Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ed09b999
authored
May 17, 2023
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
接口调整
parent
c2365811
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
20 deletions
manifest.json
pages/index/index.vue
util/api.js
util/util.js
manifest.json
View file @
ed09b999
...
...
@@ -5,7 +5,33 @@
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"h5"
:
{
"devServer"
:
{
"port"
:
8080
,
"disableHostCheck"
:
true
,
"proxy"
:
{
"/apis"
:
{
"target"
:
"http://api.liexin.com"
,
"changeOrigin"
:
true
,
"secure"
:
true
,
"pathRewrite"
:
{
"^/apis"
:
""
}
},
"/v3"
:
{
"target"
:
"http://www.liexin.com"
,
"changeOrigin"
:
true
,
"secure"
:
true
,
"pathRewrite"
:
{
"^/v3"
:
""
}
}
}
},
"optimization"
:
{
"treeShaking"
:
{
"enable"
:
false
}
}
},
"app-plus"
:
{
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
...
...
@@ -46,9 +72,9 @@
"sdkConfigs"
:
{}
}
},
/*
快应用特有相关
*/
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
...
...
pages/index/index.vue
View file @
ed09b999
...
...
@@ -171,7 +171,7 @@
</
template
>
<
script
>
import
{
API
Ichunt_Api
}
from
'@/util/api.js'
;
import
bottomNavFixed
from
'@/components/bottom_nav.vue'
;
export
default
{
...
...
@@ -205,6 +205,7 @@
onShow
()
{
this
.
getData
();
},
onPageScroll
(
e
)
{
this
.
scrollTop
=
e
.
scrollTop
;
...
...
@@ -217,14 +218,13 @@
},
getData
()
{
// this.request(API.getAllowApproveList, 'POST', {}, false).then(res => {
// if (res.code === 0) {
// this.login_status = 1;
// this.allowApproveList = res.data;
// } else if (res.code === 101) {
// this.login_status = 0;
// }
// });
this
.
request
(
Ichunt_Api
+
"/api/common/data"
,
'GET'
,
{},).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
}
else
if
(
res
.
code
===
101
)
{
}
});
}
},
components
:
{
...
...
util/api.js
View file @
ed09b999
const
API_BASE_URL
=
'https://user.ichunt.net'
;
//用户系统
let
Ichunt_Api
=
''
;
//3.0网站接口
let
Api_Url
=
''
;
//api项目url
switch
(
window
.
location
.
hostname
)
{
case
"m.ichunt.com"
:
Ichunt_Api
=
'https://www.ichunt.com/v3'
;
Api_Url
=
"https://api.ichunt.com"
break
;
default
:
//本地proxy配置参考vue.config.js
Ichunt_Api
=
'/v3'
Api_Url
=
'/apis'
;
}
module
.
exports
=
{
API_BASE_URL
Ichunt_Api
,
Api_Url
}
util/util.js
View file @
ed09b999
...
...
@@ -14,11 +14,9 @@ const request = (url = '', type = 'GET', param = {}, Loading) => {
mask
:
true
});
}
cons
t
header
=
{
le
t
header
=
{
"Content-Type"
:
"application/json; charset=utf-8"
,
"source"
:
'pc'
,
"oa-user-id"
:
oa_user_id
,
"oa-skey"
:
oa_skey
,
"source"
:
'h5'
,
};
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
...
...
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