diff --git a/pages.json b/pages.json index 720af1c..8b40ddd 100644 --- a/pages.json +++ b/pages.json @@ -241,6 +241,14 @@ "navigationBarTitleText" : "", "enablePullDownRefresh" : false } + }, + { + "path" : "pages/user/mycertinfo/mycertinfo", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } } ], "globalStyle": { diff --git a/pages/user/index.vue b/pages/user/index.vue index 104e033..42d32aa 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -197,7 +197,8 @@ resolve(app.oplist) }) .catch(err => { - if (err.result && err.result.status == 401) { + // console.log("err",err); + if (err && err.statusCode == 401) { app.isLogin = false resolve(null) } else { diff --git a/pages/user/mycertinfo/mycertinfo.vue b/pages/user/mycertinfo/mycertinfo.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/user/mycertinfo/mycertinfo.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/utils/request/index.js b/utils/request/index.js index d82f44a..921e24d 100644 --- a/utils/request/index.js +++ b/utils/request/index.js @@ -109,7 +109,8 @@ $http.dataFactory = async res => { }) } - // console.log(res.response) +console.log("sdfsaf") + console.log("rsp",res.response) let httpData = res.response.data if (typeof httpData == "string") { try { @@ -141,7 +142,7 @@ $http.dataFactory = async res => { } // 判断是否需要登录 - if (httpData.status == 401) { + if (httpData.status == 401 || httpData.statusCode == 401) { // 401也有可能是后端登录态到期, 所以要清空本地的登录状态 store.dispatch('Logout')