style: 修改代码格式
This commit is contained in:
@@ -1,8 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="blankPage">
|
<div class="blankPage">
|
||||||
<van-icon name="clear" color="#dabb27" size="70" />
|
<van-icon name="clear" color="#dabb27" size="70" />
|
||||||
<div style="font-size: 15px;margin-top: 20px;color: #8c939d">当前任务不支持手机端处理</div>
|
<div style="font-size: 15px;margin-top: 20px;color: #8c939d">
|
||||||
<el-button type="primary" size="small" style="margin-top: 30px;width: 270px;" @click="closeWindow()">返回</el-button>
|
当前任务不支持手机端处理
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
style="margin-top: 30px;width: 270px;"
|
||||||
|
@click="closeWindow()"
|
||||||
|
>
|
||||||
|
返回
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -12,7 +21,7 @@ import { Icon } from 'vant';
|
|||||||
|
|
||||||
Vue.use(Icon);
|
Vue.use(Icon);
|
||||||
export default {
|
export default {
|
||||||
name: 'blankPage',
|
name: 'BlankPage',
|
||||||
data () {
|
data () {
|
||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
|
|||||||
+10
-10
@@ -9,7 +9,7 @@ import { Message, MessageBox, Loading } from 'element-ui'
|
|||||||
import { Dialog } from 'vant'
|
import { Dialog } from 'vant'
|
||||||
|
|
||||||
function getCode () {
|
function getCode () {
|
||||||
let url = window.location.href
|
const url = window.location.href
|
||||||
if (url && url !== '') {
|
if (url && url !== '') {
|
||||||
if (url.split('code=').length > 1) {
|
if (url.split('code=').length > 1) {
|
||||||
return url.split('code=')[1]
|
return url.split('code=')[1]
|
||||||
@@ -61,12 +61,12 @@ function loginOut() {
|
|||||||
// idm登录
|
// idm登录
|
||||||
function loginInIdm (code) {
|
function loginInIdm (code) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let loading = Loading.service({
|
const loading = Loading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: '登录中...',
|
text: '登录中...',
|
||||||
spinner: 'el-icon-loading'
|
spinner: 'el-icon-loading'
|
||||||
})
|
})
|
||||||
let _formData = new FormData()
|
const _formData = new FormData()
|
||||||
_formData.append('code', code)
|
_formData.append('code', code)
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
loginIdm(_formData).then(res => {
|
loginIdm(_formData).then(res => {
|
||||||
@@ -90,8 +90,8 @@ function loginInIdm(code) {
|
|||||||
|
|
||||||
// welink登录
|
// welink登录
|
||||||
function loginInPhone () {
|
function loginInPhone () {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise( (resolve, reject) => {
|
||||||
let loading = Loading.service({
|
const loading = Loading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: '登录中...',
|
text: '登录中...',
|
||||||
spinner: 'el-icon-loading'
|
spinner: 'el-icon-loading'
|
||||||
@@ -99,7 +99,7 @@ function loginInPhone() {
|
|||||||
hwh5.getAuthCode().then(data => {
|
hwh5.getAuthCode().then(data => {
|
||||||
console.log('获取到了welinkCode', data)
|
console.log('获取到了welinkCode', data)
|
||||||
if (data) {
|
if (data) {
|
||||||
let code = data.code
|
const code = data.code
|
||||||
getTokenToWeLink({
|
getTokenToWeLink({
|
||||||
code: code,
|
code: code,
|
||||||
name: encodeURIComponent('standards' + '-' + 'regulations'),
|
name: encodeURIComponent('standards' + '-' + 'regulations'),
|
||||||
@@ -134,11 +134,11 @@ function loginNew(res) {
|
|||||||
Message.warning('未分配组织机构,请联系管理员分配后重新登录')
|
Message.warning('未分配组织机构,请联系管理员分配后重新登录')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let Base64 = require('js-base64').Base64
|
const Base64 = require('js-base64').Base64
|
||||||
// 解析用户信息
|
// 解析用户信息
|
||||||
let userInfoStr = Base64.decode(res.data)
|
const userInfoStr = Base64.decode(res.data)
|
||||||
let userInfoJSON = decodeURIComponent(userInfoStr)
|
const userInfoJSON = decodeURIComponent(userInfoStr)
|
||||||
let userInfo = JSON.parse(userInfoJSON)
|
const userInfo = JSON.parse(userInfoJSON)
|
||||||
userInfo.userId = userInfo.usid
|
userInfo.userId = userInfo.usid
|
||||||
store.commit('setToken', userInfo.token)
|
store.commit('setToken', userInfo.token)
|
||||||
store.commit('setUserInfo', JSON.stringify(userInfo))
|
store.commit('setUserInfo', JSON.stringify(userInfo))
|
||||||
|
|||||||
Reference in New Issue
Block a user