Commit 47d5ab12 by kyle

token校验有效性

parent 8d8144bb
......@@ -318,6 +318,17 @@
this.provCityQry();
},
methods:{
checkToken(){
api.checkToken().then(res=>{
if(res['success']){}else{
api.obtainToken().then(res=>{
if(res.success){
uni.setStorageSync('uni-token',res.data['token']);
}
})
}
})
},
radioChange: function(evt) {
for (let i = 0; i < this.chartsLegends.length; i++) {
if (this.chartsLegends[i].value === evt.detail.value) {
......@@ -629,6 +640,9 @@
this.planningParams = {};
this.resultFlag = false;
}
},
mounted() {
this.checkToken();
}
}
</script>
......
......@@ -257,6 +257,17 @@
}
},
methods: {
checkToken(){
api.checkToken().then(res=>{
if(res['success']){}else{
api.obtainToken().then(res=>{
if(res.success){
uni.setStorageSync('uni-token',res.data['token']);
}
})
}
})
},
getFollowData(e){
this.isNeedOfficialAccountQrcode= ref(e);
console.log('父组件拿到值了',e);
......@@ -613,6 +624,9 @@
this.calcuteMethod = '2';
this.resultShowFlag = true;
}
},
mounted() {
this.checkToken();
}
}
......
......@@ -3,7 +3,7 @@
<ul>
<li v-for="item in moduleLists" :key="item.no">
<navigator :url="item.path" hover-class="other-navigator-hover">
<view class="imgContainer"><img :src="`../../static/images/${item.background}`" alt="" srcset=""></view>
<view class="imgContainer"><img :src="`/sfp/static/images/${item.background}`" alt="" srcset=""></view>
<text :style="{color:item.color}">{{item.name}}</text>
</navigator>
</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment