123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- // pages/art/art.js
- const APIClient = require('../../utils/APIClient.js');
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
-
- },
- /**
- * 组件的初始数据
- */
- data: {
- flag: false,
- productionData: {},
- questionsData: {}
- },
- /**
- * 组件的方法列表
- */
- methods: {
- shareImage: function(e) {
- console.log(e.target.dataset.flag)
- }
- },
- ready () {
- /* 区分答疑和分享 */
- let distinction = (type, success) => {
- APIClient.getProductionSchedule({
- uid: 'e7e0d43a-36b1-4e71-a3a3-61469c90d0a2'
- }, {
- "userId": "e7e0d43a-36b1-4e71-a3a3-61469c90d0a2",
- "type": type,
- "columnId": "41209f14-05ba-11e8-9771-080027fcfc4b",
- "pageNo": 1,
- "pageSize": 2
- }).success(success)
- };
- /* 分享 */
- distinction(2, res => {
- console.log(res.data.data)
- this.setData({
- productionData: res.data.data,
- })
- });
- /* 答疑 */
- distinction(1, res => {
- console.log(res.data)
- this.setData({
- questionsData: res.data.data,
- })
- })
- },
- })
|