123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- import { getUserInfo } from '../../api/user.js';
- import { openExtrctSubscribe } from '../../utils/SubscribeMessage.js';
- const app = getApp();
- Page({
-
- data: {
- parameter: {
- 'navbar': '1',
- 'return': '1',
- 'title': '我的推广',
- 'color': true,
- 'class': '0'
- },
- userInfo:[],
- yesterdayPrice:0.00,
- isClone:false
- },
- onLoadFun:function(){
- this.getUserInfo();
- },
-
- onLoad: function (options) {
- },
- openSubscribe: function (e) {
- let page = e.currentTarget.dataset.url;
- wx.showLoading({
- title: '正在加载',
- })
- openExtrctSubscribe().then(res => {
- wx.hideLoading();
- wx.navigateTo({
- url: page,
- });
- }).catch(() => {
- wx.hideLoading();
- });
- },
-
- onReady: function () {
- },
-
- onShow: function () {
- if (app.globalData.isLog && this.data.isClone){
- this.getUserInfo();
- }
- },
-
- getUserInfo: function () {
- var that = this;
- getUserInfo().then(res=>{
- that.setData({ userInfo: res.data });
- });
- },
-
- onHide: function () {
- this.setData({isClone:true});
- },
-
- onUnload: function () {
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- }
- })
|