Commit 4674776a13ac5b3c7db21fbd77e3a6a8e21def89
1 parent
0d4d8f53
测试报告男女图片优化
Showing
13 changed files
with
226 additions
and
175 deletions
packageB/pages/AI-test-skin/shoot_notice/shoot_notice.wxml
| ... | ... | @@ -7,25 +7,25 @@ |
| 7 | 7 | <view> |
| 8 | 8 | <view class="ready"> |
| 9 | 9 | <view class="image"> |
| 10 | - <image src="{{iurl}}/miniapp/images/skinimg/4.jpeg"></image> | |
| 10 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei1.jpeg"></image> | |
| 11 | 11 | <text class="shuxian"></text> |
| 12 | - <image src="{{iurl}}/miniapp/images/skinimg/7.jpeg"></image> | |
| 12 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei2.jpeg"></image> | |
| 13 | 13 | </view> |
| 14 | 14 | <text class="fs28">1、请对准镜头,闭眼拍照</text> |
| 15 | 15 | </view> |
| 16 | 16 | <view class="ready"> |
| 17 | 17 | <view class="image"> |
| 18 | - <image src="{{iurl}}/miniapp/images/skinimg/5.jpeg"></image> | |
| 18 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei3.jpeg"></image> | |
| 19 | 19 | <text class="shuxian"></text> |
| 20 | - <image src="{{iurl}}/miniapp/images/skinimg/7.jpeg"></image> | |
| 20 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei2.jpeg"></image> | |
| 21 | 21 | </view> |
| 22 | 22 | <text class="fs28">2、请摘下眼镜,撩起刘海</text> |
| 23 | 23 | </view> |
| 24 | 24 | <view class="ready"> |
| 25 | 25 | <view class="image"> |
| 26 | - <image src="{{iurl}}/miniapp/images/skinimg/8.jpeg"></image> | |
| 26 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei4.jpeg"></image> | |
| 27 | 27 | <text class="shuxian"></text> |
| 28 | - <image src="{{iurl}}/miniapp/images/skinimg/10.jpeg"></image> | |
| 28 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei5.jpeg"></image> | |
| 29 | 29 | </view> |
| 30 | 30 | <text class="fs28">3、保持脸部垂直,切勿距离过远过近</text> |
| 31 | 31 | </view> |
| ... | ... | @@ -37,13 +37,13 @@ |
| 37 | 37 | <view> |
| 38 | 38 | <view class="ready"> |
| 39 | 39 | <view class="image_1"> |
| 40 | - <image src="{{iurl}}/miniapp/images/skinimg/6.jpeg"></image> | |
| 40 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei6.jpeg"></image> | |
| 41 | 41 | </view> |
| 42 | 42 | <text class="fs28">1、脸部置于画面中央,请勿距离过远或过近</text> |
| 43 | 43 | </view> |
| 44 | 44 | <view class="ready1"> |
| 45 | 45 | <view class="image_1"> |
| 46 | - <image src="{{iurl}}/miniapp/images/skinimg/9.jpeg"></image> | |
| 46 | + <image src="{{iurl}}/miniapp/images/skinimg/zhunbei7.jpeg"></image> | |
| 47 | 47 | </view> |
| 48 | 48 | <text class="fs28">2、脸部保持平视摄像头</text> |
| 49 | 49 | </view> | ... | ... |
packageB/pages/AI-test-skin/shoot_notice/shoot_notice.wxss
packageB/pages/AI-test-skin/success_result/acne/acne.wxml
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | </view> |
| 15 | 15 | <view class="analyse_classify_header_item mt_b5"> |
| 16 | 16 | <view class="analyse_classify_header_img"> |
| 17 | - <image src="{{iurl}}/miniapp/images/skinimg/mao123.png"></image> | |
| 17 | + <image src="{{iurl}}/miniapp/images/skinimg/seban_heitou_maokong_.png"></image> | |
| 18 | 18 | </view> |
| 19 | 19 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 20 | 20 | <view class="fs28">程度情况</view> |
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | </view> |
| 24 | 24 | <view class="analyse_classify_header_item" style="margin-top:5%"> |
| 25 | 25 | <view class="analyse_classify_header_img"> |
| 26 | - <image src="{{iurl}}/miniapp/images/skinimg/mao123.png"></image> | |
| 26 | + <image src="{{iurl}}/miniapp/images/skinimg/cuochuang_icon.jpg"></image> | |
| 27 | 27 | </view> |
| 28 | 28 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 29 | 29 | <view>痤疮个数</view> |
| ... | ... | @@ -32,28 +32,28 @@ |
| 32 | 32 | </view> |
| 33 | 33 | <view class="leixing mt_b10"> |
| 34 | 34 | <view class="_img"> |
| 35 | - <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/mao25.jpeg"></image> | |
| 35 | + <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/nongzhong.jpeg"></image> | |
| 36 | 36 | <view class="fs28 c_666"> |
| 37 | 37 | <view>囊肿</view> |
| 38 | 38 | <view>健康</view> |
| 39 | 39 | </view> |
| 40 | 40 | </view> |
| 41 | 41 | <view class="_img"> |
| 42 | - <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/mao28.jpeg"></image> | |
| 42 | + <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/qiuzheng.jpeg"></image> | |
| 43 | 43 | <view class="fs28 c_666"> |
| 44 | 44 | <view>丘疹</view> |
| 45 | 45 | <view>健康</view> |
| 46 | 46 | </view> |
| 47 | 47 | </view> |
| 48 | 48 | <view class="_img"> |
| 49 | - <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/mao27.jpeg"></image> | |
| 49 | + <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/fengci.jpeg"></image> | |
| 50 | 50 | <view class="fs28 c_666"> |
| 51 | 51 | <view>粉刺</view> |
| 52 | 52 | <view>健康</view> |
| 53 | 53 | </view> |
| 54 | 54 | </view> |
| 55 | 55 | <view class="_img"> |
| 56 | - <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/mao29.jpeg"></image> | |
| 56 | + <image style="height:100rpx;width:100rpx;border-radius: 50%;opacity:0.6" src="{{iurl}}/miniapp/images/skinimg/douying.jpeg"></image> | |
| 57 | 57 | <view class="fs28 c_666"> |
| 58 | 58 | <view>痘印</view> |
| 59 | 59 | <view>健康</view> | ... | ... |
packageB/pages/AI-test-skin/success_result/blackhead/blackhead.wxml
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | </view> |
| 14 | 14 | <view class="analyse_classify_header_item mt_b5"> |
| 15 | 15 | <view class="analyse_classify_header_img"> |
| 16 | - <image src="{{iurl}}/miniapp/images/skinimg/mao123.png"></image> | |
| 16 | + <image src="{{iurl}}/miniapp/images/skinimg/seban_heitou_maokong_.png"></image> | |
| 17 | 17 | </view> |
| 18 | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 19 | 19 | <view class="fs28">程度情况</view> |
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | </view> |
| 23 | 23 | <view class="analyse_classify_header_item mt_b5"> |
| 24 | 24 | <view class="analyse_classify_header_img"> |
| 25 | - <image src="/packageB/images/Snipaste_2022-02-17_15-28-13.jpg"></image> | |
| 25 | + <image src="{{iurl}}/miniapp/images/skinimg/heitou_icon.jpg"></image> | |
| 26 | 26 | </view> |
| 27 | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 28 | 28 | <view class="fs28">粗大区域</view> | ... | ... |
packageB/pages/AI-test-skin/success_result/dark/dark.wxml
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | </view> |
| 14 | 14 | <view class="analyse_classify_header_item mt_b5"> |
| 15 | 15 | <view class="analyse_classify_header_img"> |
| 16 | - <image src="{{iurl}}/miniapp/images/skinimg/mao123.png"></image> | |
| 16 | + <image src="{{iurl}}/miniapp/images/skinimg/heiyanquan.png"></image> | |
| 17 | 17 | </view> |
| 18 | 18 | <view style="line-height:60rpx;margin-left:20rpx" style="margin-top:5%"> |
| 19 | 19 | <view class="fs28">程度情况</view> |
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | |
| 24 | 24 | <view class="analyse_classify_header_item mt_b5"> |
| 25 | 25 | <view class="analyse_classify_header_img"> |
| 26 | - <image src="/packageB/images/Snipaste_2022-02-17_15-28-13.jpg"></image> | |
| 26 | + <image src="{{iurl}}/miniapp/images/skinimg/heiyanquan_icon.jpg"></image> | |
| 27 | 27 | </view> |
| 28 | 28 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 29 | 29 | <view class="fs28">黑眼圈类型</view> |
| ... | ... | @@ -32,23 +32,44 @@ |
| 32 | 32 | </view> |
| 33 | 33 | |
| 34 | 34 | <view> |
| 35 | - <view class="heiyanquan"> | |
| 36 | - <image src="{{iurl}}/miniapp/images/skinimg/man1.jpeg" style="width: 100%;height: 100%;"></image> | |
| 37 | - </view> | |
| 38 | - <view class="leixing"> | |
| 39 | - <view class="_img"> | |
| 40 | - <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/man2.jpeg"></image> | |
| 41 | - <view class="fs28">色素性-中度</view> | |
| 35 | + <block wx:if="{{sex === 'male'}}"> | |
| 36 | + <view class="heiyanquan"> | |
| 37 | + <image src="{{iurl}}/miniapp/images/skinimg/nan3.jpeg" style="width: 100%;height: 100%;"></image> | |
| 42 | 38 | </view> |
| 43 | - <view class="_img"> | |
| 44 | - <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/man8.jpeg"></image> | |
| 45 | - <view class="fs28">血管性-轻度</view> | |
| 39 | + <view class="leixing"> | |
| 40 | + <view class="_img"> | |
| 41 | + <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/nan4.jpeg"></image> | |
| 42 | + <view class="fs28">色素性-中度</view> | |
| 43 | + </view> | |
| 44 | + <view class="_img"> | |
| 45 | + <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/nan5.jpeg"></image> | |
| 46 | + <view class="fs28">血管性-轻度</view> | |
| 47 | + </view> | |
| 48 | + <view class="_img"> | |
| 49 | + <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/nan6.jpeg"></image> | |
| 50 | + <view class="fs28" style="color: #666;">阴影型-无</view> | |
| 51 | + </view> | |
| 46 | 52 | </view> |
| 47 | - <view class="_img"> | |
| 48 | - <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/man11.jpeg"></image> | |
| 49 | - <view class="fs28" style="color: #666;">阴影型-无</view> | |
| 53 | + </block> | |
| 54 | + <block wx:else> | |
| 55 | + <view class="heiyanquan"> | |
| 56 | + <image src="{{iurl}}/miniapp/images/skinimg/nv3.jpeg" style="width: 100%;height: 100%;"></image> | |
| 50 | 57 | </view> |
| 51 | - </view> | |
| 58 | + <view class="leixing"> | |
| 59 | + <view class="_img"> | |
| 60 | + <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/nv4.jpeg"></image> | |
| 61 | + <view class="fs28">色素性-中度</view> | |
| 62 | + </view> | |
| 63 | + <view class="_img"> | |
| 64 | + <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/nv5.jpeg"></image> | |
| 65 | + <view class="fs28">血管性-轻度</view> | |
| 66 | + </view> | |
| 67 | + <view class="_img"> | |
| 68 | + <image style="height:150rpx;width:150rpx;border-radius: 50%;" src="{{iurl}}/miniapp/images/skinimg/nv6.jpeg"></image> | |
| 69 | + <view class="fs28" style="color: #666;">阴影型-无</view> | |
| 70 | + </view> | |
| 71 | + </view> | |
| 72 | + </block> | |
| 52 | 73 | </view> |
| 53 | 74 | <view class="fs28 mt_b10"> |
| 54 | 75 | <text>明显可见毛孔或内含小于毛孔大小角栓</text> | ... | ... |
packageB/pages/AI-test-skin/success_result/pore/pore.wxml
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | </view> |
| 23 | 23 | <view class="analyse_classify_header_item mt_b5"> |
| 24 | 24 | <view class="analyse_classify_header_img"> |
| 25 | - <image src="/packageB/images/Snipaste_2022-02-17_15-28-13.jpg"></image> | |
| 25 | + <image src="{{iurl}}/miniapp/images/skinimg/maokong_icon.jpg"></image> | |
| 26 | 26 | </view> |
| 27 | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 28 | 28 | <view class="fs28">粗大区域</view> | ... | ... |
packageB/pages/AI-test-skin/success_result/sensitive/sensitive.wxml
| 1 | -<view class="mb_b5" id="mao_kong"> | |
| 1 | +<view class="mb_b5" id="min_gan_du"> | |
| 2 | 2 | <view class="analyse_classify bg_white"> |
| 3 | 3 | <view class="analyse_classify_header"> |
| 4 | 4 | <view> |
| 5 | - <view style="color: #45d4eb;">#01</view> | |
| 5 | + <view style="color: #45d4eb;">#07</view> | |
| 6 | 6 | <view class="flex-space-between"> |
| 7 | 7 | <text style="font-size: 42rpx;" class="bold">敏感度</text> |
| 8 | 8 | <view class="fs26" catchtap="show_dailog" data-type="7" style="display: flex;align-items: center;"> |
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | </view> |
| 14 | 14 | <view class="analyse_classify_header_item mt_b5"> |
| 15 | 15 | <view class="analyse_classify_header_img"> |
| 16 | - <image src="{{iurl}}/miniapp/images/skinimg/mao123.png"></image> | |
| 16 | + <image src="{{iurl}}/miniapp/images/skinimg/seban_heitou_maokong_.png"></image> | |
| 17 | 17 | </view> |
| 18 | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 19 | 19 | <view class="fs28">程度情况</view> |
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | </view> |
| 23 | 23 | <view class="analyse_classify_header_item mt_b5"> |
| 24 | 24 | <view class="analyse_classify_header_img"> |
| 25 | - <image src="/packageB/images/Snipaste_2022-02-17_15-28-13.jpg"></image> | |
| 25 | + <image src="{{iurl}}/miniapp/images/skinimg/mingandu_icon.jpg"></image> | |
| 26 | 26 | </view> |
| 27 | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 28 | 28 | <view class="fs28">敏感度得分</view> | ... | ... |
packageB/pages/AI-test-skin/success_result/speckle/speckle.wxml
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | </view> |
| 14 | 14 | <view class="analyse_classify_header_item mt_b5"> |
| 15 | 15 | <view class="analyse_classify_header_img"> |
| 16 | - <image src="{{iurl}}/miniapp/images/skinimg/mao123.png"></image> | |
| 16 | + <image src="{{iurl}}/miniapp/images/skinimg/seban_heitou_maokong_.png"></image> | |
| 17 | 17 | </view> |
| 18 | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 19 | 19 | <view class="fs28">程度情况</view> |
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | </view> |
| 23 | 23 | <view class="analyse_classify_header_item mt_b5"> |
| 24 | 24 | <view class="analyse_classify_header_img"> |
| 25 | - <image src="/packageB/images/Snipaste_2022-02-17_15-28-13.jpg"></image> | |
| 25 | + <image src="{{iurl}}/miniapp/images/skinimg/seban_icon.jpg"></image> | |
| 26 | 26 | </view> |
| 27 | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 28 | 28 | <view class="fs28">色斑个数</view> | ... | ... |
packageB/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-21 16:07:09 | |
| 4 | + * @LastEditTime: 2022-02-22 16:16:59 | |
| 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,15 +24,15 @@ 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: 'ming_gan_ji', 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 | currentIndex: 0, |
| 29 | 29 | tab_id: 'zong_he', |
| 30 | 30 | iurl: setting.imghost, |
| 31 | 31 | showDialog: false, |
| 32 | 32 | yanjing: true, //显示皮肤问题 |
| 33 | 33 | img_scale: true, //问题标注放大图片 |
| 34 | - img_scale_icon:true, | |
| 35 | - show_problem:1, //问题标注显示问题 | |
| 34 | + img_scale_icon: true, | |
| 35 | + show_problem: 1, //问题标注显示问题 | |
| 36 | 36 | |
| 37 | 37 | }, |
| 38 | 38 | |
| ... | ... | @@ -40,76 +40,77 @@ Page({ |
| 40 | 40 | * 生命周期函数--监听页面加载 |
| 41 | 41 | */ |
| 42 | 42 | onLoad: function (options) { |
| 43 | - var th=this; | |
| 44 | - //初始化一下,获取商品的价格 | |
| 45 | - this.init(); | |
| 46 | - //var face_result=getApp().globalData.face_result; | |
| 47 | - //var face_data=face_result.face_list[0]; | |
| 48 | - this.data.id=options.id; | |
| 43 | + var th = this; | |
| 44 | + //初始化一下,获取商品的价格 | |
| 45 | + this.init(); | |
| 46 | + //var face_result=getApp().globalData.face_result; | |
| 47 | + //var face_data=face_result.face_list[0]; | |
| 48 | + this.data.id = options.id; | |
| 49 | 49 | |
| 50 | 50 | //计算图片要显示的大小 |
| 51 | 51 | th.data.cWidth = wx.getSystemInfoSync().windowWidth; |
| 52 | 52 | th.data.cHeight = wx.getSystemInfoSync().windowHeight; |
| 53 | - th.data.face_height=th.data.cHeight*0.8*0.8; | |
| 54 | - | |
| 55 | - this.get_data(function (json,img) { | |
| 56 | - //-- 数据先存着 -- | |
| 57 | - var face_data=th.data.face_data=json.face_list[0]; | |
| 58 | - //痤疮数 | |
| 59 | - var acne_num=face_data.acnespotmole.acne_num; | |
| 60 | - //色斑数 | |
| 61 | - var speckle_num=face_data.acnespotmole.speckle_num; | |
| 62 | - //皱纹数 | |
| 63 | - var wrinkle_num=face_data.wrinkle.wrinkle_num; | |
| 64 | - //黑头数 | |
| 65 | - var blackhead_num=face_data.blackheadpore.blackhead_num; | |
| 66 | - //毛孔数 | |
| 67 | - var pore_num=face_data.blackheadpore.pore_num; | |
| 68 | - //黑眼圈的严重程度 | |
| 69 | - var dark_type=face_data.eyesattr.dark_circle_left_type.length>0?face_data.eyesattr.dark_circle_left_type[0]:-1; | |
| 70 | - var dark_type1=face_data.eyesattr.dark_circle_right_type.length>0?face_data.eyesattr.dark_circle_right_type[0]:-1; | |
| 71 | - if(dark_type1>dark_type){ | |
| 72 | - dark_type=dark_type1; | |
| 73 | - } | |
| 74 | - var skin_sensitive_check= parseInt(face_data.skinquality.skin_sensitive_check[0]); | |
| 75 | - var skin_dryoil_check=face_data.skinquality.skin_dryoil_check; | |
| 76 | - | |
| 77 | - var location=face_data.location; | |
| 78 | - th.data.bili=th.data.face_height/(location.height+location.height/2.3); | |
| 79 | - | |
| 80 | - th.setData({ | |
| 81 | - acne_num:acne_num, | |
| 82 | - speckle_num:speckle_num, | |
| 83 | - wrinkle_num:wrinkle_num, | |
| 84 | - blackhead_num:blackhead_num, | |
| 85 | - pore_num:pore_num, | |
| 86 | - dark_type:dark_type, | |
| 87 | - skin_sensitive_check:skin_sensitive_check, | |
| 88 | - skin_dryoil_check:skin_dryoil_check, | |
| 89 | - face_img:img, | |
| 90 | - m_top:(location.top-location.height/2.5)*th.data.bili, | |
| 91 | - m_left:(location.left-location.width/7)*th.data.bili, | |
| 92 | - bili:th.data.bili | |
| 93 | - }) | |
| 94 | - //-- 调用毛孔的推荐函数 -- | |
| 95 | - if(pore_num>0) | |
| 96 | - pore.get_goods(th,setting.stoid); | |
| 97 | - //-- 调用黑头的推荐函数 -- | |
| 98 | - if(blackhead_num>0) | |
| 99 | - blackhead.get_goods(th,setting.stoid); | |
| 100 | - //-- 调用色斑的推荐函数 -- | |
| 101 | - if(speckle_num>0) | |
| 102 | - speckle.get_goods(th,setting.stoid); | |
| 103 | - //-- 调用皱纹的推荐函数 -- | |
| 104 | - if(wrinkle_num>0) | |
| 105 | - wrinkle.get_goods(th,setting.stoid); | |
| 106 | - //-- 黑眼圈 -- | |
| 107 | - if(dark_type>-1) | |
| 108 | - dark.get_goods(th,setting.stoid); | |
| 109 | - //-- 黑眼圈 -- | |
| 110 | - if(acne_num>-0) | |
| 111 | - acne.get_goods(th,setting.stoid); | |
| 112 | - }) | |
| 53 | + th.data.face_height = th.data.cHeight * 0.8 * 0.8; | |
| 54 | + | |
| 55 | + this.get_data(function (json, json1, img) { | |
| 56 | + //-- 数据先存着 -- | |
| 57 | + var face_data = th.data.face_data = json.face_list[0]; | |
| 58 | + var sex = json1.face_list[0].gender.type; | |
| 59 | + //痤疮数 | |
| 60 | + var acne_num = face_data.acnespotmole.acne_num; | |
| 61 | + //色斑数 | |
| 62 | + var speckle_num = face_data.acnespotmole.speckle_num; | |
| 63 | + //皱纹数 | |
| 64 | + var wrinkle_num = face_data.wrinkle.wrinkle_num; | |
| 65 | + //黑头数 | |
| 66 | + var blackhead_num = face_data.blackheadpore.blackhead_num; | |
| 67 | + //毛孔数 | |
| 68 | + var pore_num = face_data.blackheadpore.pore_num; | |
| 69 | + //黑眼圈的严重程度 | |
| 70 | + var dark_type = face_data.eyesattr.dark_circle_left_type.length > 0 ? face_data.eyesattr.dark_circle_left_type[0] : -1; | |
| 71 | + var dark_type1 = face_data.eyesattr.dark_circle_right_type.length > 0 ? face_data.eyesattr.dark_circle_right_type[0] : -1; | |
| 72 | + if (dark_type1 > dark_type) { | |
| 73 | + dark_type = dark_type1; | |
| 74 | + } | |
| 75 | + var skin_sensitive_check = parseInt(face_data.skinquality.skin_sensitive_check[0]); | |
| 76 | + var skin_dryoil_check = face_data.skinquality.skin_dryoil_check; | |
| 77 | + | |
| 78 | + var location = face_data.location; | |
| 79 | + th.data.bili = th.data.face_height / (location.height + location.height / 2.3); | |
| 80 | + | |
| 81 | + th.setData({ | |
| 82 | + acne_num: acne_num, | |
| 83 | + speckle_num: speckle_num, | |
| 84 | + wrinkle_num: wrinkle_num, | |
| 85 | + blackhead_num: blackhead_num, | |
| 86 | + pore_num: pore_num, | |
| 87 | + dark_type: dark_type, | |
| 88 | + skin_sensitive_check: skin_sensitive_check, | |
| 89 | + skin_dryoil_check: skin_dryoil_check, | |
| 90 | + face_img: img, | |
| 91 | + m_top: (location.top - location.height / 2.5) * th.data.bili, | |
| 92 | + m_left: (location.left - location.width / 7) * th.data.bili, | |
| 93 | + bili: th.data.bili | |
| 94 | + }) | |
| 95 | + //-- 调用毛孔的推荐函数 -- | |
| 96 | + if (pore_num > 0) | |
| 97 | + pore.get_goods(th, setting.stoid); | |
| 98 | + //-- 调用黑头的推荐函数 -- | |
| 99 | + if (blackhead_num > 0) | |
| 100 | + blackhead.get_goods(th, setting.stoid); | |
| 101 | + //-- 调用色斑的推荐函数 -- | |
| 102 | + if (speckle_num > 0) | |
| 103 | + speckle.get_goods(th, setting.stoid); | |
| 104 | + //-- 调用皱纹的推荐函数 -- | |
| 105 | + if (wrinkle_num > 0) | |
| 106 | + wrinkle.get_goods(th, setting.stoid); | |
| 107 | + //-- 黑眼圈 -- | |
| 108 | + if (dark_type > -1) | |
| 109 | + dark.get_goods(th, setting.stoid); | |
| 110 | + //-- 黑眼圈 -- | |
| 111 | + if (acne_num > -0) | |
| 112 | + acne.get_goods(th, setting.stoid); | |
| 113 | + }) | |
| 113 | 114 | }, |
| 114 | 115 | |
| 115 | 116 | //-- 初始等级卡 -- |
| ... | ... | @@ -164,27 +165,52 @@ Page({ |
| 164 | 165 | }) |
| 165 | 166 | }, |
| 166 | 167 | //-- 获取json数据 -- |
| 167 | - get_data:function (func) { | |
| 168 | - var url="/api/weshop/face/storeSkinface/get/"+setting.stoid+"/"+this.data.id; | |
| 169 | - getApp().request.promiseGet(url, {}).then(res=>{ | |
| 170 | - if(res.data.code==0){ | |
| 171 | - var json=JSON.parse(res.data.data.resultjson); | |
| 172 | - func(json,res.data.data.img) | |
| 173 | - }else{ | |
| 174 | - getApp().showWarning("获取数据失败"); | |
| 175 | - } | |
| 176 | - }) | |
| 168 | + get_data: function (func) { | |
| 169 | + var url = "/api/weshop/face/storeSkinface/get/" + setting.stoid + "/" + this.data.id; | |
| 170 | + getApp().request.promiseGet(url, {}).then(res => { | |
| 171 | + if (res.data.code == 0) { | |
| 172 | + console.log(res, 'dsffffff'); | |
| 173 | + var json = JSON.parse(res.data.data.resultjson); | |
| 174 | + var json1 = JSON.parse(res.data.data.detectjson); | |
| 175 | + func(json, json1, res.data.data.img) | |
| 176 | + } else { | |
| 177 | + getApp().showWarning("获取数据失败"); | |
| 178 | + } | |
| 179 | + }) | |
| 177 | 180 | }, |
| 178 | 181 | |
| 179 | 182 | /** |
| 180 | 183 | * 生命周期函数--监听页面初次渲染完成 |
| 181 | 184 | */ |
| 182 | - onReady: function () {}, | |
| 185 | + onReady: function () { | |
| 186 | + // let heightRecords = []; | |
| 187 | + // setTimeout(() => { | |
| 188 | + // for (let i = 0; i < this.data.tab.length; i++) { | |
| 189 | + // let item = this.data.tab[i]; | |
| 190 | + // let id = `#${item.id}`; | |
| 191 | + // let query = wx.createSelectorQuery(); | |
| 192 | + // query.select(id).boundingClientRect(rect => { | |
| 193 | + // console.log(rect, i); | |
| 194 | + // heightRecords[i] = rect.height; | |
| 195 | + // }).exec() | |
| 196 | + // } | |
| 197 | + // this.setData({ | |
| 198 | + // heightRecords, | |
| 199 | + // }) | |
| 200 | + // }, 1000) | |
| 201 | + | |
| 202 | + }, | |
| 203 | + binddragend(e) { | |
| 204 | + console.log(e); | |
| 205 | + this.setData({ | |
| 206 | + scrollTop: e.detail.scrollTop, | |
| 207 | + }) | |
| 208 | + }, | |
| 183 | 209 | |
| 184 | 210 | /** |
| 185 | 211 | * 生命周期函数--监听页面显示 |
| 186 | 212 | */ |
| 187 | - onShow: function () {}, | |
| 213 | + onShow: function () { }, | |
| 188 | 214 | |
| 189 | 215 | clickTab(e) { |
| 190 | 216 | let { index, tab_id } = e.currentTarget.dataset; |
| ... | ... | @@ -201,7 +227,7 @@ Page({ |
| 201 | 227 | click_fangda() { |
| 202 | 228 | this.setData({ |
| 203 | 229 | img_scale: !this.data.img_scale, |
| 204 | - img_scale_icon:!this.data.yanjing, | |
| 230 | + img_scale_icon: !this.data.yanjing, | |
| 205 | 231 | }) |
| 206 | 232 | }, |
| 207 | 233 | |
| ... | ... | @@ -219,39 +245,39 @@ Page({ |
| 219 | 245 | |
| 220 | 246 | }, |
| 221 | 247 | show_dailog(e) { |
| 222 | - var type=parseInt(e.currentTarget.dataset.type); | |
| 248 | + var type = parseInt(e.currentTarget.dataset.type); | |
| 223 | 249 | this.setData({ |
| 224 | - showDialog: true,show_type:type | |
| 250 | + showDialog: true, show_type: type | |
| 225 | 251 | }) |
| 226 | - switch (type){ | |
| 227 | - case 1: //毛孔 | |
| 228 | - var pore_list=this.data.face_data.blackheadpore.circles[0].pore; | |
| 229 | - this.setData({pore_list:pore_list}); | |
| 230 | - break; | |
| 252 | + switch (type) { | |
| 253 | + case 1: //毛孔 | |
| 254 | + var pore_list = this.data.face_data.blackheadpore.circles[0].pore; | |
| 255 | + this.setData({ pore_list: pore_list }); | |
| 256 | + break; | |
| 231 | 257 | case 2://色斑 |
| 232 | - var speckle_list=this.data.face_data.acnespotmole.speckle_list; | |
| 233 | - this.setData({speckle_list:speckle_list}); | |
| 258 | + var speckle_list = this.data.face_data.acnespotmole.speckle_list; | |
| 259 | + this.setData({ speckle_list: speckle_list }); | |
| 260 | + break; | |
| 261 | + case 3://皱纹 | |
| 262 | + var wrinkle_list = this.data.face_data.wrinkle.wrinkle_data; | |
| 263 | + this.setData({ wrinkle_list: wrinkle_list }); | |
| 234 | 264 | break; |
| 235 | - case 3://皱纹 | |
| 236 | - var wrinkle_list=this.data.face_data.wrinkle.wrinkle_data; | |
| 237 | - this.setData({wrinkle_list:wrinkle_list}); | |
| 238 | - break; | |
| 239 | 265 | case 4://黑头 |
| 240 | - var blackhead_list=this.data.face_data.blackheadpore.circles[0].blackhead; | |
| 241 | - this.setData({blackhead_list:blackhead_list}); | |
| 266 | + var blackhead_list = this.data.face_data.blackheadpore.circles[0].blackhead; | |
| 267 | + this.setData({ blackhead_list: blackhead_list }); | |
| 242 | 268 | break; |
| 243 | 269 | case 5://黑眼圈 |
| 244 | - var arr=this.data.face_data.eyesattr.dark_circle_left[0]; | |
| 245 | - var arr2=this.data.face_data.eyesattr.dark_circle_right[0]; | |
| 246 | - var arr3=[...arr,...arr2]; | |
| 247 | - this.setData({dark_list:arr3}); | |
| 270 | + var arr = this.data.face_data.eyesattr.dark_circle_left[0]; | |
| 271 | + var arr2 = this.data.face_data.eyesattr.dark_circle_right[0]; | |
| 272 | + var arr3 = [...arr, ...arr2]; | |
| 273 | + this.setData({ dark_list: arr3 }); | |
| 248 | 274 | break; |
| 249 | 275 | case 6://痤疮 |
| 250 | - var acne_list=this.data.face_data.acnespotmole.acne_list; | |
| 251 | - this.setData({acne_list:acne_list}); | |
| 276 | + var acne_list = this.data.face_data.acnespotmole.acne_list; | |
| 277 | + this.setData({ acne_list: acne_list }); | |
| 252 | 278 | break; |
| 253 | - default: | |
| 254 | - break | |
| 279 | + default: | |
| 280 | + break | |
| 255 | 281 | } |
| 256 | 282 | }, |
| 257 | 283 | |
| ... | ... | @@ -290,8 +316,8 @@ Page({ |
| 290 | 316 | }, |
| 291 | 317 | |
| 292 | 318 | //商品页面跳转 |
| 293 | - go_url:function (e) { | |
| 294 | - var url=e.currentTarget.dataset.url; | |
| 319 | + go_url: function (e) { | |
| 320 | + var url = e.currentTarget.dataset.url; | |
| 295 | 321 | getApp().goto(url); |
| 296 | 322 | }, |
| 297 | 323 | |
| ... | ... | @@ -337,16 +363,16 @@ Page({ |
| 337 | 363 | |
| 338 | 364 | //图片加载的时候,计算图片的像素大小 |
| 339 | 365 | face_img_load: function (e) { |
| 340 | - var th=this; | |
| 366 | + var th = this; | |
| 341 | 367 | var imgwidth = e.detail.width; |
| 342 | 368 | var imgheight = e.detail.height; |
| 343 | 369 | |
| 344 | - var w= th.data.cWidth*0.8; | |
| 370 | + var w = th.data.cWidth * 0.8; | |
| 345 | 371 | |
| 346 | 372 | this.setData({ |
| 347 | - iwidth:imgwidth*th.data.bili, | |
| 348 | - iheight:imgheight*th.data.bili, | |
| 349 | - bili1:w/imgwidth //图片放大时候的比例 | |
| 373 | + iwidth: imgwidth * th.data.bili, | |
| 374 | + iheight: imgheight * th.data.bili, | |
| 375 | + bili1: w / imgwidth //图片放大时候的比例 | |
| 350 | 376 | }) |
| 351 | 377 | }, |
| 352 | 378 | }) |
| 353 | 379 | \ No newline at end of file | ... | ... |
packageB/pages/AI-test-skin/success_result/success_result.json
packageB/pages/AI-test-skin/success_result/success_result.wxml
| ... | ... | @@ -2,16 +2,16 @@ |
| 2 | 2 | |
| 3 | 3 | <view style="height: 100rpx;"> |
| 4 | 4 | <scroll-view enable-flex scroll-into-view="{{tab_id}}" scroll-with-animation scroll-x class="tab_scroll"> |
| 5 | - <view class="flex" style="height: 100%;"> | |
| 6 | - <view wx:for="{{tab}}" wx:key="id" id="{{item.id}}" bindtap="clickTab" data-tab_id="{{item.id}}" data-index="{{index}}" class="tab_scroll_item {{currentIndex==index?'active':''}}"> | |
| 7 | - {{item.name}} | |
| 5 | + <view class="flex" style="height: 100%;"> | |
| 6 | + <view wx:for="{{tab}}" wx:key="id" id="{{item.id}}" bindtap="clickTab" data-tab_id="{{item.id}}" data-index="{{index}}" class="tab_scroll_item {{currentIndex==index?'active':''}}"> | |
| 7 | + {{item.name}} | |
| 8 | + </view> | |
| 8 | 9 | </view> |
| 9 | - </view> | |
| 10 | -</scroll-view> | |
| 10 | + </scroll-view> | |
| 11 | 11 | </view> |
| 12 | 12 | |
| 13 | -<scroll-view enable-flex scroll-into-view="{{tab_id}}" scroll-with-animation scroll-y style="height: 100%;"> | |
| 14 | - <view bindtap="lo" class="analyse_by_people" id="zong_he" > | |
| 13 | +<scroll-view enable-flex enhanced scroll-into-view="{{tab_id}}" scroll-with-animation bindscroll="binddragend" scroll-y style="height: calc(100% - 100rpx)"> | |
| 14 | + <view class="analyse_by_people" id="zong_he"> | |
| 15 | 15 | <view class="analyse"> |
| 16 | 16 | <view class="analyse_left"> |
| 17 | 17 | <view class="mark">毛孔 {{pore_num}}</view> |
| ... | ... | @@ -19,7 +19,8 @@ |
| 19 | 19 | <view class="mark">黑眼圈 {{s_filter.get_dark_type(dark_type)}}</view> |
| 20 | 20 | </view> |
| 21 | 21 | <view class="analyse_center"> |
| 22 | - <image src="{{iurl}}/miniapp/images/skinimg/man.png"></image> | |
| 22 | + <image wx:if="{{sex === 'female'}}" src="{{iurl}}/miniapp/images/skinimg/nv.png"></image> | |
| 23 | + <image wx:else src="{{iurl}}/miniapp/images/skinimg/nan.png"></image> | |
| 23 | 24 | </view> |
| 24 | 25 | <view class="analyse_right"> |
| 25 | 26 | <view class="mark">黑头 {{blackhead_num}}</view> |
| ... | ... | @@ -43,12 +44,12 @@ |
| 43 | 44 | </view> |
| 44 | 45 | <view class="content" style="padding-bottom: 0;"> |
| 45 | 46 | <view class="mb_b5" style="display: none"> |
| 46 | - <image src="/packageB/images/1.png" style="height: 200rpx;width: 100%;"></image> | |
| 47 | + <image src="{{iurl}}/miniapp/images/skinimg/_code.png" style="height: 200rpx;width: 100%;"></image> | |
| 47 | 48 | </view> |
| 48 | 49 | <view class="analyse_result mt_b5"> |
| 49 | - <!-- <view> --> | |
| 50 | 50 | <view class="img"> |
| 51 | - <image src="{{iurl}}/miniapp/images/skinimg/mao18.jpeg" style="width: 100%;height: 100%;"></image> | |
| 51 | + <image wx:if="{{sex === 'female'}}" src="{{iurl}}/miniapp/images/skinimg/nv1.jpeg" style="width: 100%;height: 100%;"></image> | |
| 52 | + <image wx:else src="{{iurl}}/miniapp/images/skinimg/nan1.jpeg" style="width: 100%;height: 100%;"></image> | |
| 52 | 53 | </view> |
| 53 | 54 | <view class="f1 ml20"> |
| 54 | 55 | <view class="bold">待确定</view> |
| ... | ... | @@ -57,10 +58,9 @@ |
| 57 | 58 | <text class="you">油性区</text> |
| 58 | 59 | </view> |
| 59 | 60 | <view class="mt20 fs26"> |
| 60 | - <text>你的油性的身份骨科大夫地方官梵蒂冈反对烦得很东方红风格和的发挥</text> | |
| 61 | + <text>你的皮肤总体油脂过剩,容易引发皮肤问题。日常可使用一些具有控油,补水功效产品,帮助调理肌肤</text> | |
| 61 | 62 | </view> |
| 62 | 63 | </view> |
| 63 | - <!-- </view> --> | |
| 64 | 64 | </view> |
| 65 | 65 | </view> |
| 66 | 66 | </view> |
| ... | ... | @@ -68,7 +68,7 @@ |
| 68 | 68 | <view class="content"> |
| 69 | 69 | <!-- 毛孔 --> |
| 70 | 70 | <block wx:if="{{pore_num}}"> |
| 71 | - <include src="pore/pore.wxml" /> | |
| 71 | + <include src="pore/pore.wxml" /> | |
| 72 | 72 | </block> |
| 73 | 73 | <!-- 黑头 --> |
| 74 | 74 | <block wx:if="{{blackhead_num}}"> |
| ... | ... | @@ -107,9 +107,8 @@ |
| 107 | 107 | <block wx:if="{{img_scale}}"> |
| 108 | 108 | <view class="dialog_img"> |
| 109 | 109 | <view class="img_content"> |
| 110 | - <view class="face_show_view" | |
| 111 | - style="position: relative;width:{{iwidth}}px;height:{{iheight}}px;margin-top: -{{m_top}}px;margin-left: -{{m_left}}px"> | |
| 112 | - <image src="{{iurl}}{{face_img}}" bindload="face_img_load" style="width: 100%;height: 100%;"></image> | |
| 110 | + <view class="face_show_view" style="position: relative;width:{{iwidth}}px;height:{{iheight}}px;margin-top: -{{m_top}}px;margin-left: -{{m_left}}px"> | |
| 111 | + <image src="{{iurl}}{{face_img}}" bindload="face_img_load" style="width: 100%;height: 100%;"></image> | |
| 113 | 112 | |
| 114 | 113 | <block wx:if="{{yanjing}}"> |
| 115 | 114 | <!-- 显示毛孔 --> |
| ... | ... | @@ -196,7 +195,7 @@ |
| 196 | 195 | <!-- 缩小 --> |
| 197 | 196 | <block wx:else> |
| 198 | 197 | <view style="position: relative"> |
| 199 | - <image style="width: 100%;" src="{{iurl}}{{face_img}}" mode="widthFix" ></image> | |
| 198 | + <image style="width: 100%;" src="{{iurl}}{{face_img}}" mode="widthFix"></image> | |
| 200 | 199 | <block wx:if="{{yanjing}}"> |
| 201 | 200 | <!-- 显示毛孔 --> |
| 202 | 201 | <block wx:if="{{show_type==1}}"> |
| ... | ... | @@ -252,4 +251,4 @@ |
| 252 | 251 | <text catchtap="click_fangda" class="iconfont icon-suoxiao mgb20"></text> |
| 253 | 252 | </view> |
| 254 | 253 | </block> |
| 255 | 254 | -</view> |
| 255 | +</view> | |
| 256 | 256 | \ No newline at end of file | ... | ... |
packageB/pages/AI-test-skin/success_result/success_result.wxss
packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | </view> |
| 14 | 14 | <view class="analyse_classify_header_item mt_b5"> |
| 15 | 15 | <view class="analyse_classify_header_img"> |
| 16 | - <image src="{{iurl}}/miniapp/images/skinimg/mao123.png"></image> | |
| 16 | + <image src="{{iurl}}/miniapp/images/skinimg/zhouwen.png"></image> | |
| 17 | 17 | </view> |
| 18 | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
| 19 | 19 | <view class="fs28">程度情况</view> |
| ... | ... | @@ -30,7 +30,8 @@ |
| 30 | 30 | </view> |
| 31 | 31 | </view> |
| 32 | 32 | <view class="analyse_center" style="width: 250rpx;height: 250rpx;"> |
| 33 | - <image src="{{iurl}}/miniapp/images/skinimg/man10.jpeg"></image> | |
| 33 | + <image wx:if="{{sex === 'male'}}" src="{{iurl}}/miniapp/images/skinimg/nan2.jpeg"></image> | |
| 34 | + <image wx:else src="{{iurl}}/miniapp/images/skinimg/nv2.jpeg"></image> | |
| 34 | 35 | <view class="lianxian"></view> |
| 35 | 36 | <view class="lianxian1"></view> |
| 36 | 37 | <view class="lianxian2"></view> | ... | ... |