|
@@ -26,12 +26,13 @@
|
|
<icon class="list-icon order-icon"></icon>
|
|
<icon class="list-icon order-icon"></icon>
|
|
<text>我的订单</text>
|
|
<text>我的订单</text>
|
|
</view>
|
|
</view>
|
|
- <view class="list-row" @click="quitClick">
|
|
|
|
|
|
+ <view class="list-row" @click="exitLogin">
|
|
<icon class="list-icon login-out-icon"></icon>
|
|
<icon class="list-icon login-out-icon"></icon>
|
|
<text>退出登录</text>
|
|
<text>退出登录</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<CustomTabBar></CustomTabBar>
|
|
<CustomTabBar></CustomTabBar>
|
|
|
|
+ <exit-dialog ref="exitDialogRef" @confirm-btn="exitBtn"></exit-dialog>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -44,6 +45,7 @@
|
|
import {getAuth} from '@/utils/auth.js';
|
|
import {getAuth} from '@/utils/auth.js';
|
|
import {reactive,ref} from "vue";
|
|
import {reactive,ref} from "vue";
|
|
import { toast } from "../../utils/common";
|
|
import { toast } from "../../utils/common";
|
|
|
|
+ import exitDialog from './exitDialog.vue'
|
|
|
|
|
|
let loginFlag = ref(false);
|
|
let loginFlag = ref(false);
|
|
let myInfoData = reactive({
|
|
let myInfoData = reactive({
|
|
@@ -52,23 +54,13 @@
|
|
credit: '',
|
|
credit: '',
|
|
vipFlag: '',
|
|
vipFlag: '',
|
|
});
|
|
});
|
|
|
|
+ const exitDialogRef = ref(null);
|
|
|
|
|
|
- const quitClick = () => {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '你确定要执行这个操作吗?',
|
|
|
|
- success: (res) => {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- quit();
|
|
|
|
- } else if (res.cancel) {
|
|
|
|
- console.log('用户点击了取消');
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
|
|
+ const exitLogin = () => {
|
|
|
|
+ exitDialogRef.value.handleShow();
|
|
}
|
|
}
|
|
|
|
|
|
- const quit = () => {
|
|
|
|
|
|
+ const exitBtn = () => {
|
|
uni.removeStorage({
|
|
uni.removeStorage({
|
|
key: 'Mta-Auth',
|
|
key: 'Mta-Auth',
|
|
success: function(res) {
|
|
success: function(res) {
|