| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import common from '../../utils/util';
- import server from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- IsAccredit: false,
- },
- onLoad: function (options) {
- var member = "非会员";
- if (app.globalData.userInfo.IsMember == 1)
- member = "付费会员";
- this.setData({
- Height: common.getSystemHeight(),
- Member: member,
- });
- this.init();
- },
- init: function () {
- var that = this;
- server.getData('GetWXUsersAllTime?ProductID=' + app.globalData.ProgramID + '&UserID=' + app.globalData.userInfo.UserID, function (data) {
- if (data) {
- for (var i = 0; i < data.length; i++) {
- if (data[i].ID == app.globalData.ProgramID) {
- if (that.data.Member == "非会员") {
- data[i].Time = common.formatDateCHS(app.globalData.userInfo.CreateTime);
- }
- }
- }
- that.setData({
- ProductList: data,
- });
- }
- });
- wx.getSetting({
- success(res) {
- if (res.authSetting['scope.userInfo']) {
- that.setData({
- IsAccredit: true,
- });
- }
- }
- });
- },
- gotoPaylist: function () {
- var that = this;
- wx.getSetting({
- success(res) {
- if (res.authSetting['scope.userInfo']) {
- wx.navigateTo({
- url: '../about/paylist',
- });
- }
- else {
- that.getAccredit();
- }
- }
- });
- },
- gotoPayFinished: function () {
- wx.navigateTo({
- url: '../about/payfinished?type=accredit',
- });
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: '../../images/07001.png',
- }
- },
- })
|