You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
26 KiB
1 line
26 KiB
4 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0b7517d4"],{"02b1":function(t,e,a){"use strict";var i=a("1029");a.n(i).a},"0b65":function(t,e,a){"use strict";e.a={shortcuts:[{text:"今天",value:function(){var t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,a=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,a))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]}},1029:function(t,e,a){},1426:function(t,e,a){"use strict";a.r(e);var i=a("a34a"),r=a.n(i),n=a("2f62"),o=a("c4c8"),s=a("2021"),l={props:{visible:{type:Boolean,default:!1},goods:{type:Object,default:function(){return{}}},attr:{type:Object,default:function(){return{}}},avatar:{type:Object,default:function(){return{}}},picture:{type:Array,default:function(){return[]}}},data:function(){return{formData:{avatar:"",nickname:"",comment:""},product_score:0,service_score:0,pics:[],add_time:""}},watch:{picture:function(t){this.pics=t.map((function(t){return t.att_dir}))},visible:function(t){t||(this.formData.nickname="",this.formData.comment="",this.product_score=0,this.service_score=0,this.add_time="")}},methods:{removeUser:function(){this.avatar.att_dir=""},removePicture:function(t){this.$emit("removePicture",t)},onChange:function(t){this.add_time=t},callGoods:function(){this.$emit("callGoods")},callAttr:function(){this.$emit("callAttr")},callPicture:function(t){this.$emit("callPicture",t)},onOk:function(){var t=this;if(!this.goods.id)return this.$Message.error("请选择商品");if(!this.attr.unique)return this.$Message.error("请选择商品规格");if(!this.avatar.att_dir)return this.$Message.error("请选择用户头像");if(!this.formData.nickname)return this.$Message.error("请填写用户昵称");if(!this.formData.comment)return this.$Message.error("请填写评论内容");if(!this.product_score)return this.$Message.error("商品分数必须是1-5之间的整数");if(!this.service_score)return this.$Message.error("服务分数必须是1-5之间的整数");var e={image:{image:this.goods.image,product_id:this.goods.id},unique:this.attr.unique,avatar:this.avatar.att_dir,nickname:this.formData.nickname,comment:this.formData.comment,product_score:this.product_score,service_score:this.service_score,pics:this.pics,add_time:this.add_time};Object(o.tb)(e).then((function(e){t.$Message.success(e.msg),t.$emit("update:visible",!1)})).catch((function(e){t.$Message.error(e.msg)}))},onCancel:function(){this.$emit("update:visible",!1)}}},c=(a("b2b2"),a("2877")),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Modal",{attrs:{value:t.visible,"z-index":2,title:"添加自评",width:"700"},on:{"on-ok":t.onOk,"on-cancel":t.onCancel}},[a("Form",{attrs:{model:t.formData,"label-width":125}},[a("FormItem",{attrs:{label:"商品",required:""}},[a("div",{staticClass:"upload-box",on:{click:t.callGoods}},[t.goods.id?a("img",{staticClass:"image",attrs:{src:t.goods.image}}):a("Icon",{a
|