From 48bec930f2308c58d76d2065a38bebba62d9fc5c Mon Sep 17 00:00:00 2001
From: THK3121 <thk121969318@163.com>
Date: Mon, 5 Jun 2023 16:49:43 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=9B=B4=E6=96=B0=E6=97=B6?=
 =?UTF-8?q?=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .env.development                           |  2 +-
 src/views/merchant/classify/index.vue      |  2 +-
 src/views/merchant/list/index.vue          | 34 +++++++++++++---------
 src/views/product/productExamine/index.vue |  1 +
 4 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/.env.development b/.env.development
index d567ec3..29ac40c 100644
--- a/.env.development
+++ b/.env.development
@@ -3,7 +3,7 @@ ENV = 'development'
 //http://192.168.1.43:8324/admin
 // http://mer.crmeb.net/admin
 # base api
-# VUE_APP_BASE_API = 'http://0.0.0.0:8324'
+#VUE_APP_BASE_API = 'http://0.0.0.0:8324'
 #VUE_APP_BASE_API = 'https://mer1.crmeb.net'
 VUE_APP_BASE_API = 'https://crmeb-test.shop.lihaink.cn'
 #VUE_APP_BASE_API_Two = 'https://nk.lihaink.cn'
diff --git a/src/views/merchant/classify/index.vue b/src/views/merchant/classify/index.vue
index 5e07cb8..96aae14 100644
--- a/src/views/merchant/classify/index.vue
+++ b/src/views/merchant/classify/index.vue
@@ -111,7 +111,7 @@ export default {
     // 添加
     onAdd() {
       this.$modalForm(categoryCreateApi()).then(() => this.getList())
-    },
+    },  
     // 编辑
     onEdit(id) {
       this.$modalForm(categoryUpdateApi(id)).then(() => this.getList())
diff --git a/src/views/merchant/list/index.vue b/src/views/merchant/list/index.vue
index c86fb31..38d6804 100644
--- a/src/views/merchant/list/index.vue
+++ b/src/views/merchant/list/index.vue
@@ -231,7 +231,7 @@
     <el-form-item label="商圈" :label-width="formLabelWidth" >
         <el-cascader v-model="form.info"  :options="form.options"  @change="handleChange1" ></el-cascader>
         <el-cascader v-model="form.info1" :options="form.options1"   @change="handleChange2" ></el-cascader>
-        <el-cascader v-model="form.info2"  :options="form.options2"  @change="handleChange3($event,form.options2)"  ></el-cascader>
+        <el-cascader v-model="form.info2  "  :options="form.options2"  @change="handleChange3($event,form.options2)"  ></el-cascader>
     </el-form-item>
     <el-form-item label="商户账号" :label-width="formLabelWidth" prop="mer_account">
       <el-input v-model="form.mer_account" autocomplete="off" placeholder="请输入商户账号" :disabled="!add"></el-input>
@@ -449,6 +449,7 @@ export default {
         // console.log(value);
       },
      async handleChange1(value){
+      console.log(value);
         const data = {area_code:value[0]}
         const promise =  await getShopAddressApi_two(data)
         console.log(promise.data)
@@ -459,15 +460,19 @@ export default {
           }
           console.log(this.form.info1)
       },
-      async handleChange2(value){
-        const data = {street_code:value[0]}
-        const promise =  await getShopAddressApi_three(data)
-        for(let item of promise.data){
-            this.$set(item,'label',item.name)
-            this.$set(item,'value',item.id)
-          }
-        this.form.options2 = promise.data
-      },
+      async handleChange2(value,ID){
+        console.log(value,ID);
+        if(value!==value){
+          this.form.info2=0
+        }
+          const data = {street_code:value[0]}
+          const promise =  await getShopAddressApi_three(data)
+          for(let item of promise.data){
+              this.$set(item,'label',item.name)
+              this.$set(item,'value',item.id)
+            }
+          this.form.options2 = promise.data
+        },
       handleChange3(e,val){
         // let id=''
         // for(let item of val){
@@ -475,6 +480,7 @@ export default {
         //     id = item.id
         //   }
         // }
+        console.log(e);
         if(this.form.info instanceof Array){
           this.form.area_id = this.form.info[0]
         }else{
@@ -488,7 +494,7 @@ export default {
         if(this.form.info2 instanceof Array){
           this.form.village_id = this.form.info2[0]
         }else{
-          this.form.village_id = this.form.info2
+          this.form.village_id = this.form.info2[14]
         }
         // this.form.street_id = this.form.info1[0]
         // this.form.village_id = id
@@ -557,6 +563,7 @@ export default {
                 this.open2(res.message)
                 //编辑弹出层
                 this.popFormVisible=false
+                
               }
             } catch (error) {
               this.open4(error.message)
@@ -708,6 +715,7 @@ export default {
       this.add =false
       const promise = await merchantUpdateApi(id)
       console.log('promise',promise);
+      console.log(this.form);
       const res = promise.data
       this.merid = res.mer_id
       this.form.mer_name = res.mer_name //商户名称
@@ -729,10 +737,10 @@ export default {
       this.handleChange1(val)
       this.form.info1 = res.geo_address.street_id //code
       this.form.info2 = res.geo_address.village_id //id
-      
       let vala = []
+      let ID=res.geo_address.street_id
       vala.push(res.geo_address.street_id)
-      this.handleChange2(vala) 
+      this.handleChange2(vala,ID) 
       this.form.commission_rate = res.commission_rate
       this.form.mer_keyword = res.mer_keyword
       this.form.mer_address = res.mer_address
diff --git a/src/views/product/productExamine/index.vue b/src/views/product/productExamine/index.vue
index 3417005..76a5fc4 100644
--- a/src/views/product/productExamine/index.vue
+++ b/src/views/product/productExamine/index.vue
@@ -142,6 +142,7 @@
             </el-rate>
           </template>
         </el-table-column>
+        <el-table-column prop="update_time" label="更新时间" min-width="150" />
         <el-table-column prop="rank" label="排序" min-width="70" />
         <el-table-column prop="status" label="是否显示" min-width="100">
           <template slot-scope="scope">