123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/address/addressManage" ], {
- 217: function(e, n, t) {
- (function(e) {
- function n(e) {
- return e && e.__esModule ? e : {
- default: e
- };
- }
- t(4), n(t(2)), e(n(t(218)).default);
- }).call(this, t(1).createPage);
- },
- 218: function(e, n, t) {
- t.r(n);
- var i = t(219), o = t(221);
- for (var a in o) "default" !== a && function(e) {
- t.d(n, e, function() {
- return o[e];
- });
- }(a);
- t(223);
- var s = t(13), r = Object(s.default)(o.default, i.render, i.staticRenderFns, !1, null, null, null, !1, i.components, void 0);
- r.options.__file = "pages/address/addressManage.vue", n.default = r.exports;
- },
- 219: function(e, n, t) {
- t.r(n);
- var i = t(220);
- t.d(n, "render", function() {
- return i.render;
- }), t.d(n, "staticRenderFns", function() {
- return i.staticRenderFns;
- }), t.d(n, "recyclableRender", function() {
- return i.recyclableRender;
- }), t.d(n, "components", function() {
- return i.components;
- });
- },
- 220: function(e, n, t) {
- var i;
- t.r(n), t.d(n, "render", function() {
- return o;
- }), t.d(n, "staticRenderFns", function() {
- return s;
- }), t.d(n, "recyclableRender", function() {
- return a;
- }), t.d(n, "components", function() {
- return i;
- });
- try {
- i = {
- uniList: function() {
- return t.e("components/uni-list/uni-list").then(t.bind(null, 483));
- },
- uniListItem: function() {
- return t.e("components/uni-list-item/uni-list-item").then(t.bind(null, 490));
- }
- };
- } catch (e) {
- if (-1 === e.message.indexOf("Cannot find module") || -1 === e.message.indexOf(".vue")) throw e;
- console.error(e.message), console.error("1. 排查组件名称拼写是否正确"), console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),
- console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件");
- }
- var o = function() {
- var e = this;
- e.$createElement;
- e._self._c, e._isMounted || (e.e0 = function(n) {
- !e.loading && e.confirm();
- });
- }, a = !1, s = [];
- o._withStripped = !0;
- },
- 221: function(e, n, t) {
- t.r(n);
- var i = t(222), o = t.n(i);
- for (var a in i) "default" !== a && function(e) {
- t.d(n, e, function() {
- return i[e];
- });
- }(a);
- n.default = o.a;
- },
- 222: function(e, n, t) {
- (function(e) {
- Object.defineProperty(n, "__esModule", {
- value: !0
- }), n.default = void 0;
- var i = t(206), o = {
- components: {
- uniList: function() {
- t.e("components/uni-list/uni-list").then(function() {
- return resolve(t(483));
- }.bind(null, t)).catch(t.oe);
- },
- uniListItem: function() {
- t.e("components/uni-list-item/uni-list-item").then(function() {
- return resolve(t(490));
- }.bind(null, t)).catch(t.oe);
- },
- pickerAddress: function() {
- Promise.all([ t.e("common/vendor"), t.e("components/wangding-pickerAddress/wangding-pickerAddress") ]).then(function() {
- return resolve(t(528));
- }.bind(null, t)).catch(t.oe);
- },
- uniPopup: function() {
- Promise.all([ t.e("common/vendor"), t.e("components/uni-popup/uni-popup") ]).then(function() {
- return resolve(t(519));
- }.bind(null, t)).catch(t.oe);
- }
- },
- data: function() {
- return {
- addressDetail: "",
- addressData: {
- name: "",
- mobile: "",
- address: {
- province: "",
- city: "",
- district: ""
- },
- area: "",
- default: !1
- },
- loading: !1
- };
- },
- onLoad: function(n) {
- var t = "新增收货地址";
- if ("edit" === n.type) {
- t = "编辑收货地址";
- var i = JSON.parse(n.data);
- console.log(i), this.addressData = {
- name: i.real_name,
- mobile: i.phone,
- address: {
- province: i.province,
- city: i.city,
- district: i.district
- },
- area: i.detail,
- default: 1 == i.is_default,
- id: i.id
- }, this.addressDetail = i.province + i.city + i.district;
- }
- this.manageType = n.type, e.setNavigationBarTitle({
- title: t
- });
- },
- methods: {
- onCityClick: function(e) {
- var n = e.data, t = this.addressData.address;
- t.province = n[0], t.city = n[1], t.district = n[2], this.addressDetail = n.join("");
- },
- chooseLocation: function() {
- var n = this;
- e.chooseLocation({
- success: function(e) {
- console.log(e), n.addressData.addressName = e.name, n.addressData.address = e.name;
- }
- });
- },
- switchChange: function(e) {
- this.addressData.default = e.value;
- },
- confirm: function() {
- var n = this;
- console.log("1");
- var t = this, o = this.addressData;
- o.name ? /(^1[3|4|5|7|8][0-9]{9}$)/.test(o.mobile) ? o.address ? o.area ? (this.loading = !0,
- (0, i.addressEdit)({
- real_name: o.name,
- phone: o.mobile,
- address: {
- province: o.address.province,
- city: o.address.city,
- district: o.address.district
- },
- detail: o.area,
- is_default: o.default,
- id: o.id || "",
- type: 1
- }).then(function(n) {
- t.$api.prePage().refreshList(), e.showToast({
- title: "提交成功",
- duration: 2e3
- }), setTimeout(function() {
- this.loading = !1, e.navigateBack();
- }, 800);
- }).catch(function(e) {
- console.log(e), n.loading = !1;
- })) : this.$api.msg("请填写门牌号信息") : this.$api.msg("请在地图选择所在位置") : this.$api.msg("请输入正确的手机号码") : this.$api.msg("请填写收货人姓名");
- }
- }
- };
- n.default = o;
- }).call(this, t(1).default);
- },
- 223: function(e, n, t) {
- t.r(n);
- var i = t(224), o = t.n(i);
- for (var a in i) "default" !== a && function(e) {
- t.d(n, e, function() {
- return i[e];
- });
- }(a);
- n.default = o.a;
- },
- 224: function(e, n, t) {}
- }, [ [ 217, "common/runtime", "common/vendor" ] ] ]);
|