diff --git a/apis/interfaces/essentialInfo.js b/apis/interfaces/essentialInfo.js
index c33dbfd..290ecf1 100644
--- a/apis/interfaces/essentialInfo.js
+++ b/apis/interfaces/essentialInfo.js
@@ -42,13 +42,16 @@ const editHealthBefore = (id) => {
* @Date: 2022-01-12 13:49:29
*/
const editHealth = (record_id, data) => {
+ console.log(data,'data............')
return request({
url: `health/records/${record_id}`,
method: "PUT",
- date: data
+ data: data
})
}
export {
- recordsHealth
+ recordsHealth,
+ editHealthBefore,
+ editHealth
}
diff --git a/apis/interfaces/setting.js b/apis/interfaces/setting.js
new file mode 100644
index 0000000..3f5fed9
--- /dev/null
+++ b/apis/interfaces/setting.js
@@ -0,0 +1,34 @@
+/**
+ * Web-zdx
+ * moduleName:修改头像和昵称
+ */
+
+import {
+ request
+} from '../index'
+
+
+
+// 获取用户设置中心的信息
+const getUserSettingInfo = () => {
+ return request({
+ url: 'user/setting'
+ })
+}
+
+
+// 修改用户头像或昵称
+const resetUserInfo = (data) => {
+ return request({
+ url: 'user/' + data.key,
+ method: 'PUT',
+ data: {
+ value: data.value
+ }
+ })
+}
+
+export {
+ getUserSettingInfo,
+ resetUserInfo,
+}
diff --git a/pages.json b/pages.json
index cadb731..34409cf 100644
--- a/pages.json
+++ b/pages.json
@@ -140,6 +140,15 @@
"navigationBarTextStyle": "white"
}
},
+ {
+ "path": "pages/setting/setting",
+ "name": "Setting",
+ "style": {
+ "navigationBarTitleText": "设置中心",
+ "navigationBarBackgroundColor": "#34CE98",
+ "navigationBarTextStyle": "white"
+ }
+ },
{
"path": "pages/store/index",
"name": "Store",
@@ -574,8 +583,9 @@
"path": "pages/user/files",
"name": "UserFiles",
"style": {
- "navigationBarTitleText": "健康档案",
- "navigationBarBackgroundColor": "#FFFFFF"
+ "navigationBarTitleText": "健康档案管理",
+ "navigationBarBackgroundColor": "#34CE98",
+ "navigationBarTextStyle": "white"
}
}
],
diff --git a/pages/essentialInfo/index.vue b/pages/essentialInfo/index.vue
index 159f379..357dd56 100644
--- a/pages/essentialInfo/index.vue
+++ b/pages/essentialInfo/index.vue
@@ -306,16 +306,9 @@ export default {
},
//年龄------------- 过滤出生年月日
formatter(type, value) {
- if (type === 'year') {
- return `${value}年`;
- }
- if (type === 'month') {
- return `${value}月`;
- }
- if (type === 'day') {
- return `${value}日`;
- }
- console.log(value);
+ if (type === 'year') {return `${value}年`;}
+ if (type === 'month') {return `${value}月`;}
+ if (type === 'day') {return `${value}日`;}
return value;
},
// 体重---------标尺滚动
diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue
new file mode 100644
index 0000000..7f9ba30
--- /dev/null
+++ b/pages/setting/setting.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+ 修改头像
+
+
+
+
+
+
+
+
+ 修改昵称
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/user/files.vue b/pages/user/files.vue
index 0b05f82..3a1dc8a 100644
--- a/pages/user/files.vue
+++ b/pages/user/files.vue
@@ -1,70 +1,282 @@
-
-
-
- 性别
-
-
- {{ recordsData.sex == 1 ? '男' : '女' }}
-
-
-
-
- 年龄
-
-
- {{ recordsData.age }}
-
-
-
-
- 身高
-
-
- {{ recordsData.height }}cm
-
-
-
-
- 体重
-
-
- {{ recordsData.weight }}kg
-
-
-
+
+
+
+ 性别
+
+
+
+
+ { (this.recordsData.sex = e.id), (this.sexShow = false); } "
+ @close="sexShow = false"
+ />
+
+
+
+
+ 生日
+
+
+
+
+ { this.recordsData.birthday = e.value, this.birthdayShow = false } "
+ @cancel=" () => { this.birthdayShow = false; } "
+ />
+
+
+
+
+ 身高
+
+
+
+
+ { heightShow = false }">
+
+ 你的身高为?
+ {{recordsData.height}} CM
+
+
+
+
+
+
+
+ 最新体重
+
+
+
+
+ { weightShow = false }">
+
+ 你的当前体重为?
+ {{recordsData.weight}} KG
+
+
+
+
+
+
+
+ 目标
+
+
+
+
+ { (this.selectedTargetIndex = this.targetList.findIndex(item => e.id === item.id)), (this.targetShow = false); } "
+ @close="targetShow = false"
+ />
+
+
+
+
+ 目标体重
+
+
+ { targetWeightShow = false }">
+
+ 你的目标体重为?
+ {{recordsData.goal_weight}} KG
+
+
+
+
+
+
+
+ 运动量
+
+
+
+
+ { (this.selectExerciseIndex = this.exerciseList.findIndex(item => e.id === item.id)), (this.exerciseShow = false); } "
+ @close="exerciseShow = false"
+ />
+
+ 确认修改
+ 修改资料后可更新并查看最新方案,预算热量可能会发生变化
+
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 5f67f33..84a04f2 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -1,432 +1,472 @@
-
-
-
-
-
-
-
-
- {{userInfo.nickname}}
-
- 会员
-
-
-
- 未登录
-
-
-
-
-
-
-
-
- ZH会员
-
-
-
-
- 开通
-
-
-
-
-
- 体脂率
-
-
-
- {{userInfo.record.fat.fat}}%
-
- {{userInfo.record.fat.text}}
-
-
-
- 体重
-
-
-
- {{userInfo.record.weight.weight}}KG
-
- {{userInfo.record.weight.text}}
-
-
-
-
-
-
- 全部订单
-
-
-
- 待付款
-
-
-
- 待发货
-
-
-
- 待收货
-
-
-
- 已完成
-
-
-
-
-
-
- ZH钱包
-
-
-
-
- 健康档案
-
-
-
-
- 地址管理
-
-
-
-
-
-
- 退出登录
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ userInfo.nickname }}
+
+
+
+ VIP会员
+
+
+
+
+
+ 普通用户
+
+
+
+
+
+
+ 未登录
+
+
+
+
+
+
+
+
+
+ ZH会员
+
+
+ 开通
+
+
+
+
+
+
+ 体脂率
+
+
+
+ {{ userInfo.record.fat.fat }}
+ %
+
+ {{ userInfo.record.fat.text }}
+
+
+
+ 体重
+
+
+
+ {{ userInfo.record.weight.weight }}
+ KG
+
+ {{ userInfo.record.weight.text }}
+
+
+
+
+
+
+ 全部订单
+
+
+
+ 待付款
+
+
+
+ 待发货
+
+
+
+ 待收货
+
+
+
+ 已完成
+
+
+
+
+
+
+ ZH钱包
+
+
+
+
+ 健康档案
+
+
+
+
+ 地址管理
+
+
+
+
+
+
+ 退出登录
+
+
+
+
+
diff --git a/static/imgs/copy.png b/static/imgs/copy.png
new file mode 100644
index 0000000..ef625f8
Binary files /dev/null and b/static/imgs/copy.png differ
diff --git a/static/user/mine-self-name.png b/static/user/mine-self-name.png
new file mode 100644
index 0000000..d527b4c
Binary files /dev/null and b/static/user/mine-self-name.png differ
diff --git a/static/user/user-avatar.png b/static/user/user-avatar.png
new file mode 100644
index 0000000..8f95acc
Binary files /dev/null and b/static/user/user-avatar.png differ