|
@@ -52,12 +52,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="footer">
|
|
|
- <button type="warn" plain @click="getWaitPhoto">排队情况</button>
|
|
|
+ <button type="warn" :loading="loading" plain @click="getWaitPhoto">排队情况</button>
|
|
|
<button type="warn" @click="openLocation">立刻导航</button>
|
|
|
</view>
|
|
|
- <u-popup v-model="showPop" mode="center" width="90%" height="60%" closeable>
|
|
|
- <image class="pop-img" :src="waitPhoto"></image>
|
|
|
- </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -73,15 +70,15 @@
|
|
|
lat: '36.636193',
|
|
|
lng: '101.760521'
|
|
|
},
|
|
|
- showPop: false, // 是否显示排队弹窗
|
|
|
storeInfo: null, // 网点详细信息
|
|
|
labelList: [], // 网点标签
|
|
|
- waitPhoto: '' // 排队照片
|
|
|
+ loading: false // 是否显示排队按钮loading
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
// 获取当前经纬度
|
|
|
let _this = this
|
|
|
+ this.pageInit()
|
|
|
uni.getLocation({
|
|
|
type: 'wgs84', // 默认wgs84
|
|
|
success: function(res) {
|
|
@@ -103,6 +100,11 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ pageInit () {
|
|
|
+ this.storeInfo = null
|
|
|
+ this.labelList = []
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
// 获取网点详情信息
|
|
|
getStoreDetail (id) {
|
|
|
uni.showLoading({
|
|
@@ -152,19 +154,29 @@
|
|
|
},
|
|
|
// 获取排队情况
|
|
|
getWaitPhoto () {
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中...',
|
|
|
- mask: true
|
|
|
- })
|
|
|
+ this.loading = true
|
|
|
let deviceNo = this.storeInfo.deviceVOList && this.storeInfo.deviceVOList.length? this.storeInfo.deviceVOList[0].deviceNo :''
|
|
|
getWaitPhoto({deviceNo:deviceNo}).then(res=>{
|
|
|
- uni.hideLoading()
|
|
|
+ this.loading = false
|
|
|
if(res.status==200) {
|
|
|
- this.waitPhoto = res.data
|
|
|
- this.showPop=true
|
|
|
- } else {
|
|
|
- this.toashMsg(res.message)
|
|
|
- }
|
|
|
+ if (res.data) {
|
|
|
+ // 预览图片
|
|
|
+ uni.previewImage({
|
|
|
+ urls: [res.data],
|
|
|
+ longPressActions: {
|
|
|
+ itemList: ['发送给朋友', '保存图片', '收藏'],
|
|
|
+ success: function(data) {
|
|
|
+ console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ console.log(err.errMsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.toashMsg('暂无数据')
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
// 打开导航位置信息界面
|