You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.4 KiB

2 years ago
var app = getApp();
var WXAPI = require('../../utils/server.js');
2 years ago
Page({
data: {
winWidth: 0,
winHeight: 0,
currentTab: 0,
angle: 0,
remind: '加载中',
detailed_commission: 0
},
//页面加载完成函数
onReady: function () {
var that = this;
that.setData({
remind: ''
});
},
onPullDownRefresh: function () {
wx.showNavigationBarLoading() //在标题栏中显示加载
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
onLoad: function (options) {
this.requestMyData();
},
/**
* 滑动切换tab
*/
bindChange: function (e) {
var that = this;
that.setData({
currentTab: e.detail.current
});
},
/**
* 点击tab切换
*/
swichNav: function (e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
// 请求我的数据
requestMyData: function () {
var that = this;
WXAPI.getWallet({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
}).then(res => {
if (res.code == 200) {
var data = res.data;
that.setData({
user: data,
list: data.list,
// list_2: data.list_2,
// list_3: data.list_3,
2 years ago
});
}
2 years ago
});
},
})