1 |
- require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/goods_comment_con/index"],{"02fc":function(t,i,n){"use strict";(function(t,i){var e=n("4ea4");n("4789");e(n("66fd"));var o=e(n("aaf8"));t.__webpack_require_UNI_MP_PLUGIN__=n,i(o.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"4c7a":function(t,i,n){"use strict";(function(t){var e=n("4ea4");Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var o=n("39ed"),u=n("86eb"),c=n("26cb"),a=e(n("19b6")),s={components:{authorize:function(){n.e("components/Authorize").then(function(){return resolve(n("ad23"))}.bind(null,n)).catch(n.oe)}},mixins:[a.default],data:function(){return{pics:[],scoreList:[{name:this.$t("商品质量"),stars:["","","","",""],index:-1},{name:this.$t("服务态度"),stars:["","","","",""],index:-1}],orderId:"",unique:"",productInfo:{},cart_num:0,isAuto:!1,isShowAuth:!1,canvasWidth:"",canvasHeight:"",canvasStatus:!1}},computed:(0,c.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,i){t&&this.getOrderProduct()},deep:!0}},onLoad:function(t){if(!t.unique||!t.uni)return this.$util.Tips({title:this.$t("缺少参数")},{tab:3,url:1});this.unique=t.unique,this.orderId=t.uni,this.isLogin?this.getOrderProduct():(0,u.toLogin)()},methods:{onLoadFun:function(){this.getOrderProduct()},authColse:function(t){this.isShowAuth=t},getOrderProduct:function(){var t=this;(0,o.orderProduct)(t.unique).then((function(i){t.$set(t,"productInfo",i.data.productInfo),t.cart_num=i.data.cart_num}))},stars:function(t,i){this.scoreList[i].index=t},DelPic:function(t){this.pics[t];this.pics.splice(t,1),this.$set(this,"pics",this.pics)},uploadpic:function(){var t=this,i=this;this.canvasStatus=!0,i.$util.uploadImageChange("upload/image",(function(t){i.pics.push(t.data.url)}),(function(i){t.canvasStatus=!1}),(function(i){t.canvasWidth=i.w,t.canvasHeight=i.h}))},formSubmit:function(i){i.detail.formId;var n=i.detail.value,e=this,u=e.scoreList[0].index+1===0?"":e.scoreList[0].index+1,c=e.scoreList[1].index+1===0?"":e.scoreList[1].index+1;if(!n.comment)return e.$util.Tips({title:e.$t("请填写你对宝贝的心得")});n.product_score=u,n.service_score=c,n.pics=e.pics,n.unique=e.unique,t.showLoading({title:e.$t("正在发布评论")}),(0,o.orderComment)(n).then((function(i){if(t.hideLoading(),i.data.to_lottery){var n="/pages/goods/goods_comment_con/lottery_comment?type=4&order_id="+e.orderId+"&date="+Date.parse(new Date);e.$util.Tips({title:e.$t("感谢您的评价"),icon:"success"},n)}else e.$util.Tips({title:e.$t("感谢您的评价"),icon:"success"}),setTimeout((function(i){t.navigateBack()}),1500)})).catch((function(i){return t.hideLoading(),e.$util.Tips({title:i})}))}}};i.default=s}).call(this,n("543d")["default"])},9994:function(t,i,n){"use strict";n.r(i);var e=n("4c7a"),o=n.n(e);for(var u in e)["default"].indexOf(u)<0&&function(t){n.d(i,t,(function(){return e[t]}))}(u);i["default"]=o.a},a616:function(t,i,n){"use strict";var e=n("f547"),o=n.n(e);o.a},aaf8:function(t,i,n){"use strict";n.r(i);var e=n("e9f9"),o=n("9994");for(var u in o)["default"].indexOf(u)<0&&function(t){n.d(i,t,(function(){return o[t]}))}(u);n("a616");var c=n("f0c5"),a=Object(c["a"])(o["default"],e["b"],e["c"],!1,null,"63811459",null,!1,e["a"],void 0);i["default"]=a.exports},e9f9:function(t,i,n){"use strict";n.d(i,"b",(function(){return e})),n.d(i,"c",(function(){return o})),n.d(i,"a",(function(){}));var e=function(){var t=this,i=t.$createElement,n=(t._self._c,t.$t("¥")),e=t.__map(t.scoreList,(function(i,n){var e=t.__get_orig(i),o=-1!==i.index?t.$t("星"):null;return{$orig:e,m1:o}})),o=t.$t("商品满足你的期待么?说说你的想法,分享给想买的他们吧"),u=t.pics.length,c=u<8?t.$t("上传图片"):null,a=t.$t("立即评价");t.$mp.data=Object.assign({},{$root:{m0:n,l0:e,m2:o,g0:u,m3:c,m4:a}})},o=[]},f547:function(t,i,n){}},[["02fc","common/runtime","common/vendor"]]]);
|