From 3c43344c7b42773931289e68a65a176852202c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Mon, 12 Jun 2023 11:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E8=90=A5=E5=BA=97=E8=BF=94=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/editInsImg/index.js | 24 +++++++-- pages/order/editInsImg/index.wxml | 90 +++++++++++++++++-------------- 2 files changed, 72 insertions(+), 42 deletions(-) diff --git a/pages/order/editInsImg/index.js b/pages/order/editInsImg/index.js index 3039727..8ef6ff9 100644 --- a/pages/order/editInsImg/index.js +++ b/pages/order/editInsImg/index.js @@ -32,6 +32,7 @@ Page({ accident_price:'', accident_rebate:0, accident_rebate_am:0, + userInfo:'', }, onLoad: function (options) { for (let key in options) { @@ -41,12 +42,23 @@ Page({ } this.getAppCusorderdata() + this.getUserInfo() }, onShow: function () { }, + //获取用户信息 + getUserInfo(){ + _.apiQuery.getUserInfo().then(res => { + this.setData({ + userInfo: res, + }) + }); + }, + + //获取订单图片 getAppCusorderdata(){ let params = {}; @@ -428,21 +440,27 @@ Page({ params['product'] = this.data.insurance_product; params['price'] = this.data.insurance_price; params['date'] = this.data.insurance_date; - params['rebate'] = this.data.insurance_rebate; + if(this.data.userInfo.biz_type==1){ + params['rebate'] = this.data.insurance_rebate; + } } else if(e.currentTarget.dataset.type=='business'){ params['type'] = 0; params['product'] = this.data.business_product; params['price'] = this.data.business_price; params['date'] = this.data.business_date; - params['rebate'] = this.data.business_rebate; + if(this.data.userInfo.biz_type==1){ + params['rebate'] = this.data.business_rebate; + } } else if(e.currentTarget.dataset.type=='accident'){ params['type'] = 2; params['product'] = this.data.accident_product; params['price'] = this.data.accident_price; params['date'] = this.data.accident_date; - params['rebate'] = this.data.accident_rebate; + if(this.data.userInfo.biz_type==1){ + params['rebate'] = this.data.accident_rebate; + } } _.apiQuery.putAppCusorderdataInfo(params).then(res => { diff --git a/pages/order/editInsImg/index.wxml b/pages/order/editInsImg/index.wxml index 69fa97e..8953e4c 100644 --- a/pages/order/editInsImg/index.wxml +++ b/pages/order/editInsImg/index.wxml @@ -34,12 +34,14 @@ 保险金额:{{insurance_img.price}}元 - - 保险返点:{{insurance_rebate}}% - - - 返点金额:{{insurance_rebate_am}}元 - + + + 保险返点:{{insurance_rebate}}% + + + 返点金额:{{insurance_rebate_am}}元 + + @@ -65,13 +67,15 @@ - - 保险返点 - - + + + 保险返点 + + + + % - % - + @@ -110,12 +114,14 @@ 保险金额:{{business_img.price}}元 - - 保险返点:{{business_rebate}}% - - - 返点金额:{{business_rebate_am}}元 - + + + 保险返点:{{business_rebate}}% + + + 返点金额:{{business_rebate_am}}元 + + @@ -141,16 +147,18 @@ - - 保险返点 - - + + + 保险返点 + + + + % - % - - - - + + + + @@ -186,12 +194,14 @@ 保险金额:{{accident_img.price}}元 - - 保险返点:{{accident_rebate}}% - - - 返点金额:{{accident_rebate_am}}元 - + + + 保险返点:{{accident_rebate}}% + + + 返点金额:{{accident_rebate_am}}元 + + @@ -217,13 +227,15 @@ - - 保险返点 - - + + + 保险返点 + + + + % - % - +