1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //获取应用实例
- const app = getApp()
- const util = require('../../utils/util.js');
- const APIClient = require('../../utils/APIClient.js');
- const login = require('../../utils/loginSchedule.js');
- Page({
- data: {
- recommendData: {},
- metalsStrategy: [],
- wxObjectives: ''
- },
- onLoad: function (options) {
-
-
- },
- onShow: function () {
- login.getOpenidSessionKey(res => {
- APIClient.getRecommendSchedule({
- uid: res.data.data.uid
- }).success(res => {
- console.log(res.data)
- this.setData({
- recommendData: res.data.data,
- metalsStrategy:util.strategy(res.data.data.weekPageThemeConfig.metalsStrategy),
- wxObjectives: util.strategy(res.data.data.weekPageThemeConfig.wxObjectives)
- })
- })
- }, function() {
- wx.showModal({
- title: '提示',
- content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定')
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- });
- },
-
- })
|