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