From f1ac6dd5fd6dcb077cc416d34b76d13bc3589d7a Mon Sep 17 00:00:00 2001 From: abson Date: Thu, 24 Feb 2022 14:21:27 +0800 Subject: [PATCH] 测试报告问题并标注黑眼圈优化 --- packageD/pages/AI-test-skin/success_result/acne/acne.wxml | 2 +- packageD/pages/AI-test-skin/success_result/blackhead/blackhead.wxml | 2 +- packageD/pages/AI-test-skin/success_result/dark/dark.wxml | 2 +- packageD/pages/AI-test-skin/success_result/pore/pore.wxml | 2 +- packageD/pages/AI-test-skin/success_result/sensitive/sensitive.wxml | 2 +- packageD/pages/AI-test-skin/success_result/speckle/speckle.wxml | 2 +- packageD/pages/AI-test-skin/success_result/success_result.js | 424 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- packageD/pages/AI-test-skin/success_result/success_result.wxml | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------ packageD/pages/AI-test-skin/success_result/success_result.wxss | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- packageD/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml | 2 +- 10 files changed, 406 insertions(+), 219 deletions(-) diff --git a/packageD/pages/AI-test-skin/success_result/acne/acne.wxml b/packageD/pages/AI-test-skin/success_result/acne/acne.wxml index e03ac39..9fa7938 100644 --- a/packageD/pages/AI-test-skin/success_result/acne/acne.wxml +++ b/packageD/pages/AI-test-skin/success_result/acne/acne.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageD/pages/AI-test-skin/success_result/blackhead/blackhead.wxml b/packageD/pages/AI-test-skin/success_result/blackhead/blackhead.wxml index 68d7587..a86f4ea 100644 --- a/packageD/pages/AI-test-skin/success_result/blackhead/blackhead.wxml +++ b/packageD/pages/AI-test-skin/success_result/blackhead/blackhead.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageD/pages/AI-test-skin/success_result/dark/dark.wxml b/packageD/pages/AI-test-skin/success_result/dark/dark.wxml index f2fa44a..1f1964d 100644 --- a/packageD/pages/AI-test-skin/success_result/dark/dark.wxml +++ b/packageD/pages/AI-test-skin/success_result/dark/dark.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageD/pages/AI-test-skin/success_result/pore/pore.wxml b/packageD/pages/AI-test-skin/success_result/pore/pore.wxml index 31c81bb..f5ead0d 100644 --- a/packageD/pages/AI-test-skin/success_result/pore/pore.wxml +++ b/packageD/pages/AI-test-skin/success_result/pore/pore.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageD/pages/AI-test-skin/success_result/sensitive/sensitive.wxml b/packageD/pages/AI-test-skin/success_result/sensitive/sensitive.wxml index 8982a5e..c16ed87 100644 --- a/packageD/pages/AI-test-skin/success_result/sensitive/sensitive.wxml +++ b/packageD/pages/AI-test-skin/success_result/sensitive/sensitive.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageD/pages/AI-test-skin/success_result/speckle/speckle.wxml b/packageD/pages/AI-test-skin/success_result/speckle/speckle.wxml index 23aa0e0..8735270 100644 --- a/packageD/pages/AI-test-skin/success_result/speckle/speckle.wxml +++ b/packageD/pages/AI-test-skin/success_result/speckle/speckle.wxml @@ -1,4 +1,4 @@ - + diff --git a/packageD/pages/AI-test-skin/success_result/success_result.js b/packageD/pages/AI-test-skin/success_result/success_result.js index 9774c46..9c64c62 100644 --- a/packageD/pages/AI-test-skin/success_result/success_result.js +++ b/packageD/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-22 20:52:12 + * @LastEditTime: 2022-02-24 14:16:37 * @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 @@ -25,16 +25,21 @@ Page({ */ data: { 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: '敏感度' }], + 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: '眉间纹' }], + cuochuang_arr: [{ id: 1, name: '全部痤疮' }, { id: 2, name: '痘印' }, { id: 3, name: '囊肿' }, { id: 4, name: '丘疹' }, { id: 5, name: '粉刺' }], + heitanquan_arr: [{ id: 1, name: '综合情况' }, { id: 2, name: '左眼' }, { id: 3, name: '右眼' }], currentIndex: 0, + scroll_index: 0, + sex:'female', //female女 male男 tab_id: 'zong_he', iurl: setting.imghost, showDialog: false, yanjing: true, //显示皮肤问题 img_scale: true, //问题标注放大图片 - - img_scale_icon:true, - show_problem:1, //问题标注显示问题 - ig_scale:1, //缩放问题 + heightRecord: [], + img_scale_icon: true, + show_problem: 1, //问题标注显示问题 + img_scale: 1, //缩放问题 }, /** @@ -93,32 +98,68 @@ Page({ m_top: (location.top - location.height / 2.5) * th.data.bili, m_left: (location.left - location.width / 7) * th.data.bili, bili: th.data.bili, - sex:sex + sex: sex }) - var sort=1; + var sort = 1; //-- 调用毛孔的推荐函数 -- if (pore_num > 0) - pore.get_goods(th, setting.stoid,sort++); + pore.get_goods(th, setting.stoid, sort++); //-- 调用黑头的推荐函数 -- if (blackhead_num > 0) - blackhead.get_goods(th, setting.stoid,sort++); + blackhead.get_goods(th, setting.stoid, sort++); //-- 调用色斑的推荐函数 -- if (speckle_num > 0) - speckle.get_goods(th, setting.stoid,sort++); + speckle.get_goods(th, setting.stoid, sort++); //-- 调用皱纹的推荐函数 -- if (wrinkle_num > 0) - wrinkle.get_goods(th, setting.stoid,sort++); + wrinkle.get_goods(th, setting.stoid, sort++); //-- 黑眼圈 -- if (dark_type > -1) - dark.get_goods(th, setting.stoid,sort++); + dark.get_goods(th, setting.stoid, sort++); //-- 黑眼圈 -- if (acne_num > -0) - acne.get_goods(th, setting.stoid,sort++); + acne.get_goods(th, setting.stoid, sort++); //获取一下分享要用的图片 th.set_share_img(); + acne.get_goods(th, setting.stoid); + let { heightRecord, tab } = th.data; + tab.forEach(item => { + console.log(2); + var query = th.createSelectorQuery(); + let class_name = `.${item['id']}`; + query.select(class_name).boundingClientRect(function (rect) { + // let ratio = 750 / rect.width; + let height = parseInt(rect.height); //加上导航栏50px + heightRecord.push(height); + // item['top'] = top; + }).exec(); + }); + heightRecord.sort((a, b) => { + return a - b; + }); + th.setData({ + heightRecord, + }) + // setTimeout(() => { + // heightRecord.sort((a, b) => { + // return a - b; + // }) + // let new_arr = []; + // if (heightRecord.length > 0) { + // heightRecord.reduce((pre, cur) => { + // let sum = pre + cur; + // new_arr.push(sum); + // return sum; + // }) + // } + // th.setData({ + // heightRecord:new_arr, + // }) + // },1000) }) + }, //-- 初始等级卡 -- @@ -177,7 +218,6 @@ Page({ var url = "/api/weshop/face/storeSkinface/get/" + setting.stoid + "/" + this.data.id; getApp().request.promiseGet(url, {}).then(res => { if (res.data.code == 0) { - console.log(res, 'dsffffff'); var json = JSON.parse(res.data.data.resultjson); var json1 = JSON.parse(res.data.data.detectjson); func(json, json1, res.data.data.img) @@ -190,27 +230,53 @@ Page({ /** * 生命周期函数--监听页面初次渲染完成 */ - onReady: function () {}, - set_share_img:function () { - var th=this; - var path3=th.data.iurl+"/miniapp/images/skinimg/nan.png"; - if(this.data.sex=='female') - path3=th.data.iurl+"/miniapp/images/skinimg/nv.png"; + onReady: function () { }, + set_share_img() { + var th = this; + var path3 = th.data.iurl + "/miniapp/images/skinimg/nan.png"; + if (this.data.sex == 'female') + path3 = th.data.iurl + "/miniapp/images/skinimg/nv.png"; // 读取文件成功则OK-- wx.getImageInfo({ src: path3, success: function (res) { //获取到二维码的图片 - th.data.share_head=res.path; + th.data.share_head = res.path; } }) }, + scroll_view(e) { + let scrollTop = e.detail.scrollTop; + let heightRecord = this.data.heightRecord; + if (heightRecord.length === 0) return; + let length = this.data.tab.length; + var index = 0; + if (scrollTop >= heightRecord[0]) { + for (let i = 0; i < length; i++) { + if (scrollTop >= heightRecord[i - 1] && scrollTop < heightRecord[i]) { + index = i; + break; + } + } + } + if (index !== this.data.currentIndex) { + // let tab_id = this.data.tab[index].id; + console.log(scrollTop); + this.setData({ + scrollTop, + // currentIndex: index, + }) + } + + }, - binddragend(e) { + click_scroll(e) { console.log(e); + let { index, scroll_id } = e.currentTarget.dataset; this.setData({ - scrollTop: e.detail.scrollTop, + scroll_index: index, + scroll_id, }) }, @@ -291,8 +357,8 @@ Page({ close_dialog() { this.setData({ showDialog: false, - share_flag:false, - img_scale:true, + share_flag: false, + img_scale: true, }) }, @@ -370,6 +436,14 @@ Page({ }) }, + click_share() { + this.setData({ + share_flag: true, + img_scale: false, + showDialog: true, + }) + }, + //图片加载的时候,计算图片的像素大小 face_img_load: function (e) { var th = this; @@ -386,82 +460,82 @@ Page({ }, //-- 图片的拖拽缩放的功能 -- - touchstartCallback: function(e) { - this.data.tc_end=0; + touchstartCallback: function (e) { + this.data.tc_end = 0; // 单手指缩放开始,也不做任何处理 - if(e.touches.length>1) { + if (e.touches.length > 1) { // 一开始我并没有这个回调函数,会出现缩小的时候有瞬间被放大过程的bug // 当两根手指放上去的时候,就将distance 初始化。 let xMove = e.touches[1].clientX - e.touches[0].clientX; let yMove = e.touches[1].clientY - e.touches[0].clientY; let distance = Math.sqrt(xMove * xMove + yMove * yMove); - this.data.img_distance=distance; - }else if(e.touches.length==1){ - this.data.img_x=e.touches[0].clientX; - this.data.img_y=e.touches[0].clientY; + this.data.img_distance = distance; + } else if (e.touches.length == 1) { + this.data.img_x = e.touches[0].clientX; + this.data.img_y = e.touches[0].clientY; } }, - touchmoveCallback: function(e) { - if(this.data.tc_end) return false; - // 单手指缩放我们不做任何操作 - if(e.touches.length > 1){ - let xMove = e.touches[1].clientX - e.touches[0].clientX; - let yMove = e.touches[1].clientY - e.touches[0].clientY; - // 新的 ditance - let distance = Math.sqrt(xMove * xMove + yMove * yMove); - let distanceDiff = distance - this.data.img_distance; - - let newScale = this.data.ig_scale + 0.005 * distanceDiff - // 为了防止缩放得太大,所以scale需要限制,同理最小值也是 - if(newScale >= 2) { - newScale = 2 - } - if(newScale <= 0.6) { - newScale = 0.6 - } + touchmoveCallback: function (e) { + if (this.data.tc_end) return false; + // 单手指缩放我们不做任何操作 + if (e.touches.length > 1) { + let xMove = e.touches[1].clientX - e.touches[0].clientX; + let yMove = e.touches[1].clientY - e.touches[0].clientY; + // 新的 ditance + let distance = Math.sqrt(xMove * xMove + yMove * yMove); + let distanceDiff = distance - this.data.img_distance; - this.data.img_distance=distance; - // 赋值 新的 => 旧的 - this.setData({ - 'ig_scale': newScale, - }) - }else if(e.touches.length==1){ - let xMove= e.touches[0].clientX- this.data.img_x; - let yMove= e.touches[0].clientY- this.data.img_y; - this.setData({ - 'img_top': yMove*0.8, - 'img_left': xMove*0.8, - }); + let newScale = this.data.ig_scale + 0.005 * distanceDiff + // 为了防止缩放得太大,所以scale需要限制,同理最小值也是 + if (newScale >= 2) { + newScale = 2 + } + if (newScale <= 0.6) { + newScale = 0.6 } + this.data.img_distance = distance; + // 赋值 新的 => 旧的 + this.setData({ + 'ig_scale': newScale, + }) + } else if (e.touches.length == 1) { + let xMove = e.touches[0].clientX - this.data.img_x; + let yMove = e.touches[0].clientY - this.data.img_y; + this.setData({ + 'img_top': yMove * 0.8, + 'img_left': xMove * 0.8, + }); + } - }, - touchendCallback:function (e) { - this.data.tc_end=1; + }, + touchendCallback: function (e) { + this.data.tc_end = 1; }, + //--定义的保存图片方法,分享团--- saveImageToPhotosAlbum: function () { - var th=this; - var rpx = this.data.cWidth / 750 * 1.35; //基础单位, + var th = this; + var rpx = this.data.cWidth / 750 * 1.35; //基础单位, //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({url: '/pages/togoin/togoin',}) + wx.navigateTo({ url: '/pages/togoin/togoin', }) return false; } if (this.data.share_hidden) { - this.setData({share_hidden: false,}); + this.setData({ share_hidden: false, }); } ; - wx.showLoading({title: '生成中...',}) + wx.showLoading({ title: '生成中...', }) var that = this, th = that; //设置画板显示,才能开始绘图 - that.setData({canvasHidden: false }) + that.setData({ canvasHidden: false }) var app = getApp(); var scene = this.data.id + ""; @@ -477,106 +551,106 @@ Page({ wx.getImageInfo({ src: path3, success: function (res) { - var b=1.1; - //获取到二维码的图片 - var vpath = res.path; - var context = wx.createCanvasContext('share'); - // 先画背景 - context.fillStyle = '#ebf6f8'; - // 灰色实心矩形 - // 1. 语法: x坐标, y坐标, 宽度, 高度 - context.fillRect(0,0,750 * rpx,1338 * rpx); - - context.setFontSize(20* rpx) - context.setFillStyle("#00d8e9") - context.fillText("官方检测认证", 28*b* rpx, 80*b* rpx); - - //两个底部颜色 - context.fillStyle = '#a7ecf5'; - context.fillRect(28 *b* rpx,136 *b* rpx,262 *b* rpx,18 *b* rpx); - context.fillRect(28 *b* rpx,194 *b* rpx,262 *b* rpx,18 *b* rpx); - - context.setFontSize(42*b*rpx) - context.setFillStyle("#070609") - context.fillText("我的肌底强韧", 30*b* rpx, 140*b* rpx); - context.fillText("肌肤鲜活润泽", 30*b* rpx, 196*b* rpx); - - //先画一个圆形 - th.circle(context,110*b*rpx, 280*b*rpx,140*b*rpx,"#e7f3f8"); - th.circle(context,130*b*rpx, 300*b*rpx,120*b*rpx,"#c8f2fa"); - //绘制人脸 - context.drawImage(th.data.share_head, 132*b*rpx, 310*b*rpx, 230*b* rpx, 230 *b* rpx); - - //左右俩个框并填充文字 - th.darwRoundRect(38 *b* rpx,340*b*rpx,140*b*rpx,40*b*rpx,20*b*rpx,context); - th.darwRoundRect(324 *b* rpx,340*b*rpx,140*b*rpx,40*b*rpx,20*b*rpx,context); - context.setFontSize(20*b*rpx) - context.setFillStyle("black") - context.fillText("黑眼圈 重度", 50*b* rpx, 368*b* rpx); - context.fillText("毛孔 较粗大", 336*b* rpx, 368*b* rpx); - - //左右俩个框并填充文字 - th.darwRoundRect(40 *b* rpx,412*b*rpx,116*b*rpx,40*b*rpx,20*b*rpx,context); - th.darwRoundRect(348 *b* rpx,412*b*rpx,116*b*rpx,40*b*rpx,20*b*rpx,context); - context.setFillStyle("black") - context.fillText("黑头 重度", 52*b* rpx, 440*b* rpx); - context.fillText("色斑 轻度", 354*b* rpx, 440*b* rpx); - - //左右俩个框并填充文字 - th.darwRoundRect(60 *b* rpx,484*b*rpx,116*b*rpx,40*b*rpx,20*b*rpx,context); - th.darwRoundRect(328 *b* rpx,484*b*rpx,116*b*rpx,40*b*rpx,20*b*rpx,context); - context.setFillStyle("black") - context.fillText("皱纹 重度", 74*b* rpx, 510*b* rpx); - context.fillText("痤疮 轻度", 344*b* rpx, 510*b* rpx); - - //底部的绘制 - th.darwRoundRect(38 *b* rpx,650*b*rpx,430*b*rpx,160*b*rpx,10*b*rpx,context); - //绘制二维码 - context.drawImage(vpath, 60*b*rpx, 672*b*rpx, 120 *b* rpx, 120 *b* rpx); - context.setFillStyle("black") - context.setFontSize(32*b*rpx) - context.fillText("美肤管家AI测肤", 200*b* rpx, 726*b* rpx); - context.setFontSize(22*b*rpx) - context.fillText("科学了解皮肤的真实状态", 200*b* rpx, 766*b* rpx); - - //把画板内容绘制成图片,并回调 画板图片路径 - context.draw(false, function () { - setTimeout(function () { - wx.canvasToTempFilePath({ - x: 0, - y: 0, - width: 750, - height: 1338, - destWidth: 1.4 * 750 * 750 / th.data.screenWidth, - destHeight: 1.4 * 750 * 750 / th.data.screenWidth, - canvasId: 'share', - success: function (res) { - that.setData({ - shareImgPath: res.tempFilePath, - canvasHidden: true, - share_show:1 + var b = 1.1; + //获取到二维码的图片 + var vpath = res.path; + var context = wx.createCanvasContext('share'); + // 先画背景 + context.fillStyle = '#ebf6f8'; + // 灰色实心矩形 + // 1. 语法: x坐标, y坐标, 宽度, 高度 + context.fillRect(0, 0, 750 * rpx, 1338 * rpx); + + context.setFontSize(20 * rpx) + context.setFillStyle("#00d8e9") + context.fillText("官方检测认证", 28 * b * rpx, 80 * b * rpx); + + //两个底部颜色 + context.fillStyle = '#a7ecf5'; + context.fillRect(28 * b * rpx, 136 * b * rpx, 262 * b * rpx, 18 * b * rpx); + context.fillRect(28 * b * rpx, 194 * b * rpx, 262 * b * rpx, 18 * b * rpx); + + context.setFontSize(42 * b * rpx) + context.setFillStyle("#070609") + context.fillText("我的肌底强韧", 30 * b * rpx, 140 * b * rpx); + context.fillText("肌肤鲜活润泽", 30 * b * rpx, 196 * b * rpx); + + //先画一个圆形 + th.circle(context, 110 * b * rpx, 280 * b * rpx, 140 * b * rpx, "#e7f3f8"); + th.circle(context, 130 * b * rpx, 300 * b * rpx, 120 * b * rpx, "#c8f2fa"); + //绘制人脸 + context.drawImage(th.data.share_head, 132 * b * rpx, 310 * b * rpx, 230 * b * rpx, 230 * b * rpx); + + //左右俩个框并填充文字 + th.darwRoundRect(38 * b * rpx, 340 * b * rpx, 140 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); + th.darwRoundRect(324 * b * rpx, 340 * b * rpx, 140 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); + context.setFontSize(20 * b * rpx) + context.setFillStyle("black") + context.fillText("黑眼圈 重度", 50 * b * rpx, 368 * b * rpx); + context.fillText("毛孔 较粗大", 336 * b * rpx, 368 * b * rpx); + + //左右俩个框并填充文字 + th.darwRoundRect(40 * b * rpx, 412 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); + th.darwRoundRect(348 * b * rpx, 412 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); + context.setFillStyle("black") + context.fillText("黑头 重度", 52 * b * rpx, 440 * b * rpx); + context.fillText("色斑 轻度", 354 * b * rpx, 440 * b * rpx); + + //左右俩个框并填充文字 + th.darwRoundRect(60 * b * rpx, 484 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); + th.darwRoundRect(328 * b * rpx, 484 * b * rpx, 116 * b * rpx, 40 * b * rpx, 20 * b * rpx, context); + context.setFillStyle("black") + context.fillText("皱纹 重度", 74 * b * rpx, 510 * b * rpx); + context.fillText("痤疮 轻度", 344 * b * rpx, 510 * b * rpx); + + //底部的绘制 + th.darwRoundRect(38 * b * rpx, 650 * b * rpx, 430 * b * rpx, 160 * b * rpx, 10 * b * rpx, context); + //绘制二维码 + context.drawImage(vpath, 60 * b * rpx, 672 * b * rpx, 120 * b * rpx, 120 * b * rpx); + context.setFillStyle("black") + context.setFontSize(32 * b * rpx) + context.fillText("美肤管家AI测肤", 200 * b * rpx, 726 * b * rpx); + context.setFontSize(22 * b * rpx) + context.fillText("科学了解皮肤的真实状态", 200 * b * rpx, 766 * b * rpx); + + //把画板内容绘制成图片,并回调 画板图片路径 + context.draw(false, function () { + setTimeout(function () { + wx.canvasToTempFilePath({ + x: 0, + y: 0, + width: 750, + height: 1338, + destWidth: 1.4 * 750 * 750 / th.data.screenWidth, + destHeight: 1.4 * 750 * 750 / th.data.screenWidth, + canvasId: 'share', + success: function (res) { + that.setData({ + shareImgPath: res.tempFilePath, + canvasHidden: true, + share_show: 1 + }) + + if (!res.tempFilePath) { + wx.showModal({ + title: '提示', + content: '图片绘制中,请稍后重试', + showCancel: false }) + return false; + } - if (!res.tempFilePath) { - wx.showModal({ - title: '提示', - content: '图片绘制中,请稍后重试', - showCancel: false - }) - return false; - } - - /*-- - wx.previewImage({ - //将图片预览出来 - ur--*/ + /*-- + wx.previewImage({ + //将图片预览出来 + ur--*/ - wx.hideLoading(); - } - }) - }, 500) + wx.hideLoading(); + } + }) + }, 500) - }); + }); }, fail: function (res) { @@ -588,7 +662,7 @@ Page({ // 圆形图片 - circle: function (ctx, x, y, r,color){ + circle: function (ctx, x, y, r, color) { ctx.save() ctx.beginPath(); var cx = x + r; @@ -596,7 +670,7 @@ Page({ ctx.arc(cx, cy, r, 0, 2 * Math.PI); ctx.clip(); ctx.fillStyle = color; - ctx.fillRect(x,y,2 * r,2 * r); + ctx.fillRect(x, y, 2 * r, 2 * r); ctx.restore() ctx.closePath(); }, @@ -638,8 +712,8 @@ Page({ ctx.setFillStyle('white') ctx.fill() }, - close_share:function () { - this.setData({share_show:0}) + close_share: function () { + this.setData({ share_show: 0 }) }, @@ -778,7 +852,7 @@ Page({ pdata.guide_id = getApp().globalData.guide_id; } - var app = getApp(),th = this; + var app = getApp(), th = this; wx.showLoading(); app.request.post("/api/weshop/couponList/saveCouponList", { data: pdata, @@ -787,15 +861,15 @@ Page({ if (res.data.code == 0) { app.my_warnning("领取成功", 1, th); lq_num++; - var text = q_word+"[" + index + "].lqnum"; - var text2 = q_word+"[" + index + "].linging"; + var text = q_word + "[" + index + "].lqnum"; + var text2 = q_word + "[" + index + "].linging"; var obj = {}; obj[text] = lq_num; obj[text2] = 0; th.setData(obj); } else { app.confirmBox(res.data.msg); - var text2 = q_word+"[" + index + "].linging"; + var text2 = q_word + "[" + index + "].linging"; var obj = {}; obj[text2] = 0; th.setData(obj); diff --git a/packageD/pages/AI-test-skin/success_result/success_result.wxml b/packageD/pages/AI-test-skin/success_result/success_result.wxml index 3b611a0..36eb39f 100644 --- a/packageD/pages/AI-test-skin/success_result/success_result.wxml +++ b/packageD/pages/AI-test-skin/success_result/success_result.wxml @@ -1,5 +1,11 @@ - + @@ -10,8 +16,8 @@ - - + + 毛孔 {{pore_num}} @@ -68,7 +74,7 @@ - + @@ -106,7 +112,7 @@ - + @@ -170,29 +176,61 @@ - - - 毛孔较粗大 - 色斑轻度 - 皱纹轻度 - 黑头轻度 - 黑眼圈轻度 - 痤疮轻度 - 敏感度{{s_filter.get_nai_shou(skin_sensitive_check)}} + + + + + + + 血管型 无 + + + + + 色素型 轻度 + + + + + 阴影型 轻度 + - - - - - - - - - - + + + + + 毛孔较粗大 + 色斑轻度 + 皱纹轻度 + 黑头轻度 + 黑眼圈轻度 + 痤疮轻度 + 敏感度{{s_filter.get_nai_shou(skin_sensitive_check)}} + + + + + + + + + + + + + + + + {{item.name}} + + + + + + diff --git a/packageD/pages/AI-test-skin/success_result/success_result.wxss b/packageD/pages/AI-test-skin/success_result/success_result.wxss index 29af08a..ddc859d 100644 --- a/packageD/pages/AI-test-skin/success_result/success_result.wxss +++ b/packageD/pages/AI-test-skin/success_result/success_result.wxss @@ -44,6 +44,21 @@ page { background-color: #333333; } +.dialog_item.active1 { + color: #45d4eb; +} + +.dialog_item.active1::after { + content: ''; + position: absolute; + bottom: 0; + left: 50%; + transform: translateX(-50%); + width: 25%; + height: 6rpx; + background-color: #45d4eb; +} + .analyse { display: flex; align-items: center; @@ -51,6 +66,7 @@ page { justify-content: center; /* justify-content: space-evenly; */ } + .analyse1 { display: flex; align-items: center; @@ -65,6 +81,7 @@ page { background: #fff; border-radius: 20rpx; } + .analyse1 .mark1 { padding: 3rpx; font-size: 24rpx; @@ -85,6 +102,7 @@ page { width: 400rpx; height: 400rpx; } + .analyse1 .analyse_center1 { position: relative; background: #c9f0f9; @@ -92,11 +110,13 @@ page { width: 300rpx; height: 300rpx; } + .analyse1 .analyse_left1 { position: relative; right: -25rpx; z-index: 2; } + .analyse1 .analyse_right1 { position: relative; right: 25rpx; @@ -338,6 +358,7 @@ page { font-size: 38rpx; font-weight: 600; } + .renzheng::after { position: absolute; content: ""; @@ -427,7 +448,7 @@ page { top: 50%; right: 50%; transform: translate(50%, -50%); - height: 70%; + height: 80%; width: 80%; border-top-left-radius: 12rpx; border-top-right-radius: 12rpx; @@ -436,16 +457,42 @@ page { } .dialog .dialog_img { - height: 84%; + height: 75%; position: relative; } .dialog .dialog_txt { display: flex; - align-items: center; - justify-content: center; + flex-direction: column; + justify-content: space-evenly; + background-color: #fff; + min-height: 25%; +} + +.dialog_txt .heiyanquan_img { + justify-content: space-between; + padding: 2%; +} +.dialog_txt .heiyanquan_img .img1 { + width: 32%; +} + +.dialog .dialog_progress { + display: flex; + align-self: center; +} + +.dialog .dialog_bottom { + display: flex; + width: 130%; + background-color: #fff; +} + +.dialog_item { + position: relative; + padding: 3% 6%; + white-space: nowrap; background-color: #fff; - min-height: 20%; } .dialog .dialog_icon { @@ -471,8 +518,8 @@ page { .pp { width: 8rpx; - height: 35rpx; - margin-right: 5rpx; + height: 40rpx; + margin-right: 8rpx; border-radius: 3rpx; background: #2cb344; } @@ -635,14 +682,42 @@ page { border-radius: 20rpx; } -.share_content{position: fixed;z-index: 999999;top: 50%; left: 50%; width: 70%;transform: translate(-50%, -50%);} -.share_save_btn{width: 100%; height: 80rpx;line-height: 80rpx; text-align: center;color: #fff;background-color:#c3172d } -.sh_close{ position: absolute; right: 20rpx;top: 20rpx;width: 70rpx; height: 70rpx; - display: flex;justify-content: center;align-items: center;font-size: 26rpx; - border-radius: 50%; background-color: grey;color: #fff} +.share_content { + position: fixed; + z-index: 999999; + top: 50%; + left: 50%; + width: 70%; + transform: translate(-50%, -50%); +} + +.share_save_btn { + width: 100%; + height: 80rpx; + line-height: 80rpx; + text-align: center; + color: #fff; + background-color: #c3172d +} + +.sh_close { + position: absolute; + right: 20rpx; + top: 20rpx; + width: 70rpx; + height: 70rpx; + display: flex; + justify-content: center; + align-items: center; + font-size: 26rpx; + border-radius: 50%; + background-color: grey; + color: #fff +} @font-face { - font-family: "iconfont"; /* Project id */ + font-family: "iconfont"; + /* Project id */ src: url('iconfont.ttf?t=1645607343376') format('truetype'); } diff --git a/packageD/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml b/packageD/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml index 7c64351..440b265 100644 --- a/packageD/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml +++ b/packageD/pages/AI-test-skin/success_result/wrinkle/wrinkle.wxml @@ -1,4 +1,4 @@ - + -- libgit2 0.21.4