1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[44,15,18],{434:function(e,t,o){"use strict";var r=o(15),n=o(2),c=o(3),l=o(137),d=o(27),v=o(17),m=o(273),f=o(53),h=o(136),_=o(272),x=o(4),y=o(93).f,w=o(45).f,C=o(23).f,S=o(435),I=o(436).trim,N="Number",R=n.Number,E=R.prototype,$=n.TypeError,F=c("".slice),T=c("".charCodeAt),j=function(e){var t=_(e,"number");return"bigint"==typeof t?t:k(t)},k=function(e){var t,o,r,n,c,l,d,code,v=_(e,"number");if(h(v))throw $("Cannot convert a Symbol value to a number");if("string"==typeof v&&v.length>2)if(v=I(v),43===(t=T(v,0))||45===t){if(88===(o=T(v,2))||120===o)return NaN}else if(48===t){switch(T(v,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=F(v,2)).length,d=0;d<l;d++)if((code=T(c,d))<48||code>n)return NaN;return parseInt(c,r)}return+v};if(l(N,!R(" 0o1")||!R("0b1")||R("+0x1"))){for(var M,z=function(e){var t=arguments.length<1?0:R(j(e)),o=this;return f(E,o)&&x((function(){S(o)}))?m(Object(t),o,z):t},A=r?y(R):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),O=0;A.length>O;O++)v(R,M=A[O])&&!v(z,M)&&C(z,M,w(R,M));z.prototype=E,E.constructor=z,d(n,N,z)}},435:function(e,t,o){var r=o(3);e.exports=r(1..valueOf)},436:function(e,t,o){var r=o(3),n=o(31),c=o(16),l=o(437),d=r("".replace),v="["+l+"]",m=RegExp("^"+v+v+"*"),f=RegExp(v+v+"*$"),h=function(e){return function(t){var o=c(n(t));return 1&e&&(o=d(o,m,"")),2&e&&(o=d(o,f,"")),o}};e.exports={start:h(1),end:h(2),trim:h(3)}},437:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},438:function(e,t,o){var content=o(441);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(19).default)("03051d40",content,!0,{sourceMap:!1})},439:function(e,t,o){"use strict";o.r(t);o(434),o(39),o(274);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(440),o(11)),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},440:function(e,t,o){"use strict";o(438)},441:function(e,t,o){var r=o(18)(!1);r.push([e.i,".price-format{display:flex;align-items:baseline}",""]),e.exports=r},447:function(e,t,o){var content=o(455);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(19).default)("61949a37",content,!0,{sourceMap:!1})},454:function(e,t,o){"use strict";o(447)},455:function(e,t,o){var r=o(18)(!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},456:function(e,t,o){"use strict";o.r(t);o(434),o(40);var r=o(189),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");var o="jpg"===t,r="png"===t;return o||r?o||r||"jpeg"===t:(this.$message({message:"上传文件只能是 jpg, jpeg, png格式!",type:"warning"}),!1)}}},c=(o(454),o(11)),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+"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},536:function(e,t,o){var content=o(609);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(19).default)("260d1a1b",content,!0,{sourceMap:!1})},608:function(e,t,o){"use strict";o(536)},609:function(e,t,o){var r=o(18)(!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},655:function(e,t,o){"use strict";o.r(t);var r=o(6),n=(o(64),o(78),o(39),o(94),o(52),{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(456).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(608),o(11)),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(439).default})}}]); |