address.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/address/address" ], {
  2. 200: 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(201)).default);
  10. }).call(this, t(1).createPage);
  11. },
  12. 201: function(e, n, t) {
  13. t.r(n);
  14. var d = t(202), r = t(204);
  15. for (var s in r) "default" !== s && function(e) {
  16. t.d(n, e, function() {
  17. return r[e];
  18. });
  19. }(s);
  20. t(207);
  21. var a = t(13), i = Object(a.default)(r.default, d.render, d.staticRenderFns, !1, null, null, null, !1, d.components, void 0);
  22. i.options.__file = "pages/address/address.vue", n.default = i.exports;
  23. },
  24. 202: function(e, n, t) {
  25. t.r(n);
  26. var d = t(203);
  27. t.d(n, "render", function() {
  28. return d.render;
  29. }), t.d(n, "staticRenderFns", function() {
  30. return d.staticRenderFns;
  31. }), t.d(n, "recyclableRender", function() {
  32. return d.recyclableRender;
  33. }), t.d(n, "components", function() {
  34. return d.components;
  35. });
  36. },
  37. 203: function(e, n, t) {
  38. t.r(n), t.d(n, "render", function() {
  39. return d;
  40. }), t.d(n, "staticRenderFns", function() {
  41. return s;
  42. }), t.d(n, "recyclableRender", function() {
  43. return r;
  44. }), t.d(n, "components", function() {});
  45. var d = function() {
  46. var e = this;
  47. e.$createElement;
  48. e._self._c;
  49. }, r = !1, s = [];
  50. d._withStripped = !0;
  51. },
  52. 204: function(e, n, t) {
  53. t.r(n);
  54. var d = t(205), r = t.n(d);
  55. for (var s in d) "default" !== s && function(e) {
  56. t.d(n, e, function() {
  57. return d[e];
  58. });
  59. }(s);
  60. n.default = r.a;
  61. },
  62. 205: function(e, n, t) {
  63. (function(e) {
  64. Object.defineProperty(n, "__esModule", {
  65. value: !0
  66. }), n.default = void 0;
  67. var d = t(206), r = (t(56), {
  68. data: function() {
  69. return {
  70. source: 0,
  71. addressList: [],
  72. isShow: !1
  73. };
  74. },
  75. onLoad: function(e) {
  76. this.source = e.source || 0, this.loadAddress();
  77. },
  78. methods: {
  79. loadAddress: function() {
  80. var e = this;
  81. (0, d.getAddressList)({
  82. page: 1,
  83. limit: 100
  84. }).then(function(n) {
  85. var t = n.data;
  86. e.addressList = t;
  87. });
  88. },
  89. defaultUp: function(e, n) {
  90. var t = this;
  91. this.addressList = this.addressList.map(function(e) {
  92. return e.is_default = 0, e;
  93. }), this.addressList[n].is_default = 1, (0, d.addressEdit)({
  94. real_name: e.real_name,
  95. phone: e.phone,
  96. address: {
  97. province: e.province,
  98. city: e.city,
  99. district: e.district
  100. },
  101. detail: e.detail,
  102. is_default: 1,
  103. id: e.id,
  104. type: 1
  105. }).then(function(e) {
  106. e.data, t.loadAddress();
  107. }).catch(function(e) {
  108. console.log(e);
  109. });
  110. },
  111. delAddress: function(e) {
  112. var n = this;
  113. (0, d.addressDel)({
  114. id: e.id
  115. }).then(function(e) {
  116. e.data, n.$api.msg("删除成功");
  117. });
  118. var t = this.addressList.indexOf(e);
  119. this.addressList.splice(t, 1);
  120. },
  121. checkAddress: function(n) {
  122. 1 == this.source && (this.$api.prePage().addressData = n, e.navigateBack());
  123. },
  124. addAddress: function(n, t) {
  125. e.navigateTo({
  126. url: "/pages/address/addressManage?type=".concat(n, "&data=").concat(JSON.stringify(t))
  127. });
  128. },
  129. refreshList: function() {
  130. this.loadAddress();
  131. }
  132. }
  133. });
  134. n.default = r;
  135. }).call(this, t(1).default);
  136. },
  137. 207: function(e, n, t) {
  138. t.r(n);
  139. var d = t(208), r = t.n(d);
  140. for (var s in d) "default" !== s && function(e) {
  141. t.d(n, e, function() {
  142. return d[e];
  143. });
  144. }(s);
  145. n.default = r.a;
  146. },
  147. 208: function(e, n, t) {}
  148. }, [ [ 200, "common/runtime", "common/vendor" ] ] ]);