Browse Source

上传修改

master
前端-胡立永 9 months ago
parent
commit
be0f45933b
4 changed files with 63 additions and 1 deletions
  1. +3
    -0
      pages.json
  2. +22
    -0
      pages_order/auth/switchIdentity.vue
  3. +23
    -1
      pages_order/mine/setting.vue
  4. +15
    -0
      store/store.js

+ 3
- 0
pages.json View File

@ -110,6 +110,9 @@
},
{
"path": "work/addResume"
},
{
"path": "auth/switchIdentity"
}
]
}],


+ 22
- 0
pages_order/auth/switchIdentity.vue View File

@ -0,0 +1,22 @@
<template>
<view class="page">
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

+ 23
- 1
pages_order/mine/setting.vue View File

@ -11,6 +11,7 @@
icon="coupon"
title="切换账号"
isLink
@click="$utils.navigateTo('/pages_order/auth/wxLogin')"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;">
<template #icon>
@ -23,6 +24,7 @@
icon="coupon"
title="切换身份"
isLink
@click="$utils.navigateTo('/pages_order/auth/switchIdentity')"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;">
<template #icon>
@ -52,6 +54,7 @@
icon="coupon"
title="清理缓存"
isLink
@click="clearCache"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;">
<template #icon>
@ -64,6 +67,7 @@
icon="coupon"
title="退出登录"
isLink
@click="$store.commit('logout')"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;">
<template #icon>
@ -91,7 +95,25 @@
if (item.text === this.$t('pageTitle.languageSwitch')) {
this.$refs.changeLanguage.open();
}
}
},
//
clearCache(){
uni.showModal({
title: '确认清理缓存吗?',
success(r) {
if(r.confirm){
uni.showLoading()
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '缓存清理成功!',
icon: 'none'
})
}, 800)
}
}
})
},
},
}
</script>


+ 15
- 0
store/store.js View File

@ -113,6 +113,21 @@ const store = new Vuex.Store({
state.banner = res.result.records
})
},
logout(state){
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
state.userInfo = {}
state.role = false
uni.removeStorageSync('token')
uni.redirectTo({
url: '/pages/index/index'
})
}
}
})
},
},
actions: {},
})


Loading…
Cancel
Save