Commit a1b3d341ba940194297ca8a0b7c95b36b88bf7b6
Merge branch 'dev' into 'test'
Dev See merge request !966
Showing
61 changed files
with
1514 additions
and
707 deletions
app.json
@@ -154,14 +154,8 @@ | @@ -154,14 +154,8 @@ | ||
154 | "pages/user/choice_guide/choice_guide", | 154 | "pages/user/choice_guide/choice_guide", |
155 | "pages/video/index", | 155 | "pages/video/index", |
156 | "pages/boxes-list/boxes-list", | 156 | "pages/boxes-list/boxes-list", |
157 | - "pages/boxes-details/boxes-details", | ||
158 | - "pages/AI-test-skin/index/aiskin", | ||
159 | - "pages/AI-test-skin/shoot_notice/shoot_notice", | ||
160 | - "pages/AI-test-skin/history_record/history_record", | ||
161 | - "pages/AI-test-skin/select_photo/select_photo", | ||
162 | - "pages/AI-test-skin/fail_result/fail_result", | ||
163 | - "pages/AI-test-skin/success_result/success_result", | ||
164 | - "pages/AI-test-skin/analyse/analyse" | 157 | + "pages/boxes-details/boxes-details" |
158 | + | ||
165 | ] | 159 | ] |
166 | }, | 160 | }, |
167 | { | 161 | { |
@@ -187,6 +181,19 @@ | @@ -187,6 +181,19 @@ | ||
187 | "pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo", | 181 | "pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo", |
188 | "pages/luckyGo/luckyGo_activityList/luckyGo_activityList" | 182 | "pages/luckyGo/luckyGo_activityList/luckyGo_activityList" |
189 | ] | 183 | ] |
184 | + }, | ||
185 | + { | ||
186 | + "root": "packageD/", | ||
187 | + "name": "pack4", | ||
188 | + "pages": [ | ||
189 | + "pages/AI-test-skin/index/aiskin", | ||
190 | + "pages/AI-test-skin/shoot_notice/shoot_notice", | ||
191 | + "pages/AI-test-skin/history_record/history_record", | ||
192 | + "pages/AI-test-skin/select_photo/select_photo", | ||
193 | + "pages/AI-test-skin/fail_result/fail_result", | ||
194 | + "pages/AI-test-skin/success_result/success_result", | ||
195 | + "pages/AI-test-skin/analyse/analyse" | ||
196 | + ] | ||
190 | } | 197 | } |
191 | ], | 198 | ], |
192 | "permission": { | 199 | "permission": { |
components/diy_goodsGroup/diy_goodsGroup.js
@@ -449,7 +449,7 @@ Component({ | @@ -449,7 +449,7 @@ Component({ | ||
449 | var now = ut.gettimestamp(); | 449 | var now = ut.gettimestamp(); |
450 | var th = this; | 450 | var th = this; |
451 | if (!goods || goods.length == 0) return false; | 451 | if (!goods || goods.length == 0) return false; |
452 | - var user_id = getApp().globalData.userInfo.user_id; | 452 | + var user_id = getApp().globalData.user_id; |
453 | if (!user_id) user_id = 0; | 453 | if (!user_id) user_id = 0; |
454 | for (var i in goods) { | 454 | for (var i in goods) { |
455 | var val = goods[i]; | 455 | var val = goods[i]; |
packageB/pages/AI-test-skin/history_record/history_record.wxml deleted
1 | -<view class="content"> | ||
2 | - <view style="margin-bottom: 5%;">历史分析</view> | ||
3 | - <view class="echarts" style="border-radius: 30rpx;"> | ||
4 | - <view class="tubiao"> | ||
5 | - <ec-canvas id="mychart" canvas-id="mychart-bar" ec="{{ec}}"></ec-canvas> | ||
6 | - </view> | ||
7 | - <text class="fs24" style="position:absolute;bottom:25px;color: #333;"> | ||
8 | - 注:请确保多次拍摄姿态和环境光线一致。拍摄姿态的偏移、环境光线变化或者皮肤状态变化都可能导致分数较大波动。 | ||
9 | - </text> | ||
10 | - </view> | ||
11 | - <view class="mgv5">历史报告</view> | ||
12 | - | ||
13 | - <view class="history_list"> | ||
14 | - <view class="history_list_month"> | ||
15 | - <view style="color:#333;font-size:26rpx;margin-top: 30rpx">2022年02月</view> | ||
16 | - <view class="souce"> | ||
17 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
18 | - <view style="color:#fbb11f;">73分</view> | ||
19 | - </view> | ||
20 | - <view class="souce"> | ||
21 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
22 | - <view style="color:#fbb11f;">73分</view> | ||
23 | - </view> | ||
24 | - <view class="souce"> | ||
25 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
26 | - <view style="color:#fbb11f;">73分</view> | ||
27 | - </view> | ||
28 | - <view class="souce"> | ||
29 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
30 | - <view style="color:#fbb11f;">73分</view> | ||
31 | - </view> | ||
32 | - <view class="souce"> | ||
33 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
34 | - <view style="color:#fbb11f;">73分</view> | ||
35 | - </view> | ||
36 | - <view class="souce"> | ||
37 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
38 | - <view style="color:#fbb11f;">73分</view> | ||
39 | - </view> | ||
40 | - <view class="souce"> | ||
41 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
42 | - <view style="color:#fbb11f;">73分</view> | ||
43 | - </view> | ||
44 | - <view class="souce"> | ||
45 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
46 | - <view style="color:#fbb11f;">73分</view> | ||
47 | - </view> | ||
48 | - <view class="souce"> | ||
49 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
50 | - <view style="color:#fbb11f;">73分</view> | ||
51 | - </view> | ||
52 | - </view> | ||
53 | - <view class="history_list_month"> | ||
54 | - <view style="color:#333;font-size:26rpx;margin-top: 30rpx">2022年02月</view> | ||
55 | - <view class="souce"> | ||
56 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
57 | - <view style="color:#fbb11f;">73分</view> | ||
58 | - </view> | ||
59 | - </view> | ||
60 | - <view class="history_list_month"> | ||
61 | - <view style="color:#333;font-size:26rpx;margin-top: 30rpx">2022年02月</view> | ||
62 | - <view class="souce"> | ||
63 | - <view style="font-weight: 600;">2022/02/19 15:35</view> | ||
64 | - <view style="color:#fbb11f;">73分</view> | ||
65 | - </view> | ||
66 | - </view> | ||
67 | - </view> | ||
68 | -</view> | ||
69 | \ No newline at end of file | 0 | \ No newline at end of file |
packageB/pages/AI-test-skin/success_result/success_result.js deleted
1 | -/* | ||
2 | - * @Author: abson | ||
3 | - * @Date: 2022-02-16 15:36:47 | ||
4 | - * @LastEditTime: 2022-02-21 16:07:09 | ||
5 | - * @LastEditors: Please set LastEditors | ||
6 | - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
7 | - * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js | ||
8 | - */ | ||
9 | -// packageB/pages/AI-test-skin/success_result/success_result.js | ||
10 | -const app = getApp(); | ||
11 | -const request = app.request; | ||
12 | -const os = app.globalData; | ||
13 | -const setting = os.setting; | ||
14 | -const ut = require('../../../../utils/util'); | ||
15 | -//毛孔 | ||
16 | -const acne = require('acne/acne'); | ||
17 | -const blackhead = require('blackhead/blackhead'); | ||
18 | -const dark = require('dark/dark'); | ||
19 | -const pore = require('pore/pore'); | ||
20 | -const speckle = require('speckle/speckle'); | ||
21 | -const wrinkle = require('wrinkle/wrinkle'); | ||
22 | -Page({ | ||
23 | - /** | ||
24 | - * 页面的初始数据 | ||
25 | - */ | ||
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: '敏感度' }], | ||
28 | - currentIndex: 0, | ||
29 | - tab_id: 'zong_he', | ||
30 | - iurl: setting.imghost, | ||
31 | - showDialog: false, | ||
32 | - yanjing: true, //显示皮肤问题 | ||
33 | - img_scale: true, //问题标注放大图片 | ||
34 | - img_scale_icon:true, | ||
35 | - show_problem:1, //问题标注显示问题 | ||
36 | - | ||
37 | - }, | ||
38 | - | ||
39 | - /** | ||
40 | - * 生命周期函数--监听页面加载 | ||
41 | - */ | ||
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; | ||
49 | - | ||
50 | - //计算图片要显示的大小 | ||
51 | - th.data.cWidth = wx.getSystemInfoSync().windowWidth; | ||
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 | - }) | ||
113 | - }, | ||
114 | - | ||
115 | - //-- 初始等级卡 -- | ||
116 | - init: function () { | ||
117 | - var th = this; | ||
118 | - if (!getApp().globalData.user_id) return false; | ||
119 | - getApp().request.get("/api/weshop/users/get/" + setting.stoid + "/" + getApp().globalData.user_id, { | ||
120 | - isShowLoading: false, | ||
121 | - success: function (e) { | ||
122 | - if (e.data.code == 0 && e.data && e.data.data) { | ||
123 | - getApp().globalData.userInfo = e.data.data; | ||
124 | - getApp().getConfig2(function (e) { | ||
125 | - var swithc_list = e.switch_list; | ||
126 | - var sw_arr = JSON.parse(swithc_list); | ||
127 | - //---如果后台有开等级卡的开关--- | ||
128 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
129 | - th.setData({ | ||
130 | - rank_switch: true | ||
131 | - }); | ||
132 | - //---回调卡的列表--- | ||
133 | - th.getPlusCardType(function (ob) { | ||
134 | - th.setData({ | ||
135 | - card_list: ob.card_list | ||
136 | - }); | ||
137 | - var ti = setInterval(function () { | ||
138 | - var user = getApp().globalData.userInfo; | ||
139 | - if (!user) return false; | ||
140 | - clearInterval(ti); | ||
141 | - if (user.card_field && user['card_expiredate']) { | ||
142 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
143 | - var end = new Date(str); | ||
144 | - end = Date.parse(end) / 1000; | ||
145 | - var now = ut.gettimestamp(); | ||
146 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
147 | - if (user.card_field && now < end) { | ||
148 | - var card_name = ob.name_map.get(user.card_field); | ||
149 | - if (card_name.length > 4) card_name = card_name.substring(0, 8); | ||
150 | - th.setData({ | ||
151 | - card_field: user.card_field, | ||
152 | - card_name: card_name, | ||
153 | - card_list: ob.card_list | ||
154 | - }); | ||
155 | - } | ||
156 | - } | ||
157 | - }, 500) | ||
158 | - }) | ||
159 | - } | ||
160 | - }) | ||
161 | - | ||
162 | - } | ||
163 | - } | ||
164 | - }) | ||
165 | - }, | ||
166 | - //-- 获取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 | - }) | ||
177 | - }, | ||
178 | - | ||
179 | - /** | ||
180 | - * 生命周期函数--监听页面初次渲染完成 | ||
181 | - */ | ||
182 | - onReady: function () {}, | ||
183 | - | ||
184 | - /** | ||
185 | - * 生命周期函数--监听页面显示 | ||
186 | - */ | ||
187 | - onShow: function () {}, | ||
188 | - | ||
189 | - clickTab(e) { | ||
190 | - let { index, tab_id } = e.currentTarget.dataset; | ||
191 | - this.setData({ | ||
192 | - currentIndex: index, | ||
193 | - tab_id, | ||
194 | - }) | ||
195 | - }, | ||
196 | - click_yanjing() { | ||
197 | - this.setData({ | ||
198 | - yanjing: !this.data.yanjing, | ||
199 | - }) | ||
200 | - }, | ||
201 | - click_fangda() { | ||
202 | - this.setData({ | ||
203 | - img_scale: !this.data.img_scale, | ||
204 | - img_scale_icon:!this.data.yanjing, | ||
205 | - }) | ||
206 | - }, | ||
207 | - | ||
208 | - /** | ||
209 | - * 生命周期函数--监听页面隐藏 | ||
210 | - */ | ||
211 | - onHide: function () { | ||
212 | - | ||
213 | - }, | ||
214 | - | ||
215 | - /** | ||
216 | - * 生命周期函数--监听页面卸载 | ||
217 | - */ | ||
218 | - onUnload: function () { | ||
219 | - | ||
220 | - }, | ||
221 | - show_dailog(e) { | ||
222 | - var type=parseInt(e.currentTarget.dataset.type); | ||
223 | - this.setData({ | ||
224 | - showDialog: true,show_type:type | ||
225 | - }) | ||
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; | ||
231 | - case 2://色斑 | ||
232 | - var speckle_list=this.data.face_data.acnespotmole.speckle_list; | ||
233 | - this.setData({speckle_list:speckle_list}); | ||
234 | - 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 | - case 4://黑头 | ||
240 | - var blackhead_list=this.data.face_data.blackheadpore.circles[0].blackhead; | ||
241 | - this.setData({blackhead_list:blackhead_list}); | ||
242 | - break; | ||
243 | - 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}); | ||
248 | - break; | ||
249 | - case 6://痤疮 | ||
250 | - var acne_list=this.data.face_data.acnespotmole.acne_list; | ||
251 | - this.setData({acne_list:acne_list}); | ||
252 | - break; | ||
253 | - default: | ||
254 | - break | ||
255 | - } | ||
256 | - }, | ||
257 | - | ||
258 | - close_dialog() { | ||
259 | - this.setData({ | ||
260 | - showDialog: false, | ||
261 | - }) | ||
262 | - }, | ||
263 | - | ||
264 | - close_mask() { | ||
265 | - this.setData({ | ||
266 | - showDialog: false, | ||
267 | - img_scale: true, | ||
268 | - }) | ||
269 | - }, | ||
270 | - | ||
271 | - /** | ||
272 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
273 | - */ | ||
274 | - onPullDownRefresh: function () { | ||
275 | - | ||
276 | - }, | ||
277 | - | ||
278 | - /** | ||
279 | - * 页面上拉触底事件的处理函数 | ||
280 | - */ | ||
281 | - onReachBottom: function () { | ||
282 | - | ||
283 | - }, | ||
284 | - | ||
285 | - /** | ||
286 | - * 用户点击右上角分享 | ||
287 | - */ | ||
288 | - onShareAppMessage: function () { | ||
289 | - | ||
290 | - }, | ||
291 | - | ||
292 | - //商品页面跳转 | ||
293 | - go_url:function (e) { | ||
294 | - var url=e.currentTarget.dataset.url; | ||
295 | - getApp().goto(url); | ||
296 | - }, | ||
297 | - | ||
298 | - //--- 获取卡类列表 --- | ||
299 | - getPlusCardType: function (func) { | ||
300 | - var storid = setting.stoid; | ||
301 | - var th = this; | ||
302 | - getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
303 | - | ||
304 | - if (res.data.code != 0 || !res.data.data) { | ||
305 | - var ob = { | ||
306 | - "card_list": [], | ||
307 | - "name_map": "" | ||
308 | - }; | ||
309 | - func(ob); | ||
310 | - return false; | ||
311 | - } | ||
312 | - | ||
313 | - var plusCard = res.data.data; | ||
314 | - var arr = [1219, 2089, 3031]; | ||
315 | - var new_arr = new Array(); | ||
316 | - var card_name_map = new Map(); | ||
317 | - | ||
318 | - var user = getApp().globalData.userInfo; | ||
319 | - if (plusCard) { | ||
320 | - for (var i = 0; i < plusCard.length; i++) { | ||
321 | - if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) { | ||
322 | - continue; | ||
323 | - } | ||
324 | - var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | ||
325 | - card_name_map.set(name, plusCard[i].CardName); | ||
326 | - new_arr.push(plusCard[i]); | ||
327 | - | ||
328 | - } | ||
329 | - } | ||
330 | - var ob = { | ||
331 | - "card_list": new_arr, | ||
332 | - "name_map": card_name_map | ||
333 | - }; | ||
334 | - func(ob); | ||
335 | - }) | ||
336 | - }, | ||
337 | - | ||
338 | - //图片加载的时候,计算图片的像素大小 | ||
339 | - face_img_load: function (e) { | ||
340 | - var th=this; | ||
341 | - var imgwidth = e.detail.width; | ||
342 | - var imgheight = e.detail.height; | ||
343 | - | ||
344 | - var w= th.data.cWidth*0.8; | ||
345 | - | ||
346 | - this.setData({ | ||
347 | - iwidth:imgwidth*th.data.bili, | ||
348 | - iheight:imgheight*th.data.bili, | ||
349 | - bili1:w/imgwidth //图片放大时候的比例 | ||
350 | - }) | ||
351 | - }, | ||
352 | -}) | ||
353 | \ No newline at end of file | 0 | \ No newline at end of file |
packageB/components/ec-canvas/ec-canvas.js renamed to packageD/components/ec-canvas/ec-canvas.js
packageB/components/ec-canvas/ec-canvas.json renamed to packageD/components/ec-canvas/ec-canvas.json
packageB/components/ec-canvas/ec-canvas.wxml renamed to packageD/components/ec-canvas/ec-canvas.wxml
packageB/components/ec-canvas/ec-canvas.wxss renamed to packageD/components/ec-canvas/ec-canvas.wxss
packageB/components/ec-canvas/echarts.js renamed to packageD/components/ec-canvas/echarts.js
packageB/components/ec-canvas/wx-canvas.js renamed to packageD/components/ec-canvas/wx-canvas.js
packageB/pages/AI-test-skin/analyse/analyse.js renamed to packageD/pages/AI-test-skin/analyse/analyse.js
packageB/pages/AI-test-skin/analyse/analyse.json renamed to packageD/pages/AI-test-skin/analyse/analyse.json
packageB/pages/AI-test-skin/analyse/analyse.wxml renamed to packageD/pages/AI-test-skin/analyse/analyse.wxml
packageB/pages/AI-test-skin/analyse/analyse.wxss renamed to packageD/pages/AI-test-skin/analyse/analyse.wxss
packageB/pages/AI-test-skin/fail_result/fail_result.js renamed to packageD/pages/AI-test-skin/fail_result/fail_result.js
packageB/pages/AI-test-skin/fail_result/fail_result.json renamed to packageD/pages/AI-test-skin/fail_result/fail_result.json
packageB/pages/AI-test-skin/fail_result/fail_result.wxml renamed to packageD/pages/AI-test-skin/fail_result/fail_result.wxml
packageB/pages/AI-test-skin/fail_result/fail_result.wxss renamed to packageD/pages/AI-test-skin/fail_result/fail_result.wxss
packageB/pages/AI-test-skin/fail_result/iconfont.ttf renamed to packageD/pages/AI-test-skin/fail_result/iconfont.ttf
No preview for this file type
packageB/pages/AI-test-skin/fail_result/iconfont.woff renamed to packageD/pages/AI-test-skin/fail_result/iconfont.woff
No preview for this file type
packageB/pages/AI-test-skin/fail_result/iconfont.woff2 renamed to packageD/pages/AI-test-skin/fail_result/iconfont.woff2
No preview for this file type
packageB/pages/AI-test-skin/history_record/history_record.js renamed to packageD/pages/AI-test-skin/history_record/history_record.js
@@ -10,15 +10,15 @@ let initChart = null; | @@ -10,15 +10,15 @@ let initChart = null; | ||
10 | const option = { | 10 | const option = { |
11 | backgroundColor: 'white', | 11 | backgroundColor: 'white', |
12 | tooltip: {}, | 12 | tooltip: {}, |
13 | - grid:{ | 13 | + grid: { |
14 | // left:'20%', | 14 | // left:'20%', |
15 | - top:'30%', | 15 | + top: '30%', |
16 | // right:'10%' | 16 | // right:'10%' |
17 | }, | 17 | }, |
18 | legend: { | 18 | legend: { |
19 | icon: 'circle', | 19 | icon: 'circle', |
20 | - itemWidth: 5, | ||
21 | - itemHeight: 5, | 20 | + itemWidth: 5, |
21 | + itemHeight: 5, | ||
22 | selected: { | 22 | selected: { |
23 | '综合': true, | 23 | '综合': true, |
24 | '毛孔': false, | 24 | '毛孔': false, |
@@ -29,7 +29,7 @@ const option = { | @@ -29,7 +29,7 @@ const option = { | ||
29 | '敏感度': false, | 29 | '敏感度': false, |
30 | '黑眼圈': false, | 30 | '黑眼圈': false, |
31 | }, | 31 | }, |
32 | - padding:[20,50], | 32 | + padding: [20, 50], |
33 | data: [ | 33 | data: [ |
34 | { | 34 | { |
35 | name: '综合', | 35 | name: '综合', |
@@ -183,7 +183,57 @@ Page({ | @@ -183,7 +183,57 @@ Page({ | ||
183 | * 生命周期函数--监听页面加载 | 183 | * 生命周期函数--监听页面加载 |
184 | */ | 184 | */ |
185 | onLoad: function (options) { | 185 | onLoad: function (options) { |
186 | + let url = `/api/weshop/face/storeSkinface/page`; | ||
187 | + app.request.promiseGet(url, { | ||
188 | + isShowLoading: true, | ||
189 | + data: { | ||
190 | + store_id: setting.stoid, | ||
191 | + user_id: os.user_id, | ||
192 | + } | ||
193 | + }).then(res => { | ||
194 | + console.log('111111111', res); | ||
195 | + if (ut.ajax_ok(res)) { | ||
196 | + let data = res.data.data.pageData; | ||
197 | + let arr = []; | ||
198 | + for (let i = 0; i < data.length; i++) { | ||
199 | + let history = data[i]; | ||
200 | + let id = history.id; | ||
201 | + let now = new Date(history['addtime'] * 1000); | ||
202 | + let year = now.getFullYear(); //年 | ||
203 | + let month = (now.getMonth() + 1).toString().padStart(2, 0); //月 | ||
204 | + let day = (now.getDate()).toString().padStart(2, 0); //日 | ||
205 | + let hour = (now.getHours()).toString().padStart(2, 0); //时 | ||
206 | + let minute = (now.getMinutes()).toString().padStart(2, 0); //分 | ||
207 | + let history_time = `${year}年${month}月`; | ||
208 | + let time = `${year}/${month}/${day} ${hour}:${minute}`; | ||
209 | + let time_obj = { | ||
210 | + history_time, | ||
211 | + time_arr: new Array(), | ||
212 | + }; | ||
213 | + if (arr.length > 0) { | ||
214 | + let index = arr.findIndex(item => { | ||
215 | + return item['history_time'] === history_time; | ||
216 | + }) | ||
217 | + if (index > -1) { | ||
218 | + let obj = { | ||
219 | + time, | ||
220 | + id, | ||
221 | + }; | ||
222 | + arr[index]['time_arr'].push(obj); | ||
223 | + } else { | ||
224 | + arr.push(time_obj); | ||
225 | + } | ||
226 | + } else { | ||
227 | + arr.push(time_obj); | ||
228 | + } | ||
229 | + } | ||
230 | + this.setData({ | ||
231 | + history: arr, | ||
232 | + }) | ||
233 | + initChart.setOption(option); | ||
234 | + } | ||
186 | 235 | ||
236 | + }) | ||
187 | }, | 237 | }, |
188 | 238 | ||
189 | /** | 239 | /** |
@@ -192,17 +242,18 @@ Page({ | @@ -192,17 +242,18 @@ Page({ | ||
192 | onReady: function () { | 242 | onReady: function () { |
193 | 243 | ||
194 | }, | 244 | }, |
195 | - initChartOption() { | ||
196 | - initChart.setOption(option); | ||
197 | - }, | 245 | + |
198 | /** | 246 | /** |
199 | * 生命周期函数--监听页面显示 | 247 | * 生命周期函数--监听页面显示 |
200 | */ | 248 | */ |
201 | onShow: function () { | 249 | onShow: function () { |
202 | setTimeout(() => { | 250 | setTimeout(() => { |
203 | - initChart.setOption(option); | 251 | + |
204 | }, 1000); | 252 | }, 1000); |
205 | }, | 253 | }, |
254 | + go_result(e) { | ||
255 | + | ||
256 | + }, | ||
206 | 257 | ||
207 | /** | 258 | /** |
208 | * 生命周期函数--监听页面隐藏 | 259 | * 生命周期函数--监听页面隐藏 |
packageB/pages/AI-test-skin/history_record/history_record.json renamed to packageD/pages/AI-test-skin/history_record/history_record.json
packageD/pages/AI-test-skin/history_record/history_record.wxml
0 → 100644
1 | +<view class="content"> | ||
2 | + <view style="margin-bottom: 5%;">历史分析</view> | ||
3 | + <view class="echarts" style="border-radius: 30rpx;"> | ||
4 | + <view class="tubiao"> | ||
5 | + <ec-canvas id="mychart" canvas-id="mychart-bar" ec="{{ec}}"></ec-canvas> | ||
6 | + </view> | ||
7 | + <text class="fs24" style="position:absolute;bottom:25px;color: #333;"> | ||
8 | + 注:请确保多次拍摄姿态和环境光线一致。拍摄姿态的偏移、环境光线变化或者皮肤状态变化都可能导致分数较大波动。 | ||
9 | + </text> | ||
10 | + </view> | ||
11 | + <view class="mgv5">历史报告</view> | ||
12 | + | ||
13 | + <view class="history_list"> | ||
14 | + <view class="history_list_month" wx:for="{{history}}"> | ||
15 | + <view style="color:#333;font-size:26rpx;margin-top: 30rpx">{{item.time}}</view> | ||
16 | + <view class="souce" wx:for="{{item.time_arr}}" wx:for-item="subitem" wx:for-index="subindex" wx:key="subindex"> | ||
17 | + <view style="font-weight: 600;">{{subitem}}</view> | ||
18 | + <view style="color: #9b9b9b;" bindtap="go_result">去查看<text style="font-size: 24rpx;" class="iconfont icon-arrow_right"></text></view> | ||
19 | + </view> | ||
20 | + </view> | ||
21 | + </view> | ||
22 | +</view> | ||
0 | \ No newline at end of file | 23 | \ No newline at end of file |
packageB/pages/AI-test-skin/history_record/history_record.wxss renamed to packageD/pages/AI-test-skin/history_record/history_record.wxss
packageB/pages/AI-test-skin/index/aiskin.js renamed to packageD/pages/AI-test-skin/index/aiskin.js
1 | /* | 1 | /* |
2 | - * @Author: your name | 2 | + * @Author: abson |
3 | * @Date: 2022-02-11 14:13:05 | 3 | * @Date: 2022-02-11 14:13:05 |
4 | - * @LastEditTime: 2022-02-16 14:18:30 | 4 | + * @LastEditTime: 2022-02-22 15:17:48 |
5 | * @LastEditors: Please set LastEditors | 5 | * @LastEditors: Please set LastEditors |
6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\index\aiskin.js | 7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\index\aiskin.js |
packageB/pages/AI-test-skin/index/aiskin.json renamed to packageD/pages/AI-test-skin/index/aiskin.json
packageB/pages/AI-test-skin/index/aiskin.wxml renamed to packageD/pages/AI-test-skin/index/aiskin.wxml
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <cover-view style="padding: 0 6rpx 0 25rpx;" bindtap="goto" data-url="/packageB/pages/AI-test-skin/history_record/history_record">历史档案</cover-view> | 3 | <cover-view style="padding: 0 6rpx 0 25rpx;" bindtap="goto" data-url="/packageB/pages/AI-test-skin/history_record/history_record">历史档案</cover-view> |
4 | <text class="iconfont icon-arrow_right"></text> | 4 | <text class="iconfont icon-arrow_right"></text> |
5 | </view> | 5 | </view> |
6 | - <image src="{{iurl}}/miniapp/images/skinimg/3.jpeg"></image> | 6 | + <image src="{{iurl}}/miniapp/images/skinimg/shouye.jpeg"></image> |
7 | <view class="start_btn" bindtap="goto" data-url="/packageB/pages/AI-test-skin/shoot_notice/shoot_notice"> | 7 | <view class="start_btn" bindtap="goto" data-url="/packageB/pages/AI-test-skin/shoot_notice/shoot_notice"> |
8 | <text>开始测肤</text> | 8 | <text>开始测肤</text> |
9 | </view> | 9 | </view> |
packageB/pages/AI-test-skin/index/aiskin.wxss renamed to packageD/pages/AI-test-skin/index/aiskin.wxss
packageB/pages/AI-test-skin/select_photo/select_photo.js renamed to packageD/pages/AI-test-skin/select_photo/select_photo.js
packageB/pages/AI-test-skin/select_photo/select_photo.json renamed to packageD/pages/AI-test-skin/select_photo/select_photo.json
packageB/pages/AI-test-skin/select_photo/select_photo.wxml renamed to packageD/pages/AI-test-skin/select_photo/select_photo.wxml
packageB/pages/AI-test-skin/select_photo/select_photo.wxss renamed to packageD/pages/AI-test-skin/select_photo/select_photo.wxss
packageB/pages/AI-test-skin/shoot_notice/shoot_notice.js renamed to packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
packageB/pages/AI-test-skin/shoot_notice/shoot_notice.json renamed to packageD/pages/AI-test-skin/shoot_notice/shoot_notice.json
packageB/pages/AI-test-skin/shoot_notice/shoot_notice.wxml renamed to packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml
@@ -7,25 +7,25 @@ | @@ -7,25 +7,25 @@ | ||
7 | <view> | 7 | <view> |
8 | <view class="ready"> | 8 | <view class="ready"> |
9 | <view class="image"> | 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 | <text class="shuxian"></text> | 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 | </view> | 13 | </view> |
14 | <text class="fs28">1、请对准镜头,闭眼拍照</text> | 14 | <text class="fs28">1、请对准镜头,闭眼拍照</text> |
15 | </view> | 15 | </view> |
16 | <view class="ready"> | 16 | <view class="ready"> |
17 | <view class="image"> | 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 | <text class="shuxian"></text> | 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 | </view> | 21 | </view> |
22 | <text class="fs28">2、请摘下眼镜,撩起刘海</text> | 22 | <text class="fs28">2、请摘下眼镜,撩起刘海</text> |
23 | </view> | 23 | </view> |
24 | <view class="ready"> | 24 | <view class="ready"> |
25 | <view class="image"> | 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 | <text class="shuxian"></text> | 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 | </view> | 29 | </view> |
30 | <text class="fs28">3、保持脸部垂直,切勿距离过远过近</text> | 30 | <text class="fs28">3、保持脸部垂直,切勿距离过远过近</text> |
31 | </view> | 31 | </view> |
@@ -37,13 +37,13 @@ | @@ -37,13 +37,13 @@ | ||
37 | <view> | 37 | <view> |
38 | <view class="ready"> | 38 | <view class="ready"> |
39 | <view class="image_1"> | 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 | </view> | 41 | </view> |
42 | <text class="fs28">1、脸部置于画面中央,请勿距离过远或过近</text> | 42 | <text class="fs28">1、脸部置于画面中央,请勿距离过远或过近</text> |
43 | </view> | 43 | </view> |
44 | <view class="ready1"> | 44 | <view class="ready1"> |
45 | <view class="image_1"> | 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 | </view> | 47 | </view> |
48 | <text class="fs28">2、脸部保持平视摄像头</text> | 48 | <text class="fs28">2、脸部保持平视摄像头</text> |
49 | </view> | 49 | </view> |
packageB/pages/AI-test-skin/shoot_notice/shoot_notice.wxss renamed to packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss
packageB/pages/AI-test-skin/success_result/acne/acne.js renamed to packageD/pages/AI-test-skin/success_result/acne/acne.js
1 | -/* | ||
2 | - * @Author: abson | ||
3 | - * @Date: 2022-02-21 11:03:07 | ||
4 | - * @LastEditTime: 2022-02-21 17:50:35 | ||
5 | - * @LastEditors: Please set LastEditors | ||
6 | - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
7 | - * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\acne\acne.js | ||
8 | - */ | ||
9 | module.exports = { | 1 | module.exports = { |
10 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 | 2 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 |
11 | - get_goods: function(th,stoid) { | 3 | + get_goods: function(th,stoid,sort) { |
4 | + th.setData({acne_sort:sort}); | ||
12 | var r_code='03'; | 5 | var r_code='03'; |
13 | //获取痘痘的类型 | 6 | //获取痘痘的类型 |
14 | var list=th.data.face_data.acnespotmole.acne_list; | 7 | var list=th.data.face_data.acnespotmole.acne_list; |
@@ -42,9 +35,16 @@ module.exports = { | @@ -42,9 +35,16 @@ module.exports = { | ||
42 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; | 35 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; |
43 | getApp().request.promiseGet(url, {}).then(res=>{ | 36 | getApp().request.promiseGet(url, {}).then(res=>{ |
44 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | 37 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ |
45 | - th.setData({acne_quan_list:res.data.data.pageData}); | 38 | + var arr=res.data.data.pageData; |
39 | + arr.map(function (e) { | ||
40 | + e.q_word='acne_quan_list'; | ||
41 | + return e; | ||
42 | + }) | ||
43 | + th.setData({acne_quan_list:arr}); | ||
46 | } | 44 | } |
47 | }) | 45 | }) |
48 | 46 | ||
47 | + | ||
48 | + | ||
49 | }, | 49 | }, |
50 | } | 50 | } |
packageB/pages/AI-test-skin/success_result/acne/acne.wxml renamed to packageD/pages/AI-test-skin/success_result/acne/acne.wxml
1 | -<view class="mb_b5" id="cuo_chuang"> | 1 | +<view class="mb_b5 cuo_chuang" id="cuo_chuang"> |
2 | <view class="analyse_classify bg_white"> | 2 | <view class="analyse_classify bg_white"> |
3 | <view class="analyse_classify_header"> | 3 | <view class="analyse_classify_header"> |
4 | <view> | 4 | <view> |
5 | - <view style="color: #45d4eb;">#06</view> | 5 | + <view style="color: #45d4eb;">#0{{acne_sort}}</view> |
6 | <view class="flex-space-between"> | 6 | <view class="flex-space-between"> |
7 | <text style="font-size: 42rpx;" class="bold">痤疮</text> | 7 | <text style="font-size: 42rpx;" class="bold">痤疮</text> |
8 | <view class="fs26" catchtap="show_dailog" data-type="6" style="display: flex;align-items: center;"> | 8 | <view class="fs26" catchtap="show_dailog" data-type="6" style="display: flex;align-items: center;"> |
@@ -14,16 +14,16 @@ | @@ -14,16 +14,16 @@ | ||
14 | </view> | 14 | </view> |
15 | <view class="analyse_classify_header_item mt_b5"> | 15 | <view class="analyse_classify_header_item mt_b5"> |
16 | <view class="analyse_classify_header_img"> | 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 | </view> | 18 | </view> |
19 | <view style="line-height:60rpx;margin-left:20rpx"> | 19 | <view style="line-height:60rpx;margin-left:20rpx"> |
20 | <view class="fs28">程度情况</view> | 20 | <view class="fs28">程度情况</view> |
21 | - <view class="bold">I级</view> | 21 | + <view class="bold">痤疮数{{acne_num}}个</view> |
22 | </view> | 22 | </view> |
23 | </view> | 23 | </view> |
24 | - <view class="analyse_classify_header_item" style="margin-top:5%"> | 24 | + <view class="analyse_classify_header_item" style="margin-top:5%;display: none"> |
25 | <view class="analyse_classify_header_img"> | 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 | </view> | 27 | </view> |
28 | <view style="line-height:60rpx;margin-left:20rpx"> | 28 | <view style="line-height:60rpx;margin-left:20rpx"> |
29 | <view>痤疮个数</view> | 29 | <view>痤疮个数</view> |
@@ -32,28 +32,28 @@ | @@ -32,28 +32,28 @@ | ||
32 | </view> | 32 | </view> |
33 | <view class="leixing mt_b10"> | 33 | <view class="leixing mt_b10"> |
34 | <view class="_img"> | 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 | <view class="fs28 c_666"> | 36 | <view class="fs28 c_666"> |
37 | <view>囊肿</view> | 37 | <view>囊肿</view> |
38 | <view>健康</view> | 38 | <view>健康</view> |
39 | </view> | 39 | </view> |
40 | </view> | 40 | </view> |
41 | <view class="_img"> | 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 | <view class="fs28 c_666"> | 43 | <view class="fs28 c_666"> |
44 | <view>丘疹</view> | 44 | <view>丘疹</view> |
45 | <view>健康</view> | 45 | <view>健康</view> |
46 | </view> | 46 | </view> |
47 | </view> | 47 | </view> |
48 | <view class="_img"> | 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 | <view class="fs28 c_666"> | 50 | <view class="fs28 c_666"> |
51 | <view>粉刺</view> | 51 | <view>粉刺</view> |
52 | <view>健康</view> | 52 | <view>健康</view> |
53 | </view> | 53 | </view> |
54 | </view> | 54 | </view> |
55 | <view class="_img"> | 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 | <view class="fs28 c_666"> | 57 | <view class="fs28 c_666"> |
58 | <view>痘印</view> | 58 | <view>痘印</view> |
59 | <view>健康</view> | 59 | <view>健康</view> |
@@ -125,7 +125,7 @@ | @@ -125,7 +125,7 @@ | ||
125 | <!-- 优惠券 --> | 125 | <!-- 优惠券 --> |
126 | <view wx:if="{{acne_quan_list}}"> | 126 | <view wx:if="{{acne_quan_list}}"> |
127 | <view style="margin:5% 0">适合痤疮商品的优惠券</view> | 127 | <view style="margin:5% 0">适合痤疮商品的优惠券</view> |
128 | - <view class="xc-coupon-frame rel"> | 128 | + <view class="xc-coupon-frame"> |
129 | <block wx:for="{{acne_quan_list}}"> | 129 | <block wx:for="{{acne_quan_list}}"> |
130 | <include src="../coupon.wxml" /> | 130 | <include src="../coupon.wxml" /> |
131 | </block> | 131 | </block> |
packageB/pages/AI-test-skin/success_result/blackhead/blackhead.js renamed to packageD/pages/AI-test-skin/success_result/blackhead/blackhead.js
1 | -/* | ||
2 | - * @Author: abson | ||
3 | - * @Date: 2022-02-21 11:03:07 | ||
4 | - * @LastEditTime: 2022-02-21 17:48:28 | ||
5 | - * @LastEditors: Please set LastEditors | ||
6 | - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
7 | - * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\blackhead\blackhead.js | ||
8 | - */ | ||
9 | module.exports = { | 1 | module.exports = { |
10 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 | 2 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 |
11 | - get_goods: function(th,stoid) { | 3 | + get_goods: function(th,stoid,sort) { |
4 | + th.setData({backhead_sort:sort}); | ||
12 | var r_code='10'; | 5 | var r_code='10'; |
13 | //获取黑头的类型 | 6 | //获取黑头的类型 |
14 | var blackhead_segs_type=th.data.face_data.blackheadpore.blackhead_segs_type; | 7 | var blackhead_segs_type=th.data.face_data.blackheadpore.blackhead_segs_type; |
@@ -37,7 +30,12 @@ module.exports = { | @@ -37,7 +30,12 @@ module.exports = { | ||
37 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; | 30 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; |
38 | getApp().request.promiseGet(url, {}).then(res=>{ | 31 | getApp().request.promiseGet(url, {}).then(res=>{ |
39 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | 32 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ |
40 | - th.setData({blackhead_quan_list:res.data.data.pageData}); | 33 | + var arr=res.data.data.pageData; |
34 | + arr.map(function (e) { | ||
35 | + e.q_word='blackhead_quan_list'; | ||
36 | + return e; | ||
37 | + }) | ||
38 | + th.setData({blackhead_quan_list:arr}); | ||
41 | } | 39 | } |
42 | }) | 40 | }) |
43 | 41 |
packageB/pages/AI-test-skin/success_result/blackhead/blackhead.wxml renamed to packageD/pages/AI-test-skin/success_result/blackhead/blackhead.wxml
1 | -<view class="mb_b5" id="hei_tou"> | 1 | +<view class="mb_b5 hei_tou" id="hei_tou"> |
2 | <view class="analyse_classify bg_white"> | 2 | <view class="analyse_classify bg_white"> |
3 | <view class="analyse_classify_header"> | 3 | <view class="analyse_classify_header"> |
4 | <view> | 4 | <view> |
5 | - <view style="color: #45d4eb;">#01</view> | 5 | + <view style="color: #45d4eb;">#0{{backhead_sort}}</view> |
6 | <view class="flex-space-between"> | 6 | <view class="flex-space-between"> |
7 | <text style="font-size: 42rpx;" class="bold">黑头</text> | 7 | <text style="font-size: 42rpx;" class="bold">黑头</text> |
8 | <view class="fs26" catchtap="show_dailog" data-type="4" style="display: flex;align-items: center;"> | 8 | <view class="fs26" catchtap="show_dailog" data-type="4" style="display: flex;align-items: center;"> |
@@ -13,16 +13,16 @@ | @@ -13,16 +13,16 @@ | ||
13 | </view> | 13 | </view> |
14 | <view class="analyse_classify_header_item mt_b5"> | 14 | <view class="analyse_classify_header_item mt_b5"> |
15 | <view class="analyse_classify_header_img"> | 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 | </view> | 17 | </view> |
18 | <view style="line-height:60rpx;margin-left:20rpx"> | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
19 | <view class="fs28">程度情况</view> | 19 | <view class="fs28">程度情况</view> |
20 | - <view class="bold">待确定</view> | 20 | + <view class="bold">黑头数{{blackhead_num}}个</view> |
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | - <view class="analyse_classify_header_item mt_b5"> | 23 | + <view class="analyse_classify_header_item mt_b5" style="display: none"> |
24 | <view class="analyse_classify_header_img"> | 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 | </view> | 26 | </view> |
27 | <view style="line-height:60rpx;margin-left:20rpx"> | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
28 | <view class="fs28">粗大区域</view> | 28 | <view class="fs28">粗大区域</view> |
@@ -95,7 +95,7 @@ | @@ -95,7 +95,7 @@ | ||
95 | <!-- 优惠券 --> | 95 | <!-- 优惠券 --> |
96 | <view wx:if="{{blackhead_quan_list}}"> | 96 | <view wx:if="{{blackhead_quan_list}}"> |
97 | <view style="margin:5% 0">适合黑头商品的优惠券</view> | 97 | <view style="margin:5% 0">适合黑头商品的优惠券</view> |
98 | - <view class="xc-coupon-frame rel"> | 98 | + <view class="xc-coupon-frame"> |
99 | <block wx:for="{{blackhead_quan_list}}"> | 99 | <block wx:for="{{blackhead_quan_list}}"> |
100 | <include src="../coupon.wxml" /> | 100 | <include src="../coupon.wxml" /> |
101 | </block> | 101 | </block> |
packageB/pages/AI-test-skin/success_result/coupon.wxml renamed to packageD/pages/AI-test-skin/success_result/coupon.wxml
1 | <!-- -单张的券- --> | 1 | <!-- -单张的券- --> |
2 | +<view class="rel"> | ||
2 | <view class="coupon flex"> | 3 | <view class="coupon flex"> |
3 | <view class="circle xc-circular-one"></view> | 4 | <view class="circle xc-circular-one"></view> |
4 | <view class="xc-coupon-left "> | 5 | <view class="xc-coupon-left "> |
@@ -16,10 +17,12 @@ | @@ -16,10 +17,12 @@ | ||
16 | </view> | 17 | </view> |
17 | </view> | 18 | </view> |
18 | <view class="flex-vertical"> | 19 | <view class="flex-vertical"> |
19 | - <view class="three-level-word xc-get background {{item.everyone_num>0 && item.lqnum>=item.everyone_num?'nouse':''}}" data-ind="{{index}}" data-cid="{{item.id}}" bindtap="get_quan"> | 20 | + <view class="three-level-word xc-get background {{item.everyone_num>0 && item.lqnum>=item.everyone_num?'nouse':''}}" |
21 | + data-ind="{{index}}" data-cid="{{item.id}}" data-word="{{item.q_word}}" bindtap="get_quan"> | ||
20 | {{ item.linging==1?'领取中':'领取'}} | 22 | {{ item.linging==1?'领取中':'领取'}} |
21 | </view> | 23 | </view> |
22 | </view> | 24 | </view> |
23 | </view> | 25 | </view> |
24 | <view class="circle xc-circular-two"></view> | 26 | <view class="circle xc-circular-two"></view> |
27 | +</view> | ||
25 | </view> | 28 | </view> |
26 | \ No newline at end of file | 29 | \ No newline at end of file |
packageB/pages/AI-test-skin/success_result/dark/dark.js renamed to packageD/pages/AI-test-skin/success_result/dark/dark.js
1 | -/* | ||
2 | - * @Author: abson | ||
3 | - * @Date: 2022-02-21 11:03:07 | ||
4 | - * @LastEditTime: 2022-02-21 17:50:16 | ||
5 | - * @LastEditors: Please set LastEditors | ||
6 | - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
7 | - * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\dark\dark.js | ||
8 | - */ | ||
9 | module.exports = { | 1 | module.exports = { |
10 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 | 2 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 |
11 | - get_goods: function(th,stoid) { | ||
12 | - var r_code='08'; | 3 | + get_goods: function(th,stoid,sort) { |
4 | + | ||
5 | + th.setData({dark_sort:sort}); | ||
13 | 6 | ||
7 | + var r_code='08'; | ||
14 | var arr1=th.data.face_data.eyesattr.dark_circle_left_type; | 8 | var arr1=th.data.face_data.eyesattr.dark_circle_left_type; |
15 | var arr2=th.data.face_data.eyesattr.dark_circle_right_type; | 9 | var arr2=th.data.face_data.eyesattr.dark_circle_right_type; |
16 | var arr=[...arr1,...arr2]; | 10 | var arr=[...arr1,...arr2]; |
@@ -40,7 +34,12 @@ module.exports = { | @@ -40,7 +34,12 @@ module.exports = { | ||
40 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; | 34 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; |
41 | getApp().request.promiseGet(url, {}).then(res=>{ | 35 | getApp().request.promiseGet(url, {}).then(res=>{ |
42 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | 36 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ |
43 | - th.setData({dark_quan_list:res.data.data.pageData}); | 37 | + var arr=res.data.data.pageData; |
38 | + arr.map(function (e) { | ||
39 | + e.q_word='dark_quan_list'; | ||
40 | + return e; | ||
41 | + }) | ||
42 | + th.setData({dark_quan_list:arr}); | ||
44 | } | 43 | } |
45 | }) | 44 | }) |
46 | }, | 45 | }, |
packageB/pages/AI-test-skin/success_result/dark/dark.wxml renamed to packageD/pages/AI-test-skin/success_result/dark/dark.wxml
1 | -<view class="mb_b5" id="hei_yan_quan"> | 1 | +<view class="mb_b5 hei_yan_quan" id="hei_yan_quan"> |
2 | <view class="analyse_classify bg_white"> | 2 | <view class="analyse_classify bg_white"> |
3 | <view class="analyse_classify_header"> | 3 | <view class="analyse_classify_header"> |
4 | <view> | 4 | <view> |
5 | - <view style="color: #45d4eb;">#05</view> | 5 | + <view style="color: #45d4eb;">#0{{dark_sort}}</view> |
6 | <view class="flex-space-between"> | 6 | <view class="flex-space-between"> |
7 | <text style="font-size: 42rpx;" class="bold">黑眼圈</text> | 7 | <text style="font-size: 42rpx;" class="bold">黑眼圈</text> |
8 | <view class="fs26" catchtap="show_dailog" data-type="5" style="display: flex;align-items: center;"> | 8 | <view class="fs26" catchtap="show_dailog" data-type="5" style="display: flex;align-items: center;"> |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | </view> | 13 | </view> |
14 | <view class="analyse_classify_header_item mt_b5"> | 14 | <view class="analyse_classify_header_item mt_b5"> |
15 | <view class="analyse_classify_header_img"> | 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 | </view> | 17 | </view> |
18 | <view style="line-height:60rpx;margin-left:20rpx" style="margin-top:5%"> | 18 | <view style="line-height:60rpx;margin-left:20rpx" style="margin-top:5%"> |
19 | <view class="fs28">程度情况</view> | 19 | <view class="fs28">程度情况</view> |
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | 23 | ||
24 | <view class="analyse_classify_header_item mt_b5"> | 24 | <view class="analyse_classify_header_item mt_b5"> |
25 | <view class="analyse_classify_header_img"> | 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 | </view> | 27 | </view> |
28 | <view style="line-height:60rpx;margin-left:20rpx"> | 28 | <view style="line-height:60rpx;margin-left:20rpx"> |
29 | <view class="fs28">黑眼圈类型</view> | 29 | <view class="fs28">黑眼圈类型</view> |
@@ -32,26 +32,47 @@ | @@ -32,26 +32,47 @@ | ||
32 | </view> | 32 | </view> |
33 | 33 | ||
34 | <view> | 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 | </view> | 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 | </view> | 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 | </view> | 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 | </view> | 73 | </view> |
53 | <view class="fs28 mt_b10"> | 74 | <view class="fs28 mt_b10"> |
54 | - <text>明显可见毛孔或内含小于毛孔大小角栓</text> | 75 | + <text>隐约可见黑眼圈</text> |
55 | </view> | 76 | </view> |
56 | </view> | 77 | </view> |
57 | <view class="analyse_classify_body"> | 78 | <view class="analyse_classify_body"> |
@@ -110,7 +131,7 @@ | @@ -110,7 +131,7 @@ | ||
110 | <!-- 优惠券 --> | 131 | <!-- 优惠券 --> |
111 | <view wx:if="{{dark_quan_list}}"> | 132 | <view wx:if="{{dark_quan_list}}"> |
112 | <view style="margin:5% 0">适合黑眼圈商品的优惠券</view> | 133 | <view style="margin:5% 0">适合黑眼圈商品的优惠券</view> |
113 | - <view class="xc-coupon-frame rel"> | 134 | + <view class="xc-coupon-frame"> |
114 | <block wx:for="{{dark_quan_list}}"> | 135 | <block wx:for="{{dark_quan_list}}"> |
115 | <include src="../coupon.wxml" /> | 136 | <include src="../coupon.wxml" /> |
116 | </block> | 137 | </block> |
packageB/pages/AI-test-skin/success_result/fuwu.wxml renamed to packageD/pages/AI-test-skin/success_result/fuwu.wxml
packageB/pages/AI-test-skin/success_result/goods.wxml renamed to packageD/pages/AI-test-skin/success_result/goods.wxml
packageB/pages/AI-test-skin/success_result/pore/pore.js renamed to packageD/pages/AI-test-skin/success_result/pore/pore.js
1 | module.exports = { | 1 | module.exports = { |
2 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 | 2 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 |
3 | - get_goods: function(th,stoid) { | 3 | + get_goods: function(th,stoid,sort) { |
4 | + | ||
5 | + th.setData({port_sort:sort}) | ||
6 | + | ||
4 | var r_code='11'; | 7 | var r_code='11'; |
5 | //获取毛孔的类型 | 8 | //获取毛孔的类型 |
6 | var pore_segs_type=th.data.face_data.blackheadpore.pore_segs_type; | 9 | var pore_segs_type=th.data.face_data.blackheadpore.pore_segs_type; |
@@ -29,7 +32,12 @@ module.exports = { | @@ -29,7 +32,12 @@ module.exports = { | ||
29 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; | 32 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; |
30 | getApp().request.promiseGet(url, {}).then(res=>{ | 33 | getApp().request.promiseGet(url, {}).then(res=>{ |
31 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | 34 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ |
32 | - th.setData({pore_quan_list:res.data.data.pageData}); | 35 | + var arr=res.data.data.pageData; |
36 | + arr.map(function (e) { | ||
37 | + e.q_word='pore_quan_list'; | ||
38 | + return e; | ||
39 | + }) | ||
40 | + th.setData({pore_quan_list:arr}); | ||
33 | } | 41 | } |
34 | }) | 42 | }) |
35 | }, | 43 | }, |
packageB/pages/AI-test-skin/success_result/pore/pore.wxml renamed to packageD/pages/AI-test-skin/success_result/pore/pore.wxml
1 | -<view class="mb_b5" id="mao_kong"> | 1 | +<view class="mb_b5 mao_kong" id="mao_kong"> |
2 | <view class="analyse_classify bg_white"> | 2 | <view class="analyse_classify bg_white"> |
3 | <view class="analyse_classify_header"> | 3 | <view class="analyse_classify_header"> |
4 | <view> | 4 | <view> |
5 | - <view style="color: #45d4eb;">#01</view> | 5 | + <view style="color: #45d4eb;">#0{{port_sort}}</view> |
6 | <view class="flex-space-between"> | 6 | <view class="flex-space-between"> |
7 | <text style="font-size: 42rpx;" class="bold">毛孔</text> | 7 | <text style="font-size: 42rpx;" class="bold">毛孔</text> |
8 | <view class="fs26" catchtap="show_dailog" data-type="1" style="display: flex;align-items: center;"> | 8 | <view class="fs26" catchtap="show_dailog" data-type="1" style="display: flex;align-items: center;"> |
@@ -17,12 +17,12 @@ | @@ -17,12 +17,12 @@ | ||
17 | </view> | 17 | </view> |
18 | <view style="line-height:60rpx;margin-left:20rpx"> | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
19 | <view class="fs28">程度情况</view> | 19 | <view class="fs28">程度情况</view> |
20 | - <view class="bold">待确定</view> | 20 | + <view class="bold">毛孔粗大数{{pore_num}}个</view> |
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | - <view class="analyse_classify_header_item mt_b5"> | 23 | + <view class="analyse_classify_header_item mt_b5" style="display: none"> |
24 | <view class="analyse_classify_header_img"> | 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 | </view> | 26 | </view> |
27 | <view style="line-height:60rpx;margin-left:20rpx"> | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
28 | <view class="fs28">粗大区域</view> | 28 | <view class="fs28">粗大区域</view> |
@@ -96,7 +96,7 @@ | @@ -96,7 +96,7 @@ | ||
96 | <!-- 优惠券 --> | 96 | <!-- 优惠券 --> |
97 | <view wx:if="{{pore_quan_list}}"> | 97 | <view wx:if="{{pore_quan_list}}"> |
98 | <view style="margin:5% 0">适合毛孔商品的优惠券</view> | 98 | <view style="margin:5% 0">适合毛孔商品的优惠券</view> |
99 | - <view class="xc-coupon-frame rel"> | 99 | + <view class="xc-coupon-frame"> |
100 | <block wx:for="{{pore_quan_list}}"> | 100 | <block wx:for="{{pore_quan_list}}"> |
101 | <include src="../coupon.wxml" /> | 101 | <include src="../coupon.wxml" /> |
102 | </block> | 102 | </block> |
packageB/pages/AI-test-skin/success_result/s_filter.wxs renamed to packageD/pages/AI-test-skin/success_result/s_filter.wxs
packageB/pages/AI-test-skin/success_result/sensitive/sensitive.js renamed to packageD/pages/AI-test-skin/success_result/sensitive/sensitive.js
1 | -/* | ||
2 | - * @Author: abson | ||
3 | - * @Date: 2022-02-21 17:42:05 | ||
4 | - * @LastEditTime: 2022-02-21 17:50:54 | ||
5 | - * @LastEditors: Please set LastEditors | ||
6 | - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
7 | - * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\sensitive\sensitive.js | ||
8 | - */ | ||
9 | module.exports = { | 1 | module.exports = { |
10 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 | 2 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 |
11 | - get_goods: function (th, stoid) { | 3 | + get_goods: function (th, stoid,sort) { |
4 | + th.setData({sensitive_sort:sort}); | ||
5 | + | ||
12 | var r_code = '12'; | 6 | var r_code = '12'; |
13 | //获取毛孔的类型 | 7 | //获取毛孔的类型 |
14 | var arr = th.data.face_data.skinquality.skin_sensitive_check; | 8 | var arr = th.data.face_data.skinquality.skin_sensitive_check; |
@@ -36,7 +30,12 @@ module.exports = { | @@ -36,7 +30,12 @@ module.exports = { | ||
36 | var url = "/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code=" + r_code + "&store_id=" + stoid + "&recommend_word=" + re_word + "&pageSize=2"; | 30 | var url = "/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code=" + r_code + "&store_id=" + stoid + "&recommend_word=" + re_word + "&pageSize=2"; |
37 | getApp().request.promiseGet(url, {}).then(res => { | 31 | getApp().request.promiseGet(url, {}).then(res => { |
38 | if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | 32 | if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { |
39 | - th.setData({sensitive_quan_list: res.data.data.pageData }); | 33 | + var arr=res.data.data.pageData; |
34 | + arr.map(function (e) { | ||
35 | + e.q_word='sensitive_quan_list'; | ||
36 | + return e; | ||
37 | + }) | ||
38 | + th.setData({sensitive_quan_list: arr}); | ||
40 | } | 39 | } |
41 | }) | 40 | }) |
42 | }, | 41 | }, |
packageB/pages/AI-test-skin/success_result/sensitive/sensitive.wxml renamed to packageD/pages/AI-test-skin/success_result/sensitive/sensitive.wxml
1 | -<view class="mb_b5" id="mao_kong"> | 1 | +<view class="mb_b5 min_gan_du" id="min_gan_du"> |
2 | <view class="analyse_classify bg_white"> | 2 | <view class="analyse_classify bg_white"> |
3 | <view class="analyse_classify_header"> | 3 | <view class="analyse_classify_header"> |
4 | <view> | 4 | <view> |
5 | - <view style="color: #45d4eb;">#01</view> | 5 | + <view style="color: #45d4eb;">#0{{sensitive_sort}}</view> |
6 | <view class="flex-space-between"> | 6 | <view class="flex-space-between"> |
7 | <text style="font-size: 42rpx;" class="bold">敏感度</text> | 7 | <text style="font-size: 42rpx;" class="bold">敏感度</text> |
8 | <view class="fs26" catchtap="show_dailog" data-type="7" style="display: flex;align-items: center;"> | 8 | <view class="fs26" catchtap="show_dailog" data-type="7" style="display: flex;align-items: center;"> |
@@ -13,23 +13,23 @@ | @@ -13,23 +13,23 @@ | ||
13 | </view> | 13 | </view> |
14 | <view class="analyse_classify_header_item mt_b5"> | 14 | <view class="analyse_classify_header_item mt_b5"> |
15 | <view class="analyse_classify_header_img"> | 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 | </view> | 17 | </view> |
18 | <view style="line-height:60rpx;margin-left:20rpx"> | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
19 | <view class="fs28">程度情况</view> | 19 | <view class="fs28">程度情况</view> |
20 | <view class="bold">{{s_filter.get_nai_shou(skin_sensitive_check)}}</view> | 20 | <view class="bold">{{s_filter.get_nai_shou(skin_sensitive_check)}}</view> |
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | - <view class="analyse_classify_header_item mt_b5"> | 23 | + <view class="analyse_classify_header_item mt_b5" style="display: none"> |
24 | <view class="analyse_classify_header_img"> | 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 | </view> | 26 | </view> |
27 | <view style="line-height:60rpx;margin-left:20rpx"> | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
28 | <view class="fs28">敏感度得分</view> | 28 | <view class="fs28">敏感度得分</view> |
29 | <view class="bold">待确定</view> | 29 | <view class="bold">待确定</view> |
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
32 | - <view class="fs28 mt_b10"> | 32 | + <view class="fs28 mt_b10" style="display: none"> |
33 | <text>明显可见毛孔或内含小于毛孔大小角栓</text> | 33 | <text>明显可见毛孔或内含小于毛孔大小角栓</text> |
34 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
@@ -56,16 +56,16 @@ | @@ -56,16 +56,16 @@ | ||
56 | <view class="fenxi mgb10">护理建议</view> | 56 | <view class="fenxi mgb10">护理建议</view> |
57 | <view class=""> | 57 | <view class=""> |
58 | <view class="mgb30"> | 58 | <view class="mgb30"> |
59 | - <text style="font-size: 28rpx;margin-right: 10rpx;"><text class="bold">01</text> 日常防晒</text> | ||
60 | - <view class="fs26 c_666">用的公司大股东是公司山豆根山豆根收到二十个的山豆根山豆根使用的公司大股东是公司山豆根山豆根收到二十个的山豆根山豆根大股东是公司山豆根山豆根收到二十个的山豆根山豆根</view> | 59 | + <text style="font-size: 28rpx;margin-right: 10rpx;"><text class="bold">01</text>做好防晒</text> |
60 | + <view class="fs26 c_666">采用打伞、戴帽等物理防晒措施,肌肤稳定后再适当使用轻薄的无机防晒霜,并使用温和的卸妆产品后再进行洁面。</view> | ||
61 | </view> | 61 | </view> |
62 | <view class="mgb30"> | 62 | <view class="mgb30"> |
63 | - <text style="font-size: 28rpx;margin-right: 10rpx;"><text class="bold">02</text> 补水保湿</text> | ||
64 | - <view class="fs26 c_666">用的公司大股东是公司山豆根山豆根收到二十个的山豆根山豆根使用的公司大股东是公司山豆根山豆根收到二十个的山豆根山豆根大股东是公司山豆根山豆根收到二十个的山豆根山豆根</view> | 63 | + <text style="font-size: 28rpx;margin-right: 10rpx;"><text class="bold">02</text>抗敏护肤</text> |
64 | + <view class="fs26 c_666">护肤品越简单越好,选择不含香精、酒精、防腐剂或具有修复皮肤屏障功能的产品,并减少化妆次数。</view> | ||
65 | </view> | 65 | </view> |
66 | <view class="mgb30"> | 66 | <view class="mgb30"> |
67 | - <text style="font-size: 28rpx;margin-right: 10rpx;"><text class="bold">03</text> 早晚清洁</text> | ||
68 | - <view class="fs26 c_666">用的公司大股东是公司山豆根山豆根收到二十个的山豆根山豆根使用的公司大股东是公司山豆根山豆根收到二十个的山豆根山豆根大股东是公司山豆根山豆根收到二十个的山豆根山豆根</view> | 67 | + <text style="font-size: 28rpx;margin-right: 10rpx;"><text class="bold">03</text>温和清洁</text> |
68 | + <view class="fs26 c_666">尽量使用清水进行洁面,温水尤佳。或使用温和洗面奶在T区进行局部洁面,严禁深度清洁或去角质。</view> | ||
69 | </view> | 69 | </view> |
70 | </view> | 70 | </view> |
71 | </view> | 71 | </view> |
@@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
92 | <!-- 优惠券 --> | 92 | <!-- 优惠券 --> |
93 | <view wx:if="{{sensitive_quan_list}}"> | 93 | <view wx:if="{{sensitive_quan_list}}"> |
94 | <view style="margin:5% 0">适合敏感度商品的优惠券</view> | 94 | <view style="margin:5% 0">适合敏感度商品的优惠券</view> |
95 | - <view class="xc-coupon-frame rel"> | 95 | + <view class="xc-coupon-frame"> |
96 | <block wx:for="{{sensitive_quan_list}}"> | 96 | <block wx:for="{{sensitive_quan_list}}"> |
97 | <include src="../coupon.wxml" /> | 97 | <include src="../coupon.wxml" /> |
98 | </block> | 98 | </block> |
packageB/pages/AI-test-skin/success_result/speckle/speckle.js renamed to packageD/pages/AI-test-skin/success_result/speckle/speckle.js
1 | -/* | ||
2 | - * @Author: abson | ||
3 | - * @Date: 2022-02-21 11:03:07 | ||
4 | - * @LastEditTime: 2022-02-21 17:48:51 | ||
5 | - * @LastEditors: Please set LastEditors | ||
6 | - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
7 | - * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\speckle\speckle.js | ||
8 | - */ | ||
9 | module.exports = { | 1 | module.exports = { |
10 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 | 2 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 |
11 | - get_goods: function(th,stoid) { | 3 | + get_goods: function(th,stoid,sort) { |
4 | + th.setData({speckle_sort:sort}); | ||
5 | + | ||
12 | var r_code='07'; | 6 | var r_code='07'; |
13 | //获取斑的类型 | 7 | //获取斑的类型 |
14 | var list=th.data.face_data.acnespotmole.speckle_list; | 8 | var list=th.data.face_data.acnespotmole.speckle_list; |
@@ -42,7 +36,12 @@ module.exports = { | @@ -42,7 +36,12 @@ module.exports = { | ||
42 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; | 36 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; |
43 | getApp().request.promiseGet(url, {}).then(res=>{ | 37 | getApp().request.promiseGet(url, {}).then(res=>{ |
44 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | 38 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ |
45 | - th.setData({speckle_quan_list:res.data.data.pageData}); | 39 | + var arr=res.data.data.pageData; |
40 | + arr.map(function (e) { | ||
41 | + e.q_word='speckle_quan_list'; | ||
42 | + return e; | ||
43 | + }) | ||
44 | + th.setData({speckle_quan_list:arr}); | ||
46 | } | 45 | } |
47 | }) | 46 | }) |
48 | 47 |
packageB/pages/AI-test-skin/success_result/speckle/speckle.wxml renamed to packageD/pages/AI-test-skin/success_result/speckle/speckle.wxml
1 | -<view class="mb_b5" id="se_ban"> | 1 | +<view class="mb_b5 se_ban" id="se_ban"> |
2 | <view class="analyse_classify bg_white"> | 2 | <view class="analyse_classify bg_white"> |
3 | <view class="analyse_classify_header"> | 3 | <view class="analyse_classify_header"> |
4 | <view> | 4 | <view> |
5 | - <view style="color: #45d4eb;">#02</view> | 5 | + <view style="color: #45d4eb;">#0{{speckle_sort}}</view> |
6 | <view class="flex-space-between"> | 6 | <view class="flex-space-between"> |
7 | <text style="font-size: 42rpx;" class="bold">色斑</text> | 7 | <text style="font-size: 42rpx;" class="bold">色斑</text> |
8 | <view class="fs26" catchtap="show_dailog" data-type="2" style="display: flex;align-items: center;"> | 8 | <view class="fs26" catchtap="show_dailog" data-type="2" style="display: flex;align-items: center;"> |
@@ -13,16 +13,16 @@ | @@ -13,16 +13,16 @@ | ||
13 | </view> | 13 | </view> |
14 | <view class="analyse_classify_header_item mt_b5"> | 14 | <view class="analyse_classify_header_item mt_b5"> |
15 | <view class="analyse_classify_header_img"> | 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 | </view> | 17 | </view> |
18 | <view style="line-height:60rpx;margin-left:20rpx"> | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
19 | <view class="fs28">程度情况</view> | 19 | <view class="fs28">程度情况</view> |
20 | - <view class="bold">待确定</view> | 20 | + <view class="bold">色斑数{{speckle_num}}个</view> |
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | - <view class="analyse_classify_header_item mt_b5"> | 23 | + <view class="analyse_classify_header_item mt_b5" style="display: none"> |
24 | <view class="analyse_classify_header_img"> | 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 | </view> | 26 | </view> |
27 | <view style="line-height:60rpx;margin-left:20rpx"> | 27 | <view style="line-height:60rpx;margin-left:20rpx"> |
28 | <view class="fs28">色斑个数</view> | 28 | <view class="fs28">色斑个数</view> |
@@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
92 | <!-- 优惠券 --> | 92 | <!-- 优惠券 --> |
93 | <view wx:if="{{speckle_quan_list}}"> | 93 | <view wx:if="{{speckle_quan_list}}"> |
94 | <view style="margin:5% 0">适合色斑商品的优惠券</view> | 94 | <view style="margin:5% 0">适合色斑商品的优惠券</view> |
95 | - <view class="xc-coupon-frame rel"> | 95 | + <view class="xc-coupon-frame"> |
96 | <block wx:for="{{speckle_quan_list}}"> | 96 | <block wx:for="{{speckle_quan_list}}"> |
97 | <include src="../coupon.wxml" /> | 97 | <include src="../coupon.wxml" /> |
98 | </block> | 98 | </block> |
packageD/pages/AI-test-skin/success_result/success_result.js
0 → 100644
1 | +/* | ||
2 | + * @Author: abson | ||
3 | + * @Date: 2022-02-16 15:36:47 | ||
4 | + * @LastEditTime: 2022-02-24 14:16:37 | ||
5 | + * @LastEditors: Please set LastEditors | ||
6 | + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
7 | + * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js | ||
8 | + */ | ||
9 | +// packageB/pages/AI-test-skin/success_result/success_result.js | ||
10 | +const app = getApp(); | ||
11 | +const request = app.request; | ||
12 | +const os = app.globalData; | ||
13 | +const setting = os.setting; | ||
14 | +const ut = require('../../../../utils/util'); | ||
15 | +//毛孔 | ||
16 | +const acne = require('acne/acne'); | ||
17 | +const blackhead = require('blackhead/blackhead'); | ||
18 | +const dark = require('dark/dark'); | ||
19 | +const pore = require('pore/pore'); | ||
20 | +const speckle = require('speckle/speckle'); | ||
21 | +const wrinkle = require('wrinkle/wrinkle'); | ||
22 | +Page({ | ||
23 | + /** | ||
24 | + * 页面的初始数据 | ||
25 | + */ | ||
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: '敏感度' }], | ||
28 | + zhouwen_arr: [{ id: 1, name: '全部皱纹' }, { id: 2, name: '泪沟' }, { id: 3, name: '法令纹' }, { id: 4, name: '口角纹' }, { id: 5, name: '眼部皱纹' }, { id: 6, name: '鱼尾纹' }, { id: 7, name: '抬头皱纹' }, { id: 8, name: '眉间纹' }], | ||
29 | + cuochuang_arr: [{ id: 1, name: '全部痤疮' }, { id: 2, name: '痘印' }, { id: 3, name: '囊肿' }, { id: 4, name: '丘疹' }, { id: 5, name: '粉刺' }], | ||
30 | + heitanquan_arr: [{ id: 1, name: '综合情况' }, { id: 2, name: '左眼' }, { id: 3, name: '右眼' }], | ||
31 | + currentIndex: 0, | ||
32 | + scroll_index: 0, | ||
33 | + sex:'female', //female女 male男 | ||
34 | + tab_id: 'zong_he', | ||
35 | + iurl: setting.imghost, | ||
36 | + showDialog: false, | ||
37 | + yanjing: true, //显示皮肤问题 | ||
38 | + img_scale: true, //问题标注放大图片 | ||
39 | + heightRecord: [], | ||
40 | + img_scale_icon: true, | ||
41 | + show_problem: 1, //问题标注显示问题 | ||
42 | + img_scale: 1, //缩放问题 | ||
43 | + }, | ||
44 | + | ||
45 | + /** | ||
46 | + * 生命周期函数--监听页面加载 | ||
47 | + */ | ||
48 | + onLoad: function (options) { | ||
49 | + | ||
50 | + var th = this; | ||
51 | + //初始化一下,获取商品的价格 | ||
52 | + this.init(); | ||
53 | + //var face_result=getApp().globalData.face_result; | ||
54 | + //var face_data=face_result.face_list[0]; | ||
55 | + this.data.id = options.id; | ||
56 | + | ||
57 | + //计算图片要显示的大小 | ||
58 | + th.data.cWidth = wx.getSystemInfoSync().windowWidth; | ||
59 | + th.data.cHeight = wx.getSystemInfoSync().windowHeight; | ||
60 | + th.data.face_height = th.data.cHeight * 0.8 * 0.8; | ||
61 | + | ||
62 | + this.get_data(function (json, json1, img) { | ||
63 | + //-- 数据先存着 -- | ||
64 | + var face_data = th.data.face_data = json.face_list[0]; | ||
65 | + var sex = json1.face_list[0].gender.type; | ||
66 | + //痤疮数 | ||
67 | + var acne_num = face_data.acnespotmole.acne_num; | ||
68 | + //色斑数 | ||
69 | + var speckle_num = face_data.acnespotmole.speckle_num; | ||
70 | + //皱纹数 | ||
71 | + var wrinkle_num = face_data.wrinkle.wrinkle_num; | ||
72 | + //黑头数 | ||
73 | + var blackhead_num = face_data.blackheadpore.blackhead_num; | ||
74 | + //毛孔数 | ||
75 | + var pore_num = face_data.blackheadpore.pore_num; | ||
76 | + //黑眼圈的严重程度 | ||
77 | + var dark_type = face_data.eyesattr.dark_circle_left_type.length > 0 ? face_data.eyesattr.dark_circle_left_type[0] : -1; | ||
78 | + var dark_type1 = face_data.eyesattr.dark_circle_right_type.length > 0 ? face_data.eyesattr.dark_circle_right_type[0] : -1; | ||
79 | + if (dark_type1 > dark_type) { | ||
80 | + dark_type = dark_type1; | ||
81 | + } | ||
82 | + var skin_sensitive_check = parseInt(face_data.skinquality.skin_sensitive_check[0]); | ||
83 | + var skin_dryoil_check = face_data.skinquality.skin_dryoil_check; | ||
84 | + | ||
85 | + var location = face_data.location; | ||
86 | + th.data.bili = th.data.face_height / (location.height + location.height / 2.3); | ||
87 | + | ||
88 | + th.setData({ | ||
89 | + acne_num: acne_num, | ||
90 | + speckle_num: speckle_num, | ||
91 | + wrinkle_num: wrinkle_num, | ||
92 | + blackhead_num: blackhead_num, | ||
93 | + pore_num: pore_num, | ||
94 | + dark_type: dark_type, | ||
95 | + skin_sensitive_check: skin_sensitive_check, | ||
96 | + skin_dryoil_check: skin_dryoil_check, | ||
97 | + face_img: img, | ||
98 | + m_top: (location.top - location.height / 2.5) * th.data.bili, | ||
99 | + m_left: (location.left - location.width / 7) * th.data.bili, | ||
100 | + bili: th.data.bili, | ||
101 | + sex: sex | ||
102 | + }) | ||
103 | + var sort = 1; | ||
104 | + //-- 调用毛孔的推荐函数 -- | ||
105 | + if (pore_num > 0) | ||
106 | + pore.get_goods(th, setting.stoid, sort++); | ||
107 | + //-- 调用黑头的推荐函数 -- | ||
108 | + if (blackhead_num > 0) | ||
109 | + blackhead.get_goods(th, setting.stoid, sort++); | ||
110 | + //-- 调用色斑的推荐函数 -- | ||
111 | + if (speckle_num > 0) | ||
112 | + speckle.get_goods(th, setting.stoid, sort++); | ||
113 | + //-- 调用皱纹的推荐函数 -- | ||
114 | + if (wrinkle_num > 0) | ||
115 | + wrinkle.get_goods(th, setting.stoid, sort++); | ||
116 | + //-- 黑眼圈 -- | ||
117 | + if (dark_type > -1) | ||
118 | + dark.get_goods(th, setting.stoid, sort++); | ||
119 | + //-- 黑眼圈 -- | ||
120 | + if (acne_num > -0) | ||
121 | + acne.get_goods(th, setting.stoid, sort++); | ||
122 | + | ||
123 | + //获取一下分享要用的图片 | ||
124 | + th.set_share_img(); | ||
125 | + acne.get_goods(th, setting.stoid); | ||
126 | + let { heightRecord, tab } = th.data; | ||
127 | + tab.forEach(item => { | ||
128 | + console.log(2); | ||
129 | + var query = th.createSelectorQuery(); | ||
130 | + let class_name = `.${item['id']}`; | ||
131 | + query.select(class_name).boundingClientRect(function (rect) { | ||
132 | + // let ratio = 750 / rect.width; | ||
133 | + let height = parseInt(rect.height); //加上导航栏50px | ||
134 | + heightRecord.push(height); | ||
135 | + // item['top'] = top; | ||
136 | + }).exec(); | ||
137 | + }); | ||
138 | + heightRecord.sort((a, b) => { | ||
139 | + return a - b; | ||
140 | + }); | ||
141 | + th.setData({ | ||
142 | + heightRecord, | ||
143 | + }) | ||
144 | + // setTimeout(() => { | ||
145 | + // heightRecord.sort((a, b) => { | ||
146 | + // return a - b; | ||
147 | + // }) | ||
148 | + // let new_arr = []; | ||
149 | + // if (heightRecord.length > 0) { | ||
150 | + // heightRecord.reduce((pre, cur) => { | ||
151 | + // let sum = pre + cur; | ||
152 | + // new_arr.push(sum); | ||
153 | + // return sum; | ||
154 | + // }) | ||
155 | + // } | ||
156 | + // th.setData({ | ||
157 | + // heightRecord:new_arr, | ||
158 | + // }) | ||
159 | + // },1000) | ||
160 | + | ||
161 | + }) | ||
162 | + | ||
163 | + }, | ||
164 | + | ||
165 | + //-- 初始等级卡 -- | ||
166 | + init: function () { | ||
167 | + var th = this; | ||
168 | + if (!getApp().globalData.user_id) return false; | ||
169 | + getApp().request.get("/api/weshop/users/get/" + setting.stoid + "/" + getApp().globalData.user_id, { | ||
170 | + isShowLoading: false, | ||
171 | + success: function (e) { | ||
172 | + if (e.data.code == 0 && e.data && e.data.data) { | ||
173 | + getApp().globalData.userInfo = e.data.data; | ||
174 | + getApp().getConfig2(function (e) { | ||
175 | + var swithc_list = e.switch_list; | ||
176 | + var sw_arr = JSON.parse(swithc_list); | ||
177 | + //---如果后台有开等级卡的开关--- | ||
178 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
179 | + th.setData({ | ||
180 | + rank_switch: true | ||
181 | + }); | ||
182 | + //---回调卡的列表--- | ||
183 | + th.getPlusCardType(function (ob) { | ||
184 | + th.setData({ | ||
185 | + card_list: ob.card_list | ||
186 | + }); | ||
187 | + var ti = setInterval(function () { | ||
188 | + var user = getApp().globalData.userInfo; | ||
189 | + if (!user) return false; | ||
190 | + clearInterval(ti); | ||
191 | + if (user.card_field && user['card_expiredate']) { | ||
192 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
193 | + var end = new Date(str); | ||
194 | + end = Date.parse(end) / 1000; | ||
195 | + var now = ut.gettimestamp(); | ||
196 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
197 | + if (user.card_field && now < end) { | ||
198 | + var card_name = ob.name_map.get(user.card_field); | ||
199 | + if (card_name.length > 4) card_name = card_name.substring(0, 8); | ||
200 | + th.setData({ | ||
201 | + card_field: user.card_field, | ||
202 | + card_name: card_name, | ||
203 | + card_list: ob.card_list | ||
204 | + }); | ||
205 | + } | ||
206 | + } | ||
207 | + }, 500) | ||
208 | + }) | ||
209 | + } | ||
210 | + }) | ||
211 | + | ||
212 | + } | ||
213 | + } | ||
214 | + }) | ||
215 | + }, | ||
216 | + //-- 获取json数据 -- | ||
217 | + get_data: function (func) { | ||
218 | + var url = "/api/weshop/face/storeSkinface/get/" + setting.stoid + "/" + this.data.id; | ||
219 | + getApp().request.promiseGet(url, {}).then(res => { | ||
220 | + if (res.data.code == 0) { | ||
221 | + var json = JSON.parse(res.data.data.resultjson); | ||
222 | + var json1 = JSON.parse(res.data.data.detectjson); | ||
223 | + func(json, json1, res.data.data.img) | ||
224 | + } else { | ||
225 | + getApp().showWarning("获取数据失败"); | ||
226 | + } | ||
227 | + }) | ||
228 | + }, | ||
229 | + | ||
230 | + /** | ||
231 | + * 生命周期函数--监听页面初次渲染完成 | ||
232 | + */ | ||
233 | + onReady: function () { }, | ||
234 | + set_share_img() { | ||
235 | + var th = this; | ||
236 | + var path3 = th.data.iurl + "/miniapp/images/skinimg/nan.png"; | ||
237 | + if (this.data.sex == 'female') | ||
238 | + path3 = th.data.iurl + "/miniapp/images/skinimg/nv.png"; | ||
239 | + // 读取文件成功则OK-- | ||
240 | + wx.getImageInfo({ | ||
241 | + src: path3, | ||
242 | + success: function (res) { | ||
243 | + //获取到二维码的图片 | ||
244 | + th.data.share_head = res.path; | ||
245 | + } | ||
246 | + }) | ||
247 | + | ||
248 | + }, | ||
249 | + scroll_view(e) { | ||
250 | + let scrollTop = e.detail.scrollTop; | ||
251 | + let heightRecord = this.data.heightRecord; | ||
252 | + if (heightRecord.length === 0) return; | ||
253 | + let length = this.data.tab.length; | ||
254 | + var index = 0; | ||
255 | + if (scrollTop >= heightRecord[0]) { | ||
256 | + for (let i = 0; i < length; i++) { | ||
257 | + if (scrollTop >= heightRecord[i - 1] && scrollTop < heightRecord[i]) { | ||
258 | + index = i; | ||
259 | + break; | ||
260 | + } | ||
261 | + } | ||
262 | + } | ||
263 | + if (index !== this.data.currentIndex) { | ||
264 | + // let tab_id = this.data.tab[index].id; | ||
265 | + console.log(scrollTop); | ||
266 | + this.setData({ | ||
267 | + scrollTop, | ||
268 | + // currentIndex: index, | ||
269 | + }) | ||
270 | + } | ||
271 | + | ||
272 | + }, | ||
273 | + | ||
274 | + click_scroll(e) { | ||
275 | + console.log(e); | ||
276 | + let { index, scroll_id } = e.currentTarget.dataset; | ||
277 | + this.setData({ | ||
278 | + scroll_index: index, | ||
279 | + scroll_id, | ||
280 | + }) | ||
281 | + }, | ||
282 | + | ||
283 | + /** | ||
284 | + * 生命周期函数--监听页面显示 | ||
285 | + */ | ||
286 | + onShow: function () { }, | ||
287 | + | ||
288 | + clickTab(e) { | ||
289 | + let { index, tab_id } = e.currentTarget.dataset; | ||
290 | + this.setData({ | ||
291 | + currentIndex: index, | ||
292 | + tab_id, | ||
293 | + }) | ||
294 | + }, | ||
295 | + click_yanjing() { | ||
296 | + this.setData({ | ||
297 | + yanjing: !this.data.yanjing, | ||
298 | + }) | ||
299 | + }, | ||
300 | + click_fangda() { | ||
301 | + this.setData({ | ||
302 | + img_scale: !this.data.img_scale, | ||
303 | + img_scale_icon: !this.data.yanjing, | ||
304 | + }) | ||
305 | + }, | ||
306 | + | ||
307 | + /** | ||
308 | + * 生命周期函数--监听页面隐藏 | ||
309 | + */ | ||
310 | + onHide: function () { | ||
311 | + | ||
312 | + }, | ||
313 | + | ||
314 | + /** | ||
315 | + * 生命周期函数--监听页面卸载 | ||
316 | + */ | ||
317 | + onUnload: function () { | ||
318 | + | ||
319 | + }, | ||
320 | + show_dailog(e) { | ||
321 | + var type = parseInt(e.currentTarget.dataset.type); | ||
322 | + this.setData({ | ||
323 | + showDialog: true, show_type: type | ||
324 | + }) | ||
325 | + switch (type) { | ||
326 | + case 1: //毛孔 | ||
327 | + var pore_list = this.data.face_data.blackheadpore.circles[0].pore; | ||
328 | + this.setData({ pore_list: pore_list }); | ||
329 | + break; | ||
330 | + case 2://色斑 | ||
331 | + var speckle_list = this.data.face_data.acnespotmole.speckle_list; | ||
332 | + this.setData({ speckle_list: speckle_list }); | ||
333 | + break; | ||
334 | + case 3://皱纹 | ||
335 | + var wrinkle_list = this.data.face_data.wrinkle.wrinkle_data; | ||
336 | + this.setData({ wrinkle_list: wrinkle_list }); | ||
337 | + break; | ||
338 | + case 4://黑头 | ||
339 | + var blackhead_list = this.data.face_data.blackheadpore.circles[0].blackhead; | ||
340 | + this.setData({ blackhead_list: blackhead_list }); | ||
341 | + break; | ||
342 | + case 5://黑眼圈 | ||
343 | + var arr = this.data.face_data.eyesattr.dark_circle_left[0]; | ||
344 | + var arr2 = this.data.face_data.eyesattr.dark_circle_right[0]; | ||
345 | + var arr3 = [...arr, ...arr2]; | ||
346 | + this.setData({ dark_list: arr3 }); | ||
347 | + break; | ||
348 | + case 6://痤疮 | ||
349 | + var acne_list = this.data.face_data.acnespotmole.acne_list; | ||
350 | + this.setData({ acne_list: acne_list }); | ||
351 | + break; | ||
352 | + default: | ||
353 | + break | ||
354 | + } | ||
355 | + }, | ||
356 | + | ||
357 | + close_dialog() { | ||
358 | + this.setData({ | ||
359 | + showDialog: false, | ||
360 | + share_flag: false, | ||
361 | + img_scale: true, | ||
362 | + }) | ||
363 | + }, | ||
364 | + | ||
365 | + close_mask() { | ||
366 | + this.setData({ | ||
367 | + showDialog: false, | ||
368 | + img_scale: true, | ||
369 | + }) | ||
370 | + }, | ||
371 | + | ||
372 | + /** | ||
373 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
374 | + */ | ||
375 | + onPullDownRefresh: function () { | ||
376 | + | ||
377 | + }, | ||
378 | + | ||
379 | + /** | ||
380 | + * 页面上拉触底事件的处理函数 | ||
381 | + */ | ||
382 | + onReachBottom: function () { | ||
383 | + | ||
384 | + }, | ||
385 | + | ||
386 | + /** | ||
387 | + * 用户点击右上角分享 | ||
388 | + */ | ||
389 | + onShareAppMessage: function () { | ||
390 | + | ||
391 | + }, | ||
392 | + | ||
393 | + //商品页面跳转 | ||
394 | + go_url: function (e) { | ||
395 | + var url = e.currentTarget.dataset.url; | ||
396 | + getApp().goto(url); | ||
397 | + }, | ||
398 | + | ||
399 | + //--- 获取卡类列表 --- | ||
400 | + getPlusCardType: function (func) { | ||
401 | + var storid = setting.stoid; | ||
402 | + var th = this; | ||
403 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
404 | + | ||
405 | + if (res.data.code != 0 || !res.data.data) { | ||
406 | + var ob = { | ||
407 | + "card_list": [], | ||
408 | + "name_map": "" | ||
409 | + }; | ||
410 | + func(ob); | ||
411 | + return false; | ||
412 | + } | ||
413 | + | ||
414 | + var plusCard = res.data.data; | ||
415 | + var arr = [1219, 2089, 3031]; | ||
416 | + var new_arr = new Array(); | ||
417 | + var card_name_map = new Map(); | ||
418 | + | ||
419 | + var user = getApp().globalData.userInfo; | ||
420 | + if (plusCard) { | ||
421 | + for (var i = 0; i < plusCard.length; i++) { | ||
422 | + if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) { | ||
423 | + continue; | ||
424 | + } | ||
425 | + var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | ||
426 | + card_name_map.set(name, plusCard[i].CardName); | ||
427 | + new_arr.push(plusCard[i]); | ||
428 | + | ||
429 | + } | ||
430 | + } | ||
431 | + var ob = { | ||
432 | + "card_list": new_arr, | ||
433 | + "name_map": card_name_map | ||
434 | + }; | ||
435 | + func(ob); | ||
436 | + }) | ||
437 | + }, | ||
438 | + | ||
439 | + click_share() { | ||
440 | + this.setData({ | ||
441 | + share_flag: true, | ||
442 | + img_scale: false, | ||
443 | + showDialog: true, | ||
444 | + }) | ||
445 | + }, | ||
446 | + | ||
447 | + //图片加载的时候,计算图片的像素大小 | ||
448 | + face_img_load: function (e) { | ||
449 | + var th = this; | ||
450 | + var imgwidth = e.detail.width; | ||
451 | + var imgheight = e.detail.height; | ||
452 | + | ||
453 | + var w = th.data.cWidth * 0.8; | ||
454 | + | ||
455 | + this.setData({ | ||
456 | + iwidth: imgwidth * th.data.bili, | ||
457 | + iheight: imgheight * th.data.bili, | ||
458 | + bili1: w / imgwidth //图片放大时候的比例 | ||
459 | + }) | ||
460 | + }, | ||
461 | + | ||
462 | + //-- 图片的拖拽缩放的功能 -- | ||
463 | + touchstartCallback: function (e) { | ||
464 | + this.data.tc_end = 0; | ||
465 | + // 单手指缩放开始,也不做任何处理 | ||
466 | + if (e.touches.length > 1) { | ||
467 | + // 一开始我并没有这个回调函数,会出现缩小的时候有瞬间被放大过程的bug | ||
468 | + // 当两根手指放上去的时候,就将distance 初始化。 | ||
469 | + let xMove = e.touches[1].clientX - e.touches[0].clientX; | ||
470 | + let yMove = e.touches[1].clientY - e.touches[0].clientY; | ||
471 | + let distance = Math.sqrt(xMove * xMove + yMove * yMove); | ||
472 | + this.data.img_distance = distance; | ||
473 | + } else if (e.touches.length == 1) { | ||
474 | + this.data.img_x = e.touches[0].clientX; | ||
475 | + this.data.img_y = e.touches[0].clientY; | ||
476 | + } | ||
477 | + | ||
478 | + }, | ||
479 | + touchmoveCallback: function (e) { | ||
480 | + if (this.data.tc_end) return false; | ||
481 | + // 单手指缩放我们不做任何操作 | ||
482 | + if (e.touches.length > 1) { | ||
483 | + let xMove = e.touches[1].clientX - e.touches[0].clientX; | ||
484 | + let yMove = e.touches[1].clientY - e.touches[0].clientY; | ||
485 | + // 新的 ditance | ||
486 | + let distance = Math.sqrt(xMove * xMove + yMove * yMove); | ||
487 | + let distanceDiff = distance - this.data.img_distance; | ||
488 | + | ||
489 | + let newScale = this.data.ig_scale + 0.005 * distanceDiff | ||
490 | + // 为了防止缩放得太大,所以scale需要限制,同理最小值也是 | ||
491 | + if (newScale >= 2) { | ||
492 | + newScale = 2 | ||
493 | + } | ||
494 | + if (newScale <= 0.6) { | ||
495 | + newScale = 0.6 | ||
496 | + } | ||
497 | + | ||
498 | + this.data.img_distance = distance; | ||
499 | + // 赋值 新的 => 旧的 | ||
500 | + this.setData({ | ||
501 | + 'ig_scale': newScale, | ||
502 | + }) | ||
503 | + } else if (e.touches.length == 1) { | ||
504 | + let xMove = e.touches[0].clientX - this.data.img_x; | ||
505 | + let yMove = e.touches[0].clientY - this.data.img_y; | ||
506 | + this.setData({ | ||
507 | + 'img_top': yMove * 0.8, | ||
508 | + 'img_left': xMove * 0.8, | ||
509 | + }); | ||
510 | + } | ||
511 | + | ||
512 | + | ||
513 | + }, | ||
514 | + touchendCallback: function (e) { | ||
515 | + this.data.tc_end = 1; | ||
516 | + }, | ||
517 | + | ||
518 | + | ||
519 | + | ||
520 | + //--定义的保存图片方法,分享团--- | ||
521 | + saveImageToPhotosAlbum: function () { | ||
522 | + var th = this; | ||
523 | + var rpx = this.data.cWidth / 750 * 1.35; //基础单位, | ||
524 | + //--先判断会员状态-- | ||
525 | + var user_info = getApp().globalData.userInfo; | ||
526 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
527 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | ||
528 | + return false; | ||
529 | + } | ||
530 | + if (this.data.share_hidden) { | ||
531 | + this.setData({ share_hidden: false, }); | ||
532 | + } | ||
533 | + ; | ||
534 | + | ||
535 | + wx.showLoading({ title: '生成中...', }) | ||
536 | + var that = this, th = that; | ||
537 | + //设置画板显示,才能开始绘图 | ||
538 | + that.setData({ canvasHidden: false }) | ||
539 | + | ||
540 | + var app = getApp(); | ||
541 | + var scene = this.data.id + ""; | ||
542 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | ||
543 | + if (user_id > 0) { | ||
544 | + scene += "_" + user_id; | ||
545 | + } | ||
546 | + ///二微码 | ||
547 | + var path3 = setting.url + "/api/wx/open/app/user/getWeAppEwm/" + | ||
548 | + setting.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | ||
549 | + | ||
550 | + // 读取文件成功则OK-- | ||
551 | + wx.getImageInfo({ | ||
552 | + src: path3, | ||
553 | + success: function (res) { | ||
554 | + var b = 1.1; | ||
555 | + //获取到二维码的图片 | ||
556 | + var vpath = res.path; | ||
557 | + var context = wx.createCanvasContext('share'); | ||
558 | + // 先画背景 | ||
559 | + context.fillStyle = '#ebf6f8'; | ||
560 | + // 灰色实心矩形 | ||
561 | + // 1. 语法: x坐标, y坐标, 宽度, 高度 | ||
562 | + context.fillRect(0, 0, 750 * rpx, 1338 * rpx); | ||
563 | + | ||
564 | + context.setFontSize(20 * rpx) | ||
565 | + context.setFillStyle("#00d8e9") | ||
566 | + context.fillText("官方检测认证", 28 * b * rpx, 80 * b * rpx); | ||
567 | + | ||
568 | + //两个底部颜色 | ||
569 | + context.fillStyle = '#a7ecf5'; | ||
570 | + context.fillRect(28 * b * rpx, 136 * b * rpx, 262 * b * rpx, 18 * b * rpx); | ||
571 | + context.fillRect(28 * b * rpx, 194 * b * rpx, 262 * b * rpx, 18 * b * rpx); | ||
572 | + | ||
573 | + context.setFontSize(42 * b * rpx) | ||
574 | + context.setFillStyle("#070609") | ||
575 | + context.fillText("我的肌底强韧", 30 * b * rpx, 140 * b * rpx); | ||
576 | + context.fillText("肌肤鲜活润泽", 30 * b * rpx, 196 * b * rpx); | ||
577 | + | ||
578 | + //先画一个圆形 | ||
579 | + th.circle(context, 110 * b * rpx, 280 * b * rpx, 140 * b * rpx, "#e7f3f8"); | ||
580 | + th.circle(context, 130 * b * rpx, 300 * b * rpx, 120 * b * rpx, "#c8f2fa"); | ||
581 | + //绘制人脸 | ||
582 | + context.drawImage(th.data.share_head, 132 * b * rpx, 310 * b * rpx, 230 * b * rpx, 230 * b * rpx); | ||
583 | + | ||
584 | + //左右俩个框并填充文字 | ||
585 | + th.darwRoundRect(38 * b * rpx, 340 * b * rpx, 140 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); | ||
586 | + th.darwRoundRect(324 * b * rpx, 340 * b * rpx, 140 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); | ||
587 | + context.setFontSize(20 * b * rpx) | ||
588 | + context.setFillStyle("black") | ||
589 | + context.fillText("黑眼圈 重度", 50 * b * rpx, 368 * b * rpx); | ||
590 | + context.fillText("毛孔 较粗大", 336 * b * rpx, 368 * b * rpx); | ||
591 | + | ||
592 | + //左右俩个框并填充文字 | ||
593 | + th.darwRoundRect(40 * b * rpx, 412 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); | ||
594 | + th.darwRoundRect(348 * b * rpx, 412 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); | ||
595 | + context.setFillStyle("black") | ||
596 | + context.fillText("黑头 重度", 52 * b * rpx, 440 * b * rpx); | ||
597 | + context.fillText("色斑 轻度", 354 * b * rpx, 440 * b * rpx); | ||
598 | + | ||
599 | + //左右俩个框并填充文字 | ||
600 | + th.darwRoundRect(60 * b * rpx, 484 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); | ||
601 | + th.darwRoundRect(328 * b * rpx, 484 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); | ||
602 | + context.setFillStyle("black") | ||
603 | + context.fillText("皱纹 重度", 74 * b * rpx, 510 * b * rpx); | ||
604 | + context.fillText("痤疮 轻度", 344 * b * rpx, 510 * b * rpx); | ||
605 | + | ||
606 | + //底部的绘制 | ||
607 | + th.darwRoundRect(38 * b * rpx, 650 * b * rpx, 430 * b * rpx, 160 * b * rpx, 10 * b * rpx, context); | ||
608 | + //绘制二维码 | ||
609 | + context.drawImage(vpath, 60 * b * rpx, 672 * b * rpx, 120 * b * rpx, 120 * b * rpx); | ||
610 | + context.setFillStyle("black") | ||
611 | + context.setFontSize(32 * b * rpx) | ||
612 | + context.fillText("美肤管家AI测肤", 200 * b * rpx, 726 * b * rpx); | ||
613 | + context.setFontSize(22 * b * rpx) | ||
614 | + context.fillText("科学了解皮肤的真实状态", 200 * b * rpx, 766 * b * rpx); | ||
615 | + | ||
616 | + //把画板内容绘制成图片,并回调 画板图片路径 | ||
617 | + context.draw(false, function () { | ||
618 | + setTimeout(function () { | ||
619 | + wx.canvasToTempFilePath({ | ||
620 | + x: 0, | ||
621 | + y: 0, | ||
622 | + width: 750, | ||
623 | + height: 1338, | ||
624 | + destWidth: 1.4 * 750 * 750 / th.data.screenWidth, | ||
625 | + destHeight: 1.4 * 750 * 750 / th.data.screenWidth, | ||
626 | + canvasId: 'share', | ||
627 | + success: function (res) { | ||
628 | + that.setData({ | ||
629 | + shareImgPath: res.tempFilePath, | ||
630 | + canvasHidden: true, | ||
631 | + share_show: 1 | ||
632 | + }) | ||
633 | + | ||
634 | + if (!res.tempFilePath) { | ||
635 | + wx.showModal({ | ||
636 | + title: '提示', | ||
637 | + content: '图片绘制中,请稍后重试', | ||
638 | + showCancel: false | ||
639 | + }) | ||
640 | + return false; | ||
641 | + } | ||
642 | + | ||
643 | + /*-- | ||
644 | + wx.previewImage({ | ||
645 | + //将图片预览出来 | ||
646 | + ur--*/ | ||
647 | + | ||
648 | + wx.hideLoading(); | ||
649 | + } | ||
650 | + }) | ||
651 | + }, 500) | ||
652 | + | ||
653 | + }); | ||
654 | + | ||
655 | + }, | ||
656 | + fail: function (res) { | ||
657 | + console.log(res); | ||
658 | + wx.hideLoading(); | ||
659 | + } | ||
660 | + }); | ||
661 | + }, | ||
662 | + | ||
663 | + | ||
664 | + // 圆形图片 | ||
665 | + circle: function (ctx, x, y, r, color) { | ||
666 | + ctx.save() | ||
667 | + ctx.beginPath(); | ||
668 | + var cx = x + r; | ||
669 | + var cy = y + r; | ||
670 | + ctx.arc(cx, cy, r, 0, 2 * Math.PI); | ||
671 | + ctx.clip(); | ||
672 | + ctx.fillStyle = color; | ||
673 | + ctx.fillRect(x, y, 2 * r, 2 * r); | ||
674 | + ctx.restore() | ||
675 | + ctx.closePath(); | ||
676 | + }, | ||
677 | + | ||
678 | + /** | ||
679 | + * 绘制圆角矩形 | ||
680 | + * @param {*} x 起始点x坐标 | ||
681 | + * @param {*} y 起始点y坐标 | ||
682 | + * @param {*} w 矩形宽 | ||
683 | + * @param {*} h 矩形高 | ||
684 | + * @param {*} r 圆角半径 | ||
685 | + * @param {*} ctx 画板上下文 | ||
686 | + */ | ||
687 | + darwRoundRect(x, y, w, h, r, ctx) { | ||
688 | + ctx.save() | ||
689 | + ctx.beginPath() | ||
690 | + | ||
691 | + // 左上弧线 | ||
692 | + ctx.arc(x + r, y + r, r, 1 * Math.PI, 1.5 * Math.PI) | ||
693 | + // 左直线 | ||
694 | + ctx.moveTo(x, y + r) | ||
695 | + ctx.lineTo(x, y + h - r) | ||
696 | + // 左下弧线 | ||
697 | + ctx.arc(x + r, y + h - r, r, 0.5 * Math.PI, 1 * Math.PI) | ||
698 | + // 下直线 | ||
699 | + ctx.lineTo(x + r, y + h) | ||
700 | + ctx.lineTo(x + w - r, y + h) | ||
701 | + // 右下弧线 | ||
702 | + ctx.arc(x + w - r, y + h - r, r, 0 * Math.PI, 0.5 * Math.PI) | ||
703 | + // 右直线 | ||
704 | + ctx.lineTo(x + w, y + h - r) | ||
705 | + ctx.lineTo(x + w, y + r) | ||
706 | + // 右上弧线 | ||
707 | + ctx.arc(x + w - r, y + r, r, 1.5 * Math.PI, 2 * Math.PI) | ||
708 | + // 上直线 | ||
709 | + ctx.lineTo(x + w - r, y) | ||
710 | + ctx.lineTo(x + r, y) | ||
711 | + | ||
712 | + ctx.setFillStyle('white') | ||
713 | + ctx.fill() | ||
714 | + }, | ||
715 | + close_share: function () { | ||
716 | + this.setData({ share_show: 0 }) | ||
717 | + }, | ||
718 | + | ||
719 | + | ||
720 | + // 保存图片到手机 | ||
721 | + savePic() { | ||
722 | + var self = this; | ||
723 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | ||
724 | + this.getSetting().then((res) => { | ||
725 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | ||
726 | + if (!res.authSetting['scope.writePhotosAlbum']) { | ||
727 | + this.authorize().then(() => { | ||
728 | + // 同意授权后保存下载文件 | ||
729 | + this.saveImage(self.data.shareImgPath) | ||
730 | + .then(() => { | ||
731 | + self.setData({ | ||
732 | + share_show: false | ||
733 | + }); | ||
734 | + }); | ||
735 | + }) | ||
736 | + } else { | ||
737 | + // 如果已经授权,保存下载文件 | ||
738 | + this.saveImage(self.data.shareImgPath) | ||
739 | + .then(() => { | ||
740 | + self.setData({ | ||
741 | + share_show: false | ||
742 | + }); | ||
743 | + }); | ||
744 | + } | ||
745 | + | ||
746 | + }) | ||
747 | + }, | ||
748 | + // 获取用户已经授予了哪些权限 | ||
749 | + getSetting() { | ||
750 | + return new Promise((resolve, reject) => { | ||
751 | + wx.getSetting({ | ||
752 | + success: res => { | ||
753 | + resolve(res) | ||
754 | + } | ||
755 | + }) | ||
756 | + }) | ||
757 | + }, | ||
758 | + // 发起首次授权请求 | ||
759 | + authorize() { | ||
760 | + // isFirst 用来记录是否为首次发起授权, | ||
761 | + // 如果首次授权拒绝后,isFirst赋值为1 | ||
762 | + let isFirst = wx.getStorageSync('isFirst') || 0; | ||
763 | + return new Promise((resolve, reject) => { | ||
764 | + wx.authorize({ | ||
765 | + scope: 'scope.writePhotosAlbum', | ||
766 | + // 同意授权 | ||
767 | + success: () => { | ||
768 | + resolve(); | ||
769 | + }, | ||
770 | + // 拒绝授权,这里是用户拒绝授权后的回调 | ||
771 | + fail: res => { | ||
772 | + if (isFirst === 0) { | ||
773 | + wx.setStorageSync('isFirst', 1); | ||
774 | + wx.showToast({ | ||
775 | + title: '保存失败', | ||
776 | + icon: 'none', | ||
777 | + duration: 1000 | ||
778 | + }) | ||
779 | + } else { | ||
780 | + this.showModal(); | ||
781 | + } | ||
782 | + console.log('拒绝授权'); | ||
783 | + reject(); | ||
784 | + } | ||
785 | + }) | ||
786 | + }) | ||
787 | + }, | ||
788 | + // 保存图片到系统相册 | ||
789 | + saveImage(saveUrl) { | ||
790 | + var self = this; | ||
791 | + return new Promise((resolve, reject) => { | ||
792 | + wx.saveImageToPhotosAlbum({ | ||
793 | + filePath: saveUrl, | ||
794 | + success: (res) => { | ||
795 | + wx.showToast({ | ||
796 | + title: '保存成功', | ||
797 | + duration: 1000, | ||
798 | + }); | ||
799 | + resolve(); | ||
800 | + }, | ||
801 | + fail: () => { | ||
802 | + wx.showToast({ | ||
803 | + title: '保存失败', | ||
804 | + duration: 1000, | ||
805 | + }); | ||
806 | + } | ||
807 | + }) | ||
808 | + }) | ||
809 | + }, | ||
810 | + | ||
811 | + //-----领取券----- | ||
812 | + get_quan: function (e) { | ||
813 | + | ||
814 | + var cid = e.currentTarget.dataset.cid; | ||
815 | + var index = e.currentTarget.dataset.ind; | ||
816 | + var q_word = e.currentTarget.dataset.word; | ||
817 | + var item = this.data[q_word][index]; | ||
818 | + | ||
819 | + //--先判断会员状态-- | ||
820 | + var user_info = getApp().globalData.userInfo; | ||
821 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
822 | + wx.navigateTo({ | ||
823 | + url: '/pages/togoin/togoin', | ||
824 | + }) | ||
825 | + return false; | ||
826 | + } | ||
827 | + | ||
828 | + | ||
829 | + //如果券还在领取中,不能再点 | ||
830 | + if (item.linging == 1) { | ||
831 | + getApp().my_warnning('领取中..', 0, this); | ||
832 | + return false; | ||
833 | + } | ||
834 | + | ||
835 | + //如果领取的次数到了 | ||
836 | + if (item.everyone_num > 0 && item.lqnum >= item.everyone_num) { | ||
837 | + getApp().my_warnning('领取失败,您已领完该券', 0, this); | ||
838 | + return false; | ||
839 | + } | ||
840 | + | ||
841 | + var lq_num = item.lqnum; | ||
842 | + | ||
843 | + var pdata = { | ||
844 | + 'uid': getApp().globalData.user_id, | ||
845 | + 'cid': cid, | ||
846 | + 'store_id': setting.stoid, | ||
847 | + 'type': 5 | ||
848 | + }; | ||
849 | + | ||
850 | + //-- 导购ID -- | ||
851 | + if (getApp().globalData.guide_id) { | ||
852 | + pdata.guide_id = getApp().globalData.guide_id; | ||
853 | + } | ||
854 | + | ||
855 | + var app = getApp(), th = this; | ||
856 | + wx.showLoading(); | ||
857 | + app.request.post("/api/weshop/couponList/saveCouponList", { | ||
858 | + data: pdata, | ||
859 | + success: function (res) { | ||
860 | + wx.hideLoading(); | ||
861 | + if (res.data.code == 0) { | ||
862 | + app.my_warnning("领取成功", 1, th); | ||
863 | + lq_num++; | ||
864 | + var text = q_word + "[" + index + "].lqnum"; | ||
865 | + var text2 = q_word + "[" + index + "].linging"; | ||
866 | + var obj = {}; | ||
867 | + obj[text] = lq_num; | ||
868 | + obj[text2] = 0; | ||
869 | + th.setData(obj); | ||
870 | + } else { | ||
871 | + app.confirmBox(res.data.msg); | ||
872 | + var text2 = q_word + "[" + index + "].linging"; | ||
873 | + var obj = {}; | ||
874 | + obj[text2] = 0; | ||
875 | + th.setData(obj); | ||
876 | + } | ||
877 | + } | ||
878 | + }) | ||
879 | + }, | ||
880 | + | ||
881 | + | ||
882 | + | ||
883 | +}) | ||
0 | \ No newline at end of file | 884 | \ No newline at end of file |
packageB/pages/AI-test-skin/success_result/success_result.json renamed to packageD/pages/AI-test-skin/success_result/success_result.json
packageB/pages/AI-test-skin/success_result/success_result.wxml renamed to packageD/pages/AI-test-skin/success_result/success_result.wxml
1 | <wxs module="s_filter" src="s_filter.wxs"></wxs> | 1 | <wxs module="s_filter" src="s_filter.wxs"></wxs> |
2 | - | 2 | +<!-- <scroll-view enable-flex scroll-x> |
3 | + <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view> | ||
4 | + <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view> | ||
5 | + <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view> | ||
6 | + <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view> | ||
7 | + <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view> | ||
8 | + </scroll-view> --> | ||
3 | <view style="height: 100rpx;"> | 9 | <view style="height: 100rpx;"> |
4 | <scroll-view enable-flex scroll-into-view="{{tab_id}}" scroll-with-animation scroll-x class="tab_scroll"> | 10 | <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}} | 11 | + <view class="flex" style="height: 100%;"> |
12 | + <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':''}}"> | ||
13 | + {{item.name}} | ||
14 | + </view> | ||
8 | </view> | 15 | </view> |
9 | - </view> | ||
10 | -</scroll-view> | 16 | + </scroll-view> |
11 | </view> | 17 | </view> |
12 | 18 | ||
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" > | 19 | +<scroll-view enable-flex enhanced scroll-into-view="{{tab_id}}" scroll-with-animation bindscroll="scroll_view" scroll-y style="height: calc(100% - 100rpx)"> |
20 | + <view class="analyse_by_people zong_he" id="zong_he"> | ||
15 | <view class="analyse"> | 21 | <view class="analyse"> |
16 | <view class="analyse_left"> | 22 | <view class="analyse_left"> |
17 | <view class="mark">毛孔 {{pore_num}}</view> | 23 | <view class="mark">毛孔 {{pore_num}}</view> |
@@ -19,7 +25,8 @@ | @@ -19,7 +25,8 @@ | ||
19 | <view class="mark">黑眼圈 {{s_filter.get_dark_type(dark_type)}}</view> | 25 | <view class="mark">黑眼圈 {{s_filter.get_dark_type(dark_type)}}</view> |
20 | </view> | 26 | </view> |
21 | <view class="analyse_center"> | 27 | <view class="analyse_center"> |
22 | - <image src="{{iurl}}/miniapp/images/skinimg/man.png"></image> | 28 | + <image wx:if="{{sex === 'female'}}" src="{{iurl}}/miniapp/images/skinimg/nv.png"></image> |
29 | + <image wx:else src="{{iurl}}/miniapp/images/skinimg/nan.png"></image> | ||
23 | </view> | 30 | </view> |
24 | <view class="analyse_right"> | 31 | <view class="analyse_right"> |
25 | <view class="mark">黑头 {{blackhead_num}}</view> | 32 | <view class="mark">黑头 {{blackhead_num}}</view> |
@@ -27,7 +34,7 @@ | @@ -27,7 +34,7 @@ | ||
27 | <view class="mark">痤疮 {{acne_num}}</view> | 34 | <view class="mark">痤疮 {{acne_num}}</view> |
28 | </view> | 35 | </view> |
29 | </view> | 36 | </view> |
30 | - <view class="score"> | 37 | + <view class="score" style="display: none"> |
31 | <view> | 38 | <view> |
32 | <view class="fs28">综合得分</view> | 39 | <view class="fs28">综合得分</view> |
33 | <view class="t-c mt10"> | 40 | <view class="t-c mt10"> |
@@ -43,12 +50,12 @@ | @@ -43,12 +50,12 @@ | ||
43 | </view> | 50 | </view> |
44 | <view class="content" style="padding-bottom: 0;"> | 51 | <view class="content" style="padding-bottom: 0;"> |
45 | <view class="mb_b5" style="display: none"> | 52 | <view class="mb_b5" style="display: none"> |
46 | - <image src="/packageB/images/1.png" style="height: 200rpx;width: 100%;"></image> | 53 | + <image src="{{iurl}}/miniapp/images/skinimg/_code.png" style="height: 200rpx;width: 100%;"></image> |
47 | </view> | 54 | </view> |
48 | <view class="analyse_result mt_b5"> | 55 | <view class="analyse_result mt_b5"> |
49 | - <!-- <view> --> | ||
50 | <view class="img"> | 56 | <view class="img"> |
51 | - <image src="{{iurl}}/miniapp/images/skinimg/mao18.jpeg" style="width: 100%;height: 100%;"></image> | 57 | + <image wx:if="{{sex === 'female'}}" src="{{iurl}}/miniapp/images/skinimg/nv1.jpeg" style="width: 100%;height: 100%;"></image> |
58 | + <image wx:else src="{{iurl}}/miniapp/images/skinimg/nan1.jpeg" style="width: 100%;height: 100%;"></image> | ||
52 | </view> | 59 | </view> |
53 | <view class="f1 ml20"> | 60 | <view class="f1 ml20"> |
54 | <view class="bold">待确定</view> | 61 | <view class="bold">待确定</view> |
@@ -57,10 +64,9 @@ | @@ -57,10 +64,9 @@ | ||
57 | <text class="you">油性区</text> | 64 | <text class="you">油性区</text> |
58 | </view> | 65 | </view> |
59 | <view class="mt20 fs26"> | 66 | <view class="mt20 fs26"> |
60 | - <text>你的油性的身份骨科大夫地方官梵蒂冈反对烦得很东方红风格和的发挥</text> | 67 | + <text>你的皮肤总体油脂过剩,容易引发皮肤问题。日常可使用一些具有控油,补水功效产品,帮助调理肌肤</text> |
61 | </view> | 68 | </view> |
62 | </view> | 69 | </view> |
63 | - <!-- </view> --> | ||
64 | </view> | 70 | </view> |
65 | </view> | 71 | </view> |
66 | </view> | 72 | </view> |
@@ -68,7 +74,7 @@ | @@ -68,7 +74,7 @@ | ||
68 | <view class="content"> | 74 | <view class="content"> |
69 | <!-- 毛孔 --> | 75 | <!-- 毛孔 --> |
70 | <block wx:if="{{pore_num}}"> | 76 | <block wx:if="{{pore_num}}"> |
71 | - <include src="pore/pore.wxml" /> | 77 | + <include src="pore/pore" /> |
72 | </block> | 78 | </block> |
73 | <!-- 黑头 --> | 79 | <!-- 黑头 --> |
74 | <block wx:if="{{blackhead_num}}"> | 80 | <block wx:if="{{blackhead_num}}"> |
@@ -97,30 +103,30 @@ | @@ -97,30 +103,30 @@ | ||
97 | 103 | ||
98 | 104 | ||
99 | <view class="mask" catchtap="close_mask" wx:if="{{showDialog}}"></view> | 105 | <view class="mask" catchtap="close_mask" wx:if="{{showDialog}}"></view> |
100 | -<cover-view class="share fs28"> | 106 | +<cover-view bindtap="saveImageToPhotosAlbum" class="share fs28"> |
101 | <cover-view class="iconfont icon-zhuanfa1" style="padding: 0 10rpx;"></cover-view> | 107 | <cover-view class="iconfont icon-zhuanfa1" style="padding: 0 10rpx;"></cover-view> |
102 | <cover-view>分享</cover-view> | 108 | <cover-view>分享</cover-view> |
103 | </cover-view> | 109 | </cover-view> |
104 | 110 | ||
111 | +<!-- 问题标注 --> | ||
105 | <view class="dialog {{img_scale?'scale':'fangda'}}" wx:if="{{showDialog}}"> | 112 | <view class="dialog {{img_scale?'scale':'fangda'}}" wx:if="{{showDialog}}"> |
106 | - <!-- 放大的 --> | 113 | + <!-- 局部放大的 --> |
107 | <block wx:if="{{img_scale}}"> | 114 | <block wx:if="{{img_scale}}"> |
108 | - <view class="dialog_img"> | 115 | + <view class="dialog_img" style="{{show_type == 5?'height:60%':'height:75%'}}"> |
109 | <view class="img_content"> | 116 | <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> | 117 | + <view class="face_show_view" style="position: relative;width:{{iwidth}}px;height:{{iheight}}px;margin-top: -{{m_top}}px;margin-left: -{{m_left}}px"> |
118 | + <image src="{{iurl}}{{face_img}}" bindload="face_img_load" style="width: 100%;height: 100%;"></image> | ||
113 | 119 | ||
114 | <block wx:if="{{yanjing}}"> | 120 | <block wx:if="{{yanjing}}"> |
115 | - <!-- 显示毛孔 --> | ||
116 | - <block wx:if="{{show_type==1}}"> | ||
117 | - <block wx:for="{{pore_list}}"> | ||
118 | - <view class="abs p_circle" style="left:{{(item.x-item.r)*bili}}px; top:{{(item.y-item.r)*bili}}px; height:{{2*item.r*bili}}px;width: {{2*item.r*bili}}px"></view> | ||
119 | - </block> | ||
120 | - </block> | 121 | + <!-- 显示毛孔 --> |
122 | + <block wx:if="{{show_type==1}}"> | ||
123 | + <block wx:for="{{pore_list}}"> | ||
124 | + <view class="abs p_circle" style="left:{{(item.x-item.r)*bili}}px; top:{{(item.y-item.r)*bili}}px; height:{{2*item.r*bili}}px;width: {{2*item.r*bili}}px"></view> | ||
125 | + </block> | ||
126 | + </block> | ||
121 | <!-- 显示色斑 --> | 127 | <!-- 显示色斑 --> |
122 | <block wx:if="{{show_type==2}}"> | 128 | <block wx:if="{{show_type==2}}"> |
123 | - <block wx:for="{{speckle_list}}" > | 129 | + <block wx:for="{{speckle_list}}"> |
124 | <block wx:for="{{item.position}}" wx:for-item="bitem"> | 130 | <block wx:for="{{item.position}}" wx:for-item="bitem"> |
125 | <view class="abs p_point" style="left:{{(bitem.x)*bili}}px; top:{{(bitem.y)*bili}}px;"></view> | 131 | <view class="abs p_point" style="left:{{(bitem.x)*bili}}px; top:{{(bitem.y)*bili}}px;"></view> |
126 | </block> | 132 | </block> |
@@ -128,15 +134,15 @@ | @@ -128,15 +134,15 @@ | ||
128 | </block> | 134 | </block> |
129 | <!-- 显示皱纹 --> | 135 | <!-- 显示皱纹 --> |
130 | <block wx:if="{{show_type==3}}"> | 136 | <block wx:if="{{show_type==3}}"> |
131 | - <block wx:for="{{wrinkle_list}}" > | 137 | + <block wx:for="{{wrinkle_list}}"> |
132 | <block wx:for="{{item}}" wx:for-item="bitem"> | 138 | <block wx:for="{{item}}" wx:for-item="bitem"> |
133 | - <view class="abs p_point" style="left:{{(bitem.x)*bili}}px; top:{{(bitem.y)*bili}}px;"></view> | 139 | + <view class="abs p_point" style="left:{{(bitem.x)*bili}}px; top:{{(bitem.y)*bili}}px;"></view> |
134 | </block> | 140 | </block> |
135 | </block> | 141 | </block> |
136 | </block> | 142 | </block> |
137 | <!-- 显示黑头 --> | 143 | <!-- 显示黑头 --> |
138 | <block wx:if="{{show_type==4}}"> | 144 | <block wx:if="{{show_type==4}}"> |
139 | - <block wx:for="{{blackhead_list}}" > | 145 | + <block wx:for="{{blackhead_list}}"> |
140 | <block wx:for="{{item}}" wx:for-item="bitem"> | 146 | <block wx:for="{{item}}" wx:for-item="bitem"> |
141 | <view class="abs p_circle" style="left:{{(item.x-item.r)*bili}}px; top:{{(item.y-item.r)*bili}}px; height:{{2*item.r*bili}}px;width: {{2*item.r*bili}}px"></view> | 147 | <view class="abs p_circle" style="left:{{(item.x-item.r)*bili}}px; top:{{(item.y-item.r)*bili}}px; height:{{2*item.r*bili}}px;width: {{2*item.r*bili}}px"></view> |
142 | </block> | 148 | </block> |
@@ -170,33 +176,69 @@ | @@ -170,33 +176,69 @@ | ||
170 | <text catchtap="click_fangda" class="iconfont icon-fangda mgb20"></text> | 176 | <text catchtap="click_fangda" class="iconfont icon-fangda mgb20"></text> |
171 | </view> | 177 | </view> |
172 | </view> | 178 | </view> |
173 | - <view class="dialog_txt"> | ||
174 | - <view class="fs28" style="margin-right:15rpx;"> | ||
175 | - <text wx:if="{{show_type==1}}">毛孔较粗大</text> | ||
176 | - <text wx:if="{{show_type==2}}">色斑轻度</text> | ||
177 | - <text wx:if="{{show_type==3}}">皱纹轻度</text> | ||
178 | - <text wx:if="{{show_type==4}}">黑头轻度</text> | ||
179 | - <text wx:if="{{show_type==5}}">黑眼圈轻度</text> | ||
180 | - <text wx:if="{{show_type==6}}">痤疮轻度</text> | ||
181 | - <text wx:if="{{show_type==7}}">敏感度{{s_filter.get_nai_shou(skin_sensitive_check)}}</text> | 179 | + <view class="dialog_txt" style="{{show_type == 5?'height:40%':'height:25%'}}"> |
180 | + <block wx:if="{{show_type == 5}}"> | ||
181 | + <view class="heiyanquan_img flex"> | ||
182 | + <view class="img1 t-c"> | ||
183 | + <image wx:if="{{sex === 'female' }}" style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nv4.jpeg"></image> | ||
184 | + <image wx:else style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nan4.jpeg"></image> | ||
185 | + <view class="fs24">血管型 无</view> | ||
186 | + </view> | ||
187 | + <view class="img1 t-c"> | ||
188 | + <image wx:if="{{sex === 'female' }}" style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nv5.jpeg"></image> | ||
189 | + <image wx:else style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nan5.jpeg"></image> | ||
190 | + <view class="fs24">色素型 轻度</view> | ||
191 | + </view> | ||
192 | + <view class="img1 t-c"> | ||
193 | + <image wx:if="{{sex === 'female' }}" style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nv6.jpeg"></image> | ||
194 | + <image wx:else style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nan6.jpeg"></image> | ||
195 | + <view class="fs24">阴影型 轻度</view> | ||
196 | + </view> | ||
182 | </view> | 197 | </view> |
183 | - <view style="margin-top:2rpx;display: flex;"> | ||
184 | - <view class="pp"></view> | ||
185 | - <view class="pp"></view> | ||
186 | - <view class="pp"></view> | ||
187 | - <view class="pp"></view> | ||
188 | - <view class="pp"></view> | ||
189 | - <view class="pp"></view> | ||
190 | - <view class="pp"></view> | ||
191 | - <view class="pp"></view> | ||
192 | - <view class="pp"></view> | 198 | + |
199 | + </block> | ||
200 | + <view class="dialog_progress"> | ||
201 | + <view style="margin-right:7px;font-size:32rpx;"> | ||
202 | + <text wx:if="{{show_type==1}}">毛孔较粗大</text> | ||
203 | + <text wx:if="{{show_type==2}}">色斑轻度</text> | ||
204 | + <text wx:if="{{show_type==3}}">皱纹轻度</text> | ||
205 | + <text wx:if="{{show_type==4}}">黑头轻度</text> | ||
206 | + <text wx:if="{{show_type==5}}">黑眼圈轻度</text> | ||
207 | + <text wx:if="{{show_type==6}}">痤疮轻度</text> | ||
208 | + <text wx:if="{{show_type==7}}">敏感度{{s_filter.get_nai_shou(skin_sensitive_check)}}</text> | ||
209 | + </view> | ||
210 | + <view style="margin-top:10rpx;display: flex;"> | ||
211 | + <view class="pp"></view> | ||
212 | + <view class="pp"></view> | ||
213 | + <view class="pp"></view> | ||
214 | + <view class="pp"></view> | ||
215 | + <view class="pp"></view> | ||
216 | + <view class="pp"></view> | ||
217 | + <view class="pp"></view> | ||
218 | + <view class="pp"></view> | ||
219 | + <view class="pp"></view> | ||
220 | + </view> | ||
193 | </view> | 221 | </view> |
222 | + <scroll-view wx:if="{{show_type == 3|| show_type == 5|| show_type == 6}}" style="margin-top: 20rpx;" enable-flex scroll-into-view="scroll{{scroll_id}}" scroll-with-animation scroll-x> | ||
223 | + <view class="flex fs28" style="height: 100%;"> | ||
224 | + <view wx:for="{{show_type == 3?zhouwen_arr:(show_type == 5?heitanquan_arr:cuochuang_arr)}}" bindtap="click_scroll" data-scroll_id="{{item.id}}" data-index="{{index}}" wx:key="id" id="scroll{{item.id}}" class="dialog_item {{scroll_index==index?'active1':''}}"> | ||
225 | + {{item.name}} | ||
226 | + </view> | ||
227 | + </view> | ||
228 | + </scroll-view> | ||
194 | </view> | 229 | </view> |
230 | + | ||
231 | + | ||
195 | </block> | 232 | </block> |
233 | + | ||
234 | + <!-- 全图的,能够自由拖拽和放大 --> | ||
235 | + | ||
196 | <!-- 缩小 --> | 236 | <!-- 缩小 --> |
197 | <block wx:else> | 237 | <block wx:else> |
198 | - <view style="position: relative"> | 238 | + <view bindtouchstart='touchstartCallback' bindtouchmove='touchmoveCallback' bindtouchEnd='touchendCallback' |
239 | + style="position: relative;transform: scale({{ig_scale}});top: {{img_top}}px; left: {{img_left}}px;"> | ||
199 | <image style="width: 100%;" src="{{iurl}}{{face_img}}" mode="widthFix" ></image> | 240 | <image style="width: 100%;" src="{{iurl}}{{face_img}}" mode="widthFix" ></image> |
241 | + | ||
200 | <block wx:if="{{yanjing}}"> | 242 | <block wx:if="{{yanjing}}"> |
201 | <!-- 显示毛孔 --> | 243 | <!-- 显示毛孔 --> |
202 | <block wx:if="{{show_type==1}}"> | 244 | <block wx:if="{{show_type==1}}"> |
@@ -206,7 +248,7 @@ | @@ -206,7 +248,7 @@ | ||
206 | </block> | 248 | </block> |
207 | <!-- 显示色斑 --> | 249 | <!-- 显示色斑 --> |
208 | <block wx:if="{{show_type==2}}"> | 250 | <block wx:if="{{show_type==2}}"> |
209 | - <block wx:for="{{speckle_list}}" > | 251 | + <block wx:for="{{speckle_list}}"> |
210 | <block wx:for="{{item.position}}" wx:for-item="bitem"> | 252 | <block wx:for="{{item.position}}" wx:for-item="bitem"> |
211 | <view class="abs p_point" style="left:{{(bitem.x)*bili1}}px; top:{{(bitem.y)*bili1}}px;"></view> | 253 | <view class="abs p_point" style="left:{{(bitem.x)*bili1}}px; top:{{(bitem.y)*bili1}}px;"></view> |
212 | </block> | 254 | </block> |
@@ -214,7 +256,7 @@ | @@ -214,7 +256,7 @@ | ||
214 | </block> | 256 | </block> |
215 | <!-- 显示皱纹 --> | 257 | <!-- 显示皱纹 --> |
216 | <block wx:if="{{show_type==3}}"> | 258 | <block wx:if="{{show_type==3}}"> |
217 | - <block wx:for="{{wrinkle_list}}" > | 259 | + <block wx:for="{{wrinkle_list}}"> |
218 | <block wx:for="{{item}}" wx:for-item="bitem"> | 260 | <block wx:for="{{item}}" wx:for-item="bitem"> |
219 | <view class="abs p_point" style="left:{{(bitem.x)*bili1}}px; top:{{(bitem.y)*bili1}}px;"></view> | 261 | <view class="abs p_point" style="left:{{(bitem.x)*bili1}}px; top:{{(bitem.y)*bili1}}px;"></view> |
220 | </block> | 262 | </block> |
@@ -223,7 +265,7 @@ | @@ -223,7 +265,7 @@ | ||
223 | 265 | ||
224 | <!-- 显示黑头 --> | 266 | <!-- 显示黑头 --> |
225 | <block wx:if="{{show_type==4}}"> | 267 | <block wx:if="{{show_type==4}}"> |
226 | - <block wx:for="{{blackhead_list}}" > | 268 | + <block wx:for="{{blackhead_list}}"> |
227 | <block wx:for="{{item}}" wx:for-item="bitem"> | 269 | <block wx:for="{{item}}" wx:for-item="bitem"> |
228 | <view class="abs p_circle" style="left:{{(item.x-item.r)*bili1}}px; top:{{(item.y-item.r)*bili1}}px; height:{{2*item.r*bili1}}px;width: {{2*item.r*bili1}}px"></view> | 270 | <view class="abs p_circle" style="left:{{(item.x-item.r)*bili1}}px; top:{{(item.y-item.r)*bili1}}px; height:{{2*item.r*bili1}}px;width: {{2*item.r*bili1}}px"></view> |
229 | </block> | 271 | </block> |
@@ -253,3 +295,19 @@ | @@ -253,3 +295,19 @@ | ||
253 | </view> | 295 | </view> |
254 | </block> | 296 | </block> |
255 | </view> | 297 | </view> |
298 | + | ||
299 | + | ||
300 | +<!-- 二维码显示页面 --> | ||
301 | +<canvas canvas-id='share' style='width:750rpx;height:1338rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas> | ||
302 | + | ||
303 | +<!-- 展示分享图 --> | ||
304 | +<view id="share_show" wx:if="{{share_show}}"> | ||
305 | + <view class="cover-layer" bindtap="close_share" style="z-index: 77777"></view> | ||
306 | + <view class="share_content"> | ||
307 | + <view class="sh_close" bindtap="close_share"><text class="iconfont icon-close"></text></view> | ||
308 | + <image src="{{shareImgPath}}" style="width: 100%" mode="widthFix"></image> | ||
309 | + <view class="share_save_btn" bindtap="savePic">保存到相册</view> | ||
310 | + </view> | ||
311 | +</view> | ||
312 | + | ||
313 | +<warn id="warn"></warn> | ||
256 | \ No newline at end of file | 314 | \ No newline at end of file |
packageB/pages/AI-test-skin/success_result/success_result.wxss renamed to packageD/pages/AI-test-skin/success_result/success_result.wxss
@@ -44,10 +44,34 @@ page { | @@ -44,10 +44,34 @@ page { | ||
44 | background-color: #333333; | 44 | background-color: #333333; |
45 | } | 45 | } |
46 | 46 | ||
47 | +.dialog_item.active1 { | ||
48 | + color: #45d4eb; | ||
49 | +} | ||
50 | + | ||
51 | +.dialog_item.active1::after { | ||
52 | + content: ''; | ||
53 | + position: absolute; | ||
54 | + bottom: 0; | ||
55 | + left: 50%; | ||
56 | + transform: translateX(-50%); | ||
57 | + width: 25%; | ||
58 | + height: 6rpx; | ||
59 | + background-color: #45d4eb; | ||
60 | +} | ||
61 | + | ||
47 | .analyse { | 62 | .analyse { |
48 | display: flex; | 63 | display: flex; |
49 | align-items: center; | 64 | align-items: center; |
50 | margin-top: 50rpx; | 65 | margin-top: 50rpx; |
66 | + justify-content: center; | ||
67 | + /* justify-content: space-evenly; */ | ||
68 | +} | ||
69 | + | ||
70 | +.analyse1 { | ||
71 | + display: flex; | ||
72 | + align-items: center; | ||
73 | + margin: 50rpx 0 100rpx 0; | ||
74 | + justify-content: center; | ||
51 | /* justify-content: space-evenly; */ | 75 | /* justify-content: space-evenly; */ |
52 | } | 76 | } |
53 | 77 | ||
@@ -58,6 +82,13 @@ page { | @@ -58,6 +82,13 @@ page { | ||
58 | border-radius: 20rpx; | 82 | border-radius: 20rpx; |
59 | } | 83 | } |
60 | 84 | ||
85 | +.analyse1 .mark1 { | ||
86 | + padding: 3rpx; | ||
87 | + font-size: 24rpx; | ||
88 | + background: #fff; | ||
89 | + border-radius: 20rpx; | ||
90 | +} | ||
91 | + | ||
61 | .analyse .analyse_left { | 92 | .analyse .analyse_left { |
62 | position: relative; | 93 | position: relative; |
63 | right: -70rpx; | 94 | right: -70rpx; |
@@ -72,6 +103,26 @@ page { | @@ -72,6 +103,26 @@ page { | ||
72 | height: 400rpx; | 103 | height: 400rpx; |
73 | } | 104 | } |
74 | 105 | ||
106 | +.analyse1 .analyse_center1 { | ||
107 | + position: relative; | ||
108 | + background: #c9f0f9; | ||
109 | + border-radius: 50%; | ||
110 | + width: 300rpx; | ||
111 | + height: 300rpx; | ||
112 | +} | ||
113 | + | ||
114 | +.analyse1 .analyse_left1 { | ||
115 | + position: relative; | ||
116 | + right: -25rpx; | ||
117 | + z-index: 2; | ||
118 | +} | ||
119 | + | ||
120 | +.analyse1 .analyse_right1 { | ||
121 | + position: relative; | ||
122 | + right: 25rpx; | ||
123 | + z-index: 2; | ||
124 | +} | ||
125 | + | ||
75 | .analyse_center .lianxian { | 126 | .analyse_center .lianxian { |
76 | position: absolute; | 127 | position: absolute; |
77 | width: 2rpx; | 128 | width: 2rpx; |
@@ -302,6 +353,22 @@ page { | @@ -302,6 +353,22 @@ page { | ||
302 | background-color: rgb(193 235 241 / 50%) | 353 | background-color: rgb(193 235 241 / 50%) |
303 | } | 354 | } |
304 | 355 | ||
356 | +.renzheng { | ||
357 | + position: relative; | ||
358 | + font-size: 38rpx; | ||
359 | + font-weight: 600; | ||
360 | +} | ||
361 | + | ||
362 | +.renzheng::after { | ||
363 | + position: absolute; | ||
364 | + content: ""; | ||
365 | + bottom: 0; | ||
366 | + display: block; | ||
367 | + width: 100%; | ||
368 | + height: 20rpx; | ||
369 | + background-color: rgb(193 235 241 / 50%) | ||
370 | +} | ||
371 | + | ||
305 | .analyse_classify_foot .shoushu { | 372 | .analyse_classify_foot .shoushu { |
306 | padding: 5%; | 373 | padding: 5%; |
307 | display: flex; | 374 | display: flex; |
@@ -381,23 +448,51 @@ page { | @@ -381,23 +448,51 @@ page { | ||
381 | top: 50%; | 448 | top: 50%; |
382 | right: 50%; | 449 | right: 50%; |
383 | transform: translate(50%, -50%); | 450 | transform: translate(50%, -50%); |
384 | - height: 70%; | 451 | + height: 80%; |
385 | width: 80%; | 452 | width: 80%; |
386 | - border-radius: 30rpx; | 453 | + border-top-left-radius: 12rpx; |
454 | + border-top-right-radius: 12rpx; | ||
387 | z-index: 99999999; | 455 | z-index: 99999999; |
456 | + overflow: hidden; | ||
388 | } | 457 | } |
389 | 458 | ||
390 | .dialog .dialog_img { | 459 | .dialog .dialog_img { |
391 | - height: 84%; | 460 | + height: 75%; |
392 | position: relative; | 461 | position: relative; |
393 | } | 462 | } |
394 | 463 | ||
395 | .dialog .dialog_txt { | 464 | .dialog .dialog_txt { |
396 | display: flex; | 465 | display: flex; |
397 | - align-items: center; | ||
398 | - justify-content: center; | 466 | + flex-direction: column; |
467 | + justify-content: space-evenly; | ||
468 | + background-color: #fff; | ||
469 | + min-height: 25%; | ||
470 | +} | ||
471 | + | ||
472 | +.dialog_txt .heiyanquan_img { | ||
473 | + justify-content: space-between; | ||
474 | + padding: 2%; | ||
475 | +} | ||
476 | +.dialog_txt .heiyanquan_img .img1 { | ||
477 | + width: 32%; | ||
478 | +} | ||
479 | + | ||
480 | +.dialog .dialog_progress { | ||
481 | + display: flex; | ||
482 | + align-self: center; | ||
483 | +} | ||
484 | + | ||
485 | +.dialog .dialog_bottom { | ||
486 | + display: flex; | ||
487 | + width: 130%; | ||
488 | + background-color: #fff; | ||
489 | +} | ||
490 | + | ||
491 | +.dialog_item { | ||
492 | + position: relative; | ||
493 | + padding: 3% 6%; | ||
494 | + white-space: nowrap; | ||
399 | background-color: #fff; | 495 | background-color: #fff; |
400 | - min-height: 20%; | ||
401 | } | 496 | } |
402 | 497 | ||
403 | .dialog .dialog_icon { | 498 | .dialog .dialog_icon { |
@@ -415,7 +510,7 @@ page { | @@ -415,7 +510,7 @@ page { | ||
415 | justify-content: center; | 510 | justify-content: center; |
416 | align-items: center; | 511 | align-items: center; |
417 | color: #fff; | 512 | color: #fff; |
418 | - background-color: #1f1919; | 513 | + background-color: #333; |
419 | border-radius: 50%; | 514 | border-radius: 50%; |
420 | width: 50rpx; | 515 | width: 50rpx; |
421 | height: 50rpx; | 516 | height: 50rpx; |
@@ -423,8 +518,8 @@ page { | @@ -423,8 +518,8 @@ page { | ||
423 | 518 | ||
424 | .pp { | 519 | .pp { |
425 | width: 8rpx; | 520 | width: 8rpx; |
426 | - height: 35rpx; | ||
427 | - margin-right: 5rpx; | 521 | + height: 40rpx; |
522 | + margin-right: 8rpx; | ||
428 | border-radius: 3rpx; | 523 | border-radius: 3rpx; |
429 | background: #2cb344; | 524 | background: #2cb344; |
430 | } | 525 | } |
@@ -481,7 +576,7 @@ page { | @@ -481,7 +576,7 @@ page { | ||
481 | left: 205rpx; | 576 | left: 205rpx; |
482 | width: 30rpx; | 577 | width: 30rpx; |
483 | height: 30rpx; | 578 | height: 30rpx; |
484 | - background: #fff; | 579 | + background: #e6f4fa; |
485 | overflow: hidden; | 580 | overflow: hidden; |
486 | } | 581 | } |
487 | 582 | ||
@@ -520,7 +615,7 @@ page { | @@ -520,7 +615,7 @@ page { | ||
520 | } | 615 | } |
521 | 616 | ||
522 | .background { | 617 | .background { |
523 | - background: #f40028; | 618 | + background: #45d4eb; |
524 | } | 619 | } |
525 | 620 | ||
526 | .xc-get { | 621 | .xc-get { |
@@ -541,13 +636,91 @@ page { | @@ -541,13 +636,91 @@ page { | ||
541 | left: 205rpx; | 636 | left: 205rpx; |
542 | width: 30rpx; | 637 | width: 30rpx; |
543 | height: 30rpx; | 638 | height: 30rpx; |
544 | - background: #fff; | 639 | + background: #e6f4fa; |
545 | } | 640 | } |
546 | 641 | ||
547 | -.abs{position: absolute} | ||
548 | -.p_circle{ border: 1rpx solid #c8162c;border-radius: 50%} | ||
549 | -.p_point{background-color:#c8162c;height:2px;width:2px} | 642 | +.abs { |
643 | + position: absolute | ||
644 | +} | ||
645 | + | ||
646 | +.p_circle { | ||
647 | + border: 1rpx solid #c8162c; | ||
648 | + border-radius: 50% | ||
649 | +} | ||
650 | + | ||
651 | +.p_point { | ||
652 | + background-color: #c8162c; | ||
653 | + height: 2px; | ||
654 | + width: 2px | ||
655 | +} | ||
550 | 656 | ||
551 | .xc-spacing { | 657 | .xc-spacing { |
552 | letter-spacing: 4rpx; | 658 | letter-spacing: 4rpx; |
659 | +} | ||
660 | + | ||
661 | +.share_dialog { | ||
662 | + background: #e8f5fd; | ||
663 | + width: 600rpx; | ||
664 | + height: 700rpx; | ||
665 | + padding: 40rpx; | ||
666 | + display: flex; | ||
667 | + flex-direction: column; | ||
668 | + justify-content: space-around; | ||
669 | +} | ||
670 | + | ||
671 | +.share_dialog .share_dialog_center { | ||
672 | + width: 400rpx; | ||
673 | + height: 400rpx; | ||
674 | + margin: 30rpx 0; | ||
675 | + align-self: center; | ||
676 | +} | ||
677 | + | ||
678 | +.share_dialog .share_dialog_bottom { | ||
679 | + background: #fff; | ||
680 | + display: flex; | ||
681 | + padding: 30rpx; | ||
682 | + border-radius: 20rpx; | ||
683 | +} | ||
684 | + | ||
685 | +.share_content { | ||
686 | + position: fixed; | ||
687 | + z-index: 999999; | ||
688 | + top: 50%; | ||
689 | + left: 50%; | ||
690 | + width: 70%; | ||
691 | + transform: translate(-50%, -50%); | ||
692 | +} | ||
693 | + | ||
694 | +.share_save_btn { | ||
695 | + width: 100%; | ||
696 | + height: 80rpx; | ||
697 | + line-height: 80rpx; | ||
698 | + text-align: center; | ||
699 | + color: #fff; | ||
700 | + background-color: #c3172d | ||
701 | +} | ||
702 | + | ||
703 | +.sh_close { | ||
704 | + position: absolute; | ||
705 | + right: 20rpx; | ||
706 | + top: 20rpx; | ||
707 | + width: 70rpx; | ||
708 | + height: 70rpx; | ||
709 | + display: flex; | ||
710 | + justify-content: center; | ||
711 | + align-items: center; | ||
712 | + font-size: 26rpx; | ||
713 | + border-radius: 50%; | ||
714 | + background-color: grey; | ||
715 | + color: #fff | ||
716 | +} | ||
717 | + | ||
718 | +@font-face { | ||
719 | + font-family: "iconfont"; | ||
720 | + /* Project id */ | ||
721 | + src: url('iconfont.ttf?t=1645607343376') format('truetype'); | ||
722 | +} | ||
723 | + | ||
724 | +.icon-close:before { | ||
725 | + content: "\e668"; | ||
553 | } | 726 | } |
554 | \ No newline at end of file | 727 | \ No newline at end of file |
packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.js renamed to packageD/pages/AI-test-skin/success_result/wrinkle/wrinkle.js
1 | -/* | ||
2 | - * @Author: abson | ||
3 | - * @Date: 2022-02-21 11:03:07 | ||
4 | - * @LastEditTime: 2022-02-21 17:50:01 | ||
5 | - * @LastEditors: Please set LastEditors | ||
6 | - * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\wrinkle\wrinkle.js | ||
7 | - */ | ||
8 | module.exports = { | 1 | module.exports = { |
9 | 2 | ||
10 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 | 3 | //把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!ladder_b_num是已经购买了多少件 |
11 | - get_goods: function(th,stoid) { | ||
12 | - var r_code='02'; | 4 | + get_goods: function(th,stoid,sort) { |
5 | + th.setData({wrinkle_sort:sort}); | ||
6 | + var r_code='02'; | ||
13 | //获取痘痘的类型 | 7 | //获取痘痘的类型 |
14 | var list=th.data.face_data.wrinkle.wrinkle_types; | 8 | var list=th.data.face_data.wrinkle.wrinkle_types; |
15 | //把所有的斑的类型拿出来 | 9 | //把所有的斑的类型拿出来 |
@@ -42,7 +36,12 @@ module.exports = { | @@ -42,7 +36,12 @@ module.exports = { | ||
42 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; | 36 | var url="/api/weshop/prom/coupon/pageCouponList?orderField=RAND()&recommend_code="+r_code+"&store_id="+stoid+"&recommend_word="+re_word+"&pageSize=2"; |
43 | getApp().request.promiseGet(url, {}).then(res=>{ | 37 | getApp().request.promiseGet(url, {}).then(res=>{ |
44 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | 38 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ |
45 | - th.setData({wrinkle_quan_list:res.data.data.pageData}); | 39 | + var arr=res.data.data.pageData; |
40 | + arr.map(function (e) { | ||
41 | + e.q_word='wrinkle_quan_list'; | ||
42 | + return e; | ||
43 | + }) | ||
44 | + th.setData({wrinkle_quan_list:arr}); | ||
46 | } | 45 | } |
47 | }) | 46 | }) |
48 | }, | 47 | }, |
packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml renamed to packageD/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml
1 | -<view class="mb_b5" id="zhou_wen"> | 1 | +<view class="mb_b5 zhou_wen" id="zhou_wen"> |
2 | <view class="analyse_classify bg_white"> | 2 | <view class="analyse_classify bg_white"> |
3 | <view class="analyse_classify_header"> | 3 | <view class="analyse_classify_header"> |
4 | <view> | 4 | <view> |
5 | - <view style="color: #45d4eb;">#03</view> | 5 | + <view style="color: #45d4eb;">#0{{wrinkle_sort}}</view> |
6 | <view class="flex-space-between"> | 6 | <view class="flex-space-between"> |
7 | <text style="font-size: 42rpx;" class="bold">皱纹</text> | 7 | <text style="font-size: 42rpx;" class="bold">皱纹</text> |
8 | <view class="fs26" catchtap="show_dailog" data-type="3" style="display: flex;align-items: center;"> | 8 | <view class="fs26" catchtap="show_dailog" data-type="3" style="display: flex;align-items: center;"> |
@@ -13,11 +13,11 @@ | @@ -13,11 +13,11 @@ | ||
13 | </view> | 13 | </view> |
14 | <view class="analyse_classify_header_item mt_b5"> | 14 | <view class="analyse_classify_header_item mt_b5"> |
15 | <view class="analyse_classify_header_img"> | 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 | </view> | 17 | </view> |
18 | <view style="line-height:60rpx;margin-left:20rpx"> | 18 | <view style="line-height:60rpx;margin-left:20rpx"> |
19 | <view class="fs28">程度情况</view> | 19 | <view class="fs28">程度情况</view> |
20 | - <view class="bold">较粗大</view> | 20 | + <view class="bold">皱纹数{{wrinkle_num}}条</view> |
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | <view class="analyse" style="height:400rpx;"> | 23 | <view class="analyse" style="height:400rpx;"> |
@@ -30,7 +30,8 @@ | @@ -30,7 +30,8 @@ | ||
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
32 | <view class="analyse_center" style="width: 250rpx;height: 250rpx;"> | 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 | <view class="lianxian"></view> | 35 | <view class="lianxian"></view> |
35 | <view class="lianxian1"></view> | 36 | <view class="lianxian1"></view> |
36 | <view class="lianxian2"></view> | 37 | <view class="lianxian2"></view> |
@@ -49,7 +50,7 @@ | @@ -49,7 +50,7 @@ | ||
49 | </view> | 50 | </view> |
50 | </view> | 51 | </view> |
51 | <view class="fs28 mt_b10"> | 52 | <view class="fs28 mt_b10"> |
52 | - <text>明显可见毛孔或内含小于毛孔大小角栓</text> | 53 | + <text>隐约可见皱纹</text> |
53 | </view> | 54 | </view> |
54 | </view> | 55 | </view> |
55 | <view class="analyse_classify_body"> | 56 | <view class="analyse_classify_body"> |
@@ -115,7 +116,7 @@ | @@ -115,7 +116,7 @@ | ||
115 | <!-- 优惠券 --> | 116 | <!-- 优惠券 --> |
116 | <view wx:if="{{wrinkle_quan_list}}"> | 117 | <view wx:if="{{wrinkle_quan_list}}"> |
117 | <view style="margin:5% 0">适合皱纹商品的优惠券</view> | 118 | <view style="margin:5% 0">适合皱纹商品的优惠券</view> |
118 | - <view class="xc-coupon-frame rel"> | 119 | + <view class="xc-coupon-frame"> |
119 | <block wx:for="{{wrinkle_quan_list}}"> | 120 | <block wx:for="{{wrinkle_quan_list}}"> |
120 | <include src="../coupon.wxml" /> | 121 | <include src="../coupon.wxml" /> |
121 | </block> | 122 | </block> |
pages/user/my_service/appment_main.js
@@ -430,7 +430,8 @@ Page({ | @@ -430,7 +430,8 @@ Page({ | ||
430 | storeId: a.stoid, | 430 | storeId: a.stoid, |
431 | userId: d.user_id, | 431 | userId: d.user_id, |
432 | serviceId: itemid, | 432 | serviceId: itemid, |
433 | - storageId: storageId | 433 | + storageId: storageId, |
434 | + VipId:getApp().globalData.userInfo.erpvipid, | ||
434 | } | 435 | } |
435 | }).then(res => { | 436 | }).then(res => { |
436 | wx.hideLoading(); | 437 | wx.hideLoading(); |
pages/user/my_service/beauty_deta.js
@@ -19,7 +19,7 @@ Page({ | @@ -19,7 +19,7 @@ Page({ | ||
19 | comment: "", //美容师评价 | 19 | comment: "", //美容师评价 |
20 | aweeks: [], //七天的预约时间 | 20 | aweeks: [], //七天的预约时间 |
21 | head_img: "", //美容师头像 | 21 | head_img: "", //美容师头像 |
22 | - time:['08:00','08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00','14:30', '15:00', '15:30', '16:00', '16:30', '17:00','17:30', '18:00','18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00','22:30'], | 22 | + time: ['08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00', '18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00', '22:30'], |
23 | weeks: [], //星期几数组 | 23 | weeks: [], //星期几数组 |
24 | time_index: -1, //选择预约时间下标 | 24 | time_index: -1, //选择预约时间下标 |
25 | date_id: 0, //选择日期的id | 25 | date_id: 0, //选择日期的id |
@@ -36,22 +36,22 @@ Page({ | @@ -36,22 +36,22 @@ Page({ | ||
36 | /** | 36 | /** |
37 | * 生命周期函数--监听页面加载 | 37 | * 生命周期函数--监听页面加载 |
38 | */ | 38 | */ |
39 | - onLoad: function(options) { | 39 | + onLoad: function (options) { |
40 | var th = this; | 40 | var th = this; |
41 | var myDate = new Date(); | 41 | var myDate = new Date(); |
42 | var minutes = myDate.getMinutes(); //获取当前分钟数(0-59) | 42 | var minutes = myDate.getMinutes(); //获取当前分钟数(0-59) |
43 | var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23) | 43 | var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23) |
44 | var beautician_id = options.BeauticianID; | 44 | var beautician_id = options.BeauticianID; |
45 | var storageId = options.StorageId; | 45 | var storageId = options.StorageId; |
46 | - | ||
47 | - | 46 | + |
47 | + | ||
48 | th.setData({ | 48 | th.setData({ |
49 | beautician_id: beautician_id, | 49 | beautician_id: beautician_id, |
50 | itemId: options.itemId, | 50 | itemId: options.itemId, |
51 | modify: options.modify, | 51 | modify: options.modify, |
52 | hours: hours, | 52 | hours: hours, |
53 | projectId: options.projectId, | 53 | projectId: options.projectId, |
54 | - storageId:storageId | 54 | + storageId: storageId |
55 | }) | 55 | }) |
56 | if (options.url != undefined) { | 56 | if (options.url != undefined) { |
57 | th.setData({ | 57 | th.setData({ |
@@ -68,17 +68,17 @@ Page({ | @@ -68,17 +68,17 @@ Page({ | ||
68 | iscos: options.iscos | 68 | iscos: options.iscos |
69 | }) | 69 | }) |
70 | } | 70 | } |
71 | - if (options.StaffName!=undefined){ | 71 | + if (options.StaffName != undefined) { |
72 | th.setData({ | 72 | th.setData({ |
73 | StaffName: options.StaffName | 73 | StaffName: options.StaffName |
74 | }) | 74 | }) |
75 | } | 75 | } |
76 | - th.query_beatea(th.query_aweek); | 76 | + th.query_beatea(th.query_aweek); |
77 | }, | 77 | }, |
78 | /** | 78 | /** |
79 | * 生命周期函数--监听页面显示 | 79 | * 生命周期函数--监听页面显示 |
80 | */ | 80 | */ |
81 | - onShow: function() { | 81 | + onShow: function () { |
82 | var th = this; | 82 | var th = this; |
83 | //获取当前时间 | 83 | //获取当前时间 |
84 | var myDate = new Date(); | 84 | var myDate = new Date(); |
@@ -91,7 +91,7 @@ Page({ | @@ -91,7 +91,7 @@ Page({ | ||
91 | }, | 91 | }, |
92 | 92 | ||
93 | //图片失败,默认图片 | 93 | //图片失败,默认图片 |
94 | - bind_bnerr1: function(e) { | 94 | + bind_bnerr1: function (e) { |
95 | var _errImg = e.target.dataset.errorimg; | 95 | var _errImg = e.target.dataset.errorimg; |
96 | var _Img = e.target.dataset.img; | 96 | var _Img = e.target.dataset.img; |
97 | if (_Img != undefined) { | 97 | if (_Img != undefined) { |
@@ -101,7 +101,7 @@ Page({ | @@ -101,7 +101,7 @@ Page({ | ||
101 | } | 101 | } |
102 | }, | 102 | }, |
103 | //选择服务日期 | 103 | //选择服务日期 |
104 | - check_date: function(e) { | 104 | + check_date: function (e) { |
105 | var th = this; | 105 | var th = this; |
106 | var id = e.currentTarget.dataset.dateid; | 106 | var id = e.currentTarget.dataset.dateid; |
107 | var date_id = th.data.date_id; | 107 | var date_id = th.data.date_id; |
@@ -115,7 +115,7 @@ Page({ | @@ -115,7 +115,7 @@ Page({ | ||
115 | } | 115 | } |
116 | }, | 116 | }, |
117 | //获取美容师信息 | 117 | //获取美容师信息 |
118 | - query_beatea: function(func) { | 118 | + query_beatea: function (func) { |
119 | var th = this; | 119 | var th = this; |
120 | var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径 | 120 | var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径 |
121 | var beautician_id = th.data.beautician_id; | 121 | var beautician_id = th.data.beautician_id; |
@@ -127,23 +127,23 @@ Page({ | @@ -127,23 +127,23 @@ Page({ | ||
127 | }).then(res => { | 127 | }).then(res => { |
128 | if (res.data.code == 0) { | 128 | if (res.data.code == 0) { |
129 | var data = res.data.data; | 129 | var data = res.data.data; |
130 | - var ob={ | 130 | + var ob = { |
131 | name: data.StaffName, | 131 | name: data.StaffName, |
132 | comment: data.Remark1, | 132 | comment: data.Remark1, |
133 | head_img: data.PhotoUrl | 133 | head_img: data.PhotoUrl |
134 | - }; | ||
135 | - if(!th.data.storageId){ | ||
136 | - ob.storageId=data.StorageId; | ||
137 | - } | 134 | + }; |
135 | + if (!th.data.storageId) { | ||
136 | + ob.storageId = data.StorageId; | ||
137 | + } | ||
138 | th.setData(ob); | 138 | th.setData(ob); |
139 | - func(); | 139 | + func(); |
140 | } else { | 140 | } else { |
141 | getApp().my_warnning(res.data.msg, 0, th); | 141 | getApp().my_warnning(res.data.msg, 0, th); |
142 | } | 142 | } |
143 | }) | 143 | }) |
144 | }, | 144 | }, |
145 | //返回上个页面 | 145 | //返回上个页面 |
146 | - navigateBack: function() { | 146 | + navigateBack: function () { |
147 | var th = this; | 147 | var th = this; |
148 | var modify = th.data.modify; //是否是更改时间 | 148 | var modify = th.data.modify; //是否是更改时间 |
149 | var seekTime = th.data.seekTime; //选择的日期 | 149 | var seekTime = th.data.seekTime; //选择的日期 |
@@ -162,7 +162,7 @@ Page({ | @@ -162,7 +162,7 @@ Page({ | ||
162 | "number": th.data.number, | 162 | "number": th.data.number, |
163 | "remark": "更改时间", | 163 | "remark": "更改时间", |
164 | "states": 0, | 164 | "states": 0, |
165 | - "storeId": a.stoid | 165 | + "storeId": a.stoid, |
166 | }; | 166 | }; |
167 | var data = JSON.stringify(json); | 167 | var data = JSON.stringify(json); |
168 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 | 168 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 |
@@ -173,10 +173,10 @@ Page({ | @@ -173,10 +173,10 @@ Page({ | ||
173 | header: { | 173 | header: { |
174 | 'content-type': 'application/json' | 174 | 'content-type': 'application/json' |
175 | }, // 设置请求的 header | 175 | }, // 设置请求的 header |
176 | - success: function(res) { | 176 | + success: function (res) { |
177 | if (res.data.code == 0) { | 177 | if (res.data.code == 0) { |
178 | getApp().my_warnning(res.data.data, 1, th); | 178 | getApp().my_warnning(res.data.data, 1, th); |
179 | - setTimeout(function() { | 179 | + setTimeout(function () { |
180 | wx.navigateBack({ | 180 | wx.navigateBack({ |
181 | //返回 | 181 | //返回 |
182 | delta: 1 | 182 | delta: 1 |
@@ -218,7 +218,7 @@ Page({ | @@ -218,7 +218,7 @@ Page({ | ||
218 | } | 218 | } |
219 | }, | 219 | }, |
220 | //选择时间 | 220 | //选择时间 |
221 | - Selection_time: function(e) { | 221 | + Selection_time: function (e) { |
222 | var th = this; | 222 | var th = this; |
223 | var index = e.currentTarget.dataset.index; | 223 | var index = e.currentTarget.dataset.index; |
224 | var time_index = th.data.time_index; | 224 | var time_index = th.data.time_index; |
@@ -231,11 +231,11 @@ Page({ | @@ -231,11 +231,11 @@ Page({ | ||
231 | } | 231 | } |
232 | }, | 232 | }, |
233 | //查询七天预约时间 | 233 | //查询七天预约时间 |
234 | - query_aweek: function() { | 234 | + query_aweek: function () { |
235 | var th = this; | 235 | var th = this; |
236 | var beautician_id = th.data.beautician_id; //美容师id | 236 | var beautician_id = th.data.beautician_id; //美容师id |
237 | - var storageId=th.data.storageId; | ||
238 | - | 237 | + var storageId = th.data.storageId; |
238 | + | ||
239 | var itemId = th.data.itemId; //服务id | 239 | var itemId = th.data.itemId; //服务id |
240 | var projectId = th.data.projectId; //项目id | 240 | var projectId = th.data.projectId; //项目id |
241 | var number = th.data.number; //预约单号 | 241 | var number = th.data.number; //预约单号 |
@@ -246,8 +246,9 @@ Page({ | @@ -246,8 +246,9 @@ Page({ | ||
246 | beauticianId: beautician_id, | 246 | beauticianId: beautician_id, |
247 | serviceId: itemId, | 247 | serviceId: itemId, |
248 | storeId: a.stoid, | 248 | storeId: a.stoid, |
249 | - storageId:storageId, | ||
250 | - number: number | 249 | + storageId: storageId, |
250 | + number: number, | ||
251 | + VipId: getApp().globalData.userInfo.erpvipid, | ||
251 | } | 252 | } |
252 | }).then(res => { | 253 | }).then(res => { |
253 | if (res.data.code == 0) { | 254 | if (res.data.code == 0) { |
@@ -287,7 +288,7 @@ Page({ | @@ -287,7 +288,7 @@ Page({ | ||
287 | 288 | ||
288 | }, | 289 | }, |
289 | 290 | ||
290 | - query_date: function() { | 291 | + query_date: function () { |
291 | var th = this; | 292 | var th = this; |
292 | var projectId = th.data.projectId; | 293 | var projectId = th.data.projectId; |
293 | var date_id = th.data.date_id; //日期下标 | 294 | var date_id = th.data.date_id; //日期下标 |
@@ -299,11 +300,12 @@ Page({ | @@ -299,11 +300,12 @@ Page({ | ||
299 | data: { | 300 | data: { |
300 | projectId: projectId, | 301 | projectId: projectId, |
301 | staffId: th.data.beautician_id, | 302 | staffId: th.data.beautician_id, |
302 | - storageId:th.data.storageId, | 303 | + storageId: th.data.storageId, |
303 | serviceId: th.data.itemId, | 304 | serviceId: th.data.itemId, |
304 | seekTime: SeekTime, | 305 | seekTime: SeekTime, |
305 | storeId: a.stoid, | 306 | storeId: a.stoid, |
306 | - number:number, | 307 | + number: number, |
308 | + VipId: getApp().globalData.userInfo.erpvipid, | ||
307 | } | 309 | } |
308 | }).then(res => { | 310 | }).then(res => { |
309 | if (res.data.code == 0) { | 311 | if (res.data.code == 0) { |
@@ -312,11 +314,11 @@ Page({ | @@ -312,11 +314,11 @@ Page({ | ||
312 | var time = th.data.time; | 314 | var time = th.data.time; |
313 | var date_id = th | 315 | var date_id = th |
314 | var new_time = []; | 316 | var new_time = []; |
315 | - var date = th.data.hours.substring(0,2); | 317 | + var date = th.data.hours.substring(0, 2); |
316 | 318 | ||
317 | //不等于空就是有可以预约的时间 | 319 | //不等于空就是有可以预约的时间 |
318 | if (time_list != null) { | 320 | if (time_list != null) { |
319 | - if (res.data.data && res.data.data[0]!= undefined) { | 321 | + if (res.data.data && res.data.data[0] != undefined) { |
320 | if (res.data.data[0].GroupHour && res.data.data[0].GroupHour.length > 11) { | 322 | if (res.data.data[0].GroupHour && res.data.data[0].GroupHour.length > 11) { |
321 | getApp().my_warnning(res.data.data[0].GroupHour, 0, th); | 323 | getApp().my_warnning(res.data.data[0].GroupHour, 0, th); |
322 | } | 324 | } |
@@ -330,7 +332,7 @@ Page({ | @@ -330,7 +332,7 @@ Page({ | ||
330 | if (date > time_list[ii].begintime.substring(0, 2) && date_id == 0) { | 332 | if (date > time_list[ii].begintime.substring(0, 2) && date_id == 0) { |
331 | new_time[i] = ""; | 333 | new_time[i] = ""; |
332 | break; | 334 | break; |
333 | - }else{ | 335 | + } else { |
334 | new_time[i] = time_list[ii].begintime.substring(0, 5); | 336 | new_time[i] = time_list[ii].begintime.substring(0, 5); |
335 | break; | 337 | break; |
336 | } | 338 | } |
@@ -339,9 +341,9 @@ Page({ | @@ -339,9 +341,9 @@ Page({ | ||
339 | } | 341 | } |
340 | } | 342 | } |
341 | } | 343 | } |
342 | - }else{ | ||
343 | - for(var i = 0 ;i<time.length;i++){ | ||
344 | - new_time[i]=""; | 344 | + } else { |
345 | + for (var i = 0; i < time.length; i++) { | ||
346 | + new_time[i] = ""; | ||
345 | } | 347 | } |
346 | } | 348 | } |
347 | th.setData({ | 349 | th.setData({ |
@@ -354,7 +356,7 @@ Page({ | @@ -354,7 +356,7 @@ Page({ | ||
354 | 356 | ||
355 | }, | 357 | }, |
356 | //更改预约时间 | 358 | //更改预约时间 |
357 | - change_time: function() { | 359 | + change_time: function () { |
358 | var th = this; | 360 | var th = this; |
359 | var seekTime = th.data.seekTime; //选择的日期 | 361 | var seekTime = th.data.seekTime; //选择的日期 |
360 | var time_list = th.data.time_list; | 362 | var time_list = th.data.time_list; |
@@ -377,7 +379,7 @@ Page({ | @@ -377,7 +379,7 @@ Page({ | ||
377 | header: { | 379 | header: { |
378 | 'content-type': 'application/json' | 380 | 'content-type': 'application/json' |
379 | }, // 设置请求的 header | 381 | }, // 设置请求的 header |
380 | - success: function(res) { | 382 | + success: function (res) { |
381 | if (res.data.code == 0) { | 383 | if (res.data.code == 0) { |
382 | getApp().my_warnning("更改成功", 0, th); | 384 | getApp().my_warnning("更改成功", 0, th); |
383 | } else { | 385 | } else { |
@@ -387,7 +389,7 @@ Page({ | @@ -387,7 +389,7 @@ Page({ | ||
387 | }) | 389 | }) |
388 | }, | 390 | }, |
389 | //预览头像 | 391 | //预览头像 |
390 | - previewImage: function(e) { | 392 | + previewImage: function (e) { |
391 | var th = this; | 393 | var th = this; |
392 | var current = e.currentTarget.dataset.src; | 394 | var current = e.currentTarget.dataset.src; |
393 | wx.previewImage({ | 395 | wx.previewImage({ |
@@ -396,7 +398,7 @@ Page({ | @@ -396,7 +398,7 @@ Page({ | ||
396 | }) | 398 | }) |
397 | }, | 399 | }, |
398 | 400 | ||
399 | - sort_arr: function(a, b) { | 401 | + sort_arr: function (a, b) { |
400 | a = a['time']; | 402 | a = a['time']; |
401 | b = b['time']; | 403 | b = b['time']; |
402 | if (a < b) { | 404 | if (a < b) { |
@@ -407,16 +409,16 @@ Page({ | @@ -407,16 +409,16 @@ Page({ | ||
407 | } | 409 | } |
408 | return 0; | 410 | return 0; |
409 | }, | 411 | }, |
410 | - | ||
411 | - check_is_in_arr:function(val,pdata) { | ||
412 | - if(!val || !pdata) return false; | ||
413 | - for(var i in pdata){ | ||
414 | - if(pdata[i].begintime.indexOf(val)!=-1){ | ||
415 | - return true; | ||
416 | - } | ||
417 | - } | ||
418 | - return false; | ||
419 | - } | 412 | + |
413 | + check_is_in_arr: function (val, pdata) { | ||
414 | + if (!val || !pdata) return false; | ||
415 | + for (var i in pdata) { | ||
416 | + if (pdata[i].begintime.indexOf(val) != -1) { | ||
417 | + return true; | ||
418 | + } | ||
419 | + } | ||
420 | + return false; | ||
421 | + } | ||
420 | 422 | ||
421 | 423 | ||
422 | 424 |