|
@@ -65,6 +65,9 @@
|
|
|
import {
|
|
|
getLookUpDatas
|
|
|
} from '@/api/data.js'
|
|
|
+ import {
|
|
|
+ getUnFinishedOrder
|
|
|
+ } from '@/api/order.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
uniNavBar,
|
|
@@ -72,7 +75,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- workStatus: 'stop',
|
|
|
+ workStatus: '',
|
|
|
mapCtx: null, // 地图对象
|
|
|
markers: [], // 标注点
|
|
|
lng: '',
|
|
@@ -84,8 +87,9 @@
|
|
|
this.mapCtx = uni.createMapContext('map')
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.workStatus = this.$store.state.vuex_workStatus
|
|
|
this.getUserLocation()
|
|
|
+ // 查询是否有未完成的订单
|
|
|
+ this.getUnFinishedOrder()
|
|
|
},
|
|
|
onLoad() {
|
|
|
// 获取订单状态数据字典
|
|
@@ -96,6 +100,15 @@
|
|
|
this.getCodeList('STORE_LABEL')
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查询是否有未完成的订单
|
|
|
+ getUnFinishedOrder(){
|
|
|
+ getUnFinishedOrder().then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if(res.status == 200){
|
|
|
+ this.workStatus = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取数据字典
|
|
|
getCodeList(code) {
|
|
|
getLookUpDatas({
|
|
@@ -241,6 +254,8 @@
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/login/login?lanuch=${false}&path=` + encodeURIComponent('/pages/userCenter/index')
|
|
|
})
|
|
|
+ }else if (res.status == '6000'){
|
|
|
+ this.toashMsg(res.message)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -288,16 +303,17 @@
|
|
|
uni.navigateTo({
|
|
|
url: res.result
|
|
|
})
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages/getOrder/getOrder?scene=100032,9691`
|
|
|
+ // })
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/pages/getOrder/getOrder?scene=100037,9998`
|
|
|
- // })
|
|
|
} else if (res.status == '9001') {
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/login/login?lanuch=${false}&path=` + encodeURIComponent('/pages/index/index')
|
|
|
})
|
|
|
+ } else if (res.status == '6000'){
|
|
|
+ this.toashMsg(res.message)
|
|
|
}
|
|
|
})
|
|
|
},
|