|
@@ -119,7 +119,7 @@
|
|
this.getIndexOptionData();
|
|
this.getIndexOptionData();
|
|
this.getStationSupData();
|
|
this.getStationSupData();
|
|
}
|
|
}
|
|
- this.getUserCode()
|
|
|
|
|
|
+ // this.getUserCode()
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
|
|
|
|
@@ -134,6 +134,9 @@
|
|
},
|
|
},
|
|
//搜索换电站
|
|
//搜索换电站
|
|
searchStation(){
|
|
searchStation(){
|
|
|
|
+ if(!this.params.code && uni.getStorageSync('token')){
|
|
|
|
+ this.getUserCode()
|
|
|
|
+ }
|
|
this.getStationSupData()
|
|
this.getStationSupData()
|
|
},
|
|
},
|
|
//获取用户code
|
|
//获取用户code
|
|
@@ -229,7 +232,10 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//跳转工单上报
|
|
//跳转工单上报
|
|
- gotoOrderUp() {
|
|
|
|
|
|
+ gotoOrderUp() {
|
|
|
|
+ if(!this.params.code && uni.getStorageSync('token')){
|
|
|
|
+ this.getUserCode()
|
|
|
|
+ }
|
|
let token = uni.getStorageSync('token')
|
|
let token = uni.getStorageSync('token')
|
|
if(!token) {
|
|
if(!token) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -242,7 +248,10 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//跳转工单页面
|
|
//跳转工单页面
|
|
- gotoOrder(type) {
|
|
|
|
|
|
+ gotoOrder(type) {
|
|
|
|
+ if(!this.params.code && uni.getStorageSync('token')){
|
|
|
|
+ this.getUserCode()
|
|
|
|
+ }
|
|
let token = uni.getStorageSync('token')
|
|
let token = uni.getStorageSync('token')
|
|
if(!token) {
|
|
if(!token) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -255,7 +264,10 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//跳转合作者页面
|
|
//跳转合作者页面
|
|
- gotoSupplier(item) {
|
|
|
|
|
|
+ gotoSupplier(item) {
|
|
|
|
+ if(!this.params.code && uni.getStorageSync('token')){
|
|
|
|
+ this.getUserCode()
|
|
|
|
+ }
|
|
let token = uni.getStorageSync('token')
|
|
let token = uni.getStorageSync('token')
|
|
if(!token) {
|
|
if(!token) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|