From d7bff5fd3696f4b504ecc2ca66c1deab8ae24079 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 27 Aug 2021 20:12:32 +0800 Subject: [PATCH] no message --- pages/home/factory-info/index.js | 8 +++++++- pages/process/payment/index.js | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pages/home/factory-info/index.js b/pages/home/factory-info/index.js index 894cb90..10a3be7 100644 --- a/pages/home/factory-info/index.js +++ b/pages/home/factory-info/index.js @@ -17,7 +17,13 @@ Scene({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - this.setData({ settlePriceType: String(app.userInfo.factory.settlePriceType), settleType: String(app.userInfo.factory.settleType)}) + if(app.userInfo.factory.settlePriceType){ + this.data.settlePriceType = String(app.userInfo.factory.settlePriceType) + } + if(app.userInfo.factory.settleType){ + this.data.settleType = String(app.userInfo.factory.settleType) + } + this.setData({ settlePriceType: this.data.settlePriceType, settleType: this.data.settleType}) }, onTypeChange: function({detail}){ this.setData({ settlePriceType: detail }) diff --git a/pages/process/payment/index.js b/pages/process/payment/index.js index 3cd76bf..ebd954c 100644 --- a/pages/process/payment/index.js +++ b/pages/process/payment/index.js @@ -73,9 +73,8 @@ Scene({ result.data.productName = productName result.data.settleWeight = settleWeight result.data.settlePrice = this.data.amount - var settleType = app.userInfo.factory.settleType - if(settleType){ - this.data.settleType = String(settleType) + if(app.userInfo.factory.settleType){ + this.data.settleType = String(app.userInfo.factory.settleType) } this.setData({ orderList: [result.data], settleType: this.data.settleType, amount: this.data.amount, orderStatus: result.data.orderStatus }) this.fetchCustomerInfo(result.data)