|
@@ -26,14 +26,18 @@
|
|
|
<icon class="list-icon error-icon"></icon>
|
|
|
<text>我的错题</text>
|
|
|
</view>
|
|
|
- <view class="list-row" @click="orderClick">
|
|
|
+ <!-- <view class="list-row" @click="orderClick">
|
|
|
<icon class="list-icon order-icon"></icon>
|
|
|
<text>我的订单</text>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="list-row no-jt" @click="aboutClick">
|
|
|
<icon class="list-icon about-icon"></icon>
|
|
|
<text>关于我们</text>
|
|
|
</view>
|
|
|
+ <view class="list-row no-jt" @click="yonghuzhuxiao">
|
|
|
+ <icon class="list-icon zhuxiao-icon"></icon>
|
|
|
+ <text>用户注销</text>
|
|
|
+ </view>
|
|
|
<view class="list-row no-jt" @click="exitLogin">
|
|
|
<icon class="list-icon login-out-icon"></icon>
|
|
|
<text>退出登录</text>
|
|
@@ -41,7 +45,8 @@
|
|
|
</view>
|
|
|
<CustomTabBar :cardId="cardId" :currentTabNumber="2" :nianji="nianji" :zhangId="zhangId" :tipFlag="tipFlag"></CustomTabBar>
|
|
|
<tip-small-dialog ref="exitDialogRef" @confirm-btn="exitBtn" :content="tipContent"></tip-small-dialog>
|
|
|
- <tip-middle-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :content="MESSAGE_VISITER_TO_LOGIN"></tip-middle-dialog>
|
|
|
+ <tip-middle-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :content="MESSAGE_VISITER_TO_LOGIN"></tip-middle-dialog>
|
|
|
+ <tip-small-dialog ref="zhuxiaoDialogRef" @confirm-btn="zhuxiaoBtn" :content="zhuxiaoContent"></tip-small-dialog>
|
|
|
<tel-dialog @telClose="telClose" @bindBtn="bindBtn" v-if="telDialogFlag"></tel-dialog>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -50,7 +55,7 @@
|
|
|
import {toast,getUserIdentity} from "@/utils/common";
|
|
|
import cacheManager from '@/utils/cacheManager.js';
|
|
|
import {logout} from '@/api/login.js'
|
|
|
- import {myInfo} from '@/api/my.js'
|
|
|
+ import {myInfo,zhuxiao} from '@/api/my.js'
|
|
|
import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
|
|
|
import {getCurrentInstance} from 'vue';
|
|
|
import {onLoad} from '@dcloudio/uni-app';
|
|
@@ -76,7 +81,8 @@
|
|
|
const nianji = ref(null); //游客使用
|
|
|
const cardId = ref(null); //游客使用
|
|
|
const tipFlag = ref(null); //游客使用
|
|
|
- const tipContent = '你确定要执行这个操作吗?';
|
|
|
+ const tipContent = '你确定要执行这个操作吗?';
|
|
|
+ const zhuxiaoContent = '你确定要执行这个操作吗?';
|
|
|
let hyqyData = reactive({
|
|
|
indicatorDots: true,
|
|
|
autoplay: true,
|
|
@@ -93,7 +99,8 @@
|
|
|
});
|
|
|
let routerOpt = ref(false);
|
|
|
const exitDialogRef = ref(null);
|
|
|
- const youkeDialogRef = ref(null);
|
|
|
+ const youkeDialogRef = ref(null);
|
|
|
+ const zhuxiaoDialogRef = ref(null);
|
|
|
|
|
|
const exitLogin = () => {
|
|
|
exitDialogRef.value.handleShow();
|
|
@@ -102,7 +109,8 @@
|
|
|
// 退出按钮
|
|
|
const exitBtn = () => {
|
|
|
if(loginFlag.value){
|
|
|
- logout().then(res => {
|
|
|
+ logout().then(res => {
|
|
|
+ toast('退出登录成功')
|
|
|
cacheManager.clearAll();
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/login/index'
|
|
@@ -116,9 +124,28 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ const zhuxiaoBtn = () => {
|
|
|
+ let req = {
|
|
|
+
|
|
|
+ }
|
|
|
+ zhuxiao().then(res=>{
|
|
|
+ cacheManager.clearAll();
|
|
|
+ toast('用户注销成功')
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/login/index'
|
|
|
+ });
|
|
|
+ }).catch(err=>{
|
|
|
+ toast('失败,请稍后重试')
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function yonghuzhuxiao(){
|
|
|
+ zhuxiaoDialogRef.value.handleShow();
|
|
|
}
|
|
|
-
|
|
|
// 游客弹窗---确定
|
|
|
+
|
|
|
function ykConfirm(){
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/login/index'
|