From 706c7f00fcdb1c1df0bfec9ff786741c269e7b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Tue, 22 Nov 2022 17:59:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=98=AF=E5=90=A6=E5=B7=B2?= =?UTF-8?q?=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/js/config.js | 2 +- pages/customer/addCard/index.js | 23 +++++++++++++++++++++++ pages/customer/addCard/index.wxml | 15 ++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/commons/js/config.js b/commons/js/config.js index e8b5f94..5fd6040 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/customer/addCard/index.js b/pages/customer/addCard/index.js index dc0f99e..a77f55d 100644 --- a/pages/customer/addCard/index.js +++ b/pages/customer/addCard/index.js @@ -35,6 +35,8 @@ Page({ city_id:'', countyIndex:-1, county_id:'', + + isShowExist:false, //客户是否已存在 }, //生命周期函数--监听页面加载 onLoad: function (options) { @@ -406,6 +408,13 @@ Page({ this.setData({ submitFlag: false, }) + if(res.data.id){ + wx.hideToast(); + this.setData({ + isShowExist: true, + exist: res, + }) + } }); } }, @@ -550,4 +559,18 @@ Page({ } }, + //查看存在客户信息 + viewDetails(e){ + wx.redirectTo({ + url: '/pages/customer/detail/index?id=' + this.data.exist.data.id + }) + }, + + //关闭客户已存在提示 + colseExist(){ + this.setData({ + isShowExist: false, + }) + }, + }) \ No newline at end of file diff --git a/pages/customer/addCard/index.wxml b/pages/customer/addCard/index.wxml index d3ac558..97d2fe1 100644 --- a/pages/customer/addCard/index.wxml +++ b/pages/customer/addCard/index.wxml @@ -154,4 +154,17 @@ - \ No newline at end of file + + + + + + + {{exist.msg}} + + + + + + + \ No newline at end of file