flat: 登陆对接

This commit is contained in:
Apcallover
2025-11-18 20:38:05 +08:00
parent d2e77e66fc
commit ca4b038e14
4 changed files with 10 additions and 8 deletions

11
App.vue
View File

@@ -49,7 +49,6 @@ function getUserInfo() {
lightAppJssdk.user.getUserInfoWithEncryptedParamByAppId({
appId: 'qdsrgznrgpp', // 接入方在成功创建应用后自动生成
success: function (data) {
console.log('res', data);
if (data == '未登录') onLoginApp();
else {
if (typeof data == 'string') data = JSON.parse(data);
@@ -106,8 +105,8 @@ function oncloseWindow() {
}
function loginCallback(userInfo) {
let pramams = {
token: userInfo,
let params = {
username: userInfo,
};
$api.createRequest('/app/login', params, 'post').then((resData) => {
useUserStore()
@@ -119,7 +118,9 @@ function loginCallback(userInfo) {
url: '/pages/index/index',
});
} else {
nextStep();
uni.redirectTo({
url: '/pages/login/login',
});
}
});
});
@@ -179,4 +180,4 @@ uni-modal,
body {
font-family: 'PingFangSC-Regular', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
</style>
</style>