Commit b08e0fa1 by 王志慧

积分

1 parent e93be1fb
...@@ -6,8 +6,7 @@ Page({ ...@@ -6,8 +6,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
score: { score: {},
},
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
...@@ -18,13 +17,7 @@ Page({ ...@@ -18,13 +17,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
//员工积分详情
this.getWithdrawalData()
// 积分列表
this.getInMoneyList()
this.setData({
isFullSucreen: wx.$util.isFullSucreen(true)
})
}, },
//我要兑换 //我要兑换
toTiXian() { toTiXian() {
...@@ -53,7 +46,7 @@ Page({ ...@@ -53,7 +46,7 @@ Page({
this.setData({ this.setData({
pageNum: pageNum + 1 pageNum: pageNum + 1
}, () => { }, () => {
this.getInMoneyList() this.getInMoneyList()
}) })
}, },
...@@ -70,9 +63,9 @@ Page({ ...@@ -70,9 +63,9 @@ Page({
//获取员工积分详情 //获取员工积分详情
getWithdrawalData() { getWithdrawalData() {
MineApi.getScoreDetailApi().then(res => { MineApi.getScoreDetailApi().then(res => {
if(res.code ==0){ if (res.code == 0) {
this.setData({ this.setData({
score:res.data score: res.data
}) })
} }
}) })
...@@ -91,12 +84,12 @@ Page({ ...@@ -91,12 +84,12 @@ Page({
}).then((res) => { }).then((res) => {
console.log(res) console.log(res)
let data; let data;
if(res.code==0){ if (res.code == 0) {
data=res.data?.data?res.data?.data:[] data = res.data?.data ? res.data?.data : []
} }
this.setData({ this.setData({
scoreList: pageNum == 1 ? data : [...scoreList, ...data], scoreList: pageNum == 1 ? data : [...scoreList, ...data],
total: res.count, total: res.data.count,
mineTrigger: false mineTrigger: false
}) })
}); });
...@@ -112,7 +105,13 @@ Page({ ...@@ -112,7 +105,13 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
//员工积分详情
this.getWithdrawalData()
// 积分列表
this.getInMoneyList()
this.setData({
isFullSucreen: wx.$util.isFullSucreen(true)
})
}, },
/** /**
......
...@@ -417,7 +417,7 @@ Page({ ...@@ -417,7 +417,7 @@ Page({
}) })
this.getVersionInfo() this.getVersionInfo()
this.getByYqShop() this.getByYqShop()
this.getStaffBankList() // this.getStaffBankList()
// console.log(app.globalData.isYqdSuper) // console.log(app.globalData.isYqdSuper)
}, },
...@@ -441,6 +441,7 @@ Page({ ...@@ -441,6 +441,7 @@ Page({
*/ */
onShow: function () { onShow: function () {
// this.getTotal() // this.getTotal()
this.getStaffBankList()
}, },
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!