123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const sheep_index = require("../../sheep/index.js");
- require("../../sheep/store/index.js");
- require("../../sheep/helper/index.js");
- const sheep_api_member_auth = require("../../sheep/api/member/auth.js");
- require("../../sheep/request/index.js");
- require("../../sheep/config/index.js");
- require("../../sheep/api/index.js");
- require("../../sheep/api/distri/score.js");
- require("../../sheep/api/distri/share.js");
- require("../../sheep/api/distri/team.js");
- require("../../sheep/api/infra/file.js");
- require("../../sheep/api/member/address.js");
- require("../../sheep/api/member/point.js");
- require("../../sheep/api/member/signin.js");
- require("../../sheep/api/member/social.js");
- require("../../sheep/api/member/user.js");
- require("../../sheep/api/migration/app.js");
- require("../../sheep/api/migration/chat.js");
- require("../../sheep/api/migration/index.js");
- require("../../sheep/api/migration/third.js");
- require("../../sheep/api/pay/channel.js");
- require("../../sheep/api/pay/order.js");
- require("../../sheep/api/pay/wallet.js");
- require("../../sheep/api/product/category.js");
- require("../../sheep/api/product/comment.js");
- require("../../sheep/api/product/favorite.js");
- require("../../sheep/api/product/history.js");
- require("../../sheep/api/product/spu.js");
- require("../../sheep/api/promotion/activity.js");
- require("../../sheep/api/promotion/article.js");
- require("../../sheep/api/promotion/bargain.js");
- require("../../sheep/api/promotion/combination.js");
- require("../../sheep/api/promotion/coupon.js");
- require("../../sheep/api/promotion/diy.js");
- require("../../sheep/api/promotion/rewardActivity.js");
- require("../../sheep/api/promotion/seckill.js");
- require("../../sheep/api/system/area.js");
- require("../../sheep/api/system/voice.js");
- require("../../sheep/api/trade/afterSale.js");
- require("../../sheep/api/trade/brokerage.js");
- require("../../sheep/api/trade/cart.js");
- require("../../sheep/api/trade/config.js");
- require("../../sheep/api/trade/delivery.js");
- require("../../sheep/api/trade/order.js");
- require("../../sheep/url/index.js");
- require("../../sheep/router/index.js");
- require("../../sheep/hooks/useModal.js");
- require("../../sheep/helper/test.js");
- require("../../sheep/helper/throttle.js");
- require("../../sheep/platform/index.js");
- require("../../sheep/platform/provider/wechat/index.js");
- require("../../sheep/platform/provider/wechat/miniProgram.js");
- require("../../sheep/platform/provider/apple/index.js");
- require("../../sheep/platform/share.js");
- require("../../sheep/platform/pay.js");
- require("../../sheep/config/zIndex.js");
- require("../../sheep/store/app.js");
- require("../../sheep/store/user.js");
- require("../../sheep/store/cart.js");
- require("../../sheep/store/sys.js");
- require("../../sheep/store/modal.js");
- require("../../sheep/helper/digit.js");
- if (!Array) {
- const _easycom_uni_list_chat2 = common_vendor.resolveComponent("uni-list-chat");
- const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item");
- const _easycom_su_image2 = common_vendor.resolveComponent("su-image");
- const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list");
- const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
- const _easycom_su_fixed2 = common_vendor.resolveComponent("su-fixed");
- const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout");
- (_easycom_uni_list_chat2 + _easycom_uni_list_item2 + _easycom_su_image2 + _easycom_uni_list2 + _easycom_uni_forms2 + _easycom_su_fixed2 + _easycom_s_layout2)();
- }
- const _easycom_uni_list_chat = () => "../../uni_modules/uni-list/components/uni-list-chat/uni-list-chat.js";
- const _easycom_uni_list_item = () => "../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js";
- const _easycom_su_image = () => "../../sheep/ui/su-image/su-image.js";
- const _easycom_uni_list = () => "../../uni_modules/uni-list/components/uni-list/uni-list.js";
- const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.js";
- const _easycom_su_fixed = () => "../../sheep/ui/su-fixed/su-fixed.js";
- const _easycom_s_layout = () => "../../sheep/components/s-layout/s-layout.js";
- if (!Math) {
- (_easycom_uni_list_chat + _easycom_uni_list_item + _easycom_su_image + _easycom_uni_list + _easycom_uni_forms + _easycom_su_fixed + _easycom_s_layout)();
- }
- const _sfc_main = {
- __name: "setting",
- setup(__props) {
- const isLogin = common_vendor.computed(() => sheep_index.sheep.$store("user").isLogin);
- const state = common_vendor.reactive({
- model: {},
- // 个人信息
- rules: {},
- thirdInfo: {}
- // 社交用户的信息
- });
- const userInfo = common_vendor.computed(() => sheep_index.sheep.$store("user").userInfo);
- const getUserInfo = async () => {
- const userInfo2 = await sheep_index.sheep.$store("user").getInfo();
- state.model = common_vendor.lodashExports.clone(userInfo2);
- if (sheep_index.sheep.$platform.name !== "H5") {
- const result = await sheep_index.sheep.$platform.useProvider("wechat").getInfo();
- state.thirdInfo = result || {};
- }
- };
- function onLogout() {
- common_vendor.index.showModal({
- title: "提示",
- content: "确认退出账号?",
- success: async function(res) {
- if (!res.confirm) {
- return;
- }
- const {
- code
- } = await sheep_api_member_auth.AuthUtil.logout();
- if (code !== 0) {
- return;
- }
- sheep_index.sheep.$store("user").logout();
- common_vendor.index.removeStorageSync("linkId");
- sheep_index.sheep.$router.go("/pages/index/user");
- }
- });
- }
- common_vendor.onBeforeMount(() => {
- getUserInfo();
- });
- return (_ctx, _cache) => {
- var _a, _b, _c;
- return common_vendor.e({
- a: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/info")),
- b: common_vendor.p({
- clickable: true,
- ["avatar-circle"]: true,
- title: (_a = state.model) == null ? void 0 : _a.nickname,
- avatar: (_b = state.model) == null ? void 0 : _b.avatar,
- note: "个性签名"
- }),
- c: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/address/list")),
- d: common_vendor.p({
- clickable: true,
- title: "实体收货地址管理",
- showArrow: true,
- border: false
- }),
- e: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/dummyAddress/list")),
- f: common_vendor.p({
- clickable: true,
- title: "虚拟收货地址管理",
- showArrow: true,
- border: false
- }),
- g: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/address/list")),
- h: common_vendor.p({
- clickable: !userInfo.value.mobile,
- title: "实名认证",
- showArrow: true,
- border: false
- }),
- i: common_vendor.p({
- current: 0,
- src: (_c = state.model) == null ? void 0 : _c.avatar,
- height: 100,
- width: 100,
- radius: 0,
- mode: "scaleToFill"
- }),
- j: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/qrcode-share")),
- k: common_vendor.p({
- title: "我的二维码",
- clickable: true,
- border: false
- }),
- l: common_vendor.p({
- border: false
- }),
- m: common_vendor.p({
- model: state.model,
- rules: state.rules,
- labelPosition: "left",
- border: true
- }),
- n: isLogin.value
- }, isLogin.value ? {
- o: common_vendor.o(onLogout)
- } : {}, {
- p: common_vendor.p({
- bottom: true,
- placeholder: true
- }),
- q: common_vendor.p({
- title: "用户信息"
- })
- });
- };
- }
- };
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-806b15dc"], ["__file", "D:/zx/mall-front-app/pages/user/setting.vue"]]);
- wx.createPage(MiniProgramPage);
|