From bba9c06808210290b710f49147487e9763318b08 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Sat, 2 Jul 2022 18:09:24 +0800 Subject: [PATCH] bug --- .../xicheng/AppMerchanGird/AddMerchan.vue | 11 +- .../xicheng/AppMerchanGird/merchanList.vue | 21 +-- .../xicheng/AppMerchantMap/AppMerchantMap.vue | 120 ++++++++++++++++-- 3 files changed, 129 insertions(+), 23 deletions(-) diff --git a/src/project/xicheng/AppMerchanGird/AddMerchan.vue b/src/project/xicheng/AppMerchanGird/AddMerchan.vue index 76382b99..285c4c19 100644 --- a/src/project/xicheng/AppMerchanGird/AddMerchan.vue +++ b/src/project/xicheng/AppMerchanGird/AddMerchan.vue @@ -112,9 +112,9 @@ this.$http.post(`/app/appgirdmembercompany/add`, { companyList: checkUserList}).then((res) => { if (res.code == 0) { this.$u.toast('提交成功') - uni.$emit('updateList') setTimeout(() => { uni.navigateBack() + uni.$emit('updateList') }, 600) } }).catch((err) => { @@ -159,6 +159,9 @@ box-sizing: border-box; margin-bottom: 30px; .item-title{ + display: flex; + align-items: center; + margin-bottom: 32px; margin-bottom: 32px; img{ width: 72px; @@ -167,13 +170,11 @@ vertical-align: middle; } p{ - display: inline-block; - width: 400px; + flex: 1; font-size: 32px; - font-family: PingFangSC-Medium, PingFang SC; font-weight: 500; color: #000; - line-height: 32px; + line-height: 1.3; } span{ display: inline-block; diff --git a/src/project/xicheng/AppMerchanGird/merchanList.vue b/src/project/xicheng/AppMerchanGird/merchanList.vue index 5429f4e2..c5165204 100644 --- a/src/project/xicheng/AppMerchanGird/merchanList.vue +++ b/src/project/xicheng/AppMerchanGird/merchanList.vue @@ -2,7 +2,6 @@
-
商户列表({{ pages }})
@@ -10,13 +9,14 @@ 取消
+
-
    +
    • - - + +
      @@ -113,6 +113,11 @@ }) }) }, + linkTo (url) { + uni.navigateTo({ + url + }) + }, changeType() { this.edit = false this.list.map((item) => { @@ -169,6 +174,8 @@ box-sizing: border-box; margin-bottom: 30px; .item-title{ + display: flex; + align-items: center; margin-bottom: 32px; img{ width: 72px; @@ -177,13 +184,11 @@ vertical-align: middle; } p{ - display: inline-block; - width: 400px; + flex: 1; font-size: 32px; - font-family: PingFangSC-Medium, PingFang SC; font-weight: 500; color: #000; - line-height: 32px; + line-height: 1.3; } span{ display: inline-block; diff --git a/src/project/xicheng/AppMerchantMap/AppMerchantMap.vue b/src/project/xicheng/AppMerchantMap/AppMerchantMap.vue index 5458c12c..74d90acb 100644 --- a/src/project/xicheng/AppMerchantMap/AppMerchantMap.vue +++ b/src/project/xicheng/AppMerchantMap/AppMerchantMap.vue @@ -2,9 +2,17 @@
      -
      +
      +
      +
      +

      {{ item.businessName }} - {{ item.bossName }}

      +

      {{ item.businessAddress }}

      +
      +
      +
      +
      @@ -24,10 +32,11 @@ polygons: [], labels: [], businessName: '', - markers: [], ops: {}, markers: [], - MarkerCluster: null + isShow: false, + MarkerCluster: null, + list: [] } }, computed: {...mapState(['user', 'config'])}, @@ -42,10 +51,25 @@ }, methods: { - getList () { + toDetail (item) { + if (!item.lat) { + return this.$u.toast('该商户尚未标记') + } + + this.businessName = '' + this.isShow = false + this.map.easeTo({ + center: new this.lib.LatLng(item.lat, item.lng), + zoom: 17 + }, { + duration: 2000 + }) + }, + + getList (isSearch) { this.$http.post('/app/appcompany/list', null, { params: { - size: 100000, + size: isSearch ? 20 : 100000, current: 1, businessName: this.businessName } @@ -53,16 +77,22 @@ if (res.code == 0) { const markers = res.data.records.filter(item => item.lat).map(item => { return { - title: item.businessName, + ...item, + title: item.businessName + '-' + item.bossName, lnglat: [item.lng, item.lat], lat: item.lat, lng: item.lng, id: item.id, - name: item.businessName + name: item.businessName + '-' + item.bossName } }) - this.getMarkerCluster(markers) + if (isSearch) { + this.list = res.data.records + this.isShow = true + } else { + this.getMarkerCluster(markers) + } } }) }, @@ -203,7 +233,77 @@