evaluate.js 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/order/evaluate" ], {
  2. 149: function(n, t, e) {
  3. (function(n) {
  4. function t(n) {
  5. return n && n.__esModule ? n : {
  6. default: n
  7. };
  8. }
  9. e(4), t(e(2)), n(t(e(150)).default);
  10. }).call(this, e(1).createPage);
  11. },
  12. 150: function(n, t, e) {
  13. e.r(t);
  14. var o = e(151), r = e(153);
  15. for (var u in r) "default" !== u && function(n) {
  16. e.d(t, n, function() {
  17. return r[n];
  18. });
  19. }(u);
  20. e(156);
  21. var i = e(13), a = Object(i.default)(r.default, o.render, o.staticRenderFns, !1, null, null, null, !1, o.components, void 0);
  22. a.options.__file = "pages/order/evaluate.vue", t.default = a.exports;
  23. },
  24. 151: function(n, t, e) {
  25. e.r(t);
  26. var o = e(152);
  27. e.d(t, "render", function() {
  28. return o.render;
  29. }), e.d(t, "staticRenderFns", function() {
  30. return o.staticRenderFns;
  31. }), e.d(t, "recyclableRender", function() {
  32. return o.recyclableRender;
  33. }), e.d(t, "components", function() {
  34. return o.components;
  35. });
  36. },
  37. 152: function(n, t, e) {
  38. e.r(t), e.d(t, "render", function() {
  39. return o;
  40. }), e.d(t, "staticRenderFns", function() {
  41. return u;
  42. }), e.d(t, "recyclableRender", function() {
  43. return r;
  44. }), e.d(t, "components", function() {});
  45. var o = function() {
  46. var n = this;
  47. n.$createElement;
  48. n._self._c;
  49. }, r = !1, u = [];
  50. o._withStripped = !0;
  51. },
  52. 153: function(n, t, e) {
  53. e.r(t);
  54. var o = e(154), r = e.n(o);
  55. for (var u in o) "default" !== u && function(n) {
  56. e.d(t, n, function() {
  57. return o[n];
  58. });
  59. }(u);
  60. t.default = r.a;
  61. },
  62. 154: function(n, t, e) {
  63. (function(n) {
  64. function o(n) {
  65. return a(n) || i(n) || u(n) || r();
  66. }
  67. function r() {
  68. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  69. }
  70. function u(n, t) {
  71. if (n) {
  72. if ("string" == typeof n) return c(n, t);
  73. var e = Object.prototype.toString.call(n).slice(8, -1);
  74. return "Object" === e && n.constructor && (e = n.constructor.name), "Map" === e || "Set" === e ? Array.from(n) : "Arguments" === e || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? c(n, t) : void 0;
  75. }
  76. }
  77. function i(n) {
  78. if ("undefined" != typeof Symbol && Symbol.iterator in Object(n)) return Array.from(n);
  79. }
  80. function a(n) {
  81. if (Array.isArray(n)) return c(n);
  82. }
  83. function c(n, t) {
  84. (null == t || t > n.length) && (t = n.length);
  85. for (var e = 0, o = new Array(t); e < t; e++) o[e] = n[e];
  86. return o;
  87. }
  88. function l(n, t, e, o, r, u, i) {
  89. try {
  90. var a = n[u](i), c = a.value;
  91. } catch (n) {
  92. return void e(n);
  93. }
  94. a.done ? t(c) : Promise.resolve(c).then(o, r);
  95. }
  96. function f(n) {
  97. return function() {
  98. var t = this, e = arguments;
  99. return new Promise(function(o, r) {
  100. function u(n) {
  101. l(a, o, r, u, i, "next", n);
  102. }
  103. function i(n) {
  104. l(a, o, r, u, i, "throw", n);
  105. }
  106. var a = n.apply(t, e);
  107. u(void 0);
  108. });
  109. };
  110. }
  111. Object.defineProperty(t, "__esModule", {
  112. value: !0
  113. }), t.default = void 0;
  114. var s = function(n) {
  115. return n && n.__esModule ? n : {
  116. default: n
  117. };
  118. }(e(23)), d = e(155), m = {
  119. components: {
  120. uniRate: function() {
  121. e.e("components/uni-rate/uni-rate").then(function() {
  122. return resolve(e(497));
  123. }.bind(null, e)).catch(e.oe);
  124. }
  125. },
  126. data: function() {
  127. return {
  128. list: "",
  129. productInfo: "",
  130. text: "",
  131. placeholder: "商品满足你的期待么?说说你的想法,分享给想买的他们吧~",
  132. imgList: [],
  133. unique: "",
  134. cloudimgList: [],
  135. rateValue1: "",
  136. rateValue2: "",
  137. imgCount: 6
  138. };
  139. },
  140. onLoad: function(n) {
  141. this.unique = n.unique, this.loadOrder();
  142. },
  143. onShow: function() {},
  144. methods: {
  145. bindTextAreaBlur: function(n) {
  146. this.text = n.detail.value;
  147. },
  148. loadOrder: function() {
  149. var n = this;
  150. return f(s.default.mark(function t() {
  151. return s.default.wrap(function(t) {
  152. for (;;) switch (t.prev = t.next) {
  153. case 0:
  154. (0, d.product)({
  155. unique: n.unique
  156. }).then(function(t) {
  157. n.list = t.data, n.productInfo = t.data.productInfo;
  158. });
  159. case 1:
  160. case "end":
  161. return t.stop();
  162. }
  163. }, t);
  164. }))();
  165. },
  166. rateChange1: function(n) {
  167. this.rateValue1 = n.value;
  168. },
  169. rateChange2: function(n) {
  170. this.rateValue2 = n.value;
  171. },
  172. scImg: function() {
  173. var t = this;
  174. console.log(t.imgCount, 11), 0 != t.imgCount ? (0, d.upload)({
  175. file: ""
  176. }).then(function(n) {
  177. console.log(n, "e"), t.imgList = [].concat(o(t.imgList), o(n)), console.log(t.imgList, "imgList"),
  178. t.imgCount = 10 - t.imgList.length, console.log(t.imgCount, "imgCount ");
  179. }).catch(function(n) {}) : n.showToast({
  180. title: "最多添加6张图片",
  181. icon: "none"
  182. });
  183. },
  184. submit: function(t) {
  185. for (var e = this, o = 0; o < e.imgList.length; o++) e.cloudimgList.push(e.imgList[o].url);
  186. var r = e.cloudimgList.join(",");
  187. (0, d.order_comment)({
  188. pics: r,
  189. comment: e.text,
  190. product_score: e.rateValue1,
  191. service_score: e.rateValue2,
  192. unique: e.unique
  193. }).then(function(t) {
  194. n.navigateTo({
  195. url: "/pages/order/order?state=4"
  196. });
  197. }).catch(function(t) {
  198. n.navigateTo({
  199. url: "/pages/order/order?state=4"
  200. });
  201. });
  202. },
  203. imgInfo: function(t) {
  204. var e = [];
  205. console.log(111), this.imgList.forEach(function(n) {
  206. e.push(n.url);
  207. }), console.log(e), n.previewImage({
  208. current: t,
  209. loop: !1,
  210. urls: e,
  211. indicator: "default"
  212. });
  213. },
  214. delImg: function(t) {
  215. var e = this;
  216. n.showModal({
  217. content: "确定删除这张吗",
  218. success: function(n) {
  219. n.confirm ? (e.imgList.splice(t, 1), e.imgCount++) : n.cancel;
  220. }
  221. });
  222. },
  223. navto: function(t) {
  224. n.navigateTo({
  225. url: t
  226. });
  227. }
  228. }
  229. };
  230. t.default = m;
  231. }).call(this, e(1).default);
  232. },
  233. 156: function(n, t, e) {
  234. e.r(t);
  235. var o = e(157), r = e.n(o);
  236. for (var u in o) "default" !== u && function(n) {
  237. e.d(t, n, function() {
  238. return o[n];
  239. });
  240. }(u);
  241. t.default = r.a;
  242. },
  243. 157: function(n, t, e) {}
  244. }, [ [ 149, "common/runtime", "common/vendor" ] ] ]);