flat: zanc
This commit is contained in:
4
App.vue
4
App.vue
@@ -15,9 +15,9 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function(options) {
|
onLaunch: function(options) {
|
||||||
if (options.query.token) {
|
if (options.query.ticket) {
|
||||||
uni.reLaunch({
|
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) {
|
} else if (this.$store.state.user.token) {
|
||||||
this.$store.dispatch('startRefreshTokenTimer')
|
this.$store.dispatch('startRefreshTokenTimer')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
} from '@/untils/store.js'
|
} from '@/untils/store.js'
|
||||||
import website from "@/config/website";
|
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',
|
url: '/api/jobslink-auth/oauth/token',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -24,7 +24,7 @@ export const loginByUsername = (tenantId, username, password, type, key, code, t
|
|||||||
grant_type: (website.captchaMode ? "captcha" : "password"),
|
grant_type: (website.captchaMode ? "captcha" : "password"),
|
||||||
scope: "all",
|
scope: "all",
|
||||||
type,
|
type,
|
||||||
token
|
ticket
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: ''
|
title: ''
|
||||||
})
|
})
|
||||||
if(options.token) {
|
if (options.ticket) {
|
||||||
const that = this
|
const that = this
|
||||||
console.log(options)
|
console.log(options)
|
||||||
this.$store.dispatch("LoginByUsername", {
|
this.$store.dispatch("LoginByUsername", {
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
key: '',
|
key: '',
|
||||||
code: '1111',
|
code: '1111',
|
||||||
type: "account",
|
type: "account",
|
||||||
token: options.token,
|
ticket: options.ticket,
|
||||||
tenantId: website.tenantId
|
tenantId: website.tenantId
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
console.log('123', resp)
|
console.log('123', resp)
|
||||||
@@ -64,7 +64,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-container{
|
.app-container {}
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -80,7 +80,7 @@ const user = {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type,
|
loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type,
|
||||||
userInfo.key,
|
userInfo.key,
|
||||||
userInfo.code, userInfo.token).then(res => {
|
userInfo.code, userInfo.ticket).then(res => {
|
||||||
|
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
if (data.error_description) {
|
if (data.error_description) {
|
||||||
|
|||||||
Reference in New Issue
Block a user