增加新模块
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const api_address = require("../api/address.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
addressList: [],
|
||||
selectAddress: {}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getAddressList();
|
||||
},
|
||||
methods: {
|
||||
// 添加地址
|
||||
jumpAddAddress() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_address_add/mine_address_add"
|
||||
});
|
||||
},
|
||||
// 查询地址
|
||||
async getAddressList() {
|
||||
const res = await api_address.getAddress();
|
||||
if (res && res.bizcode === 100) {
|
||||
this.addressList = res.data;
|
||||
}
|
||||
},
|
||||
checkAddress(item) {
|
||||
this.selectAddress = item;
|
||||
this.$emit("valueFunc", item);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
_easycom_up_image2();
|
||||
}
|
||||
const _easycom_up_image = () => "../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
if (!Math) {
|
||||
_easycom_up_image();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.addressList && $data.addressList.length !== 0
|
||||
}, $data.addressList && $data.addressList.length !== 0 ? {
|
||||
b: common_vendor.f($data.addressList, (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.countryName),
|
||||
b: common_vendor.t(item.provinceName),
|
||||
c: common_vendor.t(item.cityName),
|
||||
d: common_vendor.t(item.areaName),
|
||||
e: common_vendor.t(item.address),
|
||||
f: common_vendor.t(item.name),
|
||||
g: common_vendor.t(item.phone),
|
||||
h: item.id,
|
||||
i: common_vendor.n($data.selectAddress && $data.selectAddress.id === item.id ? "address_item address_item_sel" : "address_item"),
|
||||
j: common_vendor.o(($event) => $options.checkAddress(item), item.id)
|
||||
};
|
||||
})
|
||||
} : {
|
||||
c: common_vendor.p({
|
||||
src: "/static/common/not_search.png",
|
||||
width: "100",
|
||||
height: "100",
|
||||
bgColor: "#f1f6ff00"
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7183a377"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/address.js.map
|
||||
Reference in New Issue
Block a user