bztang-admin/addons/yun_shop/static/app/js/chunk-7fb0b19c.4e0c279d.js

1 line
7.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7fb0b19c"],{"3e37":function(t,e,a){"use strict";a("ea73")},"4f2d":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"addevaluate"}},[a("c-title",{attrs:{hide:!1,text:"追加评价"}}),a("div",{staticClass:"additional"},[a("h3",{staticClass:"add-title"},[t._v("追加评论:")]),a("van-cell-group",[a("van-field",{attrs:{type:"textarea",placeholder:"补充评论内容长度在5-100字之间~",rows:"4"},model:{value:t.reComment,callback:function(e){t.reComment=e},expression:"reComment"}})],1),a("div",{staticClass:"print"},[a("h3",[t._v("晒图:")]),a("div",{staticClass:"print-img flex"},[t._l(t.fileList4,(function(e,i){return a("block",{key:i},[a("div",{key:i,staticClass:"photobox flex",staticStyle:{"max-width":"5.625rem"}},[a("img",{staticStyle:{"max-width":"5.625rem"},attrs:{src:e.url}}),a("span",{staticClass:"iconfont icon-a-zu648",on:{click:function(e){return t.removeImg_1(i)}}})])])})),a("div",{staticClass:"img-upload flex"},[a("van-uploader",{attrs:{disabled:t.fileList4.length>=5,"after-read":t.multipleMethod_1,multiple:""}},[a("div",{staticClass:"upload flex-a-c flex-j-c"},[a("div",{staticClass:"crucifix"})])])],1)],2)])],1),a("div",{staticClass:"mh-90"}),a("div",{staticClass:"evaluate-btn",on:{click:t.toReComment}},[t._v("提交评价")])],1)},o=[],r=(a("e7e5"),a("d399")),d=(a("d81d"),a("e9c4"),a("a434"),a("14d9"),a("d3b7"),a("3ca3"),a("ddb0"),a("2b3d"),a("9861"),a("88a7"),a("271a"),a("5494"),a("a9e3"),a("6968")),n={data:function(){return{toi:this.fun.getKeyByI(),value:3,comment:"",reComment:"",good:"",comment_id:"",item:"",photosize:2097152,upNumMaxOther:"",uploadUrl:"",fileList3:[],fileList4:[]}},methods:{toReComment:function(){var t=this;0==this.reComment.length?t.$dialog.confirm({message:"您还没有输入相关的评论内容"}).then((function(){t.submitData()})).catch((function(){})):t.submitData()},submitData:function(){var t=this,e=[];0!=t.fileList3.length&&(e=t.fileList3.map((function(t){return t.url}))),$http.post("goods.comment.append-comment",{id:this.item.id,order_goods_id:this.order_goods_id,content:this.reComment,images:JSON.stringify(e),i:this.fun.getKeyByI(),type:this.fun.getTyep()}).then((function(e){1==e.result?t.$dialog.alert({message:e.msg}).then((function(){t.$router.go(-1)})):t.$dialog.alert({message:e.msg})}),(function(t){}))},removeImg_1:function(t){this.fileList3.splice(t,1),this.fileList4.splice(t,1),this.upNumMaxOther=this.fileList3.length},multipleMethod_1:function(t,e){if(t&&t.length)for(var a=0;a<t.length;a++)this.onRead_2(t[a],e);else this.onRead_2(t,e)},onRead_2:function(t,e){var a=this,i=new FormData;if(5==this.upNumMaxOther||this.upNumMaxOther>=5)return this.$notify({background:"#fef0f0",message:"图片数量已达到上限",color:"#f56c6c"}),!1;!0===e?i.append("file",t):i.append("file",t.file),i.append("attach","upload"),r["a"].loading({message:" ",forbidClick:!0}),axios.post(this.uploadUrl,i,{headers:{"Content-Type":"multipart/form-data"}}).then((function(i){var o=i.data;1==o.result?(a.upNumMax++,a.fileList3.push({url:o.data.img}),!0===e?a.fileList4.push({url:URL.createObjectURL(t)}):a.fileList4.push({url:URL.createObjectURL(t.file)}),r["a"].clear()):(Object(r["a"])(o.msg),r["a"].clear())})).catch((function(t){r["a"].clear()}))},getNetData:function(){var t=this;$http.post("goods.comment.append-comment-page",{goods_id:this.goods_id,order_id:this.order_id,order_goods_id:this.order_goods_id}).then((function(e){if(1!==e.result)return t.$toast(e.msg);t.item=e.data.comment,t.value=t.item.level,t.comment=t.item.content}))}},activated:function(){this.toi=this.fun.getKeyByI(),this.uploadUrl=this.fun.getRealUrl("upload.uploadPic",{}),this.goods_id=Number(this.$route.params.goods_id),this.order_id=Number(this.$route.params.order_id),this.order_goods_id=Number(this.$route.params.id),this.getNetData()},components:{cTitle:d["a"]}},l=n,s=l,u=(a("3e37"),a("8c13"),a("2877")),c=Object(u["a"])(s,i,o,!1,null,"929bcb98",null);e["default"]=c.exports},"8c13":function(t,e,a){"use strict";a("df60")},a7f3:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'#addevaluate .additional[data-v-929bcb98]{padding:.75rem .75rem 0 .75rem;background-color:#fff;border-radius:.5rem;margin:.5rem .75rem .75rem .75rem}#addevaluate .additional .add-title[data-v-929bcb98]{padding:0 0 .75rem 0}#addevaluate .additional .add-title[data-v-929bcb98],#addevaluate .additional .print h3[data-v-929bcb98]{font-size:.875rem;font-weight:400;line-height:1.25rem;color:#333;text-align:left}#addevaluate .additional .print h3[data-v-929bcb98]{padding:1.25rem 0 .75rem 0}#addevaluate .additional .print .photobox[data-v-929bcb98],#addevaluate .additional .print .print-img[data-v-929bcb98]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}#addevaluate .additional .print .photobox[data-v-929bcb98]{margin:0 1rem .75rem 0;position:relative}#addevaluate .additional .print .photobox img[data-v-929bcb98]{margin:0;border-radius:.25rem;height:5.625rem}#addevaluate .additional .print .photobox .icon-a-zu648[data-v-929bcb98]{color:#a0a1a7;position:absolute;top:-.025rem;right:-.875rem;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:5;width:.875rem;height:.875rem;background-color:#fff;border-radius:50%}#addevaluate .additional .print .img-upload[data-v-929bcb98]{position:relative;margin:0 0 .75rem 0}#addevaluate .additional .print .img-upload .upload[data-v-929bcb98]{width:5.625rem;height:5.625rem;border-radius:.25rem;background-color:#f5f5f5;position:relative}#addevaluate .additional .print .img-upload .upload .crucifix[data-v-929bcb98]{width:1.375rem;height:.125rem;background:#b2b2b2;border-radius:.625rem;position:relative}#addevaluate .additional .print .img-upload .upload .crucifix[data-v-929bcb98]:after{content:"";width:1.375rem;height:.125rem;background:#b2b2b2;border-radius:.625rem;position:absolute;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);left:0}#addevaluate .evaluate-btn[data-v-929bcb98]{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}',""]),t.exports=e},df60:function(t,e,a){var i=a("a7f3");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("6f7b6ba3",i,!0,{sourceMap:!1,shadowMode:!1})},e90b:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".additional[data-v-929bcb98] .van-field{background-color:#f5f5f5;padding:.75rem;border-radius:.25rem}.print-img[data-v-929bcb98] .van-uploader__wrapper{border-radius:.25rem}[data-v-929bcb98] .van-field__control::-webkit-input-placeholder{color:#666}.pcStyle #addevaluate .evaluate-btn[data-v-929bcb98]{left:auto}",""]),t.exports=e},ea73:function(t,e,a){var i=a("e90b");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("20383994",i,!0,{sourceMap:!1,shadowMode:!1})}}]);