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
acb6d8a7
Commit
acb6d8a7
authored
Jul 10, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
cd1901f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
1 deletion
+59
-1
api.js
plugin/api.js
+59
-1
No files found.
plugin/api.js
View file @
acb6d8a7
...
...
@@ -25,7 +25,7 @@ export default {
// "http://192.168.5.204:8030"
Vue
.
prototype
.
host2
=
process
.
env
.
NODE_ENV
==
"development"
?
"https://erpmallapi.oytour.com"
:
"https://erpmallapi.oytour.com"
Vue
.
prototype
.
host3
=
process
.
env
.
NODE_ENV
==
"development"
?
"https://reborn.oytour.com"
:
"https://reborn.oytour.com"
// Vue.prototype.host
2 = "https://erpmallapi.oytour.com
"
// Vue.prototype.host
3 = "http://192.168.5.204:8030
"
// Vue.prototype.host3 = "https://reborn.oytour.com"
// "http://192.168.5.204:8030":
console
.
log
()
...
...
@@ -164,6 +164,64 @@ export default {
}
})
},
Vue
.
prototype
.
apipostQrCode
=
function
(
cmd
,
msg
,
success
,
failed
)
{
var
data
=
this
.
GetPostData
(
cmd
,
msg
,
""
);
//['X-s']
const
sign
=
getRVHandler
(
data
,
data
.
token
)
uni
.
request
({
url
:
this
.
host3
+
'/api/file/GetGuestSurvey'
,
method
:
"Post"
,
header
:
{
'Content-Type'
:
'application/json'
,
},
data
,
success
:
res
=>
{
resolveRVHandler
(
res
)
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
uni
.
removeStorageSync
(
'b2b_user'
)
uni
.
removeStorageSync
(
'mall_UserInfo'
)
const
pages
=
getCurrentPages
()
const
curPage
=
pages
[
pages
.
length
-
1
]
if
(
cmd
==
'b2b_post_CheckMiniAppToken'
){
// curPage.onLoad(curPage.options)
curPage
.
onShow
()
// curPage.onReady()
}
else
{
console
.
log
(
uni
.
getStorageSync
(
"LoginState"
),
'---log'
)
if
(
uni
.
getStorageSync
(
"LoginState"
))
{
uni
.
removeStorageSync
(
"LoginState"
)
return
}
uni
.
setStorageSync
(
"LoginState"
,
true
)
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
'/pages/index/index'
})
},
1000
)
}
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
!
failed
)
{
if
(
res
.
data
.
message
!=
''
)
{
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
"none"
,
});
}
}
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
else
{
typeof
success
==
"function"
&&
success
(
res
.
data
);
}
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
uni
.
showModal
({
content
:
""
+
res
.
errMsg
});
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
})
},
Vue
.
prototype
.
javaApipost
=
function
(
cmd
,
msg
,
success
,
failed
)
{
let
b2bUser
=
uni
.
getStorageSync
(
'b2b_user'
)
let
token
=
""
;
...
...
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