(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/evaluate"],{"182a":function(t,e,n){"use strict";n.r(e);var i=n("34ee"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"2ed6":function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("d1cd");i(n("66fd"));var o=i(n("a8a4b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"34ee":function(t,e,n){"use strict";(function(t){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("2eee")),a=i(n("448a")),u=i(n("c973")),c=n("5adf"),r=n("cd04"),s={components:{uniRate:function(){n.e("components/uni-rate/uni-rate").then(function(){return resolve(n("5651"))}.bind(null,n)).catch(n.oe)}},data:function(){return{id:"",title:"",main_pic:"",list:"",productInfo:"",text:"",placeholder:"商品满足你的期待么？说说你的想法，分享给想买的他们吧~",imgList:[],unique:"",cloudimgList:[],rateValue1:"",rateValue2:"",imgCount:9}},onLoad:function(t){t.unique&&(this.unique=t.unique,this.rateValue1="0",this.rateValue2="0",this.loadOrder()),t.id&&(this.id=t.id,this.loadData())},onShow:function(){},methods:{bindTextAreaBlur:function(t){this.text=t.detail.value},loadOrder:function(){var t=this;return(0,u.default)(o.default.mark((function e(){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:(0,c.product)({unique:t.unique}).then((function(e){t.list=e.data,t.productInfo=e.data.productInfo}));case 1:case"end":return e.stop()}}),e)})))()},loadData:function(){var t=this;(0,r.reply_save)({},this.id).then((function(e){var n=e.data;t.unique=n.unique,t.title=n.title,t.main_pic=n.main_pic;for(var i=0;i<n.pics.length;i++){var o={url:n.pics[i]};t.imgList.push(o)}t.text=n.comment,t.rateValue1=n.product_score+"",t.rateValue2=n.service_score+"",t.loadOrder(),console.log(t.rateValue1,"12456")}))},rateChange1:function(t){this.rateValue1=t.value},rateChange2:function(t){this.rateValue2=t.value},scImg:function(){var e=this;console.log(e.imgCount,11),0!=e.imgCount?(0,c.upload)({file:""}).then((function(t){console.log(t,"e"),e.imgList=[].concat((0,a.default)(e.imgList),(0,a.default)(t)),console.log(e.imgList,"imgList"),e.imgCount=10-e.imgList.length,console.log(e.imgCount,"imgCount ")})).catch((function(t){})):t.showToast({title:"最多添加9张图片",icon:"none"})},scImgMian:function(){var t=this;(0,c.upload)({file:""}).then((function(e){console.log(e,"e"),t.main_pic=e[0].url})).catch((function(t){}))},submit:function(e){var n=this;if(n.imgList.length<1)t.showToast({title:"请添加图片",icon:"none"});else{for(var i=0;i<n.imgList.length;i++)n.cloudimgList.push(n.imgList[i].url);var o=n.cloudimgList.join(",");(0,c.order_comment)({pics:o,comment:n.text,product_score:n.rateValue1,service_score:n.rateValue2,unique:n.unique,main_pic:n.main_pic,title:n.title}).then((function(e){t.navigateTo({url:"/pages/order/order?state=4"})})).catch((function(e){t.navigateTo({url:"/pages/order/order?state=4"})}))}},submit1:function(e){var n=this;if(n.imgList.length<1)t.showToast({title:"请添加图片",icon:"none"});else{for(var i=0;i<n.imgList.length;i++)n.cloudimgList.push(n.imgList[i].url);var o=n.cloudimgList.join(",");(0,r.save_comment)({pics:o,comment:n.text,product_score:n.rateValue1,service_score:n.rateValue2,unique:n.unique,main_pic:n.main_pic,title:n.title}).then((function(e){t.navigateTo({url:"/pages/user/creation?id=0"})})).catch((function(t){}))}},imgInfo:function(e){var n=[];console.log(111),this.imgList.forEach((function(t){n.push(t.url)})),console.log(n),t.previewImage({current:e,loop:!1,urls:n,indicator:"default"})},delImg:function(e){var n=this;t.showModal({content:"确定删除这张吗",success:function(t){t.confirm?(n.imgList.splice(e,1),n.imgCount++):t.cancel}})},navto:function(e){t.navigateTo({url:e})}}};e.default=s}).call(this,n("543d")["default"])},6812:function(t,e,n){},"732f":function(t,e,n){"use strict";var i=n("6812"),o=n.n(i);o.a},a8a4b:function(t,e,n){"use strict";n.r(e);var i=n("d710"),o=n("182a");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("732f");var u=n("f0c5"),c=Object(u["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=c.exports},d710:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.imgList.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},o=[]}},[["2ed6","common/runtime","common/vendor"]]]);