diff --git a/app.js b/app.js index dae9f42..f24da70 100644 --- a/app.js +++ b/app.js @@ -51,7 +51,7 @@ App({ config: null, //门店参数 config2: null, //门店配置 code: null, - user_id: 5682094,//1564704,// 10153869,// 6453964,//5682094,6520044,6520119 qa 4687 6519901 + user_id: null,//1564704,// 10153869,// 6453964,//5682094,6520044,6520119 qa 4687 6519901 buy_now: null, picklist: null, //门店列表 wuliuprice: null, //物流价格表 diff --git a/packageA/pages/cart2_ser/cart2_ser.js b/packageA/pages/cart2_ser/cart2_ser.js index 34a44ab..1250ec1 100644 --- a/packageA/pages/cart2_ser/cart2_ser.js +++ b/packageA/pages/cart2_ser/cart2_ser.js @@ -249,6 +249,11 @@ Page({ t.data.data.original_img = oo.imghost + t.data.data.imgUrl; t.data.data['buynum'] = gg.goods_num; t.data.data.shop_price = gd.money; + + if(th.data.postdata.prom_type == 1) { + let postdata = th.data.postdata; + t.data.data.shop_price = postdata.prom_price; + }; th.setData({ bn_goods: t.data.data, @@ -510,6 +515,12 @@ Page({ // 'price': th.data.formData.order_amount, 'pickup_id': gg.pick_id, 'pickup_keyid': gg.keyid, + 'prom_type': this.data.postdata.prom_type, //促销活动类型 + 'prom_id': this.data.postdata.prom_id, //促销活动id + }; + + if(this.data.postdata.prom_type == 1) { + goods.price = this.data.postdata.prom_price; }; //--导购分享过来的id-- @@ -525,6 +536,7 @@ Page({ } }) } + console.log('goooooooooooooooooods', goods); item.list.push(goods); } diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js index 7793881..2d5da23 100644 --- a/packageA/pages/goodsInfo/goodsInfo.js +++ b/packageA/pages/goodsInfo/goodsInfo.js @@ -205,22 +205,18 @@ Page({ hui_condition:null, sto_sele_name_1:'',//分享的门店名称 + // 秒杀 + prom_st: 1, + prom_r_null: 0, }, //------初始化加载---------- onLoad: function(t) { - - // ===> 小程序页面分享到朋友圈时使用 - if(!getApp().is_Single_page()){ - return false; - } - // <=== - - - self = this; - this.data.options = t; // { goods_id: ...} - + + this.setData({ + options: t, + }); var ee = this, that = ee, @@ -385,7 +381,7 @@ Page({ var ser_card=th.data.data; //--如果默认门店不在等级卡的默认们店以内 if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(ee.keyid)==-1){ - ee.is_no_dis=1; + ee.is_no_dis=1; } var appd=getApp().globalData; @@ -454,6 +450,7 @@ Page({ }); }, + //------------程序初始化入口------------- async init(gid) { var ee = this, @@ -494,6 +491,58 @@ Page({ // }) + // ----> 秒杀 + let prom_type = this.data.options.prom_type; + + let goods_id = this.data.options.goods_id; + if(!goods_id) goods_id = this.data.data.goods_id; + + if(prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入 + let prom_id = this.data.options.prom_id; + this.check_prom(goods_id, prom_type, prom_id); + } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数 + getApp().request.promiseGet('/api/weshop/activitylist/getGoodActInfo', { + data: { + store_id: os.stoid, + goodsidlist: goods_id, + is_detail: 1, + goods_type: 1, + user_id: oo.user_id, + } + }).then(res => { + if (res.data.code == 0) { + let result = res.data.data; + let resLength = result.length; + if(resLength == 1) { // 如果数组长度为1,则直接显示当前活动 + let goods_id = this.data.options.goods_id; + let prom_type = result[0].prom_type; + let prom_id = result[0].act_id; + this.setData({ + 'options.prom_type': prom_type, + }); + this.check_prom(goods_id, prom_type, prom_id); + } else if(resLength > 1) { //如果数组长度大于1,表示当前商品参加多个活动,以列表形式显示多活动 + this.setData({ + actList: res.data.data, + }); + }; + + console.log('!!!!!!~~~~~~~~~prom~~~~~~~~~~!!!!!!'); + // this.setData({ + // prom, + // }); + + }; + }); + }; + // <---- 秒杀 + + + + + + + //------是否收藏---------- await getApp().request.promiseGet("/api/weshop/goodscollect/page", { data: { @@ -517,8 +566,6 @@ Page({ store_id: os.stoid, service_id: gid }, - //failRollback: !0, - }).then(res => { console.log('get评价统计数量', res.data.data); var t = res; @@ -538,7 +585,7 @@ Page({ categories3 = dd; } - }) + }); //----获取详情页的评价---- await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { @@ -553,7 +600,7 @@ Page({ }).then(res => { console.log('get详情页评价', res.data.data); fir_com = res.data.data.pageData; - }) + }); if (fir_com) { for (var ind in fir_com) { @@ -561,7 +608,7 @@ Page({ if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); } - } + }; this.getTaohe(); @@ -600,6 +647,7 @@ Page({ var ee = this,gid = this.data.gid, i = getApp().request; this.data.is_timer = 1; this.wait_for_store_config(); + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { failRollback: !0, @@ -676,6 +724,8 @@ Page({ this.data.enterAddressPage && (this.data.enterAddressPage = !1); this.get_sto(); + + }, enterAddress: function() { @@ -689,6 +739,7 @@ Page({ clearInterval(i); } }, + onHide: function() { this.data.is_timer = 0; for(var i = 1; i < 100; i++) { @@ -702,6 +753,7 @@ Page({ activeCategoryId: e }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); }, + tabClick2: function(t) { this.setData({ activeCategoryId2: t.currentTarget.id @@ -735,7 +787,7 @@ Page({ //商品详情的时候调用 tabGoodsContent: function() { var th = this, - i = getApp().request; + i = getApp().request; this.setData({ activeCategoryId: 1 }); @@ -749,7 +801,7 @@ Page({ var action= t.currentTarget.dataset.action; if(!ind) ind = t.currentTarget.dataset.openspecmodal_ind; - th.setData({ + th.setData({ open_ind_store: ind }); @@ -770,8 +822,16 @@ Page({ newd['pick_name'] = th.data.sto_sele_name; newd['guide_id'] = getApp().globalData.guide_id; newd['guide_type']=0; + + if(this.data.prom_type && this.data.prom_type == 1) { + newd['prom_type'] = this.data.prom_type; + newd['prom_id'] = this.data.prom_id; + newd['prom_price'] = this.data.prom_price; + } + + // console.log('newd++++++++', newd); th.buyNow(newd); - }else{ + } else { var newd = { service_id: th.data.data.id, @@ -881,7 +941,8 @@ Page({ }, openSpecModel: function(t) { - var th=this; + // console.log('****ttttttt***', t); + var th=this; var open_store = t.currentTarget.dataset.ind; this.setData({ store: 0, @@ -2749,7 +2810,278 @@ Page({ }; }; }); - } + }, + + + + + //---小于10的格式化函数---- + // timeFormat(param) { + // return param < 10 ? '0' + param : param; + // }, + + //----倒计时函数----- + countDown(time, prom_st) { + if (!this.data.is_timer) return false; + var th = this; + // 获取当前时间,同时得到活动结束时间数组 + var endTime = time; + var newTime = ut.gettimestamp(); + // 对结束时间进行处理渲染到页面 + var obj = null; + // 如果活动未结束,对时间进行处理 + if (endTime - newTime > 0) { + var time = (endTime - newTime); + // 获取天、时、分、秒 + var day = parseInt(time / (60 * 60 * 24)); + var hou = parseInt(time % (60 * 60 * 24) / 3600); + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); + obj = { + day: this.timeFormat(day), + hou: this.timeFormat(hou), + min: this.timeFormat(min), + sec: this.timeFormat(sec) + } + } else { + if (th.data.prom_st == 0) { + //var endTime2 = new Date(th.data.prom_end_time).getTime(); + var endTime2 = th.data.prom_act.end_time; + th.setData({ + prom_time_text: '距结束还剩:', + prom_st: 1 + }) + setTimeout(function () { + th.countDown(endTime2) + }, 1000); + return false; + + } else { + //活动已结束,全部设置为'00' + obj = { + day: '00', + hou: '00', + min: '00', + sec: '00' + } + th.setData({ + prom_time_text: '活动已经结束:', + prom_st: 3 + }) + th.setData({ + djs: obj + }); + return false; + } + } + + th.setData({ + djs: obj + }); + setTimeout(function () { + th.countDown(endTime) + }, 1000); + }, + + + get_normal(gid) { + this.setData({ + prom_type: 0, + isshow: 1, + }); + // this.get_sku(os.stoid, this.data.data, gid); + // this.get_sto(); + // this.check_is_youhui(gid, 1); + this.data.is_normal = 1; + }, + + + + + //--------检查是否活动,活动是否开始,或者是否结束------- + async check_prom(gid, prom_type, prom_id) { + console.log('check_prom'); + var ee = this, th = ee; + var user_id = getApp().globalData.user_id; + if (!user_id) user_id = 0; + + // if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9 || prom_type == 10) { + // this.setData({ + // prom_type: 0, isshow: 1, + // }); + // return false; + // } + + + + // if (prom_type == 1 && prom_id == 0) { + // this.setData({ + // prom_type: 0, isshow: 1, + // }); + + // //获取门店 + // this.get_sto(); + // this.get_sku(o.stoid, this.data.data, gid); + // this.check_has_flash(); + // this.data.is_normal = 1; + // this.check_is_youhui(gid, 1); + // return false; + // } + + //if (prom_type != 3 && prom_type!=0){ + //---判断秒杀---- + if (prom_type == 1 && prom_id > 0) { + //-------判断活动是否抢光--------- + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { + 1: 1 + }).then(res => { + var em = res; + if (res.data.code == 0) { + // console.log('!!!!!!res!!!!', res); + if (res.data.data <= 0) ee.setData({ + prom_r_null: 1 + }); + //拿取价格并且判断时间-- + getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { + success: function (t) { + // console.log('!!!!!!t!!!!', t); + if (t.data.code != 0) { + ee.get_normal(gid); + return false; + } + //----已经结束----- + if (t.data.data.is_end == 1) { + ee.get_normal(gid); + return false; + } + //----已经过期----- + var now = ut.gettimestamp(); + if (t.data.data.end_time < now) { + ee.get_normal(gid); + return false; + } + /*-- 还没有开始预热的也不显示 --*/ + if (t.data.data.show_time > now) { + ee.get_normal(gid); + return false; + } + + var t_gd = ee.data.data; + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); + + ee.setData({ + 'data.shop_price': t.data.data.user_price, + prom_price: t.data.data.user_price, + prom_type: 1, + prom_id: prom_id, + prom_buy_limit: t.data.data.buy_limit, + prom_act: t.data.data, + prom_end_time: prom_end_time, + prom_start_time: prom_start_time, + isshow: 1, + }); + + ee.get_sto(); + var newTime = ut.gettimestamp(); + var endTime2 = t.data.data.end_time; + var endTime1 = t.data.data.start_time; + if (endTime1 > newTime) { + ee.setData({ + prom_time_text: '距秒杀开始还有', + prom_st: 0, + }) + ee.countDown(endTime1, 0); + } else { + if (endTime2 > newTime) { + ee.setData({ + prom_time_text: '距秒杀结束还有', + prom_st: 1 + }) + ee.countDown(endTime2); + } + } + + //如果是进行中的话 + // if (endTime1 < newTime) { + // //-- 获取秒杀活动的多少规格 -- + // ee.get_more_flahs(function (list) { + // if (list && list.length > 1) { + + // var n_item = list[0]; + // var ind = list.findIndex(function (ele) { + // return ele.goods_id == ee.data.data.goods_id; + // }) + // if (ind < 0) return false; + // if (ind > 0) { + // n_item = JSON.parse(JSON.stringify(list[ind])); + // list.splice(ind, 1); + // list.unshift(n_item); + // } + + // ee.data.sele_g.viplimited = n_item.viplimited; + // ee.data.data.viplimited = n_item.viplimited; + + // var gb = 1; + // //-- 显示多规格 -- + // for (let i in list) { + // let item = list[i]; + // var gg = ""; + // if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = ""; + // if (item.goods_color == "null" || item.goods_color == null) item.goods_color = ""; + + // if (item.goods_spec != "" && item.goods_color != "") { + // gg = item.goods_spec + "/" + item.goods_color; + // } else if (item.goods_spec != "" || item.goods_color != "") { + // gg = item.goods_spec + item.goods_color; + // } else { + // gg = "规格" + gb; + // gb++; + // } + // item.gg = gg; + // item.prom_id = item.prom_id; + // item.prom_type = 1; + // } + + // ee.setData({ + // sku_g: list, + // }); + + // } + // }) + // } + + } + }); + } + }) + } + + }, + + + + viewFlash(e) { + let prom_type = e.currentTarget.dataset.promtype; + let prom_id = e.currentTarget.dataset.promid; + let goods_id = this.data.data.goods_id; + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; + // console.log('url~~~~', url); + getApp().goto(url); + }, + + + + + + + + + + + + + diff --git a/packageA/pages/goodsInfo/goodsInfo.wxml b/packageA/pages/goodsInfo/goodsInfo.wxml index 231982d..f18ca5e 100644 --- a/packageA/pages/goodsInfo/goodsInfo.wxml +++ b/packageA/pages/goodsInfo/goodsInfo.wxml @@ -51,6 +51,7 @@ + @@ -63,6 +64,30 @@ + + + + + + + + + + 距活动开始还有 + 距活动结束还有 + + + {{djs.day}} + + + {{djs.hou}} + + {{djs.min}} + + {{djs.sec}} + + + @@ -73,6 +98,9 @@ + + + {{filters.toFix(data.shop_price,2)}} {{data.goods_name}} @@ -124,6 +152,41 @@ + + + + + + + 秒杀{{index+1}} + + + + + + + {{item.act_name}} + + + + + + + + + + + @@ -238,7 +301,7 @@ - + @@ -439,11 +502,63 @@ - + - 加入购物车 - 立即购买 + + + + + + 加入购物车 + 立即抢购 + + + + + + 单独购买 + 即将开始 + + + 即将开始 + + + + + + + + 单独购买 + 已抢光 + + 已抢光 + + + + + 单独购买 + 活动已经结束 + + + 活动已经结束 + + + + + + + + 加入购物车 + 立即购买 + + + + + + + + @@ -558,10 +673,20 @@ 加入购物车 - - {{sele_g.offline_price?"券后购买":"立即购买"}} - + + + + {{sele_g.offline_price?"券后购买":"立即购买"}} + + + + + + {{sele_g.offline_price?"券后购买":"立即购买"}} + + diff --git a/packageA/pages/goodsInfo/goodsInfo.wxss b/packageA/pages/goodsInfo/goodsInfo.wxss index 500f8d6..c8d39ff 100644 --- a/packageA/pages/goodsInfo/goodsInfo.wxss +++ b/packageA/pages/goodsInfo/goodsInfo.wxss @@ -2907,3 +2907,45 @@ button.custom-service::after{ .del { text-decoration: line-through; } + + + + +.tick { + position: relative; +} + +.tick:before { + content: ''; + display: inline-block; + vertical-align: middle; + margin-top: -4rpx; + margin-right: 12rpx; + width: 22rpx; + height: 22rpx; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat; + background-size: 22rpx auto; +} + +.details::after { + content: ''; + position: absolute; + right: 0; + top: 0; + bottom: 0; + margin: auto; + display: inline-block; + width: 40rpx; + height: 40rpx; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=); + background-repeat: no-repeat; + background-size: 40rpx auto; +} + +.lh2 { + line-height: 2; +} + +.huise { + background: gray +} diff --git a/packageD/pages/AI-test-skin/analyse/analyse.json b/packageD/pages/AI-test-skin/analyse/analyse.json index 8835af0..a9c180d 100644 --- a/packageD/pages/AI-test-skin/analyse/analyse.json +++ b/packageD/pages/AI-test-skin/analyse/analyse.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "测肤报告" } \ No newline at end of file diff --git a/packageD/pages/AI-test-skin/analyse/analyse.wxml b/packageD/pages/AI-test-skin/analyse/analyse.wxml index f27fc6e..60b0fda 100644 --- a/packageD/pages/AI-test-skin/analyse/analyse.wxml +++ b/packageD/pages/AI-test-skin/analyse/analyse.wxml @@ -1,9 +1,10 @@ - + - - 正在分析... - + + 正在分析... + diff --git a/packageD/pages/AI-test-skin/analyse/analyse.wxss b/packageD/pages/AI-test-skin/analyse/analyse.wxss index 600a029..426f8a6 100644 --- a/packageD/pages/AI-test-skin/analyse/analyse.wxss +++ b/packageD/pages/AI-test-skin/analyse/analyse.wxss @@ -29,13 +29,13 @@ page { display: inline-block; width: 350px; height: 350px; - transform: scale(0.5); - animation: 1s mymove infinite steps(27, end); + transform: scale(0.4); + animation: 2s mymove infinite steps(27, end); } .progress { margin-top: 3%; - width: 60%; + width: 48%; /* text-align: center; */ margin-left: 50%; transform: translateX(-50%); diff --git a/packageD/pages/AI-test-skin/fail_result/fail_result.wxss b/packageD/pages/AI-test-skin/fail_result/fail_result.wxss index b3457de..51a0f2e 100644 --- a/packageD/pages/AI-test-skin/fail_result/fail_result.wxss +++ b/packageD/pages/AI-test-skin/fail_result/fail_result.wxss @@ -25,10 +25,10 @@ page { margin: 70rpx 0 30rpx 50%; transform: translateX(-50%); background: #4bd6df; - padding: 20rpx; - width: 50%; + padding: 15rpx 10rpx; + width: 46%; text-align: center; - border-radius: 40rpx; + border-radius: 50rpx; color: #fff; } .btn_fixed { diff --git a/packageD/pages/AI-test-skin/history_record/history_record.js b/packageD/pages/AI-test-skin/history_record/history_record.js index 1c1e44f..a1f954d 100644 --- a/packageD/pages/AI-test-skin/history_record/history_record.js +++ b/packageD/pages/AI-test-skin/history_record/history_record.js @@ -234,6 +234,20 @@ Page({ arr.push(time_obj); } } + function _sort_by_history_time (property){ + return function(a,b){ + let val1 = a[property]; + let val2 = b[property]; + if(val2 > val1){ + return 1 + }else if(val2 < val1){ + return -1 + }else{ + return 0 + } + } + } + arr.sort(_sort_by_history_time('history_time')); return arr; }, diff --git a/packageD/pages/AI-test-skin/index/aiskin.wxml b/packageD/pages/AI-test-skin/index/aiskin.wxml index fb38b4c..0bb66b7 100644 --- a/packageD/pages/AI-test-skin/index/aiskin.wxml +++ b/packageD/pages/AI-test-skin/index/aiskin.wxml @@ -1,10 +1,12 @@ - - 历史档案 - + + 历史档案 + - - - 开始测肤 + + + + 开始测肤 + \ No newline at end of file diff --git a/packageD/pages/AI-test-skin/index/aiskin.wxss b/packageD/pages/AI-test-skin/index/aiskin.wxss index cd27949..04e15c2 100644 --- a/packageD/pages/AI-test-skin/index/aiskin.wxss +++ b/packageD/pages/AI-test-skin/index/aiskin.wxss @@ -1,16 +1,7 @@ -/* packageB/pages/AI-test-skin/aiskin.wxss */ -page { - width: 100%; - height: 100%; -} -image { - width: 100vw; - height: 100%; -} + .container1 { position: relative; width: 100%; - height: 100%; } .history { margin-top: 30rpx; @@ -21,18 +12,19 @@ image { border-radius: 50rpx 0 0 50rpx; box-shadow: 0 0 2px 2px #f7f5f5; color: #4ad5df; + align-items: center; + z-index: 100; } .start_btn { - position: fixed; - bottom: 50rpx; - /* margin: auto; */ - /* text-align: center; */ margin-left: 50%; transform: translateX(-50%); background: #4bd6df; - padding: 20rpx; + padding:16rpx 20rpx; width: 67%; text-align: center; border-radius: 40rpx; color: #fff; + font-size: 30rpx; + position:absolute; + bottom: 90rpx; } \ No newline at end of file diff --git a/packageD/pages/AI-test-skin/select_photo/select_photo.wxml b/packageD/pages/AI-test-skin/select_photo/select_photo.wxml index b9fd5d9..e71d53b 100644 --- a/packageD/pages/AI-test-skin/select_photo/select_photo.wxml +++ b/packageD/pages/AI-test-skin/select_photo/select_photo.wxml @@ -1,6 +1,6 @@ - - + + diff --git a/packageD/pages/AI-test-skin/select_photo/select_photo.wxss b/packageD/pages/AI-test-skin/select_photo/select_photo.wxss index cc1af5f..3bb701c 100644 --- a/packageD/pages/AI-test-skin/select_photo/select_photo.wxss +++ b/packageD/pages/AI-test-skin/select_photo/select_photo.wxss @@ -23,9 +23,8 @@ page { .foot_btn .ok_btn { background: #5dd9dc; - padding: 0 50rpx; + padding: 16rpx 40rpx; border-radius: 50rpx; /* margin: 0 auto; */ - line-height: 100rpx; color: #fff; } diff --git a/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js b/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js index 623b83d..ce7ce0e 100644 --- a/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js +++ b/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js @@ -1,7 +1,7 @@ /* * @Author: abson * @Date: 2022-02-15 10:01:57 - * @LastEditTime: 2022-02-17 09:40:38 + * @LastEditTime: 2022-02-28 15:37:20 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEet urkl * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\shoot_notice\shoot_notice.js @@ -19,6 +19,7 @@ Page({ */ data: { iurl: setting.imghost, + notice_show:"", }, /** @@ -32,7 +33,11 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - + setTimeout(()=>{ + this.setData({ + notice_show:'none', + }) + },3000).bind(this) }, /** @@ -64,15 +69,15 @@ Page({ }, //从相册中选择图片 - show_pai_pop:function () { + show_pai_pop: function () { //选择和拍照一张图片 wx.chooseImage({ count: 1, sizeType: ['original', 'compressed'], sourceType: ['album', 'camera'], - success (res) { - let imgArr = res.tempFilePaths; - getApp().globalData.skin_img=imgArr[0]; + success(res) { + let imgArr = res.tempFiles; + getApp().globalData.skin_img_info = imgArr[0]; let url = "/packageD/pages/AI-test-skin/select_photo/select_photo"; app.goto(url); } diff --git a/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml b/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml index 99642af..b99fc67 100644 --- a/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml +++ b/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml @@ -1,5 +1,6 @@ + 根据要求拍摄,测肤结果更准确。 准备工作 diff --git a/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss b/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss index f098f26..3b40331 100644 --- a/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss +++ b/packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss @@ -6,7 +6,31 @@ page { box-sizing: border-box; background-color: #e7f5fb; } + +@keyframes notice_show { + 0% { + top: -999rpx; + } + + 100% { + top: 10rpx; + } +} + +.notice_show { + text-align: center; + padding: 30rpx; + color: skyblue; + position: absolute; + right: 10%; + box-shadow: #f0f0f0 0px 0px 5px; + z-index: 999; + background: #fff; + animation: 2s notice_show linear; +} + .content { + position: relative; width: 100%; /* height: 100%; */ border-radius: 25rpx; @@ -26,11 +50,12 @@ page { align-items: center; margin-bottom: 40rpx } + .content .ready1 { display: flex; flex-direction: column; align-items: center; - padding-bottom: 50rpx ; + padding-bottom: 50rpx; /* margin-bottom: 40rpx */ } @@ -65,19 +90,21 @@ page { .content image { height: 100%; } + .btn { - + /* height: 150rpx; */ /* margin-left: 50%; */ margin: 70rpx 0 30rpx 50%; transform: translateX(-50%); background: #4bd6df; - padding: 20rpx; + padding: 15rpx 15rpx; width: 50%; text-align: center; - border-radius: 40rpx; + border-radius: 50rpx; color: #fff; } + .btn_fixed { position: fixed; width: 100%; @@ -85,6 +112,7 @@ page { height: 300rpx; background: #e7f5fb; } + .notice { text-align: center; color: red; @@ -98,36 +126,71 @@ page { right: 0; bottom: 0; z-index: 11; - background: rgba(0,0,0,0.4); + background: rgba(0, 0, 0, 0.4); width: 100%; height: 100%; } -.flex{display: flex} -.jc-center{ +.flex { + display: flex +} + +.jc-center { justify-content: center; } -.ac{align-items: center} -.pai_content{ - position: fixed;z-index: 100;bottom: 0;background: #FFFFFF;width: 100%; - border-top-left-radius:30rpx; - border-top-right-radius:30rpx; + +.ac { + align-items: center } -.p_item{ height: 100rpx; line-height: 100rpx;text-align: center; border-bottom: 1rpx solid #eee} -.p_cancle{height: 100rpx; line-height: 100rpx;text-align: center; border-top:20rpx solid #f8f8f8;} -@keyframes p_up -{ - from {transform:translateY(100%);} - to {transform:translateY(0);} +.pai_content { + position: fixed; + z-index: 100; + bottom: 0; + background: #FFFFFF; + width: 100%; + border-top-left-radius: 30rpx; + border-top-right-radius: 30rpx; +} + +.p_item { + height: 100rpx; + line-height: 100rpx; + text-align: center; + border-bottom: 1rpx solid #eee +} + +.p_cancle { + height: 100rpx; + line-height: 100rpx; + text-align: center; + border-top: 20rpx solid #f8f8f8; } -@keyframes p_down -{ - from {transform:translateY(0);} - to {transform:translateY(100%);} +@keyframes p_up { + from { + transform: translateY(100%); + } + + to { + transform: translateY(0); + } } -.p_to_up{animation:p_up 1s;} -.p_to_down{animation:p_down 0.5s;} +@keyframes p_down { + from { + transform: translateY(0); + } + + to { + transform: translateY(100%); + } +} + +.p_to_up { + animation: p_up 1s; +} +.p_to_down { + animation: p_down 0.5s; +} \ No newline at end of file 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 e00232d..d764c24 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-25 11:30:33 + * @LastEditTime: 2022-02-28 10:44:27 * @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 @@ -24,7 +24,7 @@ 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: '敏感度' }], + // 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: '口周纹' }], cuochuang_arr: [{ id: 1, name: '全部痤疮' }, { id: 2, name: '粉刺 ' }, { id: 3, name: '痘印 ' }, { id: 4, name: '脓包' }, { id: 5, name: '结节' }], zhouwen_arr1: [{ id: 1, name: '皱纹/细纹',des:'是指皮肤受到外界环境影响,形成游离自由基,自由基破坏正常细胞膜组织内的胶原蛋白、活性物质,氧化细胞,或缺水而形成的小细纹,继而严重形成皱纹',sign: 'zhou1',sign1: 'zhou2' }, { id: 2, name: '抬头皱纹/抬头细纹',des:'位于额头的皱纹、细纹。形成原因因人而异,后天因素是比较少的。-般多为横纹, 竖纹较少见。' ,sign: 'zhou3',sign1:'zhou4'}, { id: 3, name: '眼部皱纹/眼部细纹',des:'眼部皱纹、细纹一般位于下眼睑部位,多见于下脸内1/3处。',sign:'zhou5',sign1:'zhou6' }, { id: 4, name: '鱼尾纹',des:'眼部皱纹的一种,是在人两侧外眼角和登角之间出现的皱纹,其纹路与鱼尾巴上的纹路很相似,故被形象地称为鱼尾纹。',sign:'zhou7',sign1:'zhou8' }, { id: 5, name: '眉间纹',des:'又叫川字纹,皱眉纹,是面部的一种正常的表情纹,随着年龄的增长,面部的皱纹会逐渐加深,双眉之间逐渐形成了较深的皱折,会使人看起来总是愁眉不展。',sign:'zhou9',sign1:'zhou10'}, { id: 6, name: '泪沟',des:'泪沟是指由内眼角开始出现在下眼睑靠鼻侧的两条凹沟,是由于眼眶隔膜下缘的软组织萎缩、下垂而生成的。',sign:'zhou11',sign1:'zhou12' }, { id: 7, name: '法令纹',des:'法令纹是位于鼻翼边延伸而下的两道纹路,是典型的皮肤组织老化、造成肌肤表面凹陷的现象。',sign:'zhou15',sign1:'zhou16' }, { id: 8, name: '口角纹',des:'口角纹又称木偶纹、括号纹,位于嘴角延伸而下的两道纹路,是表情肌、重力和遗传基因等几方面因素综合形成的。',sign:'zhou13',sign1:'zhou14' }], @@ -199,7 +199,26 @@ Page({ return e.type==3; }) th.data.acne_num4=a_arr.length; - + let tab_arr = [{ id: 'zong_he', name: '综合肤质' }]; + if(pore_num) { + tab_arr.push({ id: 'mao_kong', name: '毛孔' }); + } + if(blackhead_num){ + tab_arr.push({ id: 'hei_tou', name: '黑头' }); + } + if(speckle_num){ + tab_arr.push({ id: 'se_ban', name: '色斑' }); + } + if(wrinkle_num){ + tab_arr.push({ id: 'zhou_wen', name: '皱纹' }); + } + if(dark_type > -1) { + tab_arr.push( { id: 'hei_yan_quan', name: '黑眼圈' }); + } + if(acne_num){ + tab_arr.push({ id: 'cuo_chuang', name: '痤疮' }); + } + tab_arr.push( { id: 'min_gan_du', name: '敏感度' }); th.setData({ acne_num: acne_num, speckle_num: speckle_num, @@ -219,6 +238,7 @@ Page({ bili: bili, bili_eye:bili_eye, sex:sex, + tab:tab_arr, skin_dryoil_check_type:skin_dryoil_check_type, eye_top:eye_top* bili_eye, eye_left1:eye_left1* bili_eye, 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 6220f88..2dc0933 100644 --- a/packageD/pages/AI-test-skin/success_result/success_result.wxml +++ b/packageD/pages/AI-test-skin/success_result/success_result.wxml @@ -130,7 +130,7 @@ - + @@ -237,7 +237,7 @@ --> - + @@ -259,31 +259,31 @@ - 毛孔粗大{{pore_num}} - 色斑{{speckle_num}} + 毛孔粗大 {{pore_num}} + 色斑 {{speckle_num}} - 全部皱纹{{wrinkle_num}} - 抬头纹{{wrinkle_num1}} - 川字纹{{wrinkle_num2}} - 眼周细纹{{wrinkle_num3}} - 鱼尾纹{{wrinkle_num4}} - 法令纹{{wrinkle_num5}} - 口周纹{{wrinkle_num6}} + 全部皱纹 {{wrinkle_num}} + 抬头纹 {{wrinkle_num1}} + 川字纹 {{wrinkle_num2}} + 眼周细纹 {{wrinkle_num3}} + 鱼尾纹 {{wrinkle_num4}} + 法令纹 {{wrinkle_num5}} + 口周纹 {{wrinkle_num6}} - 黑头{{blackhead_num}} + 黑头 {{blackhead_num}} 黑眼圈 {{s_filter.get_dark_type(dark_type)}} 左眼黑眼圈 {{s_filter.get_dark_type(dark_type1)}} 右眼黑眼圈 {{s_filter.get_dark_type(dark_type2)}} - 全部痤疮{{acne_num}} - 粉刺{{acne_num1}} - 痘印{{acne_num2}} - 脓包{{acne_num3}} - 结节{{acne_num4}} + 全部痤疮 {{acne_num}} + 粉刺 {{acne_num1}} + 痘印 {{acne_num2}} + 脓包 {{acne_num3}} + 结节 {{acne_num4}} - 敏感度{{s_filter.get_nai_shou(skin_sensitive_check)}} + 敏感度 {{s_filter.get_nai_shou(skin_sensitive_check)}} @@ -305,8 +305,6 @@ - - @@ -401,8 +399,8 @@ {{item.des}} - - + + @@ -415,7 +413,7 @@ - + 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 8358dc7..a07114f 100644 --- a/packageD/pages/AI-test-skin/success_result/success_result.wxss +++ b/packageD/pages/AI-test-skin/success_result/success_result.wxss @@ -11,6 +11,7 @@ page { z-index: 99; display: flex; height: 100rpx; + background-color: #fff; } .share { @@ -18,12 +19,13 @@ page { position: fixed; bottom: 100rpx; right: 0; - padding: 20rpx; + padding:8rpx 20rpx; background-color: #fff; border: 2rpx solid #f0f0f0; /* color: #FFF; */ border-radius: 40rpx 0 0 40rpx; z-index: 99; + align-items: center; } .tab_scroll_item { @@ -463,7 +465,7 @@ page { flex-direction: column; justify-content: space-evenly; background-color: #fff; - min-height: 25%; + min-height: 10%; } .dialog_txt .heiyanquan_img { @@ -735,7 +737,7 @@ page { line-height: 80rpx; text-align: center; color: #fff; - background-color: #c3172d + background-color: #45d4eb } .sh_close { @@ -843,6 +845,7 @@ page { } .yiwen_img { + width: 100%; margin-top: 40rpx; /* width: 600rpx; height: 600rpx; */ @@ -856,4 +859,10 @@ page { top: 15px; position: absolute; right: 50rpx; -} \ No newline at end of file +} + +::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index 766039d..2d0812a 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -172,21 +172,23 @@ - - - - - - - - - {{aitem.goods_name}} - - - {{aitem.price}} - ¥{{aitem.market_price}} - - + + + + + + + + + {{aitem.goods_name}} + + + {{aitem.price}} + ¥{{aitem.market_price}} + + + +