Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
7ec9bdf5
Commit
7ec9bdf5
authored
May 18, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
111
parents
92a82bce
133dfa04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
api.js
plugin/api.js
+26
-4
No files found.
plugin/api.js
View file @
7ec9bdf5
...
...
@@ -2,10 +2,11 @@ export default {
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
//Vue.prototype.host2 = "http://192.168.20.17:8020"
Vue
.
prototype
.
host2
=
"https://erpmallapi.oytour.com"
//Vue.prototype.host3 = "http://192.168.20.17:8015"
Vue
.
prototype
.
host3
=
"https://reborn.oytour.com"
// Vue.prototype.host2 = "http://192.168.20.17:8020"
Vue
.
prototype
.
host2
=
"https://erpmallapi.oytour.com"
// Vue.prototype.host3 = "http://192.168.20.17:8015"
Vue
.
prototype
.
host3
=
"https://reborn.oytour.com"
Vue
.
prototype
.
host4
=
"https://upload.oytour.com"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
...
...
@@ -75,6 +76,27 @@ export default {
}
});
}
Vue
.
prototype
.
request4
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
url
:
this
.
host4
+
param
.
url
,
method
:
param
.
method
||
"Post"
,
header
:
param
.
header
||
{
'content-type'
:
"application/json"
},
data
:
param
.
data
,
success
:
res
=>
{
success
(
res
.
data
);
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
uni
.
showModal
({
content
:
""
+
res
.
errMsg
});
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
});
}
//请求app接口
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
success
,
failed
)
{
var
postData
=
this
.
GetPostData
(
cmd
,
msg
,
""
);
...
...
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