From adc35cf5b1fb0945b21518c1c5c089b7fcf0dd0f Mon Sep 17 00:00:00 2001 From: wangshuai <464942911@qq.com> Date: Wed, 13 Apr 2022 17:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/center/consumer/edit.vue | 25 ++++++++++++++++++------- pages/center/consumer/index.vue | 8 ++++---- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/pages/center/consumer/edit.vue b/pages/center/consumer/edit.vue index c965299..2c6b854 100644 --- a/pages/center/consumer/edit.vue +++ b/pages/center/consumer/edit.vue @@ -39,9 +39,16 @@ * - - - + + @@ -177,13 +184,13 @@ allList:[], dataCode:'', projectId: '', // 项目ID + userInfo: {}, // 当前用户信息 } }, onLoad(e) { - const { - dataCode - } = uni.getStorageSync("weapp_session_userInfo_data"); - this.dataCode=dataCode + this.userInfo = uni.getStorageSync("weapp_session_userInfo_data"); + console.log() + this.dataCode=this.userInfo.dataCode console.log(e) // 先调用借口查询数据 this.customerId=e.id @@ -206,6 +213,9 @@ if(data.data.code==10000){ this.list = data.data.data } + }, + fail: (res) => { + console.log(res) } }) }, @@ -253,6 +263,7 @@ this.$u.get("customer/findById?",{id:this.customerId}) .then(res=>{ this.form=res + this.form.showPhone = this.form.phone&&this.form.isShow==1?this.form.phone.length==11?this.form.phone.substr(0, 3) + '****' + this.form.phone.substr(7):this.form.phone:this.form.phone&&this.form.isShow!=1?this.form.phone: '--' // 给客户等级赋值 let idx= this.levellist.findIndex(item=>item.value==res.level) if(idx!=-1){ diff --git a/pages/center/consumer/index.vue b/pages/center/consumer/index.vue index c6684f2..bf8d804 100644 --- a/pages/center/consumer/index.vue +++ b/pages/center/consumer/index.vue @@ -344,19 +344,19 @@ }, ], levelList: [{ label: 'A', - value: 0, + value: 1, isShow: false, }, { label: 'B', - value: 1, + value: 2, isShow: false, }, { label: 'C', - value: 2, + value: 3, isShow: false, }, { label: 'D', - value: 3, + value: 4, isShow: false, }, ], isRefresh: false,