diff --git a/src/components/custom-navbar/index.vue b/src/components/custom-navbar/index.vue
index 02e17e5..0c78380 100644
--- a/src/components/custom-navbar/index.vue
+++ b/src/components/custom-navbar/index.vue
@@ -30,6 +30,7 @@
+
@@ -91,6 +92,18 @@ const menuButtonWidth = computed(() => navbar.menuButtonWidth.value);
const menuButtonRightGap = computed(() => navbar.menuButtonRightGap.value);
const menuButtonLeft = computed(() => navbar.menuButtonLeft.value);
+const capsuleSpaceWidth = computed(() => {
+ let width = 0;
+ // #ifdef MP-WEIXIN
+ if (menuButtonWidth.value > 0) {
+ width = menuButtonWidth.value + menuButtonRightGap.value;
+ }
+ // #endif
+ return width;
+});
+
+const rightContentWidth = computed(() => 96);
+
const leftWidth = computed(() => {
let width = 80;
// #ifdef MP-WEIXIN
@@ -102,9 +115,7 @@ const leftWidth = computed(() => {
const rightWidth = computed(() => {
let width = 80;
// #ifdef MP-WEIXIN
- if (menuButtonWidth.value > 0) {
- width = menuButtonWidth.value + menuButtonRightGap.value * 2;
- }
+ width = capsuleSpaceWidth.value + rightContentWidth.value;
// #endif
return width;
});
@@ -209,4 +220,9 @@ export default {
align-items: center;
justify-content: flex-end;
}
+
+.custom-navbar__capsule-space {
+ flex: 0 0 auto;
+ height: 1px;
+}
diff --git a/src/pages.json b/src/pages.json
index e056a25..427acf4 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -44,6 +44,17 @@
"path": "pages/mine/account/index",
"type": "page"
},
+ {
+ "path": "pages/mine/feedback/index",
+ "type": "page",
+ "name": "feedback",
+ "style": {
+ "navigationBarTitleText": "意见反馈"
+ },
+ "meta": {
+ "requireAuth": true
+ }
+ },
{
"path": "pages/mine/official/index",
"type": "page",
@@ -60,6 +71,14 @@
"path": "pages/mine/profile/index",
"type": "page"
},
+ {
+ "path": "pages/mine/settings/index",
+ "type": "page",
+ "name": "settings",
+ "style": {
+ "navigationBarTitleText": "设置"
+ }
+ },
{
"path": "pages/work/config/index",
"type": "page",
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index 3c1d663..3637b4e 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -1,169 +1,167 @@
-
-
+
+
+
+
-
-
-
+
+
+ 个人中心
+
+
-
-
+
+
+
+
+
+
+
-
@@ -187,7 +184,8 @@
diff --git a/src/pages/mine/profile/index.vue b/src/pages/mine/profile/index.vue
index 1c7b92b..f85059c 100644
--- a/src/pages/mine/profile/index.vue
+++ b/src/pages/mine/profile/index.vue
@@ -1,43 +1,54 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
{
};
// 头像选择
-function avatarUpload() {
+function handleAvatarUpload() {
uni.chooseImage({
count: 1,
success: (res) => {
@@ -107,7 +118,7 @@ const rules = reactive({
gender: [{ required: true, message: "请选择性别" }],
});
-const dialog = reactive({
+const dialogState = reactive({
visible: false,
});
@@ -118,8 +129,8 @@ const userProfileFormRef = ref();
* 打开弹窗
* @param type 弹窗类型 ACCOUNT: 账号资料 PASSWORD: 修改密码 MOBILE: 绑定手机 EMAIL: 绑定邮箱
*/
-const handleOpenDialog = () => {
- dialog.visible = true;
+const openDialog = () => {
+ dialogState.visible = true;
// 初始化表单数据
userProfileForm.nickname = userProfile.value?.nickname;
userProfileForm.gender = userProfile.value?.gender;
@@ -131,7 +142,7 @@ function handleSubmit() {
if (valid) {
UserAPI.updateProfile(userProfileForm).then(() => {
uni.showToast({ title: "账号资料修改成功", icon: "none" });
- dialog.visible = false;
+ dialogState.visible = false;
loadUserProfile();
});
}
@@ -143,8 +154,8 @@ onLoad(() => {
if (!checkLogin()) return;
// #ifdef H5
- document.addEventListener("touchstart", touchstartListener, { passive: false });
- document.addEventListener("touchmove", touchmoveListener, { passive: false });
+ document.addEventListener("touchstart", handleTouchStart, { passive: false });
+ document.addEventListener("touchmove", handleTouchMove, { passive: false });
// #endif
loadUserProfile();
});
@@ -157,26 +168,24 @@ onMounted(() => {
// 页面销毁前移除事件监听
onBeforeUnmount(() => {
// #ifdef H5
- document.removeEventListener("touchstart", touchstartListener);
- document.removeEventListener("touchmove", touchmoveListener);
+ document.removeEventListener("touchstart", handleTouchStart);
+ document.removeEventListener("touchmove", handleTouchMove);
// #endif
});
// 禁用浏览器双指缩放,使头像裁剪时双指缩放能够起作用
-function touchstartListener(event: TouchEvent) {
+function handleTouchStart(event: TouchEvent) {
if (event.touches.length > 1) {
event.preventDefault();
}
}
// 禁用浏览器下拉刷新,使头像裁剪时能够移动图片
-function touchmoveListener(event: TouchEvent) {
+function handleTouchMove(event: TouchEvent) {
event.preventDefault();
}
-
-function handleBack() {
- uni.navigateBack();
-}