user.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/user/user" ], {
  2. 167: 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(168)).default);
  10. }).call(this, t(1).createPage);
  11. },
  12. 168: function(e, n, t) {
  13. t.r(n);
  14. var o = t(169), r = t(171);
  15. for (var i in r) "default" !== i && function(e) {
  16. t.d(n, e, function() {
  17. return r[e];
  18. });
  19. }(i);
  20. t(173);
  21. var c = t(13), u = Object(c.default)(r.default, o.render, o.staticRenderFns, !1, null, null, null, !1, o.components, void 0);
  22. u.options.__file = "pages/user/user.vue", n.default = u.exports;
  23. },
  24. 169: function(e, n, t) {
  25. t.r(n);
  26. var o = t(170);
  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. 170: 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 c;
  43. }), t.d(n, "recyclableRender", function() {
  44. return i;
  45. }), t.d(n, "components", function() {
  46. return o;
  47. });
  48. try {
  49. o = {
  50. uniList: function() {
  51. return t.e("components/uni-list/uni-list").then(t.bind(null, 483));
  52. },
  53. uniListItem: function() {
  54. return t.e("components/uni-list-item/uni-list-item").then(t.bind(null, 490));
  55. }
  56. };
  57. } catch (e) {
  58. if (-1 === e.message.indexOf("Cannot find module") || -1 === e.message.indexOf(".vue")) throw e;
  59. console.error(e.message), console.error("1. 排查组件名称拼写是否正确"), console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),
  60. console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件");
  61. }
  62. var r = function() {
  63. var e = this;
  64. e.$createElement;
  65. e._self._c;
  66. }, i = !1, c = [];
  67. r._withStripped = !0;
  68. },
  69. 171: function(e, n, t) {
  70. t.r(n);
  71. var o = t(172), r = t.n(o);
  72. for (var i in o) "default" !== i && function(e) {
  73. t.d(n, e, function() {
  74. return o[e];
  75. });
  76. }(i);
  77. n.default = r.a;
  78. },
  79. 172: function(e, n, t) {
  80. (function(e) {
  81. function o(e, n) {
  82. var t = Object.keys(e);
  83. if (Object.getOwnPropertySymbols) {
  84. var o = Object.getOwnPropertySymbols(e);
  85. n && (o = o.filter(function(n) {
  86. return Object.getOwnPropertyDescriptor(e, n).enumerable;
  87. })), t.push.apply(t, o);
  88. }
  89. return t;
  90. }
  91. function r(e) {
  92. for (var n = 1; n < arguments.length; n++) {
  93. var t = null != arguments[n] ? arguments[n] : {};
  94. n % 2 ? o(Object(t), !0).forEach(function(n) {
  95. i(e, n, t[n]);
  96. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : o(Object(t)).forEach(function(n) {
  97. Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
  98. });
  99. }
  100. return e;
  101. }
  102. function i(e, n, t) {
  103. return n in e ? Object.defineProperty(e, n, {
  104. value: t,
  105. enumerable: !0,
  106. configurable: !0,
  107. writable: !0
  108. }) : e[n] = t, e;
  109. }
  110. Object.defineProperty(n, "__esModule", {
  111. value: !0
  112. }), n.default = void 0;
  113. var c = t(6), u = t(27), a = t(37), s = {
  114. components: {
  115. uniList: function() {
  116. t.e("components/uni-list/uni-list").then(function() {
  117. return resolve(t(483));
  118. }.bind(null, t)).catch(t.oe);
  119. },
  120. uniListItem: function() {
  121. t.e("components/uni-list-item/uni-list-item").then(function() {
  122. return resolve(t(490));
  123. }.bind(null, t)).catch(t.oe);
  124. }
  125. },
  126. data: function() {
  127. return {
  128. coverTransform: "translateY(0px)",
  129. coverTransition: "0s",
  130. moving: !1,
  131. userDowm: 0,
  132. userMaxDowm: 0,
  133. orderinfo: {
  134. complete_count: 0,
  135. received_count: 0,
  136. unshipped_count: 0,
  137. order_count: 0
  138. },
  139. levelData: {
  140. icon: "",
  141. name: ""
  142. },
  143. watchful: !0
  144. };
  145. },
  146. onShow: function() {
  147. this.hasLogin && this.loadBaseData();
  148. },
  149. onReady: function() {
  150. var n = this;
  151. e.createSelectorQuery().select(".container").fields({
  152. size: !0
  153. }, function(e) {
  154. n.userDowm = Math.floor(e.width / 750 * 200), n.userMaxDowm = Math.floor(e.width / 750 * 250);
  155. }).exec();
  156. },
  157. computed: r(r({}, (0, c.mapState)("user", [ "userInfo", "orderInfo", "hasLogin" ])), (0,
  158. c.mapState)([ "isShowIllegality" ])),
  159. methods: r(r({}, (0, c.mapMutations)("user", [ "setUserInfo", "setOrderInfo" ])), {}, {
  160. loadBaseData: function() {
  161. var e = this;
  162. (0, a.getUserInfo)({}).then(function(n) {
  163. var t = n.data;
  164. (0, u.orderData)({}).then(function(n) {
  165. var t = n.data;
  166. e.setOrderInfo(t);
  167. }).catch(function(n) {
  168. e.setOrderInfo({
  169. complete_count: 0,
  170. received_count: 0,
  171. unshipped_count: 0,
  172. order_count: 0,
  173. unpaid_count: 0
  174. });
  175. }), e.setUserInfo(t), (0, u.userlevel)().then(function(n) {
  176. console.log(n);
  177. for (var t = 0; t < n.data.list.length; t++) if (n.data.list[t].id == e.userInfo.level) {
  178. e.levelData.icon = n.data.list[t].icon, e.levelData.name = n.data.list[t].explain;
  179. break;
  180. }
  181. }).catch(function(e) {
  182. console.log(e);
  183. });
  184. }).catch(function(e) {
  185. console.log(e);
  186. });
  187. },
  188. navTo: function(n) {
  189. this.hasLogin || (n = "/pages/public/login", n = "/pages/public/wxLogin"), e.navigateTo({
  190. url: n
  191. });
  192. }
  193. })
  194. };
  195. n.default = s;
  196. }).call(this, t(1).default);
  197. },
  198. 173: function(e, n, t) {
  199. t.r(n);
  200. var o = t(174), r = t.n(o);
  201. for (var i in o) "default" !== i && function(e) {
  202. t.d(n, e, function() {
  203. return o[e];
  204. });
  205. }(i);
  206. n.default = r.a;
  207. },
  208. 174: function(e, n, t) {}
  209. }, [ [ 167, "common/runtime", "common/vendor" ] ] ]);