flat: zanc

This commit is contained in:
Apcallover
2024-04-15 16:26:25 +08:00
parent 4afc5100ae
commit db4a3f118e
4 changed files with 140 additions and 142 deletions

View File

@@ -15,9 +15,9 @@
export default {
onLaunch: function(options) {
if (options.query.token) {
if (options.query.ticket) {
uni.reLaunch({
url: '/pages/login/blank?token=' + options.query.token
url: '/pages/login/blank?ticket=' + options.query.ticket
})
} else if (this.$store.state.user.token) {
this.$store.dispatch('startRefreshTokenTimer')

View File

@@ -6,7 +6,7 @@ import {
} from '@/untils/store.js'
import website from "@/config/website";
export const loginByUsername = (tenantId, username, password, type, key, code, token) => request({
export const loginByUsername = (tenantId, username, password, type, key, code, ticket) => request({
url: '/api/jobslink-auth/oauth/token',
method: 'post',
headers: {
@@ -24,7 +24,7 @@ export const loginByUsername = (tenantId, username, password, type, key, code, t
grant_type: (website.captchaMode ? "captcha" : "password"),
scope: "all",
type,
token
ticket
},
});

View File

@@ -19,7 +19,7 @@
uni.showLoading({
title: ''
})
if(options.token) {
if (options.ticket) {
const that = this
console.log(options)
this.$store.dispatch("LoginByUsername", {
@@ -28,7 +28,7 @@
key: '',
code: '1111',
type: "account",
token: options.token,
ticket: options.ticket,
tenantId: website.tenantId
}).then((resp) => {
console.log('123', resp)
@@ -64,7 +64,5 @@
</script>
<style lang="scss" scoped>
.app-container{
}
.app-container {}
</style>

View File

@@ -80,7 +80,7 @@ const user = {
return new Promise((resolve, reject) => {
loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type,
userInfo.key,
userInfo.code, userInfo.token).then(res => {
userInfo.code, userInfo.ticket).then(res => {
const data = res.data;
if (data.error_description) {