|
@@ -17,7 +17,8 @@
|
|
|
</view>
|
|
|
</picker>
|
|
|
|
|
|
- <picker value="thirdIndex" mode="selector" range-key='name' :range="thirdArr" @change="bindPickerChange3">
|
|
|
+ <picker :value="thirdIndex" mode="selector" range-key='name' :range="thirdArr"
|
|
|
+ @change="bindPickerChange3">
|
|
|
<view class="uni-input">{{thirdIndex == null ? '运营经理' : thirdArr[thirdIndex].name}}
|
|
|
<image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
|
|
|
</view>
|
|
@@ -33,29 +34,31 @@
|
|
|
<view class="shopBox">
|
|
|
<view class="shopTop">
|
|
|
|
|
|
- <view class="shopName">门店名称</view>
|
|
|
+ <view class="shopName">{{item.ShopName}}</view>
|
|
|
|
|
|
<!-- 地址 和电话 图标 -->
|
|
|
<image class="tubiao" src="../../static/img/icon_daohang_def.png"
|
|
|
- @click="goAddress(item.address)">
|
|
|
+ @click="goAddress(item.lng, item.lat)">
|
|
|
</image>
|
|
|
- <image class="tubiao" src="../../static/img/icon_phone_def.png" @click="call(item.phone)">
|
|
|
+ <image class="tubiao" src="../../static/img/icon_phone_def.png"
|
|
|
+ @click="call(item.ContactorPhone)">
|
|
|
</image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 门店类型-开业时间-联系人 -->
|
|
|
- <view class="shopType"><text style='color: #B98B5D;'>门店类型</text> · 开业时间 · 联系人:}
|
|
|
+ <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">山东省济南市历下区齐鲁软件园创业广场广广场广广场广广场广广场广</view>
|
|
|
- <view class="distance">29.6km</view>
|
|
|
+ <view class="address">{{item.Address}}</view>
|
|
|
+ <view class="distance">{{item.distance}}km</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 运营经理 -->
|
|
|
- <view class="manager">运营经理:安老师 17762277777</view>
|
|
|
+ <view class="manager">运营经理:{{item.name}} {{item.AccountName}}</view>
|
|
|
|
|
|
<!-- 历史记录 -->
|
|
|
<view class="bottomView">
|
|
@@ -67,6 +70,8 @@
|
|
|
</view>
|
|
|
</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>
|
|
@@ -90,46 +95,62 @@
|
|
|
address: null,
|
|
|
},
|
|
|
thirdIndex: null,
|
|
|
- thirdArr: [],
|
|
|
- managerId:'',
|
|
|
+ thirdArr: [],
|
|
|
+ managerId: '',
|
|
|
shopData: [],
|
|
|
-
|
|
|
+ page: 1,
|
|
|
+ noMoreShow: false,
|
|
|
+ lng: '',
|
|
|
+ lat: '',
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
-
|
|
|
- this.getManager()
|
|
|
+ var that = this
|
|
|
+ uni.getLocation({
|
|
|
+ success(res) {
|
|
|
+ that.lng = res.longitude
|
|
|
+ that.lat = res.latitude
|
|
|
+
|
|
|
+ that.page = 1
|
|
|
+ that.getShopData()
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ this.getManager()
|
|
|
+
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
searchDone(e) {
|
|
|
- this.searchValue = e.target.value;
|
|
|
+ this.searchValue = e.target.value
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
bindChange: function(e) {
|
|
|
- console.log(e)
|
|
|
this.data.provinceCode = e.detail.code[0]
|
|
|
this.data.cityCode = e.detail.code[1]
|
|
|
this.data.areaCode = e.detail.code[2]
|
|
|
this.data.province = e.detail.value[0]
|
|
|
this.data.city = e.detail.value[1]
|
|
|
this.data.area = e.detail.value[2]
|
|
|
- this.data.address = this.data.province + this.data.city + this.data.area
|
|
|
+ this.data.address = this.data.province + this.data.city + this.data.area
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
- bindPickerChange3(e) {
|
|
|
- if(e.target.value == NaN) {
|
|
|
- this.thirdIndex = 0;
|
|
|
- }
|
|
|
- else {
|
|
|
- this.thirdIndex = e.target.value;
|
|
|
- }
|
|
|
-
|
|
|
- this.managerId = this.thirdArr[this.thirdIndex].ID;
|
|
|
+ bindPickerChange3(e) {
|
|
|
+ this.thirdIndex = e.target.value
|
|
|
+ this.managerId = this.thirdArr[this.thirdIndex].ID
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
},
|
|
|
goAddress(e) {
|
|
|
console.log('地图导航');
|
|
|
},
|
|
|
call(e) {
|
|
|
- console.log('打电话');
|
|
|
+ if(e.length != 0) {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber:e
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
history() {
|
|
|
console.log('历史记录');
|
|
@@ -147,15 +168,49 @@
|
|
|
uni.hideLoading()
|
|
|
this.thirdArr = res.data
|
|
|
})
|
|
|
+ },
|
|
|
+ getShopData() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ let url = 'accompany/SuperAccounts/listCheckPage',
|
|
|
+ params = {
|
|
|
+ page: this.page,
|
|
|
+ limit: 10,
|
|
|
+ provinceCode: this.data.provinceCode,
|
|
|
+ cityCode: this.data.cityCode,
|
|
|
+ areaCode: this.data.areaCode,
|
|
|
+ manager: this.managerId,
|
|
|
+ shopName: this.searchValue,
|
|
|
+ lng: this.lng,
|
|
|
+ lat: this.lat,
|
|
|
+ }
|
|
|
+ this.$http(url, params, 'GET').then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ var list = res.data
|
|
|
+ if (list.length < 10) {
|
|
|
+ this.noMoreShow = true
|
|
|
+ }
|
|
|
+ if (this.page == 1) {
|
|
|
+ this.shopData = list
|
|
|
+ } else {
|
|
|
+ this.shopData = this.shopData.concat(list)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // onPullDownRefresh() {
|
|
|
- // this.getData()
|
|
|
- // setTimeout(function() {
|
|
|
- // uni.stopPullDownRefresh();
|
|
|
- // }, 1000);
|
|
|
- // }
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.page = 1
|
|
|
+ this.getShopData()
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
+ // onReachBottom() {
|
|
|
+ // this.page++;
|
|
|
+ // this.getShopData()
|
|
|
+ // },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -220,9 +275,7 @@
|
|
|
.shopList {
|
|
|
background-color: #F4F5F7;
|
|
|
padding: 0rpx 24rpx;
|
|
|
- position: relative;
|
|
|
- left: 0rpx;
|
|
|
- top: 200rpx;
|
|
|
+ padding-top: 200rpx;
|
|
|
}
|
|
|
|
|
|
.shopBox {
|
|
@@ -313,4 +366,11 @@
|
|
|
color: #999999;
|
|
|
padding-top: 50rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .noMore {
|
|
|
+ text-align: center;
|
|
|
+ line-height: 50rpx;
|
|
|
+ color: #999999;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
</style>
|