更新弹窗
This commit is contained in:
parent
6652da2387
commit
e7ce4124d0
@ -75,8 +75,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="log_out" v-if="$store.state.app.token" @click="logout">退出登录</view>
|
<view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</view>
|
||||||
<view class="log_out" v-else @click="login">登录账号</view>
|
<view class="log_out" v-else @click="login">登录账号</view>
|
||||||
|
|
||||||
|
<u-modal :show="modelShow" title="警告" content='确定要退出登录吗' closeOnClickOverlay showCancelButton @close="modelShow=false" @cancel="modelShow=false" @confirm="logout"></u-modal>
|
||||||
<!-- <tabbar></tabbar> -->
|
<!-- <tabbar></tabbar> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -96,6 +98,7 @@
|
|||||||
return {
|
return {
|
||||||
myOaData: myOaData,
|
myOaData: myOaData,
|
||||||
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
||||||
|
modelShow: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
@ -107,6 +110,9 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.getOaUserInfo();
|
this.getOaUserInfo();
|
||||||
},
|
},
|
||||||
|
onHide() {
|
||||||
|
this.modelShow = false;
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
eyeType() {
|
eyeType() {
|
||||||
return this.$store.state.config.eyeType;
|
return this.$store.state.config.eyeType;
|
||||||
@ -124,19 +130,19 @@
|
|||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.showModal({
|
// uni.showModal({
|
||||||
content: '确定要退出登录吗',
|
// content: '确定要退出登录吗',
|
||||||
success: (e) => {
|
// success: (e) => {
|
||||||
if (e.confirm) {
|
// if (e.confirm) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/oaLogin/oaLogin?clear='+true,
|
url: '/pages/oaLogin/oaLogin?clear='+true,
|
||||||
success() {
|
success() {
|
||||||
that.$store.commit('CLEAR');
|
that.$store.commit('CLEAR');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
async getOaUserInfo() {
|
async getOaUserInfo() {
|
||||||
const res = await userInfo();
|
const res = await userInfo();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user