优化页面
This commit is contained in:
@@ -12,7 +12,9 @@ const _sfc_main = {
|
||||
id: "",
|
||||
info: {},
|
||||
userSig: "",
|
||||
lastPage: ""
|
||||
lastPage: "",
|
||||
picture: "",
|
||||
Filename: components_generateFileName.generateFileName()
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -60,47 +62,41 @@ const _sfc_main = {
|
||||
});
|
||||
components_postFile.uploadFile({
|
||||
path: this.userinfo,
|
||||
name: components_generateFileName.generateFileName()
|
||||
}).then((res) => {
|
||||
this.userinfo = res;
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:86", err);
|
||||
});
|
||||
if (this.userinfo) {
|
||||
const res = await components_request.request({
|
||||
name: this.Filename
|
||||
}).then((ress) => {
|
||||
this.picture = ress;
|
||||
components_request.request({
|
||||
url: "user/inputUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
headerIcon: this.userinfo,
|
||||
headerIcon: this.Filename,
|
||||
nickName: this.name,
|
||||
code,
|
||||
usersig: this.userSig.userSig
|
||||
},
|
||||
userInfo: false
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "登录成功",
|
||||
icon: "success"
|
||||
});
|
||||
common_vendor.index.setStorageSync("userinfo", res.data.info);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.reLaunch({
|
||||
url: this.lastPage
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "登录失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "登录成功",
|
||||
icon: "success"
|
||||
});
|
||||
common_vendor.index.setStorageSync("userinfo", res.data.info);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.reLaunch({
|
||||
url: this.lastPage
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "登录失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "上传失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:120", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user