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
42de93a9
Commit
42de93a9
authored
Jan 19, 2020
by
Z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Z: Dot: Ua API almost done. sign has problem.
parent
14bec745
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
33 deletions
+55
-33
main.js
ybf_wx/src/api/test/main.js
+2
-2
test.js
ybf_wx/src/api/test/test.js
+12
-0
bRequestEa.js
ybf_wx/src/utils/bRequestEa.js
+11
-5
home.vue
ybf_wx/src/views/home.vue
+8
-2
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+22
-24
No files found.
ybf_wx/src/api/test/main.js
View file @
42de93a9
...
@@ -13,8 +13,8 @@ export function ApiTestCfPost(inData) {
...
@@ -13,8 +13,8 @@ export function ApiTestCfPost(inData) {
}
}
return
request
({
return
request
({
url
:
''
,
url
:
''
,
method
:
'
ge
t'
,
method
:
'
pos
t'
,
params
:
postData
data
:
postData
})
})
}
}
...
...
ybf_wx/src/api/test/test.js
0 → 100644
View file @
42de93a9
import
request
from
'@/utils/bRequestEa'
export
function
ApiEaPost
(
inData
)
{
let
postData
=
{
args
:
inData
}
return
request
({
url
:
''
,
method
:
'post'
,
data
:
postData
})
}
ybf_wx/src/utils/bRequestEa.js
View file @
42de93a9
...
@@ -33,9 +33,10 @@ const createSign = (inPostData, inAppSecret) => {
...
@@ -33,9 +33,10 @@ const createSign = (inPostData, inAppSecret) => {
let
basicInfo
=
{
let
basicInfo
=
{
// appUser: "user001",
// appUser: "user001",
appUser
:
"YBF001"
,
appUser
:
"YBF001"
,
ver
:
"v2.17"
,
//
ver: "v2.17",
// appSecret: "JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
ver
:
"v1.0"
,
appSecret
:
"JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
appSecret
:
"JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
// appSecret: "JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
}
}
// 创建 axios 实例
// 创建 axios 实例
...
@@ -47,16 +48,21 @@ const service = axios.create({
...
@@ -47,16 +48,21 @@ const service = axios.create({
// request 拦截器
// request 拦截器
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
req
=>
{
req
=>
{
//
zlog('--->axios: req.params: start:', req.params)
zlog
(
'--->axios: req.params: start:'
,
req
.
params
)
let
apiMethod
=
req
.
method
let
apiMethod
=
req
.
method
if
(
apiMethod
===
'post'
)
{
if
(
apiMethod
===
'post'
)
{
//
log('--->axios: req.data:', req.data)
z
log
(
'--->axios: req.data:'
,
req
.
data
)
let
oldPostData
=
JSON
.
parse
(
JSON
.
stringify
(
req
.
data
))
let
oldPostData
=
JSON
.
parse
(
JSON
.
stringify
(
req
.
data
))
let
newPostData
=
{
let
newPostData
=
{
appUser
:
basicInfo
.
appUser
,
appUser
:
basicInfo
.
appUser
,
// appUser: 'user001',
appCode
:
oldPostData
.
args
.
appCode
,
appCode
:
oldPostData
.
args
.
appCode
,
ts
:
String
(
Date
.
parse
(
new
Date
())),
// appCode: '0611',
// ts: String(Date.parse(new Date())),
ts
:
String
(
parseInt
(
new
Date
().
getTime
()
/
1000
)),
// ts: '1563355519',
// ts: '1497857409',
ver
:
basicInfo
.
ver
,
ver
:
basicInfo
.
ver
,
args
:
oldPostData
.
args
args
:
oldPostData
.
args
}
}
...
...
ybf_wx/src/views/home.vue
View file @
42de93a9
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
<button
class=
"testButton"
>
Test
</button>
<button
class=
"testButton"
>
Test0606
</button>
<button
class=
"testButton"
>
Test0606
</button>
</div>
</div>
...
@@ -29,6 +30,9 @@
...
@@ -29,6 +30,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ApiTestCfPost
,
ApiTestEaPost
}
from
"@/api/test/test"
;
export
default
{
export
default
{
name
:
"home"
,
name
:
"home"
,
data
()
{
data
()
{
...
@@ -77,7 +81,9 @@ export default {
...
@@ -77,7 +81,9 @@ export default {
},
},
buttonMainMarketingClick
()
{
buttonMainMarketingClick
()
{
this
.
$router
.
push
(
"MainSale"
);
this
.
$router
.
push
(
"MainSale"
);
}
},
testButton
(
inCode
){}
}
}
};
};
</
script
>
</
script
>
...
...
ybf_wx/src/views/sideNav/discount/index.vue
View file @
42de93a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
class=
"main-money"
>
{{
item
.
money
}}
元代金券
</div>
<div
class=
"main-money"
>
{{
item
.
money
}}
元代金券
</div>
</div>
</div>
<div
class=
"buttons"
>
<div
class=
"buttons"
>
<button
class=
"button-send"
@
click=
"test
ApiCf
Post"
>
推送
</button>
<button
class=
"button-send"
@
click=
"test
Ea
Post"
>
推送
</button>
</div>
</div>
</div>
</div>
<div
class=
"infos-tips"
>
<div
class=
"infos-tips"
>
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ApiTestCfPost
,
ApiTestEaPost
}
from
"@/api/test/main"
;
// import { ApiTestCfPost, ApiTestEaPost } from "@/api/test/main";
import
{
ApiEaPost
}
from
"@/api/test/test"
;
// const log = console.log.bind(console);
// const log = console.log.bind(console);
export
default
{
export
default
{
...
@@ -77,35 +78,32 @@ export default {
...
@@ -77,35 +78,32 @@ export default {
dis
:
{}
dis
:
{}
};
};
},
},
created
()
{
created
()
{},
},
methods
:
{
methods
:
{
testApiCfPost
()
{
// testEaPost() {
// let postData = {
// appCode: "0606",
// crmActionDate: "2020-01-10"
// };
// ApiEaPost(postData).then(res => {
// console.log(res);
// });
// },
testEaPost
()
{
let
postData
=
{
let
postData
=
{
appCode
:
'0606'
,
appCode
:
"0611"
,
crmActionDate
:
'2020-01-10'
brief
:
'停车券兑换'
,
orderNo
:
'12345678'
,
point
:
'123.321'
,
procType
:
46
,
updateType
:
'dec'
,
vipId
:
1
,
};
};
Api
TestCf
Post
(
postData
).
then
(
res
=>
{
Api
Ea
Post
(
postData
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
});
});
},
},
testApiEaPost
()
{
let
postData
=
{
appCode
:
'0606'
,
crmActionDate
:
'2020-01-10'
};
ApiTestEaPost
(
postData
).
then
(
res
=>
{
console
.
log
(
res
);
});
},
testButtonClick
()
{
this
.
testApiPost
()
},
buttonSingleMarketingClick
()
{
buttonSingleMarketingClick
()
{
// this.$router.push("");
// this.$router.push("");
},
},
...
...
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