(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/evaluate"],{"05d9":function(t,e,i){"use strict";(function(t,e){var n=i("4ea4");i("d1cd");n(i("66fd"));var o=n(i("7463"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(o.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},"428a":function(t,e,i){"use strict";(function(t){var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(i("2eee")),a=n(i("448a")),u=n(i("c973")),c=i("5adf"),r=i("cd04"),s={components:{uniRate:function(){i.e("components/uni-rate/uni-rate").then(function(){return resolve(i("5651"))}.bind(null,i)).catch(i.oe)}},data:function(){return{type:0,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.type&&(this.type=t.type),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==this.type?(0,r.reply_save)({},this.id).then((function(e){var i=e.data;t.unique=i.unique,t.title=i.title,t.main_pic=i.main_pic;for(var n=0;n<i.pics.length;n++){var o={url:i.pics[n]};t.imgList.push(o)}t.text=i.comment,t.rateValue1=i.product_score+"",t.rateValue2=i.service_score+"",t.loadOrder(),console.log(t.rateValue1,"12456")})):(0,r.my_reply)({},this.id).then((function(e){var i=e.data;t.unique=i.unique,t.title=i.title,t.main_pic=i.main_pic;for(var n=0;n<i.pics.length;n++){var o={url:i.pics[n]};t.imgList.push(o)}t.text=i.comment,t.rateValue1=i.product_score+"",t.rateValue2=i.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 i=this;if(i.imgList.length<1)t.showToast({title:"请添加图片",icon:"none"});else{for(var n=0;n<i.imgList.length;n++)i.cloudimgList.push(i.imgList[n].url);var o=i.cloudimgList.join(",");(0,c.order_comment)({pics:o,comment:i.text,product_score:i.rateValue1,service_score:i.rateValue2,unique:i.unique,main_pic:i.main_pic,title:i.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 i=this;if(i.imgList.length<1)t.showToast({title:"请添加图片",icon:"none"});else{for(var n=0;n<i.imgList.length;n++)i.cloudimgList.push(i.imgList[n].url);var o=i.cloudimgList.join(",");(0,r.save_comment)({pics:o,comment:i.text,product_score:i.rateValue1,service_score:i.rateValue2,unique:i.unique,main_pic:i.main_pic,title:i.title}).then((function(e){t.navigateTo({url:"/pages/user/creation?id=0"})})).catch((function(t){}))}},imgInfo:function(e){var i=[];console.log(111),this.imgList.forEach((function(t){i.push(t.url)})),console.log(i),t.previewImage({current:e,loop:!1,urls:i,indicator:"default"})},delImg:function(e){var i=this;t.showModal({content:"确定删除这张吗",success:function(t){t.confirm?(i.imgList.splice(e,1),i.imgCount++):t.cancel}})},navto:function(e){t.navigateTo({url:e})}}};e.default=s}).call(this,i("543d")["default"])},7463:function(t,e,i){"use strict";i.r(e);var n=i("98e3"),o=i("c841");for(var a in o)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(a);i("8b40");var u=i("f0c5"),c=Object(u["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=c.exports},"8b40":function(t,e,i){"use strict";var n=i("9099"),o=i.n(n);o.a},9099:function(t,e,i){},"98e3":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=(this._self._c,this.imgList.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},o=[]},c841:function(t,e,i){"use strict";i.r(e);var n=i("428a"),o=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=o.a}},[["05d9","common/runtime","common/vendor"]]]);