1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[46,15,18],{415:function(e,t,o){"use strict";var r=o(13),n=o(2),c=o(121),l=o(24),d=o(14),v=o(53),m=o(258),f=o(84),h=o(257),_=o(5),x=o(70),w=o(85).f,y=o(45).f,C=o(23).f,S=o(416).trim,I="Number",N=n.Number,R=N.prototype,E=v(x(R))==I,$=function(e){if(f(e))throw TypeError("Cannot convert a Symbol value to a number");var t,o,r,n,c,l,d,code,v=h(e,"number");if("string"==typeof v&&v.length>2)if(43===(t=(v=S(v)).charCodeAt(0))||45===t){if(88===(o=v.charCodeAt(2))||120===o)return NaN}else if(48===t){switch(v.charCodeAt(1)){case 66:case 98:r=2,n=49;break;case 79:case 111:r=8,n=55;break;default:return+v}for(l=(c=v.slice(2)).length,d=0;d<l;d++)if((code=c.charCodeAt(d))<48||code>n)return NaN;return parseInt(c,r)}return+v};if(c(I,!N(" 0o1")||!N("0b1")||N("+0x1"))){for(var F,A=function(e){var t=arguments.length<1?0:e,o=this;return o instanceof A&&(E?_((function(){R.valueOf.call(o)})):v(o)!=I)?m(new N($(t)),o,A):$(t)},T=r?w(N):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),k=0;T.length>k;k++)d(N,F=T[k])&&!d(A,F)&&C(A,F,y(N,F));A.prototype=R,R.constructor=A,l(n,I,A)}},416:function(e,t,o){var r=o(28),n=o(11),c="["+o(417)+"]",l=RegExp("^"+c+c+"*"),d=RegExp(c+c+"*$"),v=function(e){return function(t){var o=n(r(t));return 1&e&&(o=o.replace(l,"")),2&e&&(o=o.replace(d,"")),o}};e.exports={start:v(1),end:v(2),trim:v(3)}},417:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},418:function(e,t,o){var content=o(421);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(16).default)("03051d40",content,!0,{sourceMap:!1})},419:function(e,t,o){"use strict";o.r(t);o(415),o(69),o(259);var r={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:500},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(e){this.priceFormat()}},methods:{priceFormat:function(){var e=this.price,t={};null!==e&&(e=parseFloat(e),e=String(e).split("."),t.first=e[0],t.second=e[1],this.priceSlice=t)}}},n=(o(420),o(7)),component=Object(n.a)(r,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("span",{class:(e.lineThrough?"line-through":"")+"price-format",style:{color:e.color,"font-weight":e.weight}},[e.showSubscript?o("span",{style:{"font-size":e.subscriptSize+"px","margin-right":"1px"}},[e._v("¥")]):e._e(),e._v(" "),o("span",{style:{"font-size":e.firstSize+"px","margin-right":"1px"}},[e._v(e._s(e.priceSlice.first))]),e._v(" "),e.priceSlice.second?o("span",{style:{"font-size":e.secondSize+"px"}},[e._v("."+e._s(e.priceSlice.second))]):e._e()])}),[],!1,null,null,null);t.default=component.exports},420:function(e,t,o){"use strict";o(418)},421:function(e,t,o){var r=o(15)(!1);r.push([e.i,".price-format{display:flex;align-items:baseline}",""]),e.exports=r},427:function(e,t,o){var content=o(435);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(16).default)("61949a37",content,!0,{sourceMap:!1})},434:function(e,t,o){"use strict";o(427)},435:function(e,t,o){var r=o(15)(!1);r.push([e.i,".v-upload .el-upload--picture-card{width:76px;height:76px;line-height:76px}.v-upload .el-upload-list--picture-card .el-upload-list__item{width:76px;height:76px}",""]),e.exports=r},436:function(e,t,o){"use strict";o.r(t);o(415),o(36);var r=o(175),n={components:{},props:{limit:{type:Number,default:1},isSlot:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},onChange:{type:Function,default:function(){}}},watch:{},data:function(){return{url:r.a.baseUrl}},created:function(){},computed:{},methods:{success:function(e,t,o){this.autoUpload&&(this.$message({message:"上传成功",type:"success"}),this.$emit("success",o))},error:function(e){this.$message({message:"上传失败,请重新上传",type:"error"})},beforeAvatarUpload:function(e){var t=e.name.substring(e.name.lastIndexOf(".")+1);console.log("fdsadsf",t);var o="jpg"===t,r="png"===t,n="jpeg"===t;return o||r||n?o||r||n:(this.$message({message:"上传文件只能是 jpg, jpeg, png格式!",type:"warning"}),!1)}}},c=(o(434),o(7)),component=Object(c.a)(n,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"v-upload"},[o("el-upload",{attrs:{"list-type":"picture-card",action:e.url+"/api/file/formimage",limit:e.limit,"on-success":e.success,"on-error":e.error,"on-change":e.onChange,"auto-upload":e.autoUpload,accept:"image/jpg,image/jpeg,image/png","before-upload":e.beforeAvatarUpload}},[e.isSlot?e._t("default"):o("div",[o("div",{staticClass:"muted xs"},[e._v("上传图片")])])],2)],1)}),[],!1,null,null,null);t.default=component.exports},522:function(e,t,o){var content=o(597);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(16).default)("260d1a1b",content,!0,{sourceMap:!1})},596:function(e,t,o){"use strict";o(522)},597:function(e,t,o){var r=o(15)(!1);r.push([e.i,".evaluate[data-v-dcd6490e]{padding:0 10px}.evaluate .goods .goods-con[data-v-dcd6490e],.evaluate .goods .goods-hd[data-v-dcd6490e]{padding:10px 20px;border-bottom:1px solid #e5e5e5}.evaluate .goods .goods-con .goods-item[data-v-dcd6490e],.evaluate .goods .goods-hd .goods-item[data-v-dcd6490e]{padding:10px 0}.evaluate .goods .info .goods-img[data-v-dcd6490e]{width:72px;height:72px;margin-right:10px}.evaluate .goods .num[data-v-dcd6490e],.evaluate .goods .price[data-v-dcd6490e],.evaluate .goods .total[data-v-dcd6490e]{width:150px}.evaluate .evaluate-con[data-v-dcd6490e]{padding:20px}.evaluate .evaluate-con .goods-rate .item[data-v-dcd6490e]{margin-bottom:18px}.evaluate .evaluate-con .name[data-v-dcd6490e]{margin-right:24px;flex:none}.evaluate .evaluate-con .evaluate-input[data-v-dcd6490e]{align-items:flex-start}.evaluate .evaluate-con .evaluate-input .el-textarea[data-v-dcd6490e]{width:630px}.evaluate .evaluate-con .evaluate-input .submit-btn[data-v-dcd6490e]{width:100px;height:32px;cursor:pointer}",""]),e.exports=r},642:function(e,t,o){"use strict";o.r(t);var r=o(6),n=(o(58),o(71),o(69),o(86),o(48),{head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},asyncData:function(e){return Object(r.a)(regeneratorRuntime.mark((function t(){var o,r,n,c,data;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.$get,r=e.query,n=r.id,t.next=4,o("goods_comment/getGoods",{params:{id:n}});case 4:return c=t.sent,data=c.data,t.abrupt("return",{goodsInfo:data,id:n});case 7:case"end":return t.stop()}}),t)})))()},layout:"user_lauout",components:{Upload:o(436).default},data:function(){return{goodsInfo:{},goodsRate:0,descRate:0,serverRate:0,deliveryRate:0,comment:"",fileList:[],goodsTexts:["差评","差评","中评","好评","好评"]}},methods:{onSuccess:function(e){this.fileList=e.map((function(e){return e.response.data}))},onSubmit:function(){var e=this,t=this.goodsRate,o=this.fileList,r=this.comment,n=this.deliveryRate,c=this.descRate,l=this.serverRate,image=o.map((function(e){return e.url}));return t?c?l?n?void this.$post("goods_comment/addGoodsComment",{id:parseInt(this.id),goods_comment:t,service_comment:l,express_comment:n,description_comment:c,comment:r,image:image}).then((function(t){1==t.code&&(e.$message({message:"评价成功",type:"success"}),setTimeout((function(){e.$router.replace({path:"/user/evaluation",query:{type:2}})}),1500))})):this.$message({message:"请对配送服务进行评分",type:"error"}):this.$message({message:"请对服务态度进行评分",type:"error"}):this.$message({message:"请对描述相符进行评分",type:"error"}):this.$message({message:"请对商品进行评分",type:"error"})}}}),c=(o(596),o(7)),component=Object(c.a)(n,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"evaluate"},[o("div",{staticClass:"goods"},[e._m(0),e._v(" "),o("div",{staticClass:"goods-con"},[o("div",{staticClass:"goods-item row"},[o("div",{staticClass:"info row flex1"},[o("img",{staticClass:"goods-img",attrs:{src:e.goodsInfo.image,alt:""}}),e._v(" "),o("div",{staticClass:"goods-info flex1"},[o("div",{staticClass:"goods-name line2"},[e._v("\n "+e._s(e.goodsInfo.name)+"\n ")]),e._v(" "),o("div",{staticClass:"sm lighter mt8"},[e._v(e._s(e.goodsInfo.spec_value_str))])])]),e._v(" "),o("div",{staticClass:"price row-center"},[o("price-formate",{attrs:{price:e.goodsInfo.goods_price,weight:"400"}})],1),e._v(" "),o("div",{staticClass:"num row-center"},[e._v(e._s(e.goodsInfo.goods_num))]),e._v(" "),o("div",{staticClass:"total row-center"},[o("price-formate",{attrs:{price:e.goodsInfo.total_price,weight:"400"}})],1)])])]),e._v(" "),o("div",{staticClass:"evaluate-con"},[o("div",{staticClass:"goods-rate"},[o("div",{staticClass:"row item"},[o("div",{staticClass:"name"},[e._v("商品评价")]),e._v(" "),o("el-rate",{attrs:{"show-text":"","text-color":"#FF9E2C",texts:e.goodsTexts},model:{value:e.goodsRate,callback:function(t){e.goodsRate=t},expression:"goodsRate"}})],1),e._v(" "),o("div",{staticClass:"row item"},[o("div",{staticClass:"name"},[e._v("描述相符")]),e._v(" "),o("el-rate",{model:{value:e.descRate,callback:function(t){e.descRate=t},expression:"descRate"}})],1),e._v(" "),o("div",{staticClass:"row item"},[o("div",{staticClass:"name"},[e._v("服务态度")]),e._v(" "),o("el-rate",{model:{value:e.serverRate,callback:function(t){e.serverRate=t},expression:"serverRate"}})],1),e._v(" "),o("div",{staticClass:"row item"},[o("div",{staticClass:"name"},[e._v("配送服务")]),e._v(" "),o("el-rate",{model:{value:e.deliveryRate,callback:function(t){e.deliveryRate=t},expression:"deliveryRate"}})],1)]),e._v(" "),o("div",{staticClass:"evaluate-input row"},[o("div",{staticClass:"name"},[e._v("商品评价")]),e._v(" "),o("div",[o("el-input",{attrs:{type:"textarea",placeholder:"收到商品您有什么想法或者反馈,用几个字来评价下商品吧~",maxlength:"150",rows:6,"show-word-limit":"",resize:"none"},model:{value:e.comment,callback:function(t){e.comment=t},expression:"comment"}}),e._v(" "),o("div",{staticClass:"upload mt16"},[o("upload",{attrs:{limit:9},on:{success:e.onSuccess}}),e._v(" "),o("div",{staticClass:"muted mt8"},[e._v("\n 最多可上传9张图片,支持jpg、png格式,图片大小1M以内\n ")])],1),e._v(" "),o("div",{staticClass:"submit-btn white bg-primary mt16 row-center",on:{click:e.onSubmit}},[e._v("\n 提交评价\n ")])],1)])])])}),[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"goods-hd lighter row"},[o("div",{staticClass:"info row flex1"},[e._v("商品信息")]),e._v(" "),o("div",{staticClass:"price row-center"},[e._v("单价")]),e._v(" "),o("div",{staticClass:"num row-center"},[e._v("数量")]),e._v(" "),o("div",{staticClass:"total row-center"},[e._v("合计")])])}],!1,null,"dcd6490e",null);t.default=component.exports;installComponents(component,{PriceFormate:o(419).default})}}]); |