12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7884052e"],{"43eb":function(t,e,r){"use strict";var n=r("bf18"),o=r.n(n);o.a},"57f0":function(t,e,r){"use strict";function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}r.d(e,"a",(function(){return o}))},"61f7":function(t,e,r){"use strict";r.d(e,"e",(function(){return c})),r.d(e,"a",(function(){return h})),r.d(e,"d",(function(){return p})),r.d(e,"b",(function(){return y}));r("5ab2"),r("6d57"),r("e10e");var n=r("289c");r("f548");function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var a=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i({required:!0,message:t,type:"string"},e)}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i({type:"url",message:t},e)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i({type:"email",message:t},e)}function l(t){return b.pattern(/^[\w]+$/,t)}function f(t){return b.pattern(/^[\w\d_-]+$/,t)}function h(t){return b.pattern(/^[\w\d]+$/,t)}function p(t){return b.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}function d(t){return b.pattern(/^[\u4e00-\u9fa5]+$/,t)}function v(t){return b.pattern(/^[\u4e00-\u9fa5\w]+$/,t)}function m(t){return b.pattern(/^[\u4e00-\u9fa5\w\d]+$/,t)}function g(t){return b.pattern(/^[\u4e00-\u9fa5\w\d-_]+$/,t)}function y(t){return b.pattern(/^1(3|4|5|7|8|9|6)\d{9}$/i,t)}a(c,"请输入%s"),a(s,"请输入正确的链接"),a(u,"请输入正确的邮箱地址"),a(l,"%s必须是字母"),a(f,"%s只能包含由字母、数字,以及 - 和 _"),a(h,"%s只能包含字母、数字"),a(p,"%s格式不正确"),a(d,"%s只能是汉字"),a(v,"%s只能包含汉字、字母"),a(m,"%s只能包含汉字、字母和数字"),a(g,"%s只能包含由汉字、字母、数字,以及 - 和 _"),a(y,"请输入正确的手机号码");var w={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},b=Object.keys(w).reduce((function(t,e){return t[e]=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a="range"===e?{min:t[0],max:t[1]}:Object(n["a"])({},e,t);return i({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},a,{},o)},a(t[e],w[e]),t}),{});e["c"]=b},"63ff":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=L(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}t.wrap=s;var l="suspendedStart",f="suspendedYield",h="executing",p="completed",d={};function v(){}function m(){}function g(){}var y={};y[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(k([])));b&&b!==r&&n.call(b,i)&&(y=b);var x=g.prototype=v.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function O(t){function e(r,o,i,a){var c=u(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"===typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}var r;function o(t,n){function o(){return new Promise((function(r,o){e(t,n,r,o)}))}return r=r?r.then(o,o):o()}this._invoke=o}function L(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return $()}r.method=o,r.arg=i;while(1){var a=r.delegate;if(a){var c=j(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var s=u(t,e,r);if("normal"===s.type){if(n=r.done?p:f,s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}function j(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=u(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function k(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){while(++o<t.length)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:$}}function $(){return{value:e,done:!0}}return m.prototype=x.constructor=g,g.constructor=m,g[c]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(O.prototype),O.prototype[a]=function(){return this},t.AsyncIterator=O,t.async=function(e,r,n,o){var i=new O(s(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(x),x[c]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},bf18:function(t,e,r){},f3d2:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"evaluate-con"},[t.orderCon.productInfo?r("div",{staticClass:"goodsStyle acea-row row-between"},[r("div",{staticClass:"pictrue"},[r("img",{staticClass:"image",attrs:{src:t.orderCon.productInfo.image}})]),r("div",{staticClass:"text acea-row row-between"},[r("div",{staticClass:"name line2"},[t._v("\n "+t._s(t.orderCon.productInfo.store_name)+"\n ")]),r("div",{staticClass:"money"},[r("div",[t._v("¥"+t._s(t.orderCon.productInfo.price))]),r("div",{staticClass:"num"},[t._v("x"+t._s(t.orderCon.cart_num))])])])]):t._e(),r("div",{staticClass:"score"},[t._l(t.scoreList,(function(e,n){return r("div",{key:n,staticClass:"item acea-row row-middle"},[r("div",[t._v(t._s(e.name))]),r("div",{staticClass:"starsList"},t._l(e.stars,(function(o,i){return r("span",{key:i,staticClass:"iconfont",class:e.index>=i?"icon-shitixing font-color-red":"icon-kongxinxing",on:{click:function(e){return t.stars(i,n)}}})})),0),r("span",{staticClass:"evaluate"},[t._v(t._s(-1===e.index?"":e.index+1+"分"))])])})),r("div",{staticClass:"textarea"},[r("textarea",{directives:[{name:"model",rawName:"v-model",value:t.expect,expression:"expect"}],attrs:{placeholder:"商品满足你的期待么?说说你的想法,分享给想买的他们吧~"},domProps:{value:t.expect},on:{input:function(e){e.target.composing||(t.expect=e.target.value)}}}),r("div",{staticClass:"list acea-row row-middle"},[t._l(t.uploadPictures,(function(e,n){return r("div",{key:n,staticClass:"pictrue"},[r("img",{attrs:{src:e}}),r("span",{staticClass:"iconfont icon-guanbi1 font-color-red",on:{click:function(e){return t.uploadPictures.splice(n,1)}}})])})),t.uploadPictures.length<8?r("VueCoreImageUpload",{staticClass:"btn btn-primary",attrs:{crop:!1,compress:"80",headers:t.headers,"max-file-size":5242880,credentials:!1,inputAccept:"image/*",inputOfFile:"file",url:t.url},on:{imageuploaded:t.imageuploaded}},[r("div",{staticClass:"pictrue uploadBnt acea-row row-center-wrapper row-column"},[r("span",{staticClass:"iconfont icon-icon25201"}),r("div",[t._v("上传图片")])])]):t._e()],2)]),r("div",{staticClass:"evaluateBnt bg-color-red",on:{click:t.submit}},[t._v("立即评价")])],2)])},o=[],i=(r("f548"),r("63ff"),r("57f0")),a=(r("cc57"),r("73f5")),c=r("ed08"),s=r("61f7"),u=r("e7f6"),l=r("cba2"),f="GoodsEvaluate",h={name:f,components:{VueCoreImageUpload:u["a"]},props:{},data:function(){return{orderCon:{cartProduct:{productInfo:{}}},scoreList:[{name:"商品质量",stars:["","","","",""],index:-1},{name:"服务态度",stars:["","","","",""],index:-1}],url:"".concat(c["a"],"/upload/image"),headers:{"Authori-zation":"Bearer "+this.$store.state.app.token},uploadPictures:[],expect:"",unique:this.$route.params.id}},mounted:function(){this.getOrderProduct()},watch:{$route:function(t){t.name===f&&this.unique!==t.params.id&&(this.unique=t.params.id,this.$set(this.scoreList[0],"index",-1),this.$set(this.scoreList[1],"index",-1),this.expect="",this.uploadPictures=[],this.getOrderProduct())}},methods:{getOrderProduct:function(){var t=this,e=t.unique;Object(a["p"])(e).then((function(e){t.orderCon=e.data}))},stars:function(t,e){this.scoreList[e].index=t},imageuploaded:function(t){if(200!==t.status)return this.$dialog.error(t.msg||"上传图片失败");this.uploadPictures.push(t.data.url)},submit:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e,r,n,o=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=Object(c["f"])(this.expect),r=this.scoreList[0].index+1===0?"":this.scoreList[0].index+1,n=this.scoreList[1].index+1===0?"":this.scoreList[1].index+1,t.prev=1,t.next=4,this.$validator({product_score:[Object(s["e"])("请选择商品质量分数",{type:"number"})],service_score:[Object(s["e"])("请选择服务态度分数",{type:"number"})]}).validate({product_score:r,service_score:n});case 4:t.next=9;break;case 6:return t.prev=6,t.t0=t["catch"](1),t.abrupt("return",Object(l["b"])(t.t0));case 9:Object(a["o"])({product_score:r,service_score:n,unique:this.unique,pics:this.uploadPictures.join(","),comment:e}).then((function(){o.$dialog.success("评价成功"),o.$router.replace({path:"/order/detail/"+o.orderCon.order_id})})).catch((function(t){o.$dialog.error(t.msg)}));case 10:case"end":return t.stop()}}),t,this,[[1,6]])})));function e(){return t.apply(this,arguments)}return e}()}},p=h,d=(r("43eb"),r("623f")),v=Object(d["a"])(p,n,o,!1,null,"6d987580",null);e["default"]=v.exports}}]);
- //# sourceMappingURL=chunk-7884052e.8e6255d2.js.map
|