Commit e39b5c05e79c870229a773597ce3579c618e7520
1 parent
cecbd747
历史档案也排序问题
Showing
4 changed files
with
42 additions
and
6 deletions
packageD/pages/AI-test-skin/history_record/history_record.js
| ... | ... | @@ -234,6 +234,20 @@ Page({ |
| 234 | 234 | arr.push(time_obj); |
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | + function _sort_by_history_time (property){ | |
| 238 | + return function(a,b){ | |
| 239 | + let val1 = a[property]; | |
| 240 | + let val2 = b[property]; | |
| 241 | + if(val2 > val1){ | |
| 242 | + return 1 | |
| 243 | + }else if(val2 < val1){ | |
| 244 | + return -1 | |
| 245 | + }else{ | |
| 246 | + return 0 | |
| 247 | + } | |
| 248 | + } | |
| 249 | + } | |
| 250 | + arr.sort(_sort_by_history_time('history_time')); | |
| 237 | 251 | return arr; |
| 238 | 252 | }, |
| 239 | 253 | ... | ... |
packageD/pages/AI-test-skin/success_result/success_result.js
| 1 | 1 | /* |
| 2 | 2 | * @Author: abson |
| 3 | 3 | * @Date: 2022-02-16 15:36:47 |
| 4 | - * @LastEditTime: 2022-02-25 11:30:33 | |
| 4 | + * @LastEditTime: 2022-02-28 10:44:27 | |
| 5 | 5 | * @LastEditors: Please set LastEditors |
| 6 | 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| 7 | 7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js |
| ... | ... | @@ -24,7 +24,7 @@ Page({ |
| 24 | 24 | * 页面的初始数据 |
| 25 | 25 | */ |
| 26 | 26 | data: { |
| 27 | - tab: [{ id: 'zong_he', name: '综合肤质' }, { id: 'mao_kong', name: '毛孔' }, { id: 'hei_tou', name: '黑头' }, { id: 'se_ban', name: '色斑' }, { id: 'zhou_wen', name: '皱纹' }, { id: 'hei_yan_quan', name: '黑眼圈' }, { id: 'cuo_chuang', name: '痤疮' }, { id: 'min_gan_du', name: '敏感度' }], | |
| 27 | + // tab: [{ id: 'zong_he', name: '综合肤质' }, { id: 'mao_kong', name: '毛孔' }, { id: 'hei_tou', name: '黑头' }, { id: 'se_ban', name: '色斑' }, { id: 'zhou_wen', name: '皱纹' }, { id: 'hei_yan_quan', name: '黑眼圈' }, { id: 'cuo_chuang', name: '痤疮' }, { id: 'min_gan_du', name: '敏感度' }], | |
| 28 | 28 | zhouwen_arr: [{ id: 1, name: '全部皱纹' }, { id: 2, name: '抬头纹' }, { id: 3, name: '川字纹' }, { id: 4, name: '眼周细纹' }, { id: 5, name: '鱼尾纹' }, { id: 6, name: '法令纹' }, { id: 7, name: '口周纹' }], |
| 29 | 29 | cuochuang_arr: [{ id: 1, name: '全部痤疮' }, { id: 2, name: '粉刺 ' }, { id: 3, name: '痘印 ' }, { id: 4, name: '脓包' }, { id: 5, name: '结节' }], |
| 30 | 30 | zhouwen_arr1: [{ id: 1, name: '皱纹/细纹',des:'是指皮肤受到外界环境影响,形成游离自由基,自由基破坏正常细胞膜组织内的胶原蛋白、活性物质,氧化细胞,或缺水而形成的小细纹,继而严重形成皱纹',sign: 'zhou1',sign1: 'zhou2' }, { id: 2, name: '抬头皱纹/抬头细纹',des:'位于额头的皱纹、细纹。形成原因因人而异,后天因素是比较少的。-般多为横纹, 竖纹较少见。' ,sign: 'zhou3',sign1:'zhou4'}, { id: 3, name: '眼部皱纹/眼部细纹',des:'眼部皱纹、细纹一般位于下眼睑部位,多见于下脸内1/3处。',sign:'zhou5',sign1:'zhou6' }, { id: 4, name: '鱼尾纹',des:'眼部皱纹的一种,是在人两侧外眼角和登角之间出现的皱纹,其纹路与鱼尾巴上的纹路很相似,故被形象地称为鱼尾纹。',sign:'zhou7',sign1:'zhou8' }, { id: 5, name: '眉间纹',des:'又叫川字纹,皱眉纹,是面部的一种正常的表情纹,随着年龄的增长,面部的皱纹会逐渐加深,双眉之间逐渐形成了较深的皱折,会使人看起来总是愁眉不展。',sign:'zhou9',sign1:'zhou10'}, { id: 6, name: '泪沟',des:'泪沟是指由内眼角开始出现在下眼睑靠鼻侧的两条凹沟,是由于眼眶隔膜下缘的软组织萎缩、下垂而生成的。',sign:'zhou11',sign1:'zhou12' }, { id: 7, name: '法令纹',des:'法令纹是位于鼻翼边延伸而下的两道纹路,是典型的皮肤组织老化、造成肌肤表面凹陷的现象。',sign:'zhou15',sign1:'zhou16' }, { id: 8, name: '口角纹',des:'口角纹又称木偶纹、括号纹,位于嘴角延伸而下的两道纹路,是表情肌、重力和遗传基因等几方面因素综合形成的。',sign:'zhou13',sign1:'zhou14' }], |
| ... | ... | @@ -199,7 +199,26 @@ Page({ |
| 199 | 199 | return e.type==3; |
| 200 | 200 | }) |
| 201 | 201 | th.data.acne_num4=a_arr.length; |
| 202 | - | |
| 202 | + let tab_arr = [{ id: 'zong_he', name: '综合肤质' }]; | |
| 203 | + if(pore_num) { | |
| 204 | + tab_arr.push({ id: 'mao_kong', name: '毛孔' }); | |
| 205 | + } | |
| 206 | + if(blackhead_num){ | |
| 207 | + tab_arr.push({ id: 'hei_tou', name: '黑头' }); | |
| 208 | + } | |
| 209 | + if(speckle_num){ | |
| 210 | + tab_arr.push({ id: 'se_ban', name: '色斑' }); | |
| 211 | + } | |
| 212 | + if(wrinkle_num){ | |
| 213 | + tab_arr.push({ id: 'zhou_wen', name: '皱纹' }); | |
| 214 | + } | |
| 215 | + if(dark_type > -1) { | |
| 216 | + tab_arr.push( { id: 'hei_yan_quan', name: '黑眼圈' }); | |
| 217 | + } | |
| 218 | + if(acne_num){ | |
| 219 | + tab_arr.push({ id: 'cuo_chuang', name: '痤疮' }); | |
| 220 | + } | |
| 221 | + tab_arr.push( { id: 'min_gan_du', name: '敏感度' }); | |
| 203 | 222 | th.setData({ |
| 204 | 223 | acne_num: acne_num, |
| 205 | 224 | speckle_num: speckle_num, |
| ... | ... | @@ -219,6 +238,7 @@ Page({ |
| 219 | 238 | bili: bili, |
| 220 | 239 | bili_eye:bili_eye, |
| 221 | 240 | sex:sex, |
| 241 | + tab:tab_arr, | |
| 222 | 242 | skin_dryoil_check_type:skin_dryoil_check_type, |
| 223 | 243 | eye_top:eye_top* bili_eye, |
| 224 | 244 | eye_left1:eye_left1* bili_eye, | ... | ... |
packageD/pages/AI-test-skin/success_result/success_result.wxml
| ... | ... | @@ -401,8 +401,8 @@ |
| 401 | 401 | <view class="fs28 mt10" style="color: #666;"> |
| 402 | 402 | {{item.des}} |
| 403 | 403 | </view> |
| 404 | - <image class="yiwen_img" src="{{iurl}}/miniapp/images/skinimg/{{item.sign}}.png"></image> | |
| 405 | - <image class="yiwen_img" src="{{iurl}}/miniapp/images/skinimg/{{item.sign1}}.png"></image> | |
| 404 | + <image class="yiwen_img" mode="widthFix" src="{{iurl}}/miniapp/images/skinimg/{{item.sign}}.png"></image> | |
| 405 | + <image class="yiwen_img" mode="widthFix" src="{{iurl}}/miniapp/images/skinimg/{{item.sign1}}.png"></image> | |
| 406 | 406 | </view> |
| 407 | 407 | </scroll-view> |
| 408 | 408 | <view style="position:fixed;bottom:0;width: 100%;"> |
| ... | ... | @@ -415,7 +415,7 @@ |
| 415 | 415 | </scroll-view> |
| 416 | 416 | </view> |
| 417 | 417 | <view class="close_icon" bindtap="close_yiwen"> |
| 418 | - <text class="iconfont icon-close"></text> | |
| 418 | + <text class="iconfont icon-guan"></text> | |
| 419 | 419 | </view> |
| 420 | 420 | </view> |
| 421 | 421 | <!-- 提示 --> | ... | ... |
packageD/pages/AI-test-skin/success_result/success_result.wxss
| ... | ... | @@ -11,6 +11,7 @@ page { |
| 11 | 11 | z-index: 99; |
| 12 | 12 | display: flex; |
| 13 | 13 | height: 100rpx; |
| 14 | + background-color: #fff; | |
| 14 | 15 | } |
| 15 | 16 | |
| 16 | 17 | .share { |
| ... | ... | @@ -844,6 +845,7 @@ page { |
| 844 | 845 | } |
| 845 | 846 | |
| 846 | 847 | .yiwen_img { |
| 848 | + width: 100%; | |
| 847 | 849 | margin-top: 40rpx; |
| 848 | 850 | /* width: 600rpx; |
| 849 | 851 | height: 600rpx; */ | ... | ... |