|
@@ -11,25 +11,28 @@
|
|
|
|
|
|
<!-- 门店列表 -->
|
|
|
<view class="shopContent">
|
|
|
- <view v-for="(item,index) in data" :key="index">
|
|
|
+ <view v-for="(item,index) in shopData" :key="index">
|
|
|
<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" mode="" @click="goAddress(item.address)">
|
|
|
+ <image class="tubiao" src="../../static/img/icon_daohang_def.png" mode=""
|
|
|
+ @click="goAddress(item.lng, item.lat)">
|
|
|
</image>
|
|
|
- <image class="tubiao" src="../../static/img/icon_phone_def.png" mode="" @click="call(item.phone)">
|
|
|
+ <image class="tubiao" src="../../static/img/icon_phone_def.png" mode=""
|
|
|
+ @click="call(item.ContactorPhone)">
|
|
|
</image>
|
|
|
</view>
|
|
|
|
|
|
<!-- 门店类型-开业时间-联系人 -->
|
|
|
- <view class="shopType"><text style='color: #B98B5D;'>门店类型</text> · 开业时间 · 联系人:{{lianxiren}}</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">山东省济南市历下区齐鲁软件园创业广场广广场广广场广广场广广场广</view>
|
|
|
- <view class="distance">29.6km</view>
|
|
|
+ <view class="address">{{item.Address}}</view>
|
|
|
+ <view class="distance">{{item.distance}}km</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -44,21 +47,64 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- searchValue: '',
|
|
|
- data: [1, 2, 3, 4, 5, 6, 7],
|
|
|
- lianxiren: '王老师',
|
|
|
+ searchValue: '',
|
|
|
+ managerID:'',
|
|
|
+ lng: '',
|
|
|
+ lat: '',
|
|
|
+ shopData: [],
|
|
|
}
|
|
|
},
|
|
|
+ onLoad: function(option) {
|
|
|
+ this.managerID = option.managerID
|
|
|
+ console.log(this.managerID);
|
|
|
+ var that = this
|
|
|
+ uni.getLocation({
|
|
|
+ success(res) {
|
|
|
+ that.lng = res.longitude
|
|
|
+ that.lat = res.latitude
|
|
|
+
|
|
|
+ that.getShopData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
searchDone() {
|
|
|
- this.searchValue = e.target.value;
|
|
|
+ this.searchValue = e.target.value;
|
|
|
+ this.getShopData()
|
|
|
+ },
|
|
|
+ getShopData() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ let url = 'accompany/SuperAccounts/queryShopListByManagerID',
|
|
|
+ params = {
|
|
|
+ managerID: this.managerID,
|
|
|
+ shopName: this.searchValue,
|
|
|
+ lng: this.lng,
|
|
|
+ lat: this.lat,
|
|
|
+ }
|
|
|
+ this.$http(url, params, 'GET').then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ this.shopData = res.data
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.getShopData()
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
goAddress(e) {
|
|
|
console.log('地图导航');
|
|
|
},
|
|
|
- call(e) {
|
|
|
- console.log('打电话');
|
|
|
- },
|
|
|
+ call(e) {
|
|
|
+ if(e.length != 0) {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber:e
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -108,8 +154,8 @@
|
|
|
}
|
|
|
|
|
|
.shopContent {
|
|
|
-
|
|
|
- padding: 0rpx 24rpx;
|
|
|
+
|
|
|
+ padding: 0rpx 24rpx;
|
|
|
padding-top: 120rpx;
|
|
|
background-color: #F4F5F7;
|
|
|
|
|
@@ -131,7 +177,7 @@
|
|
|
.shopName {
|
|
|
font-size: 30rpx;
|
|
|
color: #3C3C3C;
|
|
|
- font-weight: bold;
|
|
|
+ font-weight: bold;
|
|
|
width: 500rpx;
|
|
|
}
|
|
|
|