Commit 8f2287e4 by 谢中龙

限购修改

parent 752fa735
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// 修改 BRANCH_ID 为对应的商户id // 修改 BRANCH_ID 为对应的商户id
// app.js 中brandId 修改为对应 // app.js 中brandId 修改为对应
const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 : //仅生产环境时 配置 :
//3001 3001 , wx313ec36b710125d4 //3001 3001 , wx313ec36b710125d4
//泰华 2006 , wx40fec8944623c8b3 //泰华 2006 , wx40fec8944623c8b3
...@@ -15,7 +15,7 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门 ...@@ -15,7 +15,7 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
//苏州邻里 2003 //苏州邻里 2003
//2012 悦芙媞 wxfe14ebde4a6eea3d //2012 悦芙媞 wxfe14ebde4a6eea3d
//2010 热风 wxe6d270a3e399ade9 //2010 热风 wxe6d270a3e399ade9
const BRANCH_ID = 3001 const BRANCH_ID = 1002
const isMall = true const isMall = true
const needMock = '' // const needMock = '' //
......
...@@ -628,28 +628,19 @@ wxService.page({ ...@@ -628,28 +628,19 @@ wxService.page({
else{ else{
//有商品限购了,组织提示语 //有商品限购了,组织提示语
let tips = '根据限购规则以下商品限购:\r\n'; let tips = '根据限购规则以下商品限购:\r\n';
let tempArr = []; let tempObj = data[0];
data.forEach(item => { //每人限购
let txt = ''; if (tempObj.limitType == 1){
//limitType 1 每人限购 2每次限购 tips = `商品"${tempObj.productName}"每人限购${tempObj.limitNum}件`;
if (item.limitType == 1){ }
if (item.canBuy == 0) { //每次限购
txt = item.productName else if (tempObj.limitType == 2){
} tips = `商品"${tempObj.productName}"每次限购${tempObj.limitNum}件`;
else { }
txt = item.productName + ',限购数:' + item.canBuy;
}
}
else if (item.limitType == 2){
txt = item.productName + ',限购数:' + item.limitNum;
}
tempArr.push(txt);
});
wx.showModal({ wx.showModal({
title: '商品限购提醒', title: '商品限购提醒',
content: tips + tempArr.join('\r\n'), content: tips,
confirmText : '好的', confirmText : '好的',
confirmColor: '#cb3c3c', confirmColor: '#cb3c3c',
showCancel: false, showCancel: false,
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
"appid": "wx313ec36b710125d4", "appid": "wxac09792264c49b5c",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E", "projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment