diff --git a/packageB/pages/AI-test-skin/history_record/history_record.js b/packageB/pages/AI-test-skin/history_record/history_record.js index 3f973fe..60e8503 100644 --- a/packageB/pages/AI-test-skin/history_record/history_record.js +++ b/packageB/pages/AI-test-skin/history_record/history_record.js @@ -1,11 +1,182 @@ // packageB/pages/AI-test-skin/history_record/history_record.js +import * as echarts from '../../../components/ec-canvas/echarts'; + +const app = getApp(); +const request = app.request; +const os = app.globalData; +const setting = os.setting; +const ut = require('../../../../utils/util'); +let initChart = null; +const option = { + backgroundColor: 'white', + tooltip: {}, + grid:{ + // left:'20%', + top:'30%', + // right:'10%' + }, + legend: { + icon: 'circle', + itemWidth: 5, + itemHeight: 5, + selected: { + '综合': true, + '毛孔': false, + '黑头': false, + '色斑': false, + '皱纹': false, + '痤疮': false, + '敏感度': false, + '黑眼圈': false, + }, + padding:[20,50], + data: [ + { + name: '综合', + // textStyle: { + // backgroundColor: "#999", + // } + }, + { + name: '毛孔', + }, { + name: '黑头', + }, + { + name: '色斑', + }, + { + name: '皱纹', + }, + { + name: '痤疮', + }, + { + name: '敏感度', + }, + { + name: '黑眼圈', + }, + ] + }, + xAxis: { + type: 'category', + data: ["02/11", "02/16", "02/17"] + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + splitNumber: 4, + interval: 25, + }, + series: [ + { + name: '综合', + type: 'bar', + itemStyle: { + color: '#84e1eb', + borderRadius: 3, + }, + barWidth: 8, + data: [5, 20, 36, 10, 10, 20] + }, + { + name: '毛孔', + type: 'line', + lineStyle: { + color: "#fbb11f" + }, + itemStyle: { + color: '#fbb11f', + }, + data: [5, 20, 36, 10, 10, 20] + }, + { + name: '黑头', + type: 'line', + lineStyle: { + color: "#e9552b" + }, + itemStyle: { + color: '#e9552b', + }, + data: [50, 60, 70] + }, + { + name: '色斑', + type: 'line', + lineStyle: { + color: "#38ce87" + }, + itemStyle: { + color: '#38ce87', + }, + data: [50, 55, 60] + }, + { + name: '皱纹', + type: 'line', + lineStyle: { + color: "#d67bf0" + }, + itemStyle: { + color: '#d67bf0', + }, + data: [80, 85, 90] + }, + { + name: '痤疮', + type: 'line', + lineStyle: { + color: "#f85b95" + }, + itemStyle: { + color: '#f85b95', + }, + data: [30, 35, 40] + }, + { + name: '敏感度', + type: 'line', + lineStyle: { + color: "#af78fc" + }, + itemStyle: { + color: '#af78fc', + }, + data: [20, 26, 10] + }, + { + name: '黑眼圈', + type: 'line', + lineStyle: { + color: "#688eff" + }, + itemStyle: { + color: '#688eff', + }, + data: [50, 60, 20] + } + ] +}; Page({ /** * 页面的初始数据 */ data: { - + arr1: ['综合', '毛孔', '黑头', '色斑', '皱纹', '痤疮', '敏感度', '黑眼圈'], + ec: { + onInit: function (canvas, width, height) { + initChart = echarts.init(canvas, null, { + width: width, + height: height, + }); + canvas.setChart(initChart); + return initChart; + } + }, }, /** @@ -21,12 +192,16 @@ Page({ onReady: function () { }, - + initChartOption() { + initChart.setOption(option); + }, /** * 生命周期函数--监听页面显示 */ onShow: function () { - + setTimeout(() => { + initChart.setOption(option); + }, 1000); }, /** diff --git a/packageB/pages/AI-test-skin/history_record/history_record.json b/packageB/pages/AI-test-skin/history_record/history_record.json index 8835af0..3ea23fa 100644 --- a/packageB/pages/AI-test-skin/history_record/history_record.json +++ b/packageB/pages/AI-test-skin/history_record/history_record.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "navigationBarTitleText": "历史变化", + "usingComponents": { + "ec-canvas": "../../../components/ec-canvas/ec-canvas" + } } \ No newline at end of file diff --git a/packageB/pages/AI-test-skin/history_record/history_record.wxml b/packageB/pages/AI-test-skin/history_record/history_record.wxml index 94d50bb..3faa719 100644 --- a/packageB/pages/AI-test-skin/history_record/history_record.wxml +++ b/packageB/pages/AI-test-skin/history_record/history_record.wxml @@ -1,2 +1,68 @@ - -packageB/pages/AI-test-skin/history_record/history_record.wxml + + 历史分析 + + + + + + 注:请确保多次拍摄姿态和环境光线一致。拍摄姿态的偏移、环境光线变化或者皮肤状态变化都可能导致分数较大波动。 + + + 历史报告 + + + + 2022年02月 + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + 2022/02/19 15:35 + 73分 + + + + 2022年02月 + + 2022/02/19 15:35 + 73分 + + + + 2022年02月 + + 2022/02/19 15:35 + 73分 + + + + \ No newline at end of file diff --git a/packageB/pages/AI-test-skin/history_record/history_record.wxss b/packageB/pages/AI-test-skin/history_record/history_record.wxss index 2853cd7..a7a41fd 100644 --- a/packageB/pages/AI-test-skin/history_record/history_record.wxss +++ b/packageB/pages/AI-test-skin/history_record/history_record.wxss @@ -2,8 +2,52 @@ page { width: 100vw; height: 100%; - padding: 20rpx; - padding-top: 40rpx; +} + +.mgv5 { + margin-top: 5%; + margin-bottom: 5%; +} + +.content { + padding: 5%; + height: 100%; + width: 100%; box-sizing: border-box; background-color: #e7f5fb; +} + +.item { + padding: 10rpx 40rpx; + color: red; +} + +.echarts { + position: relative; + height: 60%; + padding: 20rpx; + background-color: #fff; +} + +.tubiao { + position: absolute; + top: 3%; + left: 50%; + transform: translateX(-50%); + height: 80%; + width: 100%; +} + +.history_list { + border-radius: 30rpx; + padding: 20rpx; + background-color: #fff; +} + +.souce { + display: flex; + justify-content: space-between; + font-size: 28rpx; + padding: 30rpx 0; + border-bottom: 2rpx solid #ccc; } \ No newline at end of file diff --git a/packageB/pages/AI-test-skin/success_result/acne/acne.wxml b/packageB/pages/AI-test-skin/success_result/acne/acne.wxml index 6fea6ea..d3be73a 100644 --- a/packageB/pages/AI-test-skin/success_result/acne/acne.wxml +++ b/packageB/pages/AI-test-skin/success_result/acne/acne.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageB/pages/AI-test-skin/success_result/blackhead/blackhead.wxml b/packageB/pages/AI-test-skin/success_result/blackhead/blackhead.wxml index 22be09b..d482415 100644 --- a/packageB/pages/AI-test-skin/success_result/blackhead/blackhead.wxml +++ b/packageB/pages/AI-test-skin/success_result/blackhead/blackhead.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageB/pages/AI-test-skin/success_result/dark/dark.wxml b/packageB/pages/AI-test-skin/success_result/dark/dark.wxml index 52c2b65..6490c0c 100644 --- a/packageB/pages/AI-test-skin/success_result/dark/dark.wxml +++ b/packageB/pages/AI-test-skin/success_result/dark/dark.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageB/pages/AI-test-skin/success_result/pore/pore.wxml b/packageB/pages/AI-test-skin/success_result/pore/pore.wxml index cc860e5..ba04684 100644 --- a/packageB/pages/AI-test-skin/success_result/pore/pore.wxml +++ b/packageB/pages/AI-test-skin/success_result/pore/pore.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageB/pages/AI-test-skin/success_result/speckle/speckle.wxml b/packageB/pages/AI-test-skin/success_result/speckle/speckle.wxml index ce00cb5..0aed973 100644 --- a/packageB/pages/AI-test-skin/success_result/speckle/speckle.wxml +++ b/packageB/pages/AI-test-skin/success_result/speckle/speckle.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageB/pages/AI-test-skin/success_result/success_result.js b/packageB/pages/AI-test-skin/success_result/success_result.js index e0254b6..858e587 100644 --- a/packageB/pages/AI-test-skin/success_result/success_result.js +++ b/packageB/pages/AI-test-skin/success_result/success_result.js @@ -1,7 +1,7 @@ /* * @Author: abson * @Date: 2022-02-16 15:36:47 - * @LastEditTime: 2022-02-18 18:02:00 + * @LastEditTime: 2022-02-21 16:07:09 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js @@ -96,21 +96,8 @@ Page({ if(acne_num>-0) acne.get_goods(th,setting.stoid); }) - - - - - }, - lo(){ - this.setData({ - oo:"hei_tou" - }) - }, - lo1(){ - this.setData({ - oo:"zong_he" - }) }, + //-- 初始等级卡 -- init: function () { diff --git a/packageB/pages/AI-test-skin/success_result/success_result.wxml b/packageB/pages/AI-test-skin/success_result/success_result.wxml index 54b6a84..3fe22e9 100644 --- a/packageB/pages/AI-test-skin/success_result/success_result.wxml +++ b/packageB/pages/AI-test-skin/success_result/success_result.wxml @@ -1,7 +1,7 @@ - + {{item.name}} @@ -10,7 +10,7 @@ - + @@ -90,7 +90,8 @@ - + + diff --git a/packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml b/packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml index 55ca7ff..834db10 100644 --- a/packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml +++ b/packageB/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index 009ab7d..9fdfdd2 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -1522,7 +1522,7 @@ Page({ //检查立即购买的商品是不是不包邮 check_good: function (arr, goods_id) { - if (!goods_id) goods_id = this.data.bn_goods.goods_id; + if (!goods_id) goods_id = this.data.goods.goods_id; for (var i in arr) { var item = arr[i]; if (goods_id == item) return 0;