Commit 4c87b98a authored by 刘帅阳's avatar 刘帅阳

修改

parent d3ed4816
......@@ -4,6 +4,6 @@ export default {
// baseApi:'/prod-api'//web生产
// baseApi: 'https://qf.91isoft.com/cshop'//本地测试
// baseApi: 'https://project.91isoft.com/zntg/api'//本地测试
// baseApi: 'http://127.0.0.1:8099'//本地测试
baseApi: 'https://www.hzyzntg.com/api'//本地测试
baseApi: 'http://127.0.0.1:8099'//本地测试
// baseApi: 'https://www.hzyzntg.com/api'//本地测试
}
......@@ -46,6 +46,11 @@ const install = (Vue, vm) => {
if (res.code == 200) {
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
return res.data;
} else if(res.code == 410){
Vue.prototype.$u.vuex('vuex_token', '')
Vue.prototype.$u.vuex('vuex_user', {})
Vue.prototype.$u.vuex('vuex_unit','')
Vue.prototype.$u.route('/login/login/passwordLogin');
} else {
//todo 统一处理错误信息
if(res.message){
......@@ -59,6 +64,7 @@ const install = (Vue, vm) => {
Vue.prototype.$u.http.interceptor.error = (res) => {
console.log('error',res);
if(res.code == 401){
console.log('22222222222222222222')
//跳转至登录页面
Vue.prototype.$u.route('/login/login/passwordLogin');
return true;
......
......@@ -174,6 +174,15 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
this.hotList = [...this.hotList, ...list1]
}
}).catch((err) => {
// if(err.code == 410) {
// this.$u.vuex('vuex_token', '')
// this.$u.vuex('vuex_user', '')
// this.$u.vuex('vuex_unit','')
// this.$u.route({
// url: '/login/login/passwordLogin'
// })
// }
});
......
......@@ -16,8 +16,8 @@
</view>
<view class="toptitlelist">
<view class="toptitlelist1">{{vuex_user.name}}</view>
<view class="toptitlelist2" v-if="vuex_user.nickName !== '未登录'">ID:{{vuex_user.phone}}</view>
<view class="toptitlelist2" v-if="vuex_user.nickName == '未登录'" @click="toLogin">点击登录鸿泽云智能推广系统账号
<view class="toptitlelist2" v-if="vuex_user.nickName !== '未登录' && vuex_user.name">ID:{{vuex_user.phone}}</view>
<view class="toptitlelist2" v-if="vuex_user.nickName == '未登录' || !vuex_user.name" @click="toLogin">点击登录鸿泽云智能推广系统账号
</view>
</view>
<!-- <view class="u-m-l-10 u-p-10">
......@@ -121,6 +121,7 @@
},
onShow() {
console.log('this.vuex_user',this.vuex_user)
// #ifdef H5
this.initH5()
// #endif
......
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