bztang-admin/addons/yun_shop/static/app/js/chunk-72aac56d.8209b9fc.js

1 line
12 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-72aac56d"],{17668:function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"evaluate"}},[o("c-title",{attrs:{hide:!1,text:"评价"}}),o("div",{staticClass:"shop-goods"},[o("div",{staticClass:"goods flex"},[o("div",{staticClass:"img flex"},[o("img",{attrs:{src:e.good.thumb}})]),o("div",{staticClass:"wrap flex"},[o("div",{staticClass:"goods-title flex-j-sb "},[o("div",{staticClass:"ell"},[e._v(e._s(e.good.title))]),o("div",[e._v(e._s(e.$i18n.t("money"))+e._s(e.good.price))])]),o("div",{staticClass:"goods-size flex-j-sb flex-a-c"},[o("div",{class:e.good.goods_option_title?"":"goods-hide"},[e._v("规格:"+e._s(e.good.goods_option_title))]),o("div",[e._v("x"+e._s(e.good.total))])])])]),o("div",{staticClass:"comment"},[o("h3",[e._v("评论:")]),o("van-cell-group",[o("van-field",{attrs:{type:"textarea",placeholder:"请输入评论内容~",rows:"2"},model:{value:e.comment,callback:function(t){e.comment=t},expression:"comment"}})],1),o("div",{staticClass:"print"},[o("h3",[e._v("晒图:")]),o("div",{staticClass:"print-img flex"},[e._l(e.fileList4,(function(t,i){return[o("div",{key:i,staticClass:"photobox flex",staticStyle:{"max-width":"5.625rem"}},[o("img",{staticStyle:{"max-width":"5.625rem"},attrs:{src:t}}),o("span",{staticClass:"iconfont icon-a-zu648",on:{click:function(t){return e.removeImg_1(i)}}})])]})),o("div",{staticClass:"img-upload flex"},[o("van-uploader",{attrs:{disabled:e.fileList4.length>=5,"after-read":e.multipleMethod_1,multiple:""}},[o("div",{staticClass:"upload flex-a-c flex-j-c"},[o("div",{staticClass:"crucifix"})])])],1)],2),o("div",{staticClass:"print-rate flex-a-c flex-j-sb"},[o("h4",[e._v("评分:")]),o("van-rate",{attrs:{size:20,color:"var(--themeBaseColor)"},on:{change:e.getStar},model:{value:e.level,callback:function(t){e.level=t},expression:"level"}})],1)])],1),e.is_score_latitude?o("div",{staticClass:"score-box"},[o("div",{staticClass:"score-item flex-a-c flex-j-sb"},[o("h3",[e._v("描述/包装")]),o("van-rate",{attrs:{size:20,color:"var(--themeBaseColor)"},model:{value:e.describeScore,callback:function(t){e.describeScore=t},expression:"describeScore"}})],1),o("div",{staticClass:"score-item flex-a-c flex-j-sb"},[o("h3",[e._v("物流服务/配送")]),o("van-rate",{attrs:{size:20,color:"var(--themeBaseColor)"},model:{value:e.deliveryScore,callback:function(t){e.deliveryScore=t},expression:"deliveryScore"}})],1),o("div",{staticClass:"score-item flex-a-c flex-j-sb"},[o("h3",[e._v("服务态度/质量")]),o("van-rate",{attrs:{size:20,color:"var(--themeBaseColor)"},model:{value:e.serviceScore,callback:function(t){e.serviceScore=t},expression:"serviceScore"}})],1)]):e._e(),o("div",{staticClass:"mh-90"}),o("div",{staticClass:"evaluate-btn",on:{click:function(t){return e.toComment(e.good)}}},[e._v("提交评价")])])],1)},a=[],s=(o("e7e5"),o("d399")),r=(o("ac1f"),o("00b4"),o("14d9"),o("d3b7"),o("3ca3"),o("ddb0"),o("2b3d"),o("9861"),o("88a7"),o("271a"),o("5494"),o("a434"),o("e9c4"),o("fb6a"),o("a9e3"),o("6968")),d=document.createElement("canvas"),c=d.getContext("2d"),n={data:function(){return{ratetextshow:["极差","失望","一般","满意","惊喜"],ratetext:"惊喜",toi:this.fun.getKeyByI(),good:"",order_id:"",content:"",level:5,order:"",comment:"",photosize:2097152,upNumMaxOther:"",uploadUrl:"",fileList3:[],fileList4:[],worker_score:5,is_score_latitude:!1,describeScore:5,deliveryScore:5,serviceScore:5}},methods:{getStar:function(e){this.ratetext=this.ratetextshow[e-1]},getOtherScore:function(){var e=this;$http.get("goods.comment.create-comment-page").then((function(t){1==t.result&&(e.is_score_latitude=t.data.is_score_latitude)}))},getGoodDetail:function(){var e=this;$http.get("goods.other-info.get-goods",{id:this.$route.params.id},".").then((function(t){1===t.result?e.good=t.data:e.$toast(t.msg)})).catch((function(e){}))},toComment:function(e){var t=this;0==this.comment.length?this.$dialog.confirm({message:"您还没有输入相关的评论内容"}).then((function(){t.submitData(e)})).catch((function(){})):this.submitData(e)},onphotosize:function(e){if(e&&e.length)for(var t=0;t<e.length;t++)e[t].file.size>this.photosize?this.imgPreview(e[t].file,2):this.onRead_2(e[t].file,!0);else this.imgPreview(e.file,2)},imgPreview:function(e,t){var o=this;if(e&&window.FileReader&&/^image/.test(e.type)){var i=new FileReader;i.readAsDataURL(e),i.onloadend=function(){var i=this.result,a=new Image;a.src=i,a.onload=function(){var i=this.width,s=this.height,r=400,n=400,l=i,h=s;(i>r||s>n)&&(i/s>r/n?(l=r,h=Math.round(r*(s/i))):(h=n,l=Math.round(n*(i/s)))),d.width=l,d.height=h,c.clearRect(0,0,l,h),c.drawImage(a,0,0,l,h),d.toBlob((function(e){1===t?o.onRead(e,!0):o.multipleMethod_1(e,!0)}),e.type||"image/png")}}}},multipleMethod_1:function(e,t){if(e&&e.length)for(var o=0;o<e.length;o++)this.onRead_2(e[o],t);else this.onRead_2(e,t)},onRead_2:function(e,t){var o=this,i=new FormData;if(5==this.upNumMaxOther||this.upNumMaxOther>=5)return this.$notify({background:"#fef0f0",message:"图片数量已达到上限",color:"#f56c6c"}),!1;!0===t?i.append("file",e):i.append("file",e.file),i.append("attach","upload"),s["a"].loading({message:" ",forbidClick:!0}),axios.post(this.uploadUrl,i,{headers:{"Content-Type":"multipart/form-data"}}).then((function(i){var a=i.data;1==a.result?(o.upNumMax++,o.fileList3.push(a.data.img),!0===t?o.fileList4.push(URL.createObjectURL(e)):o.fileList4.push(URL.createObjectURL(e.file)),s["a"].clear()):(Object(s["a"])(a.msg),s["a"].clear())})).catch((function(e){s["a"].clear()}))},removeImg_1:function(e){this.fileList3.splice(e,1),this.fileList4.splice(e,1),this.upNumMaxOther=this.fileList3.length},submitData:function(e){var t=this,o=[];if(0!=this.fileList3.length)for(var i=0;i<this.fileList3.length;i++)o.push(this.fileList3[i]);else o=[];o=JSON.stringify(o);var a={order_id:this.order_id,goods_id:e.goods_id,order_goods_id:this.good.id,content:this.comment,level:this.level,images:o};this.good.is_install&&(a.worker_score=this.worker_score),this.is_score_latitude&&(a.score_latitude={score_latitude_describe:this.describeScore,score_latitude_delivery:this.deliveryScore,score_latitude_service:this.serviceScore}),this.$route.query.ysi&&(a.ysi=this.$route.query.ysi),$http.post("goods.comment.create-comment",a).then((function(e){1==e.result?(t.$route.query.ysi&&t.saveYsiLog(),t.$dialog.alert({message:e.msg}).then((function(){t.$router.go(-1)}))):t.$dialog.alert({message:e.msg})}),(function(e){}))},saveYsiLog:function(){var e=this;$http.get("plugin.ys-system.frontend.help-edit.save-log",{h_id:this.$route.query.ysi},".").then((function(t){0==t.result&&e.$toast(t.msg)})).catch((function(e){}))},getYSEdit:function(){var e=this;$http.get("plugin.ys-system.frontend.help-edit.get-goods-comment",{h_id:this.$route.query.ysi},".").then((function(t){1===t.result?(e.comment=t.data.content||"",e.fileList4=t.data.images||[],e.fileList3=t.data.images.slice(0)||[],e.level=t.data.level||5,t.data.score_latitude&&(e.describeScore=t.data.score_latitude.score_latitude_describe,e.deliveryScore=t.data.score_latitude.score_latitude_delivery,e.serviceScore=t.data.score_latitude.score_latitude_service)):e.$toast(t.msg)})).catch((function(e){}))}},activated:function(){this.comment="",this.toi=this.fun.getKeyByI(),this.order_id=Number(this.$route.params.order_id),this.uploadUrl=this.fun.getRealUrl("upload.uploadPic",{}),this.getGoodDetail(),this.getOtherScore(),this.$route.query.ysi&&this.getYSEdit()},components:{cTitle:r["a"]}},l=n,h=l,m=(o("38d4"),o("3b59"),o("2877")),g=Object(m["a"])(h,i,a,!1,null,"3a7de71c",null);t["default"]=g.exports},"38d4":function(e,t,o){"use strict";o("7232")},"3b59":function(e,t,o){"use strict";o("60ed")},"60ed":function(e,t,o){var i=o("a166");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=o("499e").default;a("3b6d9c48",i,!0,{sourceMap:!1,shadowMode:!1})},7232:function(e,t,o){var i=o("8a3f");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=o("499e").default;a("cb7074c2",i,!0,{sourceMap:!1,shadowMode:!1})},"8a3f":function(e,t,o){var i=o("24fb");t=i(!1),t.push([e.i,".comment[data-v-3a7de71c] .van-field{background-color:#f5f5f5;padding:.75rem;border-radius:.25rem}.print-img[data-v-3a7de71c] .van-uploader__wrapper{border-radius:.25rem}[data-v-3a7de71c] .van-field__control::-webkit-input-placeholder{color:#666}.pcStyle .shop-goods .evaluate-btn[data-v-3a7de71c]{left:auto}",""]),e.exports=t},a166:function(e,t,o){var i=o("24fb");t=i(!1),t.push([e.i,'.ell[data-v-3a7de71c]{text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.mh-90[data-v-3a7de71c]{height:5.625rem;clear:both}.goods-hide[data-v-3a7de71c]{visibility:hidden}.shop-goods[data-v-3a7de71c]{margin:.5rem .75rem 0 .75rem}.shop-goods .goods[data-v-3a7de71c]{border-radius:.5rem;background-color:#fff;padding:.75rem}.shop-goods .goods .img[data-v-3a7de71c]{background:transparent;margin:0 .25rem 0 0}.shop-goods .goods .img img[data-v-3a7de71c]{width:4.375rem;height:4.375rem;margin:0;border-radius:.25rem}.shop-goods .goods .wrap[data-v-3a7de71c]{-webkit-box-flex:2;-webkit-flex:2;-ms-flex:2;flex:2;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.shop-goods .goods .wrap .goods-title[data-v-3a7de71c]{width:100%}.shop-goods .goods .wrap .goods-title div[data-v-3a7de71c]{font-size:.8125rem;color:#333;line-height:1.1875rem;text-align:left}.shop-goods .goods .wrap .goods-title[data-v-3a7de71c] :last-child{font-weight:700;min-width:38%;text-align:right}.shop-goods .goods .wrap .goods-size[data-v-3a7de71c]{width:100%;padding:.5rem 0 0 0;font-size:.75rem;color:#999;line-height:1.0625rem}.shop-goods .comment[data-v-3a7de71c]{margin:.5rem 0 0 0;background-color:#fff;border-radius:.5rem;padding:.75rem}.shop-goods .comment h3[data-v-3a7de71c]{font-size:.875rem;line-height:1.25rem;color:#333;padding:0 0 .75rem 0;font-weight:400;text-align:left}.shop-goods .comment .print h3[data-v-3a7de71c]{padding:1.25rem 0 .75rem 0}.shop-goods .comment .print .photobox[data-v-3a7de71c],.shop-goods .comment .print .print-img[data-v-3a7de71c]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.shop-goods .comment .print .photobox[data-v-3a7de71c]{width:5.625rem;margin:0 1rem 1rem 0;position:relative}.shop-goods .comment .print .photobox img[data-v-3a7de71c]{margin:0;border-radius:.25rem;height:5.625rem}.shop-goods .comment .print .photobox .icon-a-zu648[data-v-3a7de71c]{color:#a0a1a7;position:absolute;top:-.025rem;right:-.875rem;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:5;width:.9375rem;height:.9375rem;background-color:#fff;border-radius:50%}.shop-goods .comment .print .img-upload[data-v-3a7de71c]{position:relative;margin:0 0 1rem 0}.shop-goods .comment .print .img-upload .upload[data-v-3a7de71c]{width:5.625rem;height:5.625rem;border-radius:.25rem;background-color:#f5f5f5;position:relative}.shop-goods .comment .print .img-upload .upload .crucifix[data-v-3a7de71c]{width:1.375rem;height:.125rem;background:#b2b2b2;border-radius:.625rem;position:relative}.shop-goods .comment .print .img-upload .upload .crucifix[data-v-3a7de71c]:after{content:"";width:1.375rem;height:.125rem;background:#b2b2b2;border-radius:.625rem;position:absolute;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);left:0}.shop-goods .comment .print .print-rate[data-v-3a7de71c]{padding:.25rem 0 0 0}.shop-goods .comment .print .print-rate h4[data-v-3a7de71c]{font-size:.875rem;line-height:1.25rem;color:#333;font-weight:400}.shop-goods .score-box[data-v-3a7de71c]{margin:.5rem 0 0 0;background-color:#fff;border-radius:.5rem;padding:.75rem}.shop-goods .score-box .score-item[data-v-3a7de71c]{padding:0 0 .75rem 0}.shop-goods .score-box .score-item[data-v-3a7de71c]:last-child{padding:0}.shop-goods .score-box .score-item h3[data-v-3a7de71c]{font-size:.875rem;font-weight:400;line-height:1.25rem;color:#333}.shop-goods .evaluate-btn[data-v-3a7de71c]{width:21.875rem;background-color:var(--themeBaseColor);border-radius:.25rem;margin:0 .75rem;padding:.625rem 0;position:fixed;bottom:.875rem;left:0;z-index:9;font-size:.875rem;font-weight:700;line-height:1.25rem;color:#fff}',""]),e.exports=t}}]);