aircraft-pilot/aircraft/server/my/child_pages/setting.vue

82 lines
1.5 KiB
Vue
Raw Normal View History

2025-07-02 14:58:38 +08:00
<!-- 个人信息 -->
<template>
2025-07-14 18:41:30 +08:00
<view class="aircraft-setting">
2025-07-02 14:58:38 +08:00
<u-toast ref="uToast"></u-toast>
<Loading :show="loading" />
</view>
</template>
<script>
import configService from '@/common/config.service.js';
export default {
// #ifdef MP
options: {
styleIsolation: 'shared'
},
// #endif
data() {
return {
// #ifdef MP
// 微信小程序自定义导航栏参数
StatusBar: this.StatusBar || 0,
CustomBarHeight: this.Custom.height+(this.Custom.top-this.StatusBar)*2 || 0,
// #endif
loading: true, // 加载
2025-07-14 18:41:30 +08:00
2025-07-02 14:58:38 +08:00
}
},
computed:{
2025-07-14 18:41:30 +08:00
2025-07-02 14:58:38 +08:00
},
methods: {
// 返回
back() {
uni.navigateBack();
},
// 提交申请
async submit(e){
2025-07-14 18:41:30 +08:00
2025-07-02 14:58:38 +08:00
},
// 注销
logout(){
let that = this;
uni.showModal({
title: '注销',
content: '是否确认退出登录?',
confirmColor: '#94d500',
success: async(res) => {
if (res.confirm) {
that.$u.vuex('vuex_token', '');
that.$u.vuex('user_message', {});
that.form = {};
that.$api.logOut();
// that.$emit('userLogOut');
uni.navigateBack({complete() {
setTimeout(()=>{
uni.showToast({
icon: 'none',title: '退出登录成功!'
})
},300);
}})
}
}
})
}
},
onLoad(options) {
try{
this.form = JSON.parse(this.$store.state.user_message);
}catch(e){
this.form = {};
}finally{
this.loading = false;
}
},
}
</script>
<style scoped lang="scss">
2025-07-14 18:41:30 +08:00
.aircraft-setting {
2025-07-02 14:58:38 +08:00
}
</style>