爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

137 lines
4.5 KiB

"use strict";
const common_vendor = require("../../common/vendor.js");
const pages_mixins_pullRefreshMixin = require("../mixins/pullRefreshMixin.js");
const emailPopup = () => "../../wxcomponents/email-popup/email-popup.js";
const _sfc_main = {
mixins: [pages_mixins_pullRefreshMixin.pullRefreshMixin],
components: { emailPopup },
data() {
return {
statusBarHeight: 0,
navBarHeight: 0,
// px
navBarHeightRpx: 0,
// rpx
showEmailPopup: false,
showPhonePopup: false,
faqList: []
};
},
onLoad() {
const sysInfo = common_vendor.index.getSystemInfoSync();
this.statusBarHeight = sysInfo.statusBarHeight;
let navBarHeight = 24;
try {
const menuButtonInfo = common_vendor.index.getMenuButtonBoundingClientRect();
navBarHeight = menuButtonInfo.bottom + menuButtonInfo.top - sysInfo.statusBarHeight;
} catch (e) {
}
this.navBarHeight = navBarHeight;
this.navBarHeightRpx = Math.round(navBarHeight * 750 / sysInfo.windowWidth);
this.getQuestionList();
},
computed: {
phone() {
common_vendor.index.__f__("log", "at pages/subcomponent/admin_faq.vue:88", getApp().globalData.configData, "getApp().globalData.configData");
const item = getApp().globalData.configData.find((i) => i.keyName === "phone");
return item ? item.keyContent : "";
}
},
methods: {
async onRefresh() {
await new Promise((resolve) => setTimeout(resolve, 1e3));
common_vendor.index.stopPullRefresh();
},
openEmailPopup() {
this.showEmailPopup = true;
},
handleCloseEmailPopup() {
this.showEmailPopup = false;
},
navigateBack() {
common_vendor.index.navigateBack();
},
callService() {
this.showPhonePopup = true;
},
closePhonePopup() {
this.showPhonePopup = false;
},
makePhoneCall() {
if (this.phone) {
common_vendor.index.makePhoneCall({
phoneNumber: this.phone
//仅为示例
});
} else {
common_vendor.index.showToast({ title: "暂无客服电话", icon: "none" });
}
},
copyEmail() {
if (this.phone) {
common_vendor.index.makePhoneCall({
phoneNumber: this.phone
//仅为示例
});
} else {
common_vendor.index.showToast({ title: "暂无微信客服", icon: "none" });
}
},
getQuestionList() {
this.$api("getQuestionList", {}, (res) => {
if (res && res.success && res.result && res.result.records) {
this.faqList = res.result.records.map((item) => ({
q: item.title,
a: item.titleText
}));
}
});
}
}
};
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _component_email_popup = common_vendor.resolveComponent("email-popup");
(_easycom_uni_icons2 + _component_email_popup)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
type: "left",
size: "20"
}),
b: common_vendor.o((...args) => $options.navigateBack && $options.navigateBack(...args)),
c: common_vendor.f($data.faqList, (item, idx, i0) => {
return {
a: common_vendor.t(item.q),
b: common_vendor.t(item.a),
c: idx
};
}),
d: common_vendor.o((...args) => $options.callService && $options.callService(...args)),
e: common_vendor.o((...args) => $options.openEmailPopup && $options.openEmailPopup(...args)),
f: common_vendor.o($options.handleCloseEmailPopup),
g: common_vendor.o($options.copyEmail),
h: common_vendor.p({
show: $data.showEmailPopup
}),
i: $data.showPhonePopup
}, $data.showPhonePopup ? {
j: common_vendor.o((...args) => $options.closePhonePopup && $options.closePhonePopup(...args)),
k: common_vendor.o((...args) => $options.closePhonePopup && $options.closePhonePopup(...args)),
l: common_vendor.t($options.phone),
m: common_vendor.o($options.makePhoneCall),
n: common_vendor.p({
type: "phone-filled",
size: "28",
color: "#222"
})
} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2d4a740c"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/subcomponent/admin_faq.js.map