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 @@ 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 @@ 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