From 786c29034743cb759f92ae3c617549f67f753315 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Tue, 12 Nov 2024 15:05:51 +0800 Subject: [PATCH] 1 --- app.js | 2 +- pages/info/postProductInfo/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 2d8e4ba..8daa8ad 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest149? true : false; + data.isTest = data.isTest148? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 3afaff8..22e9eb8 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -75,7 +75,8 @@ Page({ res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0 let resData = res.data - if (resData.product_data) { + try { + if (resData.product_data && resData.is_package==1) { for(let key in resData.product_data) { resData.product_data[key] = JSON.parse(resData.product_data[key]) } @@ -89,6 +90,7 @@ Page({ // resData.product_data["食"] = JSON.parse(resData.product_data["食"]) // } } + } catch(e) {} this.setData({ info: resData,