From 4372744ca21226e97cdb55c940554fb6d1c21c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Tue, 28 Mar 2023 15:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A00=E9=A6=96=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/js/config.js | 2 +- pages/order/register/index.js | 18 ++++++++++++++++-- pages/order/register/index.wxml | 14 ++++++++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/commons/js/config.js b/commons/js/config.js index 2048682..c3523a4 100644 --- a/commons/js/config.js +++ b/commons/js/config.js @@ -1,4 +1,4 @@ -const env = "p"; +const env = "d"; const version = 1, diff --git a/pages/order/register/index.js b/pages/order/register/index.js index 65f53fb..b0c863b 100644 --- a/pages/order/register/index.js +++ b/pages/order/register/index.js @@ -101,6 +101,7 @@ Page({ packageList:[],//车辆选装包 options_ids:[],//选装包id数组 options_total:0,//选装包费用 + if_zero_firstpay:0,//是否0首付 }, //生命周期函数--监听页面加载 onLoad: function (options) { @@ -244,7 +245,7 @@ Page({ icon: 'none' }) } - else if(!this.data.priceinfo.sdeposit||this.data.priceinfo.sdeposit == '' ){ + else if(this.data.if_zero_firstpay!=1&&(!this.data.priceinfo.sdeposit||this.data.priceinfo.sdeposit == '')){ wx.showToast({ title: '请设置定金', icon: 'none' @@ -658,7 +659,9 @@ Page({ params['options_ids'] = that.data.options_ids; } params['price'] = that.data.priceinfo.price; - params['deposit'] = that.data.priceinfo.sdeposit; + if(that.data.if_zero_firstpay!=1){ + params['deposit'] = that.data.priceinfo.sdeposit; + } params['payway'] = that.data.paymentIndex==0?'1':'0'; params['delry_time'] = that.data.delry_time; params['business_id'] = that.data.priceinfo.id; @@ -712,6 +715,9 @@ Page({ // params['disc_fine_money'] = that.data.priceinfo.sdisc_fine_money; // } // } + if(that.data.paymentIndex==1){ + params['if_zero_firstpay'] = that.data.if_zero_firstpay; + } _.apiQuery.postAppCusorderV2(params).then(res => { //刷新列表页 @@ -1471,4 +1477,12 @@ Page({ }) }, + //是否0首付 + switchZeroFirstpay:function(e){ + this.setData({ + if_zero_firstpay:e.detail.value ? 1 :0, + 'priceinfo.sdeposit':'', + }) + }, + }) \ No newline at end of file diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml index 02908db..2fdc17b 100644 --- a/pages/order/register/index.wxml +++ b/pages/order/register/index.wxml @@ -235,7 +235,13 @@ 公司加价 {{priceinfo.price_coplus}} - + + 0首付 + + + + + 定金* @@ -497,7 +503,11 @@ 公司加价 {{priceinfo.price_coplus}} - + + 0首付 + {{if_zero_firstpay==1?'是':'否'}} + + 定金 {{priceinfo.sdeposit}}