feature/v-xuexi
wangdong 8 months ago
parent 6166717459
commit 4c766f5cf5
  1. 6
      api/user.js
  2. 9
      manifest.json
  3. 21
      pages/my/user_info.vue
  4. 2
      pages/special/record.vue

@ -62,6 +62,12 @@ export function logout() {
});
}
export function deleteUser() {
return http.get("/my/deleteUser", null, {
requireAuth: true
});
}
export function validateCode(phone, code) {
return http.get("/my/validate_code", {
phone,

@ -2,8 +2,8 @@
"name" : "梦航学习宝",
"appid" : "__UNI__640EC10",
"description" : "1.1",
"versionName" : "1.0.8",
"versionCode" : 108,
"versionName" : "1.0.9",
"versionCode" : 109,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -62,8 +62,9 @@
"urltypes" : "zsff.xinbadaweb.cn",
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,用于设置个人头像",
"NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,用于设置个人头像",
"NSLocationWhenInUseUsageDescription" : "该应用需要获取你的地理位置,以便为你推荐附近的线下课程"
"NSPhotoLibraryAddUsageDescription" : "该应用需要写入你的相册,用于设置个人头像",
"NSLocationWhenInUseUsageDescription" : "该应用需要获取你的地理位置,以便为你推荐附近的线下课程",
"NSCameraUsageDescription" : "该应用需要调用摄像头,用于设置个人头像"
},
"idfa" : false
},

@ -41,6 +41,9 @@
<button class="btn flex flex-center out-btn" type="button" @click="logout">
退出
</button>
<button class="btn flex flex-center out-btn" type="button" @click="deleteUser">
注销
</button>
</view>
</view>
<view :class="{ mask: popupShow }" @click="popupShow = false"></view>
@ -76,7 +79,7 @@
<script>
import userInfoMixin from "@/mixins/userInfo";
import { changePwd, getAuthCode, saveUserInfo, logout } from "@/api/user";
import { changePwd, getAuthCode, saveUserInfo, logout, deleteUser } from "@/api/user";
import { VALID_LOGIN_STATUS } from "@/store/types/action-types";
import { SET_LOGIN, SET_LOGOUT } from "@/store/types/muations-types";
@ -238,6 +241,22 @@ export default {
},
});
},
deleteUser() {
uni.showModal({
title: "提示",
content: "确定注销账号?",
success: async ({ confirm }) => {
if (!confirm) return;
await deleteUser();
this.$store.commit("app/" + SET_LOGOUT);
setTimeout(() => {
uni.reLaunch({
url: "/pages/index/index",
});
}, 500);
},
});
}
},
};
</script>

@ -144,7 +144,7 @@ export default {
this.loadTitle = this.loadend ? "我是有底线的" : "上拉加载更多";
this.$set(this, "specials", specials);
} catch (err) {
that.loading = false;
this.loading = false;
this.loadTitle = "加载更多";
}
uni.hideLoading();

Loading…
Cancel
Save