Commit 77de0c78 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 e557afad 8c11cfa3
......@@ -120,7 +120,7 @@ Page({
if (res.code == 0) {
this.setData({
//0-关闭,1-打开
isEnabled: res.data.isEnabled == 0 ? false : true
isEnabled: res.data?res.data.isEnabled == 0 ? false : true:false
})
resolve()
}
......
......@@ -39,6 +39,7 @@ Page({
this.searchScoreSummaryData()
this.getScoreProfitListData()
},
getPointsWalletData() {
const {
phone,
......@@ -231,15 +232,18 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {
onShow(){
if (this.refresh){
this.searchScoreSummaryData()
this.getScoreProfitListData()
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.refresh = true;
},
/**
......
......@@ -6,7 +6,7 @@ Page({
*/
data: {
navStyle: "background-color: transparent;",
showBank: true,
showBank: false,
agree: false,
isConfig: true,
showAuthDialog: false,
......@@ -209,6 +209,7 @@ Page({
},
// 价格输入校验规则(提现积分值:最小值需大于0)
priceVerify(price, max, min = 0) {
console.log(price, max, min = 0)
let result = 0
// 1.限制小数点为2位
price = price.replace(/[^\d.]/g, "")
......@@ -227,18 +228,15 @@ Page({
price = '0.'
}
}
// if (price.indexOf('.') != -1) {
// price = price.slice(0, price.indexOf('.'))
// }
result = price
// 4.判断最大值和最小值
if (price) {
price = Number(price)
max = Number(max)
if (max && price > max) {
if ((max||max===0) && price > max) {
result = max
}
if (min && price < min) {
if ((min||min===0) && price < min) {
result = min
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!