12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!-- 设置 -->
- <template>
- <view class="setting">
- <u-cell-group>
- <u-cell-item icon="setting-fill" title="退出登录" @click=" logoutModal = true"></u-cell-item>
- </u-cell-group>
- <!-- 退出登录提示框 -->
- <u-modal
- v-model="logoutModal"
- width="70%"
- @confirm="logout"
- content="您确认退出登录吗?"
- :show-cancel-button="true"
- />
- </view>
- </template>
- <script>
- export default {
- name: 'Setting',
- data() {
- return {
- // 登出提示框
- logoutModal: false
- }
- },
- methods: {
- /**
- * 退出登录
- */
- logout() {
- this.$u.vuex('vuex_hasLogin', false);
- this.$u.vuex('vuex_token', '');
- this.$u.vuex('vuex_user', '');
- this.$u.route('/pages/phoneLogin/phoneLogin');
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|