Commit d14cde44 by liimin

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents ea8ce604 5bc787bb
......@@ -120,7 +120,7 @@ Page({
if (res.code == 0) {
this.setData({
//0-关闭,1-打开
isEnabled: res.data?res.data.isEnabled == 0 ? false : true:false
isEnabled: res.data ? res.data.isEnabled == 0 ? false : true : false
})
resolve()
}
......@@ -351,43 +351,55 @@ Page({
formData.channelSource = channelSource
formData.merchantId = merchantId
formData.merchantName = merchantName
const {
code,
message,
data
} = await wx.p.api.withdrawalApi.insetorupdateStaffBank(formData)
if (code == '0') {
//返回类型:0:失败,1:成功,2:提示 建议您不要添加同一个人的多张卡片,避免提现时个人税务汇算累积
let resultObj = {
0: () => {
this.setData({
showModal: true,
success: 'fail',
dialogText: `原因:${message}`
})
},
1: () => {
this.setData({
showModal: true,
success: 'success',
dialogText: item ? '您的银行账户修改成功!' : '您的银行账户添加成功!'
})
},
2: () => {
this.setData({
repeatShowModal: true
})
try {
const {
code,
message,
data
} = await wx.p.api.withdrawalApi.insetorupdateStaffBank(formData)
if (code == '0') {
//返回类型:0:失败,1:成功,2:提示 建议您不要添加同一个人的多张卡片,避免提现时个人税务汇算累积
let resultObj = {
0: () => {
this.setData({
showModal: true,
success: 'fail',
dialogText: `原因:${message}`
})
},
1: () => {
this.setData({
showModal: true,
success: 'success',
dialogText: item ? '您的银行账户修改成功!' : '您的银行账户添加成功!'
})
},
2: () => {
this.setData({
repeatShowModal: true
})
}
}
}
resultObj[data]()
resultObj[data]()
} else {
this.setData({
showModal: true,
success: 'fail',
dialogText: `原因:${message}`
})
// wx.$api.showToast(message)
} else {
this.setData({
showModal: true,
success: 'fail',
dialogText: `原因:${message}`
})
wx.p.sentry.reportError(`添加账户异常:${message}`, {
...formData,
message
});
// wx.$api.showToast(message)
}
} catch (err) {
wx.p.sentry.reportError(`添加账户异常:${err.message}`, {
...formData,
err
});
}
}
})
\ No newline at end of file
......@@ -112,20 +112,30 @@ Page({
}
} = this.data;
wx.p.api.withdrawalApi.searchScoreSummary({
let params = {
staffPhone: phone,
channelSource, //1.阳光激励 2.续保用户 3.管理层
merchantId
}).then(res => {
}
wx.p.api.withdrawalApi.searchScoreSummary(params).then(res => {
if (res.code == 0) {
this.setData({
scoreSummary: res.data,
staffBankFlag: !res.data.bankCardSize
})
} else {
wx.p.sentry.reportError(`积分中心异常:${res.message}`, {
...params,
res
});
}
}).catch((err) => {
wx.p.wxApi.showToast(JSON.stringify(err))
wx.p.sentry.reportError(`积分中心异常:${err}`, {
...params,
err
});
})
},
getScoreProfitListData() {
......
......@@ -36,7 +36,6 @@ Page({
*/
onLoad(options) {
wx.p.router.getRouterParams().then(params => {
console.log(params)
this.setData(params)
})
this.getBankList()
......
......@@ -34,13 +34,13 @@ Page({
if (num === null || num === undefined || isNaN(num)) {
return '';
}
// 处理大于等于10000的数字
if (Math.abs(num) >= 10000) {
const wan = (num / 10000).toFixed(1);
// 去掉末尾的.0
return parseFloat(wan) == parseInt(wan) ? parseInt(wan) + '万' : wan + '万';
}
}
// 处理小于10000但大于等于1000的数字
else if (Math.abs(num) >= 1000) {
const qian = (num / 10000).toFixed(1);
......@@ -59,10 +59,11 @@ Page({
pageNum: 1,
pageSize: 8,
canExchange: 1,
businessType:1,
businessType: 1,
staffPhone: userInfo?.phone,
staffPlatform: userInfo?.channelSource,
merchantNo: userInfo?.merchantId
merchantNo: userInfo?.merchantId,
storeEnd: this.data.sumbitScore
}
wx.p.api.homeApi.getGoodsStockroomList(params).then(res => {
......@@ -92,12 +93,15 @@ Page({
// wx.p.wxApi.showToast('加入购物车成功')
// })
// } else {
// 获取商品详情
this.getDetail(value)
// 获取商品详情
this.getDetail(value)
// }
},
getDetail(options) {
wx.p.api.homeApi.getGoodsDetailInfo({id: options.id, businessType: 1}).then(res => {
wx.p.api.homeApi.getGoodsDetailInfo({
id: options.id,
businessType: 1
}).then(res => {
// if (res && res.specificationResponses?.length) {
// this.toGetSpecString(res, res.startQty)
// }
......@@ -131,9 +135,9 @@ Page({
}).then(res => {
if (res.code == 0) {
this.setData({
taxRateObj:{
taxRateObj: {
...res.data,
baseIncome:this.simpleWanConvert(res.data.baseIncome)
baseIncome: this.simpleWanConvert(res.data.baseIncome)
}
})
}
......@@ -173,7 +177,7 @@ Page({
sumbitScore,
disclaimerAgreementUrl,
bankId
} = this.data,{
} = this.data, {
phone,
channelSource,
merchantId,
......@@ -182,24 +186,33 @@ Page({
if (this.submit) return
this.submit = true
wx.p.wxApi.showLoading('提交中')
wx.p.api.withdrawalApi.saveWithdrawal({
let params = {
withdrawalScore: sumbitScore,
disclaimerAgreementUrl,
bankId,
merchantId,
merchantName,
channelSource:channelSource,
staffPhone:phone,
}).then(res => {
channelSource: channelSource,
staffPhone: phone,
}
wx.p.api.withdrawalApi.saveWithdrawal(params).then(res => {
wx.p.wxApi.hideLoading();
if (res.code == 0) {
wx.p.router.redirectTo('/packageIndex/pages/integral/withdrawalSuccess/withdrawalSuccess')
} else {
wx.p.wxApi.showToast(res.message)
this.submit = false
wx.p.sentry.reportError(`积分提现异常:${res.message}`, {
...params,
res
});
}
}).catch((err) => {
this.submit = false
wx.p.sentry.reportError(`积分提现异常:${err.message}`, {
...params,
err
});
wx.p.wxApi.showToast(JSON.stringify(err))
}).finally(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!