Compare commits

...

2 Commits

Author SHA1 Message Date
PQZ
fa30cbfaf0 1 2024-08-28 16:28:21 +08:00
PQZ
a441fbd0f6 1 2024-08-28 16:22:49 +08:00
3 changed files with 6 additions and 5 deletions

View File

@ -3,8 +3,8 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
//baseUrl: 'https://www.nuoyunr.com/jx',
imagesUrl: 'https://www.nuoyunr.com/jx',
baseUrl: 'http://192.168.31.54:8016/jx',
imagesUrl: 'http://localhost:48080/admin-api',
baseUrl: 'http://localhost:48080/admin-api',
// imagesUrl: 'http://192.168.31.54:8016/jx',
// 应用信息
appInfo: {

View File

@ -144,12 +144,12 @@
}
this.appuser.type = 0
request({
url: '/loginApp',
url: '/system/auth/loginApp',
method: 'post',
data: this.appuser
}).then((res) => {
if (res.code == 200) {
uni.setStorageSync("App-Token", res.token)
if (res.code == 0) {
uni.setStorageSync("App-Token", res.data.token)
uni.setStorageSync("loginType", this.tabindex)
if (this.tabindex == 0) {

View File

@ -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()
}