Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
Project
Project
Details
Activity
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
xulili
ybf
Commits
092a1124
Commit
092a1124
authored
Jan 19, 2020
by
xd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://114.67.93.201/xulili/ybf
parents
9c249ca7
a2d642ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
21 deletions
+12
-21
test.js
ybf_wx/src/api/test/test.js
+1
-0
bRequestEa.js
ybf_wx/src/utils/bRequestEa.js
+8
-14
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+3
-7
No files found.
ybf_wx/src/api/test/test.js
View file @
092a1124
...
...
@@ -10,3 +10,4 @@ export function ApiEaPost(inData) {
data
:
postData
})
}
ybf_wx/src/utils/bRequestEa.js
View file @
092a1124
...
...
@@ -19,24 +19,21 @@ const createSign = (inPostData, inAppSecret) => {
// URL 编码
for
(
let
key
in
args
)
{
res
+=
encodeURIComponent
(
key
)
+
"%3
d"
+
encodeURIComponent
(
args
[
key
]).
toLowerCase
(
)
+
"%26"
;
res
+=
encodeURIComponent
(
key
)
+
"%3
D"
+
encodeURIComponent
(
args
[
key
]
)
+
"%26"
;
}
res
=
res
.
slice
(
0
,
-
3
);
// URL 拼接
res
+=
`&appUser=
${
appUser
}
&appCode=
${
appCode
}
&
${
ts
}
${
appSecret
}
`
res
+=
`&appUser=
${
appUser
}
&appCode=
${
appCode
}
&
${
ts
}${
appSecret
}
`
return
res
;
};
// Basic Info
let
basicInfo
=
{
// appUser: "user001",
appUser
:
"YBF001"
,
// ver: "v2.17",
ver
:
"v1.0"
,
appSecret
:
"JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
// appSecret: "JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
ver
:
"v2.17"
,
appSecret
:
"t04yYm6gjsuHeehxOxojtmiwlYfXY8Zkdowf"
}
// 创建 axios 实例
...
...
@@ -48,21 +45,18 @@ const service = axios.create({
// request 拦截器
service
.
interceptors
.
request
.
use
(
req
=>
{
zlog
(
'--->axios: req.params: start:'
,
req
.
params
)
//
zlog('--->axios: req.params: start:', req.params)
let
apiMethod
=
req
.
method
if
(
apiMethod
===
'post'
)
{
zlog
(
'--->axios: req.data:'
,
req
.
data
)
//
zlog('--->axios: req.data:', req.data)
let
oldPostData
=
JSON
.
parse
(
JSON
.
stringify
(
req
.
data
))
let
newPostData
=
{
appUser
:
basicInfo
.
appUser
,
// appUser: 'user001',
appCode
:
oldPostData
.
args
.
appCode
,
// appCode: '0611',
// ts: String(Date.parse(new Date())),
ts
:
String
(
parseInt
(
new
Date
().
getTime
()
/
1000
)),
// ts: '1563355519',
// ts: '1497857409',
// ts: String(parseInt(new Date().getTime()/1000)),
ts
:
'1563355520'
,
ver
:
basicInfo
.
ver
,
args
:
oldPostData
.
args
}
...
...
ybf_wx/src/views/sideNav/discount/index.vue
View file @
092a1124
...
...
@@ -91,13 +91,9 @@ export default {
// },
testEaPost
()
{
let
postData
=
{
appCode
:
"0611"
,
brief
:
'停车券兑换'
,
orderNo
:
'12345678'
,
point
:
'123.321'
,
procType
:
46
,
updateType
:
'dec'
,
vipId
:
1
,
appCode
:
'0603'
,
condType
:
1
,
condValue
:
'138069094'
,
};
ApiEaPost
(
postData
).
then
(
res
=>
{
console
.
log
(
res
);
...
...
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