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