Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-app
Commits
0d9b6ba6
Commit
0d9b6ba6
authored
Dec 25, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了配置文件
parent
70c149da
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
40 deletions
+22
-40
config.js
config.js
+19
-0
main.js
main.js
+1
-2
api.js
util/api.js
+2
-24
vue.config.js
vue.config.js
+0
-14
No files found.
config.js
0 → 100644
View file @
0d9b6ba6
// 应用全局配置
module
.
exports
=
{
baseUrl
:
'http://localhost:8082'
}
// module.exports = {
// devServer: {
// proxy: {
// '/wxmapi': {
// // target: 'http://192.168.1.47:8082',
// target: 'http://localhost:8082',
// // target: 'https://www.wxmblog.com/wxmapi',
// changeOrigin: true,
// pathRewrite: {
// '^/wxmapi': ''
// }
// }
// },
// }
// }
main.js
View file @
0d9b6ba6
...
@@ -16,13 +16,12 @@ import {
...
@@ -16,13 +16,12 @@ import {
request
,
request
,
BASE_URL
,
BASE_URL
,
getId
,
getId
,
AMAPKEY
}
from
'util/api.js'
;
}
from
'util/api.js'
;
Vue
.
prototype
.
$myRequest
=
request
;
// 接口请求
Vue
.
prototype
.
$myRequest
=
request
;
// 接口请求
Vue
.
prototype
.
$BASE_URL
=
BASE_URL
;
//正式接口
Vue
.
prototype
.
$BASE_URL
=
BASE_URL
;
//正式接口
Vue
.
prototype
.
$getId
=
getId
;
// 获取缓存用户信息
Vue
.
prototype
.
$getId
=
getId
;
// 获取缓存用户信息
Vue
.
prototype
.
$AMAPKEY
=
AMAPKEY
;
// 定位key
// 导入并挂载全局的分享方法
// 导入并挂载全局的分享方法
import
share
from
'@/common/share.js'
import
share
from
'@/common/share.js'
...
...
util/api.js
View file @
0d9b6ba6
import
config
from
'@/config'
// #ifdef H5
// #ifdef H5
// export const BASE_URL = `${location.protocol}//${location.host}/wxmapi`
// export const BASE_URL = `${location.protocol}//${location.host}/wxmapi`
// #endif
// #endif
// #ifndef H5
// #ifndef H5
// 请求接口
// 请求接口
//export const BASE_URL = 'https://www.wxmblog.com/wxmapi'; //正式接口
//export const BASE_URL = 'https://www.wxmblog.com/wxmapi'; //正式接口
export
const
BASE_URL
=
'http://localhost:8092'
;
//本地接口
export
const
BASE_URL
=
config
.
baseUrl
;
// #endif
// #endif
// #ifdef MP-WEIXIN
export
const
AMAPKEY
=
'7528e756feaebfabd1abbb1b04097a1e'
;
//高德定位小程序
// #endif
// #ifdef APP-PLUS
export
const
AMAPKEY
=
'cdd98f785c3d27a17bf4d7022783ede9'
;
//高德定位APP
// #endif
export
const
request
=
(
options
)
=>
{
export
const
request
=
(
options
)
=>
{
...
@@ -64,19 +58,3 @@ export const request = (options) => {
...
@@ -64,19 +58,3 @@ export const request = (options) => {
});
});
});
});
};
};
//登录判断
export
const
getId
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
getStorage
({
key
:
'info'
,
success
:
(
res
)
=>
{
console
.
log
(
res
,
"登录成功"
);
resolve
(
200
);
},
fail
:
(
err
)
=>
{
console
.
log
(
err
,
'登录失败'
);
resolve
(
11003
);
}
});
})
}
vue.config.js
deleted
100644 → 0
View file @
70c149da
module
.
exports
=
{
devServer
:
{
proxy
:
{
'/wxmapi'
:
{
target
:
'http://localhost:8092'
,
// target: 'https://www.wxmblog.com/wxmapi',
changeOrigin
:
true
,
pathRewrite
:
{
'^/wxmapi'
:
''
}
}
},
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment