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