Browse Source

我的认证

master
453530270@qq.com 3 years ago
parent
commit
a3bc14f8ca
  1. 8
      pages.json
  2. 3
      pages/user/index.vue
  3. 22
      pages/user/mycertinfo/mycertinfo.vue
  4. 5
      utils/request/index.js

8
pages.json

@ -241,6 +241,14 @@
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/user/mycertinfo/mycertinfo",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}
],
"globalStyle": {

3
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 {

22
pages/user/mycertinfo/mycertinfo.vue

@ -0,0 +1,22 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

5
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')

Loading…
Cancel
Save