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