|
@@ -37,29 +37,35 @@
|
|
|
<view v-for="(item,index) in shopData" :key="index">
|
|
|
<view class="shopBox">
|
|
|
<view class="shopTop">
|
|
|
- <view class="shopName">门店名称门店名称门店名称称门店名称</view>
|
|
|
- <!-- 地址和电话 -->
|
|
|
- <view class="addresAndPhone">
|
|
|
- <image class="ditu" src="../../static/img/icon_daohang_def@2x.png" mode="widthFix">
|
|
|
- </image>
|
|
|
- <image class="phone" src="../../static/img/icon_phone_def@2x.png" mode="widthFix">
|
|
|
- </image>
|
|
|
- </view>
|
|
|
+ <view class="shopName">{{item.ShopName}}</view>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 地址 和电话 图标 -->
|
|
|
+ <image class="tubiao" src="../../static/img/icon_daohang_def@2x.png" @click="goAddress(item)">
|
|
|
+ </image>
|
|
|
+ <image class="tubiao" src="../../static/img/icon_phone_def@2x.png"
|
|
|
+ @click="call(item.ContactorPhone)">
|
|
|
+ </image>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
</view>
|
|
|
- <!-- 门店类型-开业时间-联系人 -->
|
|
|
- <view class="shopType"><text style='color: #B98B5D;'>门店类型</text> · 开业时间 · 联系人:{{lianxiren}}</view>
|
|
|
- <!-- 详细地址 -->
|
|
|
- <view class="addressView">
|
|
|
- <view class="address">山东省济南市历下区齐鲁软件园创业广场广场…</view>
|
|
|
- <view class="distance">1.6km</view>
|
|
|
+ <!-- 门店类型-开业时间-联系人 -->
|
|
|
+ <view class="shopType"><text style='color: #B98B5D;'>{{item.levelName}}</text> ·
|
|
|
+ <text v-if="item.OpeningTime != null">{{item.OpeningTime}}</text> 联系人:{{item.Contactor}}
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 详细地址 -->
|
|
|
+ <view class="addressView">
|
|
|
+ <view class="address">{{item.Address}}</view>
|
|
|
+ <view class="distance">{{item.distance}}km</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 提交信息 -->
|
|
|
<view class="tijao">
|
|
|
- <view class="time">距上次提交:<text style='color: #FF4F00;'>30</text>天</view>
|
|
|
- <view class="xiangmu"><text style='color: #FF4F00;'>2</text>项需要检测</view>
|
|
|
+ <view class="time">距上次提交:<text style='color: #FF4F00;'>{{item.maxTime}}</text>天</view>
|
|
|
+ <view class="xiangmu"><text style='color: #FF4F00;'>{{item.checkCount}}</text>项需要检测</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- btns -->
|
|
@@ -73,7 +79,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 上拉 加载更多 -->
|
|
|
- <view class="noMore" v-if="noMoreShow">没有更多数据</view>
|
|
|
+ <!-- <view class="noMore" v-if="noMoreShow">没有更多数据</view> -->
|
|
|
<!-- 无数据空白页 -->
|
|
|
<view class="nodataBox" v-if="shopData.length == 0">
|
|
|
<image src="../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
|
|
@@ -91,10 +97,9 @@
|
|
|
lng: '',
|
|
|
lat: '',
|
|
|
firstIndex: null,
|
|
|
- firstName: '',
|
|
|
firstArr: ['不限', '1-15天', '15-30天', '30天以上'],
|
|
|
isHave: false,
|
|
|
- shopData: [1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
|
|
|
+ shopData: [],
|
|
|
page: 1,
|
|
|
noMoreShow: false,
|
|
|
}
|
|
@@ -109,7 +114,7 @@
|
|
|
that.lat = res.latitude
|
|
|
|
|
|
that.page = 1
|
|
|
- //that.getShopData()
|
|
|
+ that.getShopData()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -122,37 +127,57 @@
|
|
|
searchDone() {
|
|
|
this.searchValue = e.target.value;
|
|
|
this.page = 1
|
|
|
- // this.getShopData()
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
bindPickerChange(e) {
|
|
|
this.firstIndex = Number(e.target.value)
|
|
|
- this.firstName = this.firstArr[this.firstIndex]
|
|
|
this.page = 1
|
|
|
- // this.getShopData()
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
changeHave() {
|
|
|
this.isHave = !this.isHave
|
|
|
this.page = 1
|
|
|
- // this.getShopData()
|
|
|
+ this.getShopData()
|
|
|
+ },
|
|
|
+ goAddress(v) {
|
|
|
+
|
|
|
+ uni.openLocation({
|
|
|
+ latitude: Number(v.lat),
|
|
|
+ longitude: Number(v.lng),
|
|
|
+ name: v.shopName,
|
|
|
+ address: v.Address,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ call(e) {
|
|
|
+ if (e.length != 0) {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: e
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
|
|
|
getShopData() {
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
- })
|
|
|
- let url = 'accompany/SuperAccounts/queryShopListByManagerID',
|
|
|
+ })
|
|
|
+ var maxTime = ''
|
|
|
+ if(this.firstIndex == 0){
|
|
|
+ maxTime = ''
|
|
|
+ }
|
|
|
+
|
|
|
+ let url = 'accompany/SuperAccounts/queryShopListByMyTeam',
|
|
|
params = {
|
|
|
- page: this.page,
|
|
|
- limit: 20,
|
|
|
- managerID: this.managerID,
|
|
|
+ // page: this.page,
|
|
|
+ // limit: 20,
|
|
|
shopName: this.searchValue,
|
|
|
lng: this.lng,
|
|
|
- lat: this.lat,
|
|
|
+ lat: this.lat,
|
|
|
+ maxTime:maxTime,
|
|
|
+ checkCount:Number(this.isHave),
|
|
|
}
|
|
|
this.$http(url, params, 'GET').then(res => {
|
|
|
- var list = res.data.Items
|
|
|
+ var list = res.data
|
|
|
|
|
|
// 处理 undefined和null转为空白字符串
|
|
|
list.forEach((item, index) => {
|
|
@@ -160,15 +185,19 @@
|
|
|
item[key] = this.$praseStrEmpty(item[key])
|
|
|
}
|
|
|
})
|
|
|
+ this.shopData = list
|
|
|
|
|
|
- if (list.length < 20) {
|
|
|
- this.noMoreShow = true
|
|
|
- }
|
|
|
- if (this.page == 1) {
|
|
|
- this.shopData = list
|
|
|
- } else {
|
|
|
- this.shopData = this.shopData.concat(list)
|
|
|
- }
|
|
|
+
|
|
|
+ // if (this.page == 1 && list.length == 0) {
|
|
|
+ // this.noMoreShow = false
|
|
|
+ // } else if (list.length < 20) {
|
|
|
+ // this.noMoreShow = true
|
|
|
+ // }
|
|
|
+ // if (this.page == 1) {
|
|
|
+ // this.shopData = list
|
|
|
+ // } else {
|
|
|
+ // this.shopData = this.shopData.concat(list)
|
|
|
+ // }
|
|
|
|
|
|
})
|
|
|
},
|
|
@@ -181,10 +210,10 @@
|
|
|
uni.stopPullDownRefresh();
|
|
|
}, 1000);
|
|
|
},
|
|
|
- onReachBottom() {
|
|
|
- this.page++;
|
|
|
- this.getShopData()
|
|
|
- },
|
|
|
+ // onReachBottom() {
|
|
|
+ // this.page++;
|
|
|
+ // this.getShopData()
|
|
|
+ // },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -291,24 +320,19 @@
|
|
|
}
|
|
|
|
|
|
.shopName {
|
|
|
-
|
|
|
font-size: 30rpx;
|
|
|
font-weight: bold;
|
|
|
color: #3C3C3C;
|
|
|
- margin-right: 20rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ width: 500rpx;
|
|
|
}
|
|
|
|
|
|
- .addresAndPhone {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- width: 136rpx;
|
|
|
+ .tubiao {
|
|
|
+ width: 48rpx;
|
|
|
+ height: 48rpx;
|
|
|
+ padding-left: 40rpx;
|
|
|
}
|
|
|
|
|
|
- .ditu,
|
|
|
- .phone {
|
|
|
- width: 48rpx;
|
|
|
- height: 48rpx;
|
|
|
- }
|
|
|
|
|
|
.shopType {
|
|
|
padding: 10rpx 20rpx;
|
|
@@ -320,7 +344,9 @@
|
|
|
padding: 10rpx 20rpx;
|
|
|
display: flex;
|
|
|
font-size: 26rpx;
|
|
|
- color: #999999;
|
|
|
+ color: #999999;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
}
|
|
|
|
|
|
.address {
|