Commit 8f2287e4 by 谢中龙

限购修改

parent 752fa735
......@@ -6,7 +6,7 @@
// 修改 BRANCH_ID 为对应的商户id
// 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
//泰华 2006 , wx40fec8944623c8b3
......@@ -15,7 +15,7 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
//苏州邻里 2003
//2012 悦芙媞 wxfe14ebde4a6eea3d
//2010 热风 wxe6d270a3e399ade9
const BRANCH_ID = 3001
const BRANCH_ID = 1002
const isMall = true
const needMock = '' //
......
......@@ -628,28 +628,19 @@ wxService.page({
else{
//有商品限购了,组织提示语
let tips = '根据限购规则以下商品限购:\r\n';
let tempArr = [];
data.forEach(item => {
let txt = '';
//limitType 1 每人限购 2每次限购
if (item.limitType == 1){
if (item.canBuy == 0) {
txt = item.productName
}
else {
txt = item.productName + ',限购数:' + item.canBuy;
let tempObj = data[0];
//每人限购
if (tempObj.limitType == 1){
tips = `商品"${tempObj.productName}"每人限购${tempObj.limitNum}件`;
}
//每次限购
else if (tempObj.limitType == 2){
tips = `商品"${tempObj.productName}"每次限购${tempObj.limitNum}件`;
}
else if (item.limitType == 2){
txt = item.productName + ',限购数:' + item.limitNum;
}
tempArr.push(txt);
});
wx.showModal({
title: '商品限购提醒',
content: tips + tempArr.join('\r\n'),
content: tips,
confirmText : '好的',
confirmColor: '#cb3c3c',
showCancel: false,
......
......@@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
"appid": "wx313ec36b710125d4",
"appid": "wxac09792264c49b5c",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": {
"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