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
6fcd69df
Commit
6fcd69df
authored
Jan 16, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
adea96d1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
390 additions
and
390 deletions
+390
-390
index.vue
components/auth/index.vue
+1
-0
api.js
plugin/api.js
+389
-390
No files found.
components/auth/index.vue
View file @
6fcd69df
...
@@ -214,6 +214,7 @@
...
@@ -214,6 +214,7 @@
b2bResult
.
customerInfoChildrenId
=
b2bData
.
customerInfoChildrenId
;
b2bResult
.
customerInfoChildrenId
=
b2bData
.
customerInfoChildrenId
;
b2bResult
.
name
=
b2bData
.
name
;
b2bResult
.
name
=
b2bData
.
name
;
b2bResult
.
customerName
=
b2bData
.
customerName
;
b2bResult
.
customerName
=
b2bData
.
customerName
;
b2bResult
.
token
=
b2bData
.
token
;
uni
.
setStorageSync
(
'b2b_user'
,
b2bResult
)
uni
.
setStorageSync
(
'b2b_user'
,
b2bResult
)
}
}
},
(
error2
)
=>
{
},
(
error2
)
=>
{
...
...
plugin/api.js
View file @
6fcd69df
import
Md5
from
"js-md5"
import
Md5
from
"js-md5"
// import { get_xs } from '@/static/xhs.js'
// import { get_xs } from '@/static/xhs.js'
const
resolveRVHandler
=
(
response
)
=>
{
const
resolveRVHandler
=
(
response
)
=>
{
// if(response.header && response.header['r-v']){
// if(response.header && response.header['r-v']){
// uni.setStorageSync("r-v",response.header['r-v'])
// uni.setStorageSync("r-v",response.header['r-v'])
// }
// }
}
}
const
getRVHandler
=
(
payload
,
token
)
=>
{
const
getRVHandler
=
(
payload
,
token
)
=>
{
// if(uni.getStorageSync("r-v")){
// if(uni.getStorageSync("r-v")){
// let a1 =uni.getStorageSync("r-v")
// let a1 =uni.getStorageSync("r-v")
// let xs = get_xs(payload, a1,token)
// let xs = get_xs(payload, a1,token)
...
@@ -23,10 +23,10 @@ export default {
...
@@ -23,10 +23,10 @@ export default {
install
(
Vue
,
options
)
{
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue
.
prototype
.
host2
=
"http://192.168.5.46:
5004"
Vue
.
prototype
.
host2
=
"http://192.168.5.46:
8200"
Vue
.
prototype
.
host3
=
"http://192.168.5.46"
Vue
.
prototype
.
host3
=
"http://192.168.5.46:8501"
Vue
.
prototype
.
host2
=
"https://erpmallapi.oytour.com"
// Vue.prototype.host2 = "https://mallapi.oytour.com"
Vue
.
prototype
.
host3
=
"https://reborn.oytour.com"
// Vue.prototype.host3 = "https://reborn.oytour.com"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
//网络请求
...
@@ -62,15 +62,15 @@ export default {
...
@@ -62,15 +62,15 @@ export default {
token
:
this
.
GetOpenId
().
token
token
:
this
.
GetOpenId
().
token
}
}
//['X-s']
//['X-s']
const
sign
=
getRVHandler
(
data
,
this
.
GetOpenId
().
token
)
const
sign
=
getRVHandler
(
data
,
this
.
GetOpenId
().
token
)
//网络请求
//网络请求
uni
.
request
({
uni
.
request
({
url
:
this
.
host2
+
param
.
url
,
url
:
this
.
host2
+
param
.
url
,
method
:
param
.
method
||
"Post"
,
method
:
param
.
method
||
"Post"
,
header
:
param
.
header
||
{
header
:
param
.
header
||
{
'content-type'
:
"application/json"
,
'content-type'
:
"application/json"
,
'x-sign'
:
sign
[
"X-s"
],
'x-sign'
:
sign
[
"X-s"
],
'x-ts'
:
sign
[
"X-t"
]
'x-ts'
:
sign
[
"X-t"
]
},
},
data
,
data
,
success
:
res
=>
{
success
:
res
=>
{
...
@@ -107,13 +107,12 @@ export default {
...
@@ -107,13 +107,12 @@ export default {
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
success
,
failed
)
{
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
success
,
failed
)
{
var
data
=
this
.
GetPostData
(
cmd
,
msg
,
""
);
var
data
=
this
.
GetPostData
(
cmd
,
msg
,
""
);
//['X-s']
//['X-s']
const
sign
=
getRVHandler
(
data
,
data
.
token
)
const
sign
=
getRVHandler
(
data
,
data
.
token
)
uni
.
request
({
uni
.
request
({
url
:
this
.
host3
+
'/api/common/post'
,
url
:
this
.
host3
+
'/api/common/post'
,
method
:
"Post"
,
method
:
"Post"
,
header
:
{
header
:
{
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
'x-sign'
:
sign
[
"X-s"
],
'x-ts'
:
sign
[
"X-t"
]
},
},
data
,
data
,
success
:
res
=>
{
success
:
res
=>
{
...
@@ -253,7 +252,7 @@ export default {
...
@@ -253,7 +252,7 @@ export default {
msg
=
{}
msg
=
{}
}
}
let
b2bUser
=
uni
.
getStorageSync
(
'b2b_user'
)
let
b2bUser
=
uni
.
getStorageSync
(
'b2b_user'
)
let
token
=
''
let
token
=
b2bUser
.
token
;
let
key
=
""
let
key
=
""
let
groupId
=
''
let
groupId
=
''
let
timestamp
=
(
new
Date
()).
valueOf
();
let
timestamp
=
(
new
Date
()).
valueOf
();
...
...
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