reply.js 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/product/reply" ], {
  2. 141: function(e, n, t) {
  3. (function(e) {
  4. function n(e) {
  5. return e && e.__esModule ? e : {
  6. default: e
  7. };
  8. }
  9. t(4), n(t(2)), e(n(t(142)).default);
  10. }).call(this, t(1).createPage);
  11. },
  12. 142: function(e, n, t) {
  13. t.r(n);
  14. var r = t(143), o = t(145);
  15. for (var a in o) "default" !== a && function(e) {
  16. t.d(n, e, function() {
  17. return o[e];
  18. });
  19. }(a);
  20. t(147);
  21. var i = t(13), u = Object(i.default)(o.default, r.render, r.staticRenderFns, !1, null, null, null, !1, r.components, void 0);
  22. u.options.__file = "pages/product/reply.vue", n.default = u.exports;
  23. },
  24. 143: function(e, n, t) {
  25. t.r(n);
  26. var r = t(144);
  27. t.d(n, "render", function() {
  28. return r.render;
  29. }), t.d(n, "staticRenderFns", function() {
  30. return r.staticRenderFns;
  31. }), t.d(n, "recyclableRender", function() {
  32. return r.recyclableRender;
  33. }), t.d(n, "components", function() {
  34. return r.components;
  35. });
  36. },
  37. 144: function(e, n, t) {
  38. var r;
  39. t.r(n), t.d(n, "render", function() {
  40. return o;
  41. }), t.d(n, "staticRenderFns", function() {
  42. return i;
  43. }), t.d(n, "recyclableRender", function() {
  44. return a;
  45. }), t.d(n, "components", function() {
  46. return r;
  47. });
  48. try {
  49. r = {
  50. uniLoadMore: function() {
  51. return t.e("components/uni-load-more/uni-load-more").then(t.bind(null, 413));
  52. }
  53. };
  54. } catch (e) {
  55. if (-1 === e.message.indexOf("Cannot find module") || -1 === e.message.indexOf(".vue")) throw e;
  56. console.error(e.message), console.error("1. 排查组件名称拼写是否正确"), console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),
  57. console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件");
  58. }
  59. var o = function() {
  60. var e = this;
  61. e.$createElement;
  62. e._self._c;
  63. }, a = !1, i = [];
  64. o._withStripped = !0;
  65. },
  66. 145: function(e, n, t) {
  67. t.r(n);
  68. var r = t(146), o = t.n(r);
  69. for (var a in r) "default" !== a && function(e) {
  70. t.d(n, e, function() {
  71. return r[e];
  72. });
  73. }(a);
  74. n.default = o.a;
  75. },
  76. 146: function(e, n, t) {
  77. (function(e) {
  78. function r(e, n, t, r, o, a, i) {
  79. try {
  80. var u = e[a](i), c = u.value;
  81. } catch (e) {
  82. return void t(e);
  83. }
  84. u.done ? n(c) : Promise.resolve(c).then(r, o);
  85. }
  86. function o(e) {
  87. return function() {
  88. var n = this, t = arguments;
  89. return new Promise(function(o, a) {
  90. function i(e) {
  91. r(c, o, a, i, u, "next", e);
  92. }
  93. function u(e) {
  94. r(c, o, a, i, u, "throw", e);
  95. }
  96. var c = e.apply(n, t);
  97. i(void 0);
  98. });
  99. };
  100. }
  101. Object.defineProperty(n, "__esModule", {
  102. value: !0
  103. }), n.default = void 0;
  104. var a = function(e) {
  105. return e && e.__esModule ? e : {
  106. default: e
  107. };
  108. }(t(23)), i = t(28), u = {
  109. components: {
  110. uniRate: function() {
  111. t.e("components/uni-rate/uni-rate").then(function() {
  112. return resolve(t(497));
  113. }.bind(null, t)).catch(t.oe);
  114. }
  115. },
  116. watch: {},
  117. data: function() {
  118. return {
  119. maxheight: "",
  120. id: "",
  121. list: "",
  122. reply: "",
  123. tabCurrentIndex: 0,
  124. navList: [ {
  125. state: 0,
  126. text: "全部",
  127. loadingType: "more",
  128. number: "",
  129. orderList: [],
  130. page: 1,
  131. limit: 5
  132. }, {
  133. state: 1,
  134. text: "好评",
  135. loadingType: "more",
  136. number: "",
  137. orderList: [],
  138. page: 1,
  139. limit: 5
  140. }, {
  141. state: 3,
  142. text: "差评",
  143. loadingType: "more",
  144. number: "",
  145. orderList: [],
  146. page: 1,
  147. limit: 5
  148. }, {
  149. state: 2,
  150. text: "中评",
  151. loadingType: "more",
  152. number: "",
  153. orderList: [],
  154. page: 1,
  155. limit: 5
  156. } ]
  157. };
  158. },
  159. computed: {},
  160. onReady: function() {
  161. var n = this;
  162. e.createSelectorQuery().select(".container").fields({
  163. size: !0
  164. }, function(e) {
  165. n.maxheight = e.height - Math.floor(e.width / 750 * 145);
  166. }).exec();
  167. },
  168. onLoad: function(e) {
  169. this.id = e.id;
  170. },
  171. onShow: function() {
  172. var e = this;
  173. (0, i.reply_config)({}, this.id).then(function(n) {
  174. var t = n.data;
  175. e.reply = t, e.navList[0].number = e.reply.sum_count, e.navList[1].number = e.reply.good_count,
  176. e.navList[2].number = e.reply.poor_count, e.navList[3].number = e.reply.in_count;
  177. }), this.loadDate();
  178. },
  179. methods: {
  180. loadDate: function(e) {
  181. var n = this;
  182. return o(a.default.mark(function t() {
  183. var r, o, u;
  184. return a.default.wrap(function(t) {
  185. for (;;) switch (t.prev = t.next) {
  186. case 0:
  187. if (r = n.tabCurrentIndex, o = n.navList[r], u = o.state, "tabChange" !== e || !0 !== o.loaded) {
  188. t.next = 5;
  189. break;
  190. }
  191. return t.abrupt("return");
  192. case 5:
  193. if ("loading" !== o.loadingType) {
  194. t.next = 7;
  195. break;
  196. }
  197. return t.abrupt("return");
  198. case 7:
  199. if ("noMore" !== o.loadingType) {
  200. t.next = 9;
  201. break;
  202. }
  203. return t.abrupt("return");
  204. case 9:
  205. o.loadingType = "loading", (0, i.reply_list)({
  206. type: u,
  207. page: o.page,
  208. limit: o.limit
  209. }, n.id).then(function(e) {
  210. var t = e.data, r = t;
  211. o.orderList = o.orderList.concat(r), console.log(o.orderList, 111), o.page++, o.limit != t.length ? (o.loadingType = "noMore",
  212. n.$set(o, "loaded", !0)) : o.loadingType = "more";
  213. }).catch(function(e) {
  214. console.log(e);
  215. });
  216. case 11:
  217. case "end":
  218. return t.stop();
  219. }
  220. }, t);
  221. }))();
  222. },
  223. navTo: function(n) {
  224. e.navigateTo({
  225. url: n
  226. });
  227. },
  228. changeTab: function(e) {
  229. this.tabCurrentIndex = e.target.current, this.loadDate("tabChange");
  230. },
  231. tabClick: function(e) {
  232. this.tabCurrentIndex = e;
  233. }
  234. }
  235. };
  236. n.default = u;
  237. }).call(this, t(1).default);
  238. },
  239. 147: function(e, n, t) {
  240. t.r(n);
  241. var r = t(148), o = t.n(r);
  242. for (var a in r) "default" !== a && function(e) {
  243. t.d(n, e, function() {
  244. return r[e];
  245. });
  246. }(a);
  247. n.default = o.a;
  248. },
  249. 148: function(e, n, t) {}
  250. }, [ [ 141, "common/runtime", "common/vendor" ] ] ]);