Browse Source

版本1.6.35 修改拼团购报名提示内容;

release
ZhaoTongYao 4 years ago
parent
commit
cb01daff88
  1. 2
      pages/toRegister/toRegister.js
  2. 21
      subpages/heart/pages/groupBuyDetail/groupBuyDetail.js
  3. 6
      subpages/heart/utils/api.js
  4. 2
      subpages/home/pages/newsDetail/newsDetail.js
  5. 4
      utils/config.js

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// } // }
// }) // })
let that = this let that = this
const versionNum = "1.6.34" const versionNum = "1.6.35"
api.getScanSwitch(versionNum).then(function (res) { api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data) console.log(res.data)
let state = res.data.scanFlag let state = res.data.scanFlag

21
subpages/heart/pages/groupBuyDetail/groupBuyDetail.js

@ -21,6 +21,7 @@ Page({
dialogVisible: false, //提示框 dialogVisible: false, //提示框
dialogTitle: '', //提示内容 dialogTitle: '', //提示内容
lock: false, lock: false,
configPoint: 0,
}, },
/** /**
@ -33,6 +34,7 @@ Page({
detailType: options.type || '', detailType: options.type || '',
details: {} details: {}
}) })
this.getResidentConfig()
this.getNoticeDetail() this.getNoticeDetail()
this.getEvaluationList() this.getEvaluationList()
}, },
@ -227,7 +229,7 @@ Page({
let _this = this let _this = this
let tip = '是否要取消报名?' let tip = '是否要取消报名?'
if (status == 0) { if (status == 0) {
tip = '是否要报名?' tip = `若您报名后,未购买当前商品,系统将会扣除您${this.data.configPoint}积分`
} else { } else {
tip = '是否要取消报名?' tip = '是否要取消报名?'
} }
@ -294,5 +296,22 @@ Page({
} else { } else {
return false return false
} }
},
// 获取默认配置, 提示扣除积分
getResidentConfig (){
let that = this
api.getResidentConfig().then(res => {
if (res.code === 0 && res.msg === "success") {
res.data.forEach(item => {
if (item.residentType === "poins_config" && item.residentCode === "points_ptg_dishonest") {
that.setData({
configPoint: parseInt(item.residentValue)
})
}
})
}
}).catch(err => {
console.log(err)
})
} }
}) })

6
subpages/heart/utils/api.js

@ -20,6 +20,7 @@ module.exports = {
getGroupBuySignUpList, getGroupBuySignUpList,
tradeConfirmation, tradeConfirmation,
signUpOrCancel, signUpOrCancel,
getResidentConfig
} }
//顺道捎-首页列表 //顺道捎-首页列表
@ -141,3 +142,8 @@ function tradeConfirmation (para) {
function signUpOrCancel (para) { function signUpOrCancel (para) {
return fly.post("custom/groupBuy/signUpOrCancel", para) return fly.post("custom/groupBuy/signUpOrCancel", para)
} }
// 获取居民端配置
function getResidentConfig () {
return fly.get("residentConfig/getResidentConfig")
}

2
subpages/home/pages/newsDetail/newsDetail.js

@ -169,7 +169,7 @@ Page({
api_getResidentConfig.getResidentConfig().then(res => { api_getResidentConfig.getResidentConfig().then(res => {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
res.data.forEach(item => { res.data.forEach(item => {
if (item.residentType === "poins_config") { if (item.residentType === "poins_config" && item.residentCode === "news_browse_time") {
that.setData({ that.setData({
residentValue:parseInt(item.residentValue) residentValue:parseInt(item.residentValue)
}) })

4
utils/config.js

@ -6,8 +6,8 @@ module.exports = {
}; };
function BASEURL() { function BASEURL() {
return 'https://epdc-jinan-test.elinkservice.cn/js/epdc-api/api/' // 锦水测试环境 // return 'https://epdc-jinan-test.elinkservice.cn/js/epdc-api/api/' // 锦水测试环境
// return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
// return 'http://192.168.43.8:9094/epdc-api/api/' // return 'http://192.168.43.8:9094/epdc-api/api/'
// return 'https://nei.netease.com/api/apimock-v2/068b11343b2a993a9292d11f4b3fa8a8/api/' // return 'https://nei.netease.com/api/apimock-v2/068b11343b2a993a9292d11f4b3fa8a8/api/'
} }

Loading…
Cancel
Save