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.
50 lines
840 B
50 lines
840 B
2 years ago
|
import { wxRequestPost, wxNavigateTo } from "@utils/promise-wx-api";
|
||
|
|
||
|
const app = getApp();
|
||
|
|
||
|
Page({
|
||
|
data: {
|
||
|
iniLoaded: false,
|
||
|
|
||
|
myInfo: {},
|
||
|
},
|
||
|
|
||
|
async onShow() {
|
||
|
// 更新角色权限,这里他应该已经是居民了
|
||
|
await app.doAfterLogin();
|
||
|
|
||
|
await this.getInfo();
|
||
|
|
||
|
this.setData({
|
||
|
iniLoaded: true,
|
||
|
});
|
||
|
},
|
||
|
|
||
|
logout() {
|
||
|
app.logout();
|
||
|
},
|
||
|
|
||
|
async getInfo() {
|
||
|
const {
|
||
|
data: {
|
||
|
data: { code, data },
|
||
|
},
|
||
|
msg,
|
||
|
} = await wxRequestPost(
|
||
|
"epmetuser/userbaseinfo/selectuserbaseinfo",
|
||
|
{},
|
||
|
{
|
||
|
// isMock: true,
|
||
|
isQuiet: false,
|
||
|
}
|
||
|
);
|
||
|
|
||
|
if (msg === "success" && code === 0) {
|
||
|
console.log("data:", data);
|
||
|
this.setData({
|
||
|
myInfo: data,
|
||
|
});
|
||
|
}
|
||
|
},
|
||
|
});
|