Commit 53c48fd38abf12dc784de9f68e30db5e49e37d1d
1 parent
d0a8f34b
历史档案
Showing
13 changed files
with
309 additions
and
33 deletions
packageB/pages/AI-test-skin/history_record/history_record.js
1 | 1 | // packageB/pages/AI-test-skin/history_record/history_record.js |
2 | +import * as echarts from '../../../components/ec-canvas/echarts'; | |
3 | + | |
4 | +const app = getApp(); | |
5 | +const request = app.request; | |
6 | +const os = app.globalData; | |
7 | +const setting = os.setting; | |
8 | +const ut = require('../../../../utils/util'); | |
9 | +let initChart = null; | |
10 | +const option = { | |
11 | + backgroundColor: 'white', | |
12 | + tooltip: {}, | |
13 | + grid:{ | |
14 | + // left:'20%', | |
15 | + top:'30%', | |
16 | + // right:'10%' | |
17 | + }, | |
18 | + legend: { | |
19 | + icon: 'circle', | |
20 | + itemWidth: 5, | |
21 | + itemHeight: 5, | |
22 | + selected: { | |
23 | + '综合': true, | |
24 | + '毛孔': false, | |
25 | + '黑头': false, | |
26 | + '色斑': false, | |
27 | + '皱纹': false, | |
28 | + '痤疮': false, | |
29 | + '敏感度': false, | |
30 | + '黑眼圈': false, | |
31 | + }, | |
32 | + padding:[20,50], | |
33 | + data: [ | |
34 | + { | |
35 | + name: '综合', | |
36 | + // textStyle: { | |
37 | + // backgroundColor: "#999", | |
38 | + // } | |
39 | + }, | |
40 | + { | |
41 | + name: '毛孔', | |
42 | + }, { | |
43 | + name: '黑头', | |
44 | + }, | |
45 | + { | |
46 | + name: '色斑', | |
47 | + }, | |
48 | + { | |
49 | + name: '皱纹', | |
50 | + }, | |
51 | + { | |
52 | + name: '痤疮', | |
53 | + }, | |
54 | + { | |
55 | + name: '敏感度', | |
56 | + }, | |
57 | + { | |
58 | + name: '黑眼圈', | |
59 | + }, | |
60 | + ] | |
61 | + }, | |
62 | + xAxis: { | |
63 | + type: 'category', | |
64 | + data: ["02/11", "02/16", "02/17"] | |
65 | + }, | |
66 | + yAxis: { | |
67 | + type: 'value', | |
68 | + min: 0, | |
69 | + max: 100, | |
70 | + splitNumber: 4, | |
71 | + interval: 25, | |
72 | + }, | |
73 | + series: [ | |
74 | + { | |
75 | + name: '综合', | |
76 | + type: 'bar', | |
77 | + itemStyle: { | |
78 | + color: '#84e1eb', | |
79 | + borderRadius: 3, | |
80 | + }, | |
81 | + barWidth: 8, | |
82 | + data: [5, 20, 36, 10, 10, 20] | |
83 | + }, | |
84 | + { | |
85 | + name: '毛孔', | |
86 | + type: 'line', | |
87 | + lineStyle: { | |
88 | + color: "#fbb11f" | |
89 | + }, | |
90 | + itemStyle: { | |
91 | + color: '#fbb11f', | |
92 | + }, | |
93 | + data: [5, 20, 36, 10, 10, 20] | |
94 | + }, | |
95 | + { | |
96 | + name: '黑头', | |
97 | + type: 'line', | |
98 | + lineStyle: { | |
99 | + color: "#e9552b" | |
100 | + }, | |
101 | + itemStyle: { | |
102 | + color: '#e9552b', | |
103 | + }, | |
104 | + data: [50, 60, 70] | |
105 | + }, | |
106 | + { | |
107 | + name: '色斑', | |
108 | + type: 'line', | |
109 | + lineStyle: { | |
110 | + color: "#38ce87" | |
111 | + }, | |
112 | + itemStyle: { | |
113 | + color: '#38ce87', | |
114 | + }, | |
115 | + data: [50, 55, 60] | |
116 | + }, | |
117 | + { | |
118 | + name: '皱纹', | |
119 | + type: 'line', | |
120 | + lineStyle: { | |
121 | + color: "#d67bf0" | |
122 | + }, | |
123 | + itemStyle: { | |
124 | + color: '#d67bf0', | |
125 | + }, | |
126 | + data: [80, 85, 90] | |
127 | + }, | |
128 | + { | |
129 | + name: '痤疮', | |
130 | + type: 'line', | |
131 | + lineStyle: { | |
132 | + color: "#f85b95" | |
133 | + }, | |
134 | + itemStyle: { | |
135 | + color: '#f85b95', | |
136 | + }, | |
137 | + data: [30, 35, 40] | |
138 | + }, | |
139 | + { | |
140 | + name: '敏感度', | |
141 | + type: 'line', | |
142 | + lineStyle: { | |
143 | + color: "#af78fc" | |
144 | + }, | |
145 | + itemStyle: { | |
146 | + color: '#af78fc', | |
147 | + }, | |
148 | + data: [20, 26, 10] | |
149 | + }, | |
150 | + { | |
151 | + name: '黑眼圈', | |
152 | + type: 'line', | |
153 | + lineStyle: { | |
154 | + color: "#688eff" | |
155 | + }, | |
156 | + itemStyle: { | |
157 | + color: '#688eff', | |
158 | + }, | |
159 | + data: [50, 60, 20] | |
160 | + } | |
161 | + ] | |
162 | +}; | |
2 | 163 | Page({ |
3 | 164 | |
4 | 165 | /** |
5 | 166 | * 页面的初始数据 |
6 | 167 | */ |
7 | 168 | data: { |
8 | - | |
169 | + arr1: ['综合', '毛孔', '黑头', '色斑', '皱纹', '痤疮', '敏感度', '黑眼圈'], | |
170 | + ec: { | |
171 | + onInit: function (canvas, width, height) { | |
172 | + initChart = echarts.init(canvas, null, { | |
173 | + width: width, | |
174 | + height: height, | |
175 | + }); | |
176 | + canvas.setChart(initChart); | |
177 | + return initChart; | |
178 | + } | |
179 | + }, | |
9 | 180 | }, |
10 | 181 | |
11 | 182 | /** |
... | ... | @@ -21,12 +192,16 @@ Page({ |
21 | 192 | onReady: function () { |
22 | 193 | |
23 | 194 | }, |
24 | - | |
195 | + initChartOption() { | |
196 | + initChart.setOption(option); | |
197 | + }, | |
25 | 198 | /** |
26 | 199 | * 生命周期函数--监听页面显示 |
27 | 200 | */ |
28 | 201 | onShow: function () { |
29 | - | |
202 | + setTimeout(() => { | |
203 | + initChart.setOption(option); | |
204 | + }, 1000); | |
30 | 205 | }, |
31 | 206 | |
32 | 207 | /** | ... | ... |
packageB/pages/AI-test-skin/history_record/history_record.json
packageB/pages/AI-test-skin/history_record/history_record.wxml
1 | -<!--packageB/pages/AI-test-skin/history_record/history_record.wxml--> | |
2 | -<text>packageB/pages/AI-test-skin/history_record/history_record.wxml</text> | |
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> | |
3 | 69 | \ No newline at end of file | ... | ... |
packageB/pages/AI-test-skin/history_record/history_record.wxss
... | ... | @@ -2,8 +2,52 @@ |
2 | 2 | page { |
3 | 3 | width: 100vw; |
4 | 4 | height: 100%; |
5 | - padding: 20rpx; | |
6 | - padding-top: 40rpx; | |
5 | +} | |
6 | + | |
7 | +.mgv5 { | |
8 | + margin-top: 5%; | |
9 | + margin-bottom: 5%; | |
10 | +} | |
11 | + | |
12 | +.content { | |
13 | + padding: 5%; | |
14 | + height: 100%; | |
15 | + width: 100%; | |
7 | 16 | box-sizing: border-box; |
8 | 17 | background-color: #e7f5fb; |
18 | +} | |
19 | + | |
20 | +.item { | |
21 | + padding: 10rpx 40rpx; | |
22 | + color: red; | |
23 | +} | |
24 | + | |
25 | +.echarts { | |
26 | + position: relative; | |
27 | + height: 60%; | |
28 | + padding: 20rpx; | |
29 | + background-color: #fff; | |
30 | +} | |
31 | + | |
32 | +.tubiao { | |
33 | + position: absolute; | |
34 | + top: 3%; | |
35 | + left: 50%; | |
36 | + transform: translateX(-50%); | |
37 | + height: 80%; | |
38 | + width: 100%; | |
39 | +} | |
40 | + | |
41 | +.history_list { | |
42 | + border-radius: 30rpx; | |
43 | + padding: 20rpx; | |
44 | + background-color: #fff; | |
45 | +} | |
46 | + | |
47 | +.souce { | |
48 | + display: flex; | |
49 | + justify-content: space-between; | |
50 | + font-size: 28rpx; | |
51 | + padding: 30rpx 0; | |
52 | + border-bottom: 2rpx solid #ccc; | |
9 | 53 | } |
10 | 54 | \ No newline at end of file | ... | ... |
packageB/pages/AI-test-skin/success_result/acne/acne.wxml
packageB/pages/AI-test-skin/success_result/blackhead/blackhead.wxml
packageB/pages/AI-test-skin/success_result/dark/dark.wxml
packageB/pages/AI-test-skin/success_result/pore/pore.wxml
packageB/pages/AI-test-skin/success_result/speckle/speckle.wxml
packageB/pages/AI-test-skin/success_result/success_result.js
1 | 1 | /* |
2 | 2 | * @Author: abson |
3 | 3 | * @Date: 2022-02-16 15:36:47 |
4 | - * @LastEditTime: 2022-02-18 18:02:00 | |
4 | + * @LastEditTime: 2022-02-21 16:07:09 | |
5 | 5 | * @LastEditors: Please set LastEditors |
6 | 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
7 | 7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js |
... | ... | @@ -96,21 +96,8 @@ Page({ |
96 | 96 | if(acne_num>-0) |
97 | 97 | acne.get_goods(th,setting.stoid); |
98 | 98 | }) |
99 | - | |
100 | - | |
101 | - | |
102 | - | |
103 | - }, | |
104 | - lo(){ | |
105 | - this.setData({ | |
106 | - oo:"hei_tou" | |
107 | - }) | |
108 | - }, | |
109 | - lo1(){ | |
110 | - this.setData({ | |
111 | - oo:"zong_he" | |
112 | - }) | |
113 | 99 | }, |
100 | + | |
114 | 101 | |
115 | 102 | //-- 初始等级卡 -- |
116 | 103 | init: function () { | ... | ... |
packageB/pages/AI-test-skin/success_result/success_result.wxml
1 | 1 | <wxs module="s_filter" src="s_filter.wxs"></wxs> |
2 | 2 | |
3 | 3 | <view style="height: 100rpx;"> |
4 | - <scroll-view enable-flex scroll-into-view="{{tab_id}}" scroll-x class="tab_scroll"> | |
4 | + <scroll-view enable-flex scroll-into-view="{{tab_id}}" scroll-with-animation scroll-x class="tab_scroll"> | |
5 | 5 | <view class="flex" style="height: 100%;"> |
6 | 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 | 7 | {{item.name}} |
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | </scroll-view> |
11 | 11 | </view> |
12 | 12 | |
13 | -<scroll-view enable-flex scroll-into-view="{{oo}}"> | |
13 | +<scroll-view enable-flex scroll-into-view="{{tab_id}}" scroll-with-animation scroll-y style="height: 100%;"> | |
14 | 14 | <view bindtap="lo" class="analyse_by_people" id="zong_he" > |
15 | 15 | <view class="analyse"> |
16 | 16 | <view class="analyse_left"> |
... | ... | @@ -90,7 +90,8 @@ |
90 | 90 | <block wx:if="{{acne_num}}"> |
91 | 91 | <include src="acne/acne.wxml" /> |
92 | 92 | </block> |
93 | - | |
93 | + <!-- 敏感度 --> | |
94 | + <include src="acne/acne.wxml" /> | |
94 | 95 | </view> |
95 | 96 | </scroll-view> |
96 | 97 | ... | ... |
packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml
packageC/pages/presell/cart/cart.js
... | ... | @@ -1522,7 +1522,7 @@ Page({ |
1522 | 1522 | |
1523 | 1523 | //检查立即购买的商品是不是不包邮 |
1524 | 1524 | check_good: function (arr, goods_id) { |
1525 | - if (!goods_id) goods_id = this.data.bn_goods.goods_id; | |
1525 | + if (!goods_id) goods_id = this.data.goods.goods_id; | |
1526 | 1526 | for (var i in arr) { |
1527 | 1527 | var item = arr[i]; |
1528 | 1528 | if (goods_id == item) return 0; | ... | ... |