diff --git a/common/server/user.js b/common/server/user.js
index 459fd6d..5af898d 100644
--- a/common/server/user.js
+++ b/common/server/user.js
@@ -48,5 +48,22 @@ export const mobileLogin = async (phone, code, pid = 0) => {
return res;
}
+/**
+ * 修改用户信息
+ * @param {String} nickname 昵称
+ * @param {String} avatar 头像
+ * @param {String} imagebase 图片base64
+ * @param {Number} gender 性别(1-男,2-女,3-保密,0-未设置)
+ * @returns {Promise} 是否成功
+ */
+export const updateUserInfo = async (nickname, avatar, imagebase, gender = 3) => {
+ const res = await HttpRequest.post('/update_userinfo', {
+ nickname,
+ headimg: avatar,
+ imagebase,
+ gender
+ });
+ return res.status == 1;
+}
diff --git a/components/youdas-container/no-data.vue b/components/youdas-container/no-data.vue
index 74d507b..7d2fbcf 100644
--- a/components/youdas-container/no-data.vue
+++ b/components/youdas-container/no-data.vue
@@ -5,22 +5,19 @@
-
\ No newline at end of file
diff --git a/pages/me/me.vue b/pages/me/me.vue
index 2cacbdc..173646f 100644
--- a/pages/me/me.vue
+++ b/pages/me/me.vue
@@ -6,7 +6,7 @@
-
+
@@ -57,7 +57,6 @@
import { getUserInfo } from '@/common/server/user';
import { onShow } from '@dcloudio/uni-app'
import { navigateTo, navigateToAccountLogin } from '@/common/system/router';
-import { removeCache } from '@/common/system/cacheService';
let _pagePopup = ref(null);
const itemList = ref([
@@ -86,15 +85,21 @@ const loadMenu = async () => {
title: "优惠券",
}, {
id: 4,
- title: "加入福利群",
+ title: "收货地址管理",
},
{
id: 5,
title: "用户协议",
+ onClick: (res) => {
+ yds.navigateToAgreement("user");
+ }
},
{
id: 6,
title: "隐私政策",
+ onClick: (res) => {
+ yds.navigateToAgreement("privacy");
+ }
},
];
if (yds.userInfo.isAccountLogin()) {
@@ -120,11 +125,7 @@ const loadMenu = async () => {
}
itemList.value = menuList;
}
-const goToPage = (route) => {
- uni.navigateTo({
- url: route
- });
-};
+