Ver código fonte

本地生活-地区选择功能
商家二维码参数修改

xiaomei 1 ano atrás
pai
commit
c7c30fc502

+ 2 - 2
src/pages/index/index.vue

@@ -120,7 +120,7 @@ export default {
             homeImg: "", //活动列表
             productList: [], //商品数据
             searchKey: "", //搜索关键词
-            LocationCity: "深圳",
+            LocationCity: "中国",
             showAddress: false,
             tabs: [],
             totalBytesWritten: "0B", // 已经下载的数据长度
@@ -260,7 +260,7 @@ export default {
             post("local/hotel/city", { longitude: lng, latitude: lat }).then(res => {
                 if (res.code == 0) {
                     let da = res.data
-                    this.LocationCity = da.cityName;
+                    // this.LocationCity = da.cityName;
                 }
             })
         },

+ 10 - 3
src/pages/settledMerchant/index.vue

@@ -44,10 +44,11 @@ export default {
                 latitude: "",
                 longitude: "",
                 page: 1,
-                rows: 20
+                rows: 20,
+                city: ""
             },
             pageData: {},
-            LocationCity: "深圳",
+            LocationCity: "中国",
             showAddress: false,
         };
     },
@@ -89,7 +90,7 @@ export default {
             post("local/hotel/city", { longitude: lng, latitude: lat }).then(res => {
                 if (res.code == 0) {
                     let da = res.data
-                    this.LocationCity = da.cityName;
+                    // this.LocationCity = da.cityName;
                 }
             })
         },
@@ -97,6 +98,12 @@ export default {
         selectaddress(da) {
             this.LocationCity = da.cityName;
             this.showAddress = false;
+            this.Query.latitude = da.lat;
+            this.Query.longitude = da.lng;
+            this.Query.page = 1
+            this.Query.city = da.cityName
+            this.list = []
+            this.getList()
         },
     },
     onLoad(da) {

+ 3 - 3
src/pagesC/components/createCode/index.vue

@@ -30,11 +30,11 @@ export default {
             this.title = da.name
             this.isLoading = true
             uni.showLoading({ title: '加载中...', mask: true })
-            this.getQrcode(da.id)
+            this.getQrcode(da)
         },
         // 获取商家码
-        async getQrcode(merchant_id){
-            let res = await post("v1/merchant/xcxqrcode",{merchant_id})
+        async getQrcode(da){
+            let res = await post("v1/merchant/xcxqrcode",da)
             if(res.code == 0) {
                 console.log(res.data);
                 this.qrcode = res.data;

+ 1 - 1
src/pagesC/settledMerchant/myBusiness.vue

@@ -17,7 +17,7 @@
                             <span class="commentScore">{{i.score}}分</span>
                         </div>
                     </div>
-                    <div class="twocode iconfont" @click="showcode({id:i.id,name:i.name})" v-if="i.status == 2">&#xe635;</div>
+                    <div class="twocode iconfont" @click="showcode({merchant_id:i.merchant_id,shop_id:i.shopt_id,name:i.name})" v-if="i.status == 2">&#xe635;</div>
                 </div>
                 <div class="p1 flex_r">
                     <div>商户姓名:{{i.contact}}</div>

+ 3 - 3
src/pagesC/settledMerchant/myShop.vue

@@ -28,10 +28,10 @@
                             <span class="commentScore">{{i.score}}分</span>
                         </div>
                     </div>
-                    <div class="twocode iconfont" @click.stop="showcode({id:i.shop_id,name:i.name})">&#xe635;</div>
+                    <div class="twocode iconfont" @click.stop="showcode({merchant_id:i.merchant_id,shop_id:i.shop_id,name:i.name})">&#xe635;</div>
                 </div>
                 <div class="p1 flex_r flex_jb flex_ac">
-                    <div class="l"><span class="iconfont">&#xe9d2;</span>业务员:{{i.nickname}}</div>
+                    <div class="l"><span class="iconfont">&#xe9d2;</span>业务员:{{i.nickname || ""}}</div>
                     <div class="r" @click.stop="copyText(i.mobile)"><span class="iconfont">&#xe9d3;</span>电话:{{i.mobile}}<span class="iconfont copy">&#xe602;</span></div>
                 </div>
                 <div class="p1 flex_r flex_jb flex_ac" v-if="i.user_nickname">
@@ -84,7 +84,7 @@ export default {
             this.goto("/pagesC/settledMerchant/merchantDetail", { id })
         },
         showcode(da) {
-            if(da.id) this.$refs.createCode.showCanvas(da)
+            if(da.merchant_id) this.$refs.createCode.showCanvas(da)
         },
         // 复制账号
         copyText(e) {