21
This commit is contained in:
parent
204b0c1ab9
commit
655d45a160
@ -2,8 +2,8 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||||
|
|
||||||
baseUrl: 'https://www.nuoyunr.com/jx',
|
imagesUrl: 'http://localhost:48080/admin-api',
|
||||||
imagesUrl: 'https://www.nuoyunr.com/jx',
|
baseUrl: 'http://localhost:48080/admin-api',
|
||||||
// baseUrl: 'http://192.168.31.54:8016/jx',
|
// baseUrl: 'http://192.168.31.54:8016/jx',
|
||||||
// imagesUrl: 'http://192.168.31.54:8016/jx',
|
// imagesUrl: 'http://192.168.31.54:8016/jx',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
|
import config from '@/config'
|
||||||
import {
|
import {
|
||||||
setToken
|
setToken
|
||||||
} from '@/utils/auth.js'
|
} from '@/utils/auth.js'
|
||||||
@ -160,6 +161,8 @@
|
|||||||
},
|
},
|
||||||
getPhone(e) {
|
getPhone(e) {
|
||||||
console.log('执行了');
|
console.log('执行了');
|
||||||
|
config.header = config.header || {}
|
||||||
|
config.header['Tenant-Id'] = '1'
|
||||||
if (this.privacyPolicyChecked == false) {
|
if (this.privacyPolicyChecked == false) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
@ -171,8 +174,9 @@
|
|||||||
uni.checkSession({
|
uni.checkSession({
|
||||||
success: () => {
|
success: () => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: this.baseUrl + "/wxLoginJc",
|
url: this.baseUrl + "/rescue/wxLogin",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
header: config.header,
|
||||||
data: {
|
data: {
|
||||||
code: uni.getStorageSync('c1'),
|
code: uni.getStorageSync('c1'),
|
||||||
encryptedIv: e.detail.iv,
|
encryptedIv: e.detail.iv,
|
||||||
@ -182,11 +186,12 @@
|
|||||||
},
|
},
|
||||||
success: (rex) => {
|
success: (rex) => {
|
||||||
console.log('yongdao返回', rex)
|
console.log('yongdao返回', rex)
|
||||||
if (rex.data.code == 200) {
|
if (rex.data.code == 0) {
|
||||||
if (this.loginStatus) {
|
// if (this.loginStatus) {
|
||||||
clearInterval(this.loginStatus)
|
// clearInterval(this.loginStatus)
|
||||||
}
|
// }
|
||||||
uni.setStorageSync('App-Token', rex.data.token);
|
uni.setStorageSync('App-Token', rex.data.token);
|
||||||
|
debugger
|
||||||
if (this.returnUrl) {
|
if (this.returnUrl) {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
} else {
|
} else {
|
||||||
@ -229,7 +234,7 @@
|
|||||||
userinfo() {
|
userinfo() {
|
||||||
console.log('执行了');
|
console.log('执行了');
|
||||||
request({
|
request({
|
||||||
url: '/getAppInfo',
|
url: '/jx/auth/getAppInfo',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
@ -17,6 +17,7 @@ const request = config => {
|
|||||||
// 是否需要设置 token
|
// 是否需要设置 token
|
||||||
const isToken = (config.headers || {}).isToken === false
|
const isToken = (config.headers || {}).isToken === false
|
||||||
config.header = config.header || {}
|
config.header = config.header || {}
|
||||||
|
config.header['Tenant-Id'] = '1'
|
||||||
if (getToken() && !isToken) {
|
if (getToken() && !isToken) {
|
||||||
config.header['Authorization'] = 'Bearer ' + getToken()
|
config.header['Authorization'] = 'Bearer ' + getToken()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user