evaluate.js 4.4 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/evaluate"],{"420c":function(t,n,e){"use strict";(function(t){e("30ba");o(e("66fd"));var n=o(e("e19e"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=e,t(n.default)}).call(this,e("543d")["createPage"])},"504f":function(t,n,e){"use strict";var o;e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return o}));var r=function(){var t=this,n=t.$createElement;t._self._c},i=[]},"607a":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(e("a34a")),r=e("5531");function i(t){return t&&t.__esModule?t:{default:t}}function u(t){return s(t)||l(t)||c(t)||a()}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,n){if(t){if("string"===typeof t)return f(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?f(t,n):void 0}}function l(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function s(t){if(Array.isArray(t))return f(t)}function f(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function d(t,n,e,o,r,i,u){try{var a=t[i](u),c=a.value}catch(l){return void e(l)}a.done?n(c):Promise.resolve(c).then(o,r)}function m(t){return function(){var n=this,e=arguments;return new Promise((function(o,r){var i=t.apply(n,e);function u(t){d(i,o,r,u,a,"next",t)}function a(t){d(i,o,r,u,a,"throw",t)}u(void 0)}))}}var g=function(){e.e("components/uni-rate/uni-rate").then(function(){return resolve(e("eafb"))}.bind(null,e)).catch(e.oe)},h={components:{uniRate:g},data:function(){return{list:"",productInfo:"",text:"",placeholder:"商品满足你的期待么?说说你的想法,分享给想买的他们吧~",imgList:[],unique:"",cloudimgList:[],rateValue1:"",rateValue2:"",imgCount:6}},onLoad:function(t){this.unique=t.unique,this.loadOrder()},onShow:function(){},methods:{bindTextAreaBlur:function(t){this.text=t.detail.value},loadOrder:function(){var t=this;return m(o.default.mark((function n(){return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:(0,r.product)({unique:t.unique}).then((function(n){t.list=n.data,t.productInfo=n.data.productInfo}));case 1:case"end":return n.stop()}}),n)})))()},rateChange1:function(t){this.rateValue1=t.value},rateChange2:function(t){this.rateValue2=t.value},scImg:function(){var n=this;console.log(n.imgCount,11),0!=n.imgCount?(0,r.upload)({file:""}).then((function(t){console.log(t,"e"),n.imgList=[].concat(u(n.imgList),u(t)),console.log(n.imgList,"imgList"),n.imgCount=10-n.imgList.length,console.log(n.imgCount,"imgCount ")})).catch((function(t){})):t.showToast({title:"最多添加6张图片",icon:"none"})},submit:function(n){var e=this;if(e.imgList.length<1)t.showToast({title:"请添加图片",icon:"none"});else{for(var o=0;o<e.imgList.length;o++)e.cloudimgList.push(e.imgList[o].url);var i=e.cloudimgList.join(",");(0,r.order_comment)({pics:i,comment:e.text,product_score:e.rateValue1,service_score:e.rateValue2,unique:e.unique}).then((function(n){t.navigateTo({url:"/pages/order/order?state=4"})})).catch((function(n){t.navigateTo({url:"/pages/order/order?state=4"})}))}},imgInfo:function(n){var e=[];console.log(111),this.imgList.forEach((function(t){e.push(t.url)})),console.log(e),t.previewImage({current:n,loop:!1,urls:e,indicator:"default"})},delImg:function(n){var e=this;t.showModal({content:"确定删除这张吗",success:function(t){t.confirm?(e.imgList.splice(n,1),e.imgCount++):t.cancel}})},navto:function(n){t.navigateTo({url:n})}}};n.default=h}).call(this,e("543d")["default"])},b32b:function(t,n,e){"use strict";e.r(n);var o=e("607a"),r=e.n(o);for(var i in o)"default"!==i&&function(t){e.d(n,t,(function(){return o[t]}))}(i);n["default"]=r.a},dd82:function(t,n,e){"use strict";var o=e("f133"),r=e.n(o);r.a},e19e:function(t,n,e){"use strict";e.r(n);var o=e("504f"),r=e("b32b");for(var i in r)"default"!==i&&function(t){e.d(n,t,(function(){return r[t]}))}(i);e("dd82");var u,a=e("f0c5"),c=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],u);n["default"]=c.exports},f133:function(t,n,e){}},[["420c","common/runtime","common/vendor"]]]);