处理问题
This commit is contained in:
8
unpackage/dist/dev/mp-weixin/api/index.js
vendored
8
unpackage/dist/dev/mp-weixin/api/index.js
vendored
@@ -102,6 +102,13 @@ function fetchDashboard(data) {
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchUserInfo(data) {
|
||||
return api_request.request({
|
||||
url: "/index/userInfo",
|
||||
data,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
exports.fetchAddOrder = fetchAddOrder;
|
||||
exports.fetchAddTodo = fetchAddTodo;
|
||||
exports.fetchBooking = fetchBooking;
|
||||
@@ -117,4 +124,5 @@ exports.fetchRoomOrder = fetchRoomOrder;
|
||||
exports.fetchRooms = fetchRooms;
|
||||
exports.fetchTodoList = fetchTodoList;
|
||||
exports.fetchUnBooking = fetchUnBooking;
|
||||
exports.fetchUserInfo = fetchUserInfo;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/index.js.map
|
||||
|
||||
12
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
12
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
@@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
const api_index = require("../../api/index.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_avatar2 = common_vendor.resolveComponent("nut-avatar");
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
@@ -27,17 +28,24 @@ const _sfc_main = {
|
||||
init();
|
||||
});
|
||||
const init = () => {
|
||||
api_index.fetchUserInfo().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:72", res);
|
||||
common_vendor.index.setStorageSync("uid", res.user_id);
|
||||
common_vendor.index.setStorageSync("user_name", res.user_name);
|
||||
common_vendor.index.setStorageSync("role", res.role.value);
|
||||
common_vendor.index.setStorageSync("staff_name", res.staff_name);
|
||||
});
|
||||
common_vendor.index.getStorageSync("user_name");
|
||||
let staff_name = common_vendor.index.getStorageSync("staff_name");
|
||||
let role = common_vendor.index.getStorageSync("role");
|
||||
let user_id = common_vendor.index.getStorageSync("uid");
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:70", "staff_name", staff_name);
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:82", "staff_name", staff_name);
|
||||
uid.value = user_id;
|
||||
staffName.value = staff_name;
|
||||
staffRole.value = role;
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:81", "init");
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:92", "init");
|
||||
init();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
|
||||
Reference in New Issue
Block a user