diff --git a/src/api/development.js b/src/api/development.js index 5d44ab6..67f33da 100644 --- a/src/api/development.js +++ b/src/api/development.js @@ -19,7 +19,8 @@ export const apiDevelopment = { CurrentTask, UploadFile, SubmitTask, - TaskDetail + TaskDetail, + AchieveList //成就列表 }; export default apiDevelopment; @@ -81,7 +82,7 @@ function TaskDetail(params) { method: 'get', params: { personId: personId, - ...params + ...params } }); } @@ -96,7 +97,7 @@ function SubmitTask(param) { method: 'post', data: { personId: personId, - ...param + ...param } }); } @@ -106,11 +107,11 @@ function SubmitTask(param) { */ function UploadFile(param) { return http({ - url: "/api/File/Upload", - method: "post", + url: '/api/File/Upload', + method: 'post', data: param, - headers: { "Content-Type": "multipart/form-data" }, - transformRequest: function(data) { + headers: { 'Content-Type': 'multipart/form-data' }, + transformRequest: function (data) { const formData = new FormData(); let i = data.formData.entries(); let j = i.next(); @@ -122,3 +123,15 @@ function UploadFile(param) { } }); } +/** + * + */ +function AchieveList() { + return http({ + url: '/api/Level/AchieveList', + method: 'get', + params: { + personId: personId + } + }); +} diff --git a/src/api/health-user.js b/src/api/health-user.js index ad4c235..f5a38a2 100644 --- a/src/api/health-user.js +++ b/src/api/health-user.js @@ -8,7 +8,8 @@ export const APIHealthUser = { getHomeData, //今日体征感知 getHisData, //体征历史数据 getCalendar, //体征历史数据日历 - getReportData //洞悉 + getReportData, //洞悉 + saveDiary //保存情绪日记 }; export default APIHealthUser; function addPerson(params) { @@ -76,3 +77,10 @@ function getReportData(params) { data: params }); } +function saveDiary(params) { + return request({ + url: `/api/HealthyData/SaveDiary`, + method: 'post', + data: params + }); +} diff --git a/src/assets/development/images/achieve/1.png b/src/assets/development/images/achieve/1.png new file mode 100644 index 0000000..e8dda62 Binary files /dev/null and b/src/assets/development/images/achieve/1.png differ diff --git a/src/assets/development/images/achieve/10.png b/src/assets/development/images/achieve/10.png new file mode 100644 index 0000000..2246fb5 Binary files /dev/null and b/src/assets/development/images/achieve/10.png differ diff --git a/src/assets/development/images/achieve/11.png b/src/assets/development/images/achieve/11.png new file mode 100644 index 0000000..35fd61d Binary files /dev/null and b/src/assets/development/images/achieve/11.png differ diff --git a/src/assets/development/images/achieve/12.png b/src/assets/development/images/achieve/12.png new file mode 100644 index 0000000..04bfaa6 Binary files /dev/null and b/src/assets/development/images/achieve/12.png differ diff --git a/src/assets/development/images/achieve/2.png b/src/assets/development/images/achieve/2.png new file mode 100644 index 0000000..b69e27c Binary files /dev/null and b/src/assets/development/images/achieve/2.png differ diff --git a/src/assets/development/images/achieve/3.png b/src/assets/development/images/achieve/3.png new file mode 100644 index 0000000..c17f886 Binary files /dev/null and b/src/assets/development/images/achieve/3.png differ diff --git a/src/assets/development/images/achieve/4.png b/src/assets/development/images/achieve/4.png new file mode 100644 index 0000000..9f871bd Binary files /dev/null and b/src/assets/development/images/achieve/4.png differ diff --git a/src/assets/development/images/achieve/5.png b/src/assets/development/images/achieve/5.png new file mode 100644 index 0000000..2be8375 Binary files /dev/null and b/src/assets/development/images/achieve/5.png differ diff --git a/src/assets/development/images/achieve/6.png b/src/assets/development/images/achieve/6.png new file mode 100644 index 0000000..6dba16b Binary files /dev/null and b/src/assets/development/images/achieve/6.png differ diff --git a/src/assets/development/images/achieve/7.png b/src/assets/development/images/achieve/7.png new file mode 100644 index 0000000..0249b20 Binary files /dev/null and b/src/assets/development/images/achieve/7.png differ diff --git a/src/assets/development/images/achieve/8.png b/src/assets/development/images/achieve/8.png new file mode 100644 index 0000000..6dc361c Binary files /dev/null and b/src/assets/development/images/achieve/8.png differ diff --git a/src/assets/development/images/achieve/9.png b/src/assets/development/images/achieve/9.png new file mode 100644 index 0000000..7e962fe Binary files /dev/null and b/src/assets/development/images/achieve/9.png differ diff --git a/src/assets/development/images/achieve/d_01.png b/src/assets/development/images/achieve/d_01.png new file mode 100644 index 0000000..c838997 Binary files /dev/null and b/src/assets/development/images/achieve/d_01.png differ diff --git a/src/assets/development/images/achieve_banner.png b/src/assets/development/images/achieve_banner.png new file mode 100644 index 0000000..d9871bf Binary files /dev/null and b/src/assets/development/images/achieve_banner.png differ diff --git a/src/assets/today/images/text.png b/src/assets/today/images/text.png new file mode 100644 index 0000000..6cfb91a Binary files /dev/null and b/src/assets/today/images/text.png differ diff --git a/src/router/router.config.js b/src/router/router.config.js index 4eb4731..5510e44 100644 --- a/src/router/router.config.js +++ b/src/router/router.config.js @@ -74,6 +74,18 @@ export const constantRouterMap = [ component: () => import('@/views/development/taskWearing'), meta: { title: '佩戴任务', keepAlive: false } }, + { + path: '/achieveList', + name: 'achieveList', + component: () => import('@/views/development/achieveList'), + meta: { title: '成就列表', keepAlive: false } + }, + { + path: '/achieveDetails', + name: 'achieveDetails', + component: () => import('@/views/development/achieveDetails'), + meta: { title: '成就详情', keepAlive: false } + }, { path: '/familyNumber', name: 'familyNumber', diff --git a/src/views/development/achieveDetails.vue b/src/views/development/achieveDetails.vue new file mode 100644 index 0000000..da7def7 --- /dev/null +++ b/src/views/development/achieveDetails.vue @@ -0,0 +1,358 @@ + + + + + \ No newline at end of file diff --git a/src/views/development/achieveList.vue b/src/views/development/achieveList.vue new file mode 100644 index 0000000..0266ba3 --- /dev/null +++ b/src/views/development/achieveList.vue @@ -0,0 +1,245 @@ + + + + + \ No newline at end of file diff --git a/src/views/development/include.scss b/src/views/development/include.scss index 99a0b5e..e2a873d 100644 --- a/src/views/development/include.scss +++ b/src/views/development/include.scss @@ -3,16 +3,19 @@ padding: 0; box-sizing: border-box; } + .image { width: 100%; height: 100%; + img { width: 100%; height: 100%; } } + .gap { - padding-top: 40px; + /* padding-top: 40px; */ } .pageContent { @@ -21,4 +24,4 @@ padding-top: 100px; padding-bottom: 150px; box-sizing: border-box; -} +} \ No newline at end of file diff --git a/src/views/development/index.vue b/src/views/development/index.vue index 38bf644..6c4fc2c 100644 --- a/src/views/development/index.vue +++ b/src/views/development/index.vue @@ -9,6 +9,14 @@
了解详情
+ + +
+
+ +
+
+
当前任务
@@ -49,17 +57,11 @@
-
+
@@ -71,14 +73,14 @@
{{ item.status === 0 - ? '未解锁' - : item.status === 3 + ? '未解锁' + : item.status === 3 ? '可查看' : item.status === 1 - ? '进行中' - : item.status === 2 - ? '已完成' - : '未知' + ? '进行中' + : item.status === 2 + ? '已完成' + : '未知' }}
@@ -112,7 +114,7 @@ export default { levels: [] }; }, - created() {}, + created() { }, mounted() { // 写死一个用户Id this.$store.commit( @@ -210,6 +212,14 @@ export default { } if (item.submitType === 2) { this.$toast('问卷调查'); + this.$router.push({ + name: 'questionnaire', + query: { + id: item.id, + rankId: item.rankId + } + }); + } else if (item.submitType === 0) { this.$router.push({ name: 'taskWearing', @@ -241,23 +251,29 @@ export default { diff --git a/src/views/today/index.vue b/src/views/today/index.vue index 4058481..d14a80a 100644 --- a/src/views/today/index.vue +++ b/src/views/today/index.vue @@ -1,18 +1,19 @@ + - + - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/today/scss/index.scss b/src/views/today/scss/index.scss index 0051222..537d8d2 100644 --- a/src/views/today/scss/index.scss +++ b/src/views/today/scss/index.scss @@ -654,24 +654,57 @@ .main { width: 100%; - .van-checkbox-group { + .van-radio-group { width: 100%; margin-top: 50px; - display: flex; - flex-wrap: wrap; - align-items: center; - align-content: space-between; - justify-content: space-between; + display: grid; + grid-template-columns: repeat(3, 1fr); + /* 或者固定宽度,例如:repeat(4, 1fr) */ + gap: 10px; + + } - .van-checkbox { - width: 26%; - min-width: 88px; + .van-radio { + width: 100%; &:nth-of-type(n+4) { margin-top: 40px; } + + + .checkbox-label { + width: 100%; + display: flex !important; + justify-content: flex-start !important; + align-items: center !important; + + img { + width: 25px; + height: 25px; + object-fit: contain; + } + + .text { + position: relative; + height: 27px; + padding: 0 10px; + background-image: url('@/assets/today/images/text.png'); + background-repeat: no-repeat; + /* 防止背景图片重复 */ + background-size: 50px 27px; + background-position: center; + /* 水平和垂直居中 */ + @include center(); + color: #333; + font-size: 14px; + + } + } + + + .van-checkbox__label img { width: 30px; } @@ -689,6 +722,8 @@ font-size: 28px; } } + + } }