Commit 3d4f84dce4e582a85965118414e474df8c246cde
1 parent
31ea14fa
测肤修改
Showing
6 changed files
with
51 additions
and
4 deletions
packageD/pages/AI-test-skin/analyse/analyse.js
... | ... | @@ -26,6 +26,7 @@ Page({ |
26 | 26 | err_map: null, |
27 | 27 | skin_type: 0, |
28 | 28 | ce_user_id:0, |
29 | + img_remark:'' | |
29 | 30 | }, |
30 | 31 | |
31 | 32 | /** |
... | ... | @@ -36,6 +37,7 @@ Page({ |
36 | 37 | var plugin = requirePlugin('mtSkinSdk') |
37 | 38 | plugin.setConfig(pluginGD) |
38 | 39 | } |
40 | + this.setData({img_remark:options.img_remark}) | |
39 | 41 | |
40 | 42 | if(options.ce_user_id) |
41 | 43 | this.data.ce_user_id=options.ce_user_id; |
... | ... | @@ -519,6 +521,7 @@ Page({ |
519 | 521 | resultjson: JSON.stringify(analyse_data), |
520 | 522 | detectjson: JSON.stringify(analyse_info), |
521 | 523 | skin_type: 1, |
524 | + img_remark:th.data.img_remark | |
522 | 525 | } |
523 | 526 | //要保存一下分析的结果 |
524 | 527 | th.json_post("/api/weshop/face/storeSkinface/save", req_data, function (res) { |
... | ... | @@ -556,6 +559,8 @@ Page({ |
556 | 559 | resultjson: JSON.stringify(res.data.data), |
557 | 560 | detectjson: JSON.stringify(th.data.check_data), |
558 | 561 | skin_type: 0, |
562 | + img_remark:th.data.img_remark | |
563 | + | |
559 | 564 | } |
560 | 565 | |
561 | 566 | var txt=[]; | ... | ... |
packageD/pages/AI-test-skin/history_record/history_record.js
... | ... | @@ -203,6 +203,7 @@ Page({ |
203 | 203 | for (let i = 0; i < data.length; i++) { |
204 | 204 | let history = data[i]; |
205 | 205 | let id = history.id; |
206 | + let img_remark = history.img_remark; | |
206 | 207 | let now = new Date(history['addtime'] * 1000); |
207 | 208 | let year = now.getFullYear(); //年 |
208 | 209 | let month = (now.getMonth() + 1).toString().padStart(2, 0); //月 |
... | ... | @@ -218,10 +219,12 @@ Page({ |
218 | 219 | let obj = { |
219 | 220 | time, |
220 | 221 | id, |
222 | + img_remark, | |
221 | 223 | }; |
222 | 224 | if (arr.length > 0) { |
223 | 225 | let index = arr.findIndex(item => { |
224 | 226 | return item['history_time'] === history_time; |
227 | + | |
225 | 228 | }) |
226 | 229 | if (index > -1) { |
227 | 230 | arr[index]['time_arr'].push(obj); | ... | ... |
packageD/pages/AI-test-skin/history_record/history_record.wxml
... | ... | @@ -14,9 +14,14 @@ |
14 | 14 | <view class="history_list"> |
15 | 15 | <view class="history_list_month" wx:for="{{history}}"> |
16 | 16 | <view style="color:#333;font-size:26rpx;margin-top: 30rpx">{{item.history_time}}</view> |
17 | - <view class="souce" wx:for="{{item.time_arr}}" wx:for-item="subitem" bindtap="go_result" data-id="{{subitem.id}}" wx:for-index="subindex" wx:key="subindex"> | |
17 | + <view wx:for="{{item.time_arr}}" wx:for-item="subitem" bindtap="go_result" data-id="{{subitem.id}}" wx:for-index="subindex" wx:key="subindex"> | |
18 | + | |
19 | + <view class="pdt16 fs28" wx:if="{{subitem.img_remark}}">{{subitem.img_remark}}</view> | |
20 | + <view class="souce"> | |
18 | 21 | <view style="font-weight: 600;">{{subitem.time}}</view> |
19 | 22 | <view style="color: #9b9b9b;" >去查看<text style="font-size: 24rpx;" class="iconfont icon-arrow_right"></text></view> |
23 | + </view> | |
24 | + | |
20 | 25 | </view> |
21 | 26 | </view> |
22 | 27 | </view> | ... | ... |
packageD/pages/AI-test-skin/select_photo/select_photo.js
... | ... | @@ -13,7 +13,8 @@ Page({ |
13 | 13 | iurl: setting.imghost, |
14 | 14 | gl_skin_img: null, |
15 | 15 | skin_type: 0, |
16 | - ce_user_id:0 | |
16 | + ce_user_id:0, | |
17 | + img_remark:'' | |
17 | 18 | }, |
18 | 19 | |
19 | 20 | /** |
... | ... | @@ -40,9 +41,13 @@ Page({ |
40 | 41 | if (e.data.code == 0) { |
41 | 42 | getApp().globalData.face_img = e.data.data.img; |
42 | 43 | getApp().globalData.face_SourceImg = e.data.data.SourceImg; |
43 | - let url = "/packageD/pages/AI-test-skin/analyse/analyse"; //跳到分析页 | |
44 | + var getimg_remark=th.data.img_remark; | |
45 | + | |
46 | + | |
47 | + let url = "/packageD/pages/AI-test-skin/analyse/analyse"; //跳到分析页 | |
48 | + url+="?img_remark="+getimg_remark; | |
44 | 49 | if(th.data.ce_user_id) |
45 | - url+="?ce_user_id="+th.data.ce_user_id; | |
50 | + url+="&ce_user_id="+th.data.ce_user_id; | |
46 | 51 | |
47 | 52 | console.log("select_ph"); |
48 | 53 | console.log(url); |
... | ... | @@ -60,6 +65,20 @@ Page({ |
60 | 65 | }) |
61 | 66 | |
62 | 67 | }, |
68 | + | |
69 | + getInput(e) { | |
70 | + let val = e.detail.value; | |
71 | + if (val) { | |
72 | + this.setData({ | |
73 | + img_remark: e.detail.value, | |
74 | + }); | |
75 | + } else { | |
76 | + this.setData({ | |
77 | + img_remark: '', | |
78 | + }); | |
79 | + } | |
80 | + | |
81 | + }, | |
63 | 82 | //-- 重新从相册中选择图片 -- |
64 | 83 | show_pai_pop: function () { |
65 | 84 | var th = this; | ... | ... |
packageD/pages/AI-test-skin/select_photo/select_photo.wxml
... | ... | @@ -3,6 +3,11 @@ |
3 | 3 | <image style="width: 100%;border-radius: 3%;" mode="widthFix" src="{{gl_skin_img['path']}}"></image> |
4 | 4 | <!-- <image wx:else style="width: 100%;border-radius: 3%;" mode="widthFix" src="{{gl_skin_img['path']}}"></image> --> |
5 | 5 | </view> |
6 | + | |
7 | + <view> | |
8 | + <input class="inputclass" name="img_remark" value="" placeholder="请填写备注" bindinput="getInput"> </input> | |
9 | + </view> | |
10 | + | |
6 | 11 | <view class="foot_btn"> |
7 | 12 | <view class="reset_select" bindtap="takePhoto"> |
8 | 13 | <text class="iconfont icon-zuojiantou" style="font-size: 40rpx"></text> | ... | ... |
packageD/pages/AI-test-skin/select_photo/select_photo.wxss
... | ... | @@ -28,3 +28,13 @@ page { |
28 | 28 | /* margin: 0 auto; */ |
29 | 29 | color: #fff; |
30 | 30 | } |
31 | + | |
32 | +.inputclass{ | |
33 | + width: 540rpx; | |
34 | + height: 55rpx; | |
35 | + line-height: 55rpx; | |
36 | + background-color: rgb(238, 238, 238); | |
37 | + border-radius: 6rpx; | |
38 | + padding-left: 40rpx; | |
39 | + padding-right: 15rpx; | |
40 | +} | |
31 | 41 | \ No newline at end of file | ... | ... |