12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const _sfc_main = {
- data() {
- return {
- avatarUrl: "",
- phone: "",
- nickname: "",
- studyList: [
- { title: "日历", icon: "/static/calender.png", path: "/pages/calendar/index" },
- { title: "我的下载", icon: "/static/xiazai.png", path: "/pages/search/index" },
- { title: "错题本", icon: "/static/cuotiben.png", path: "/pages/search/index" },
- { title: "超级会员", icon: "/static/supperhuiyuan.png", path: "/pages/discover/index" },
- { title: "订阅店铺", icon: "/static/dingyuedianpu.png", path: "/pages/discover/index" }
- ],
- menuList: [
- // <!-- 商家后台模块 -->
- { title: "商家店铺后台", icon: "/static/shangjiadianpu.png", path: "/pages/mine/Merchant" },
- { title: "回收站", icon: "/static/huishouzhan.png", path: "/pages/mine/recycle" },
- { title: "通知设置", icon: "/static/tongzhi.png", path: "/pages/mine/notify" },
- { title: "意见反馈", icon: "/static/yijianfankui.png", path: "/pages/mine/feedback" },
- { title: "在线客服", icon: "/static/kefu.png", path: "/pages/mine/service" },
- { title: "了解小鹅通", icon: "/static/liaojie.png", path: "/pages/mine/about" },
- { title: "设置", icon: "/static/shezhi.png", path: "/pages/mine/setting" }
- ]
- };
- },
- onLoad() {
- this.getUid();
- },
- methods: {
- goToProfile() {
- common_vendor.index.navigateTo({ url: "/pages/mine/profile" });
- },
- goTo(path) {
- common_vendor.index.navigateTo({ url: path });
- },
- async getUid() {
- try {
- const res = await common_vendor.index.request({
- url: "http://localhost:9527/api/getUid",
- method: "GET"
- });
- common_vendor.index.__f__("log", "at pages/mine/index.vue:82", res);
- if (res.statusCode === 200) {
- this.nickname = res.data.data.nickname;
- this.avatarUrl = res.data.data.avatarUrl;
- this.phone = res.data.data.phone;
- } else {
- this.avatarUrl = this.defaultAvatar;
- this.phone = "获取失败";
- }
- } catch (e) {
- this.avatarUrl = this.defaultAvatar;
- this.phone = "网络错误";
- }
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: $data.avatarUrl,
- b: common_vendor.t($data.nickname),
- c: common_vendor.t($data.phone),
- d: common_vendor.o((...args) => $options.goToProfile && $options.goToProfile(...args)),
- e: common_vendor.f($data.studyList, (item, k0, i0) => {
- return {
- a: item.icon,
- b: common_vendor.t(item.title),
- c: item.title,
- d: common_vendor.o(($event) => $options.goTo(item.path), item.title)
- };
- }),
- f: common_vendor.f($data.menuList, (item, idx, i0) => {
- return common_vendor.e({
- a: item.icon,
- b: common_vendor.t(item.title),
- c: common_vendor.o(($event) => $options.goTo(item.path), item.title),
- d: idx !== $data.menuList.length - 1
- }, idx !== $data.menuList.length - 1 ? {} : {}, {
- e: item.title
- });
- })
- };
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/index.js.map
|