合同小程序前端代码仓库
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.
 
 
 
 
 

99 lines
3.2 KiB

"use strict";
const common_vendor = require("../../common/vendor.js");
const api = require("../../api.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = common_vendor.defineComponent({
data() {
return {
avatar: "",
nickName: "",
aboutUs: "",
popupNoCancelShow: false
};
},
mounted() {
api.isToken();
this.avatar = getApp().usrInfo.avatar;
this.nickName = getApp().usrInfo.nickName;
this.aboutUs = getApp().aboutUs;
},
methods: {
showModal() {
this.popupNoCancelShow = true;
},
getConfirm() {
this.popupNoCancelShow = false;
},
closeModal() {
this.popupNoCancelShow = false;
},
logout() {
common_vendor.index.showModal({
title: "提示",
content: "确定要退出登录吗?",
success: (res) => {
if (res.confirm) {
api.logout().then((res2 = null) => {
if (res2.success) {
common_vendor.index.showToast({
title: "退出登录成功",
icon: "success",
success: () => {
common_vendor.index.clearStorageSync();
setTimeout(() => {
common_vendor.index.navigateTo({ url: "/pages/index/login" });
}, 1500);
}
});
}
});
}
}
});
}
}
});
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_mosowe_confirm_popup2 = common_vendor.resolveComponent("mosowe-confirm-popup");
(_easycom_uni_icons2 + _easycom_mosowe_confirm_popup2)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_mosowe_confirm_popup = () => "../../uni_modules/mosowe-confirm-popup/components/mosowe-confirm-popup/mosowe-confirm-popup.js";
if (!Math) {
(_easycom_uni_icons + _easycom_mosowe_confirm_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.avatar,
b: common_vendor.t($data.nickName),
c: common_assets._imports_0$2,
d: common_vendor.p({
type: "right"
}),
e: common_vendor.o((...args) => $options.showModal && $options.showModal(...args)),
f: common_assets._imports_1$1,
g: common_vendor.p({
type: "right"
}),
h: common_assets._imports_2$1,
i: common_vendor.p({
type: "right"
}),
j: common_vendor.o((...args) => $options.logout && $options.logout(...args)),
k: $data.aboutUs,
l: common_vendor.o((...args) => $options.closeModal && $options.closeModal(...args)),
m: common_vendor.o((...args) => $options.getConfirm && $options.getConfirm(...args)),
n: common_vendor.o(($event) => $data.popupNoCancelShow = $event),
o: common_vendor.p({
title: "用户协议",
confirmText: true,
cancelText: true,
modelValue: $data.popupNoCancelShow
}),
p: common_vendor.sei(_ctx.virtualHostId, "view")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/wode.js.map