flat: zanc
This commit is contained in:
4
App.vue
4
App.vue
@@ -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')
|
||||
|
||||
@@ -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
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user