| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- List: [],
- IsPay: true,
- IsShow: 0,
- },
- onLoad: function (options) {
- var that = this;
- var childUserID = 0;
- if (app.globalData.userInfo.ChildUserID && app.globalData.userInfo.ChildUserID != undefined)
- childUserID = app.globalData.userInfo.ChildUserID;
- var productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
- var today15 = common.formatDateCHS(common.formatTime(common.addDate("d", 15, new Date())));
- var isPay = true;
- if (productServiceTime > today15) {
- isPay = false;
- }
- that.setData({
- Containnerheight: main.getWindowHeight(),
- ProgramName: app.globalData.ProgramName,
- Version: app.globalData.Version,
- ProductServiceTime: productServiceTime,
- IsPay: isPay,
- IsShow: app.globalData.IsShow,
- ChildUserID: childUserID,
- });
- },
- gotoPay: function () {
- var payindex = 3;
- if (app.globalData.userInfo.IsFinishTask == 1)
- payindex = 2;
- wx.navigateTo({
- url: '../other/pay?paypanel=1&payindex=' + payindex,
- });
- },
- gotoBinding: function () {
- wx.navigateTo({
- url: '../other/binding',
- })
- },
- updateMember: function () {
- wx.reLaunch({
- url: '../index/index',
- })
- },
- gotoPayTemp: function (e) {
- if (app.globalData.userInfo.UserID <= 7) {
- wx.navigateTo({
- url: '../other/pay?paypanel=0&payindex=0',
- });
- }
- },
- gotoLesson: function () {
- if (app.globalData.userInfo.UserID <= 7) {
- wx.navigateTo({
- url: '../other/lessonlist',
- });
- }
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.ShareImage,
- }
- },
- })
|