wallet.js 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/wallet/wallet" ], {
  2. 275: 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(276)).default);
  10. }).call(this, t(1).createPage);
  11. },
  12. 276: function(e, n, t) {
  13. t.r(n);
  14. var o = t(277), r = t(279);
  15. for (var a in r) "default" !== a && function(e) {
  16. t.d(n, e, function() {
  17. return r[e];
  18. });
  19. }(a);
  20. t(281);
  21. var i = t(13), c = Object(i.default)(r.default, o.render, o.staticRenderFns, !1, null, null, null, !1, o.components, void 0);
  22. c.options.__file = "pages/wallet/wallet.vue", n.default = c.exports;
  23. },
  24. 277: function(e, n, t) {
  25. t.r(n);
  26. var o = t(278);
  27. t.d(n, "render", function() {
  28. return o.render;
  29. }), t.d(n, "staticRenderFns", function() {
  30. return o.staticRenderFns;
  31. }), t.d(n, "recyclableRender", function() {
  32. return o.recyclableRender;
  33. }), t.d(n, "components", function() {
  34. return o.components;
  35. });
  36. },
  37. 278: function(e, n, t) {
  38. var o;
  39. t.r(n), t.d(n, "render", function() {
  40. return r;
  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 o;
  47. });
  48. try {
  49. o = {
  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 r = function() {
  60. var e = this, n = (e.$createElement, e._self._c, e._f("getMoneyStyle")(e.money));
  61. e.$mp.data = Object.assign({}, {
  62. $root: {
  63. f0: n
  64. }
  65. });
  66. }, a = !1, i = [];
  67. r._withStripped = !0;
  68. },
  69. 279: function(e, n, t) {
  70. t.r(n);
  71. var o = t(280), r = t.n(o);
  72. for (var a in o) "default" !== a && function(e) {
  73. t.d(n, e, function() {
  74. return o[e];
  75. });
  76. }(a);
  77. n.default = r.a;
  78. },
  79. 280: function(e, n, t) {
  80. (function(e) {
  81. function o(e, n, t, o, r, a, i) {
  82. try {
  83. var c = e[a](i), u = c.value;
  84. } catch (e) {
  85. return void t(e);
  86. }
  87. c.done ? n(u) : Promise.resolve(u).then(o, r);
  88. }
  89. function r(e) {
  90. return function() {
  91. var n = this, t = arguments;
  92. return new Promise(function(r, a) {
  93. function i(e) {
  94. o(u, r, a, i, c, "next", e);
  95. }
  96. function c(e) {
  97. o(u, r, a, i, c, "throw", e);
  98. }
  99. var u = e.apply(n, t);
  100. i(void 0);
  101. });
  102. };
  103. }
  104. Object.defineProperty(n, "__esModule", {
  105. value: !0
  106. }), n.default = void 0;
  107. var a = function(e) {
  108. return e && e.__esModule ? e : {
  109. default: e
  110. };
  111. }(t(23)), i = t(247), c = {
  112. filters: {
  113. getMoneyStyle: t(82).getMoneyStyle
  114. },
  115. components: {
  116. empty: function() {
  117. t.e("components/empty").then(function() {
  118. return resolve(t(420));
  119. }.bind(null, t)).catch(t.oe);
  120. },
  121. uniLoadMore: function() {
  122. t.e("components/uni-load-more/uni-load-more").then(function() {
  123. return resolve(t(413));
  124. }.bind(null, t)).catch(t.oe);
  125. }
  126. },
  127. onReady: function() {
  128. var n = this;
  129. e.createSelectorQuery().select(".content").fields({
  130. size: !0
  131. }, function(t) {
  132. e.createSelectorQuery().select(".content-money").fields({
  133. size: !0
  134. }, function(e) {
  135. n.maxheight = t.height - e.height - 40;
  136. }).exec();
  137. }).exec();
  138. },
  139. data: function() {
  140. return {
  141. maxheight: "",
  142. tabCurrentIndex: 0,
  143. navList: [ {
  144. state: 1,
  145. text: "支出",
  146. loadingType: "more",
  147. orderList: [],
  148. page: 1,
  149. limit: 10
  150. }, {
  151. state: 2,
  152. text: "收入",
  153. loadingType: "more",
  154. orderList: [],
  155. page: 1,
  156. limit: 10
  157. } ],
  158. money: ""
  159. };
  160. },
  161. onLoad: function(n) {
  162. e.getStorageSync("weichatBrowser") && weixindata();
  163. },
  164. onShow: function() {
  165. var e = this;
  166. this.loadData(), (0, i.userBalance)({}).then(function(n) {
  167. var t = n.data;
  168. e.money = t.now_money;
  169. });
  170. },
  171. methods: {
  172. navto: function(n) {
  173. e.navigateTo({
  174. url: n
  175. });
  176. },
  177. loadData: function(n) {
  178. var t = this;
  179. return r(a.default.mark(function o() {
  180. var r, c, u;
  181. return a.default.wrap(function(o) {
  182. for (;;) switch (o.prev = o.next) {
  183. case 0:
  184. if (r = t.tabCurrentIndex, c = t.navList[r], u = c.state, "tabChange" !== n || !0 !== c.loaded) {
  185. o.next = 5;
  186. break;
  187. }
  188. return o.abrupt("return");
  189. case 5:
  190. if ("loading" !== c.loadingType) {
  191. o.next = 7;
  192. break;
  193. }
  194. return o.abrupt("return");
  195. case 7:
  196. c.loadingType = "loading", (0, i.spreadCommission)({
  197. page: c.page,
  198. limit: c.limit
  199. }, u).then(function(n) {
  200. var o = n.data;
  201. o.length > 0 && (c.orderList = c.orderList.concat(o), console.log(c.orderList),
  202. c.page++), c.limit != o.length ? (c.loadingType = "noMore", e.hideLoading(), t.$set(c, "loaded", !0)) : c.loadingType = "more";
  203. }).catch(function(e) {
  204. console.log(e);
  205. });
  206. case 9:
  207. case "end":
  208. return o.stop();
  209. }
  210. }, o);
  211. }))();
  212. },
  213. changeTab: function(e) {
  214. this.tabCurrentIndex = e.target.current, this.loadData("tabChange");
  215. },
  216. tabClick: function(e) {
  217. this.tabCurrentIndex = e;
  218. }
  219. }
  220. };
  221. n.default = c;
  222. }).call(this, t(1).default);
  223. },
  224. 281: function(e, n, t) {
  225. t.r(n);
  226. var o = t(282), r = t.n(o);
  227. for (var a in o) "default" !== a && function(e) {
  228. t.d(n, e, function() {
  229. return o[e];
  230. });
  231. }(a);
  232. n.default = r.a;
  233. },
  234. 282: function(e, n, t) {}
  235. }, [ [ 275, "common/runtime", "common/vendor" ] ] ]);