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.
60 lines
2.3 KiB
60 lines
2.3 KiB
"use strict"; |
|
const common_vendor = require("../../common/vendor.js"); |
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ |
|
__name: "user", |
|
setup(__props) { |
|
let users = common_vendor.ref(null); |
|
let butlist = common_vendor.ref([ |
|
{ icon: "/static/usericon1.png", name: "通讯录", type: 1 }, |
|
{ icon: "/static/usericon2.png", name: "计件工资", type: 2 }, |
|
{ icon: "/static/usericon3.png", name: "系统设置", type: 3 }, |
|
{ icon: "/static/usericon4.png", name: "安全设置", type: 4 }, |
|
{ icon: "/static/usericon5.png", name: "关于我们", type: 5 }, |
|
{ icon: "/static/usericon6.png", name: "系统更新", type: 6 }, |
|
{ icon: "/static/usericon7.png", name: "分享", type: 7 } |
|
]); |
|
users.value = common_vendor.index.getStorageSync("userinfo"); |
|
function gologin() { |
|
common_vendor.index.navigateTo({ |
|
url: "/pages/login/login" |
|
}); |
|
} |
|
function removeall() { |
|
const res = common_vendor.index.getStorageInfoSync(); |
|
res.keys.map((item) => { |
|
if (item == "loginuser" || item == "HistoryDate") { |
|
return; |
|
} |
|
common_vendor.index.removeStorageSync(item); |
|
}); |
|
common_vendor.index.navigateTo({ |
|
url: "/pages/login/login" |
|
}); |
|
console.log(res.currentSize); |
|
console.log(res.limitSize); |
|
} |
|
return (_ctx, _cache) => { |
|
var _a, _b, _c, _d; |
|
return common_vendor.e({ |
|
a: !((_a = common_vendor.unref(users)) == null ? void 0 : _a.user_id) |
|
}, !((_b = common_vendor.unref(users)) == null ? void 0 : _b.user_id) ? { |
|
b: common_vendor.o(gologin) |
|
} : {}, { |
|
c: (_c = common_vendor.unref(users)) == null ? void 0 : _c.user_id |
|
}, ((_d = common_vendor.unref(users)) == null ? void 0 : _d.user_id) ? { |
|
d: common_vendor.t(common_vendor.unref(users).real_name), |
|
e: common_vendor.t(common_vendor.unref(users).role_name) |
|
} : {}, { |
|
f: common_vendor.f(common_vendor.unref(butlist), (item, k0, i0) => { |
|
return { |
|
a: item.icon, |
|
b: common_vendor.t(item.name) |
|
}; |
|
}), |
|
g: common_vendor.o(removeall) |
|
}); |
|
}; |
|
} |
|
}); |
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/物流/logPm/pages/user/user.vue"]]); |
|
wx.createPage(MiniProgramPage);
|
|
|