1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0421f5da"],{"0ba8d":function(e,t,a){var i=a("332d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=a("499e").default;o("7c36288a",i,!0,{sourceMap:!1,shadowMode:!1})},"0c3e":function(e,t,a){"use strict";a("0ba8d")},3297:function(e,t,a){e.exports=a.p+"static/app/img/tips.0d95bb1d.png"},"332d":function(e,t,a){var i=a("24fb"),o=a("1de5"),n=a("3297");t=i(!1);var s=o(n);t.push([e.i,"#skin_home[data-v-4b76e921]{min-height:calc(100vh - 50px);background-color:#fff}#skin_home .main[data-v-4b76e921]{font-size:1rem}#skin_home .main .main-top[data-v-4b76e921]{width:90%;margin:1.875rem auto;background-color:#fff;-webkit-box-shadow:0 1px 12px 1px hsla(0,0%,88.6%,.95);box-shadow:0 1px 12px 1px hsla(0,0%,88.6%,.95);border-radius:.375rem;color:#fe5a73;position:relative}#skin_home .main .main-top img[data-v-4b76e921]{width:7.875rem;height:7.875rem;margin:1.25rem auto}#skin_home .main .main-top .h1[data-v-4b76e921]{font-size:1.5rem;font-weight:700;line-height:1.875rem}#skin_home .main .main-top .h3[data-v-4b76e921]{line-height:1.5rem;padding-bottom:.5rem}#skin_home .main .main-top .uploadMask[data-v-4b76e921]{position:absolute;width:100%;height:100%;left:0;top:0}#skin_home .main .main-warn .warn-text[data-v-4b76e921]{color:#333;line-height:1.5rem}#skin_home .main .main-warn .warn-example[data-v-4b76e921]{color:#fe5a73;font-size:.75rem;margin:.75rem 0 3rem}#skin_home .main .main-bottom[data-v-4b76e921]{color:#fff}#skin_home .main .main-bottom .bottom-child[data-v-4b76e921]{margin:1rem auto 0;height:2.375rem;line-height:2.375rem;width:12.75rem;border-radius:2rem;overflow:hidden;background-color:#fe5a73;-webkit-box-shadow:0 1px 3px 0 #fe5a73;box-shadow:0 1px 3px 0 #fe5a73}#skin_home .main .main-bottom .color2[data-v-4b76e921]{background-color:#fe9d56;-webkit-box-shadow:0 1px 3px 0 #e78740;box-shadow:0 1px 3px 0 #e78740}#skin_home .main .main-agreement[data-v-4b76e921]{text-align:center;margin:0 0 1rem 0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#999}#skin_home .main .example-popup[data-v-4b76e921]{padding:0 1rem}#skin_home .main .example-popup .example-title[data-v-4b76e921]{color:#333;margin-top:1rem;text-align:left}#skin_home .main .example-popup img[data-v-4b76e921]{width:5.375rem;height:5.375rem;margin-top:1rem}#skin_home .main .example-popup .example-text[data-v-4b76e921]{font-size:.75rem;color:#666;margin:1rem 0}#skin_home .main .agreement-popup[data-v-4b76e921]{padding:1rem}#skin_home .main .agreement-popup img[data-v-4b76e921]{width:6.875rem;height:5.625rem}#skin_home .main .agreement-popup .h2[data-v-4b76e921]{font-size:1rem;color:#161615;margin:.875rem 0}#skin_home .main .agreement-popup .agreement-popup-text[data-v-4b76e921]{text-align:left;color:#6e6e6e;font-size:.75rem;line-height:1.25rem;max-height:10rem;overflow-y:scroll}#skin_home .main .agreement-popup .agreement-popup-text[data-v-4b76e921] img{width:100%}#skin_home .main .tips-popup[data-v-4b76e921]{background:url("+s+");background-size:100% 100%;width:15.625rem;height:11.875rem;color:#fff;padding:0 .875rem}#skin_home .main .tips-popup .h2[data-v-4b76e921]{font-size:1rem;padding:2rem 0 1rem}#skin_home .main .tips-popup .tips-popup-text1[data-v-4b76e921]{font-size:.875rem;line-height:1rem}#skin_home .main .tips-popup .tips-popup-text2[data-v-4b76e921]{font-size:.75rem;padding:.875rem 0}#skin_home .main .tips-popup .tips-popup-btn[data-v-4b76e921]{width:7.5rem;height:1.875rem;line-height:1.875rem;background-image:-webkit-gradient(linear,left top,left bottom,from(#fe5a73),to(#fe5a73)),-webkit-gradient(linear,left top,left bottom,from(#ec8094),to(#ec8094));background-image:-webkit-linear-gradient(#fe5a73,#fe5a73),-webkit-linear-gradient(#ec8094,#ec8094);background-image:linear-gradient(#fe5a73,#fe5a73),linear-gradient(#ec8094,#ec8094);-webkit-box-shadow:0 .125rem .25rem 0 rgba(165,79,25,.43);box-shadow:0 .125rem .25rem 0 rgba(165,79,25,.43);border-radius:1rem;margin:0 auto}#skin_home .main .upload-popup .img-animation[data-v-4b76e921]{width:9.375rem;height:9.375rem;position:relative;margin:4.625rem auto 1.625rem}#skin_home .main .upload-popup .img-animation .whirl[data-v-4b76e921]{width:9.375rem;height:9.375rem;-webkit-animation:haha1-data-v-4b76e921 3s linear infinite}#skin_home .main .upload-popup .img-animation .upload-img[data-v-4b76e921]{position:absolute;width:7.375rem;height:7.375rem;top:50%;left:50%;margin-top:-3.6875rem;margin-left:-3.6875rem;border-radius:100%;overflow:hidden}@-webkit-keyframes haha1-data-v-4b76e921{0%{-webkit-transform:rotate(0deg)}25%{-webkit-transform:rotate(90deg)}50%{-webkit-transform:rotate(180deg)}75%{-webkit-transform:rotate(270deg)}to{-webkit-transform:rotate(1turn)}}#skin_home .main .upload-popup .upload-popup-text[data-v-4b76e921]{color:#666;font-size:.875rem;line-height:1.875rem}",""]),e.exports=t},"3dc6":function(e,t,a){e.exports=a.p+"static/app/img/example.e7b00dad.png"},a75b:function(e,t,a){e.exports=a.p+"static/app/img/camera.dd45a46e.png"},ca5b:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"skin_home"}},[i("c-title",{attrs:{hide:!1,text:e.diyName}}),i("div",{staticClass:"main"},[i("div",{staticClass:"main-top"},[i("van-uploader",{attrs:{"after-read":e.onRead,"max-size":e.photosize},on:{oversize:e.onphotosize}},[i("img",{attrs:{src:a("a75b"),alt:""}})]),i("div",{staticClass:"h1"},[e._v("开始测肤")]),i("div",{staticClass:"h3"},[e._v("看看您的皮肤状态怎么样?")]),i("div",{directives:[{name:"show",rawName:"v-show",value:e.treaty_data&&(1==e.treaty_data.is_open||"1"==e.treaty_data.is_open)&&!e.checked,expression:"treaty_data && (treaty_data.is_open == 1 || treaty_data.is_open == '1') && !checked"}],staticClass:"uploadMask",on:{click:function(t){return t.stopPropagation(),e.checkprotocol.apply(null,arguments)}}})],1),!e.treaty_data||1!=e.treaty_data.is_open&&"1"!=e.treaty_data.is_open?e._e():i("div",{staticClass:"main-agreement"},[i("van-checkbox",{attrs:{shape:"square","checked-color":"#fe5a73","icon-size":"16px"},model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}}),i("div",{staticStyle:{"margin-left":"0.75rem"},on:{click:function(t){t.stopPropagation(),e.showAgreement=!0}}},[e._v(e._s(e.treaty_data.name))])],1),i("div",{staticClass:"main-warn"},[e._m(0),i("div",{staticClass:"warn-example",on:{click:function(t){e.showExample=!0}}},[e._v("查看图片示例")])]),i("div",{staticClass:"main-bottom"},[i("router-link",{staticClass:"bottom-child",attrs:{to:e.fun.getUrl("skinLog"),tag:"div"}},[e._v("我的测肤记录")]),e.isOpenRank?[i("router-link",{staticClass:"bottom-child color2",attrs:{to:e.fun.getUrl("skinRank"),tag:"div"}},[e._v("测肤排行榜")])]:e._e()],2),i("van-popup",{staticClass:"example-popup",staticStyle:{width:"80%"},attrs:{closeable:"",round:""},model:{value:e.showExample,callback:function(t){e.showExample=t},expression:"showExample"}},[i("div",{staticClass:"example-title"},[e._v("1.点击开始测肤")]),i("img",{attrs:{src:a("a75b"),alt:""}}),i("div",{staticClass:"example-title"},[e._v("2.从您的图库里选择一张")]),i("img",{attrs:{src:a("3dc6"),alt:""}}),i("p",{staticClass:"example-text"},[e._v("建议使用后置摄像头、闭眼使用闪光灯拍照!")])]),i("van-popup",{staticClass:"agreement-popup",staticStyle:{width:"80%"},attrs:{round:"",closeable:""},model:{value:e.showAgreement,callback:function(t){e.showAgreement=t},expression:"showAgreement"}},[i("img",{attrs:{src:a("caea"),alt:""}}),i("div",{staticClass:"h2"},[e._v(e._s(e.treaty_data&&e.treaty_data.name))]),e.treaty_data?[i("div",{staticClass:"agreement-popup-text",domProps:{innerHTML:e._s(e.treaty_data.content)}})]:e._e()],2),i("van-popup",{staticClass:"tips-popup",attrs:{round:""},model:{value:e.showTips,callback:function(t){e.showTips=t},expression:"showTips"}},[i("div",{staticClass:"h2"},[e._v("温馨提示")]),i("div",{staticClass:"tips-popup-text1"},[e._v(e._s(e.warnData.msg))]),i("div",{staticClass:"tips-popup-text2"},[e._v("注:"+e._s(e.warnData.data?e.warnData.data.checkAuth:""))]),i("div",{staticClass:"tips-popup-btn",on:{click:function(t){e.showTips=!1}}},[e._v("确定")])]),i("van-popup",{staticClass:"upload-popup",staticStyle:{height:"100vh"},attrs:{overlay:!1,position:"bottom"},model:{value:e.showUpload,callback:function(t){e.showUpload=t},expression:"showUpload"}},[i("div",{staticClass:"img-animation"},[i("img",{staticClass:"whirl",attrs:{src:a("f1c1"),alt:""}}),i("img",{staticClass:"upload-img",attrs:{src:e.preview,alt:""}})]),i("div",{directives:[{name:"show",rawName:"v-show",value:e.img_fize,expression:"img_fize"}],staticClass:"upload-popup-text"},[e._v(" 图片大小"+e._s(Number(e.img_fize/1048576).toFixed(2)>1?Number(e.img_fize/1048576).toFixed(2)+"M":Number(e.img_fize/1024).toFixed(2)+"KB")+" ,预计时间"+e._s(parseInt(2.5*Number(e.img_fize/1048576).toFixed(2))>5?parseInt(2.5*Number(e.img_fize/1048576).toFixed(2)):5)+"s,请稍等... ")]),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.img_fize,expression:"!img_fize"}],staticClass:"upload-popup-text"},[e._v("图片大小获取失败,预计时间 N s,请稍等...")]),i("div",{staticClass:"upload-popup-text"},[e._v("肤质检测,已完成"+e._s(e.percentage)+"%")])])],1)],1)},o=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"warn-text"},[e._v("图片越清晰,测肤结果越准确~"),a("br"),e._v("拍照请务必关闭美颜功能哦~")])}],n=(a("e7e5"),a("d399")),s=(a("14d9"),a("d3b7"),a("3ca3"),a("ddb0"),a("2b3d"),a("9861"),a("88a7"),a("271a"),a("5494"),a("a9e3"),a("b0c0"),a("e9c4"),a("ac1f"),a("00b4"),a("6968")),r=document.createElement("canvas"),p=r.getContext("2d"),m={data:function(){return{diyName:"肌肤测试",isOpenRank:!1,checked:!1,showExample:!1,showAgreement:!1,showTips:!1,showUpload:!1,img_fize:0,photosize:8388608,percentage:0,img_url:null,preview:a("3dc6"),warnData:{},treaty_data:{},page:1,isLoadMore:!0,total_page:0}},mounted:function(){this.getCheck()},components:{cTitle:s["a"]},computed:{},methods:{getCheck:function(){var e=this;$http.get("plugin.skin-check.api.skin-check.index",{},"...").then((function(t){1===t.result?(e.diyName=t.data.customizeName||"肌肤测试",e.fun.setWXTitle(e.diyName),e.treaty_data=t.data.set.treaty_data,e.isOpenRank="1"==t.data.rank_list):Object(n["a"])(t.msg)}),(function(e){}))},getReport:function(){var e=this;if(!this.img_url)return this.showUpload=!1,this.preview=null,this.$toast("图片链接错误,请重新上传");$http.get("plugin.skin-check.api.skin-check.skin-check",{img:this.img_url,is_check:this.checked?1:0},"...").then((function(t){1===t.result?e.$router.push(e.fun.getUrl("skinResult",{id:t.data.reportId})):(e.warnData=t,e.showUpload=!1,Object(n["a"])(t.msg),warnData.data.checkAuth&&(e.showTips=!0))}),(function(e){}))},onRead_1:function(e,t){var a=new FormData;if(!0===t){try{this.preview=URL.createObjectURL(e)}catch(s){}a.append("file",e),this.img_fize=Number(e.size)||void 0}else{try{this.preview=URL.createObjectURL(e.file)}catch(s){}a.append("file",e.file),this.img_fize=Number(e.file.size)||void 0}var i=this;a.append("upload_type","img");var o=this.fun.getRealUrl("upload.uploadPic",{});i.showUpload=!0,axios.post(o,a,{headers:{"Content-Type":"multipart/form-data"},processData:!1,contentType:!1,onUploadProgress:function(e){if(e.lengthComputable){var t=e.total+.09*e.total;i.percentage=Math.ceil(e.loaded/t*100)}}}).then((function(e){200===e.status&&1==e.data.result?(i.img_url=e.data.data.img_url,i.getReport()):Object(n["a"])(e.data.msg)})).catch((function(e){}))},checkprotocol:function(){"1"!=this.treaty_data.is_open||this.checked||Object(n["a"])("请勾选".concat(this.treaty_data.name))},onRead:function(e){"{}"==JSON.stringify(this.warnData)?this.onRead_1(e):Object(n["a"])(this.warnData.msg)},onphotosize:function(e){this.imgPreview(e.file,1)},imgPreview:function(e,t){var a=this;if(e&&window.FileReader&&/^image/.test(e.type)){var i=new FileReader;i.readAsDataURL(e),i.onloadend=function(){var i=this.result,o=new Image;o.src=i,o.onload=function(){var i=o.naturalWidth/o.naturalHeight,n=o.naturalWidth,s=n/i,m=2500,d=3500,c=n,l=s;(n>m||s>d)&&(n/s>m/d?(c=m,l=Math.round(m*(s/n))):(l=d,c=Math.round(d*(n/s)))),r.width=c,r.height=l,p.clearRect(0,0,c,l),p.drawImage(o,0,0,c,l),r.toBlob((function(e){1===t&&a.onRead_1(e,!0)}),e.type||"image/png")}}}}}},d=m,c=(a("0c3e"),a("2877")),l=Object(c["a"])(d,i,o,!1,null,"4b76e921",null);t["default"]=l.exports},caea:function(e,t,a){e.exports=a.p+"static/app/img/agreement.0c3ffc84.png"},f1c1:function(e,t,a){e.exports=a.p+"static/app/img/upload.fc14f5aa.png"}}]); |