Commit 1c370296 by 前端

Merge branch 'SAAS+V5.8.5.2' into 'master'

上线合并

See merge request !6
2 parents 83fd9f98 1387dd04
...@@ -44,6 +44,11 @@ const getMockData = async () => { ...@@ -44,6 +44,11 @@ const getMockData = async () => {
} }
}; };
// 实时获取配置中心数据
const getConfigData = async () => {
return http.wx_request({ url: configUrl })
}
// 图片版本号 // 图片版本号
const getImageVersion = async () => { const getImageVersion = async () => {
const accountInfo = await getMockData() const accountInfo = await getMockData()
...@@ -52,5 +57,6 @@ const getMockData = async () => { ...@@ -52,5 +57,6 @@ const getMockData = async () => {
module.exports={ module.exports={
getImageVersion, getImageVersion,
getMockData
}
\ No newline at end of file \ No newline at end of file
getMockData,
getConfigData
}
...@@ -178,7 +178,7 @@ Page({ ...@@ -178,7 +178,7 @@ Page({
score score
}) })
}, },
toSumbitData() { async toSumbitData() {
let { let {
sumbitScore, sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
...@@ -196,12 +196,31 @@ Page({ ...@@ -196,12 +196,31 @@ Page({
} }
const money = this.accSub(Number(sumbitScore), 0) const money = this.accSub(Number(sumbitScore), 0)
if (money <= 0) return wx.p.wxApi.showToast(`您的积分不足,请确认后重新申请兑换`) if (money <= 0) return wx.p.wxApi.showToast(`您的积分不足,请确认后重新申请兑换`)
const pointsWithdrawalConfig = await this.getPointsWithdrawalConfig()
if (pointsWithdrawalConfig?.isOpen === true) {
wx.showModal({
title: '提示',
content: pointsWithdrawalConfig.tips || '系统升级中暂时无法使用',
showCancel: false,
confirmText: '确定',
confirmColor: '#F13C3D'
})
return false
}
wx.p.router.go('/packageIndex/pages/integral/withdrawalRules/withdrawalRules', { wx.p.router.go('/packageIndex/pages/integral/withdrawalRules/withdrawalRules', {
sumbitScore, sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankId: id bankId: id
}) })
}, },
async getPointsWithdrawalConfig() {
try {
const config = await wx.p.api.systemApi.getConfigData()
return config?.pointsWithdrawalConfig || null
} catch (error) {
return null
}
},
accSub(arg1, arg2) { accSub(arg1, arg2) {
let r1, r2, m, n; let r1, r2, m, n;
try { try {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!