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
303f9b86
Commit
303f9b86
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
c2e6d86d
42de93a9
Hide 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 @
303f9b86
...
...
@@ -13,8 +13,8 @@ export function ApiTestCfPost(inData) {
}
return
request
({
url
:
''
,
method
:
'
ge
t'
,
params
:
postData
method
:
'
pos
t'
,
data
:
postData
})
}
...
...
ybf_wx/src/api/test/test.js
0 → 100644
View file @
303f9b86
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 @
303f9b86
...
...
@@ -33,9 +33,10 @@ const createSign = (inPostData, inAppSecret) => {
let
basicInfo
=
{
// appUser: "user001",
appUser
:
"YBF001"
,
ver
:
"v2.17"
,
// appSecret: "JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
//
ver: "v2.17",
ver
:
"v1.0"
,
appSecret
:
"JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
// appSecret: "JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
}
// 创建 axios 实例
...
...
@@ -47,16 +48,21 @@ 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'
)
{
//
log('--->axios: req.data:', req.data)
z
log
(
'--->axios: req.data:'
,
req
.
data
)
let
oldPostData
=
JSON
.
parse
(
JSON
.
stringify
(
req
.
data
))
let
newPostData
=
{
appUser
:
basicInfo
.
appUser
,
// appUser: 'user001',
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
,
args
:
oldPostData
.
args
}
...
...
ybf_wx/src/views/home.vue
View file @
303f9b86
...
...
@@ -17,7 +17,8 @@
</div>
</div>
</div>
<button
class=
"testButton"
>
Test
</button>
<button
class=
"testButton"
>
Test0606
</button>
<button
class=
"testButton"
>
Test0606
</button>
</div>
...
...
@@ -29,6 +30,9 @@
</
template
>
<
script
>
import
{
ApiTestCfPost
,
ApiTestEaPost
}
from
"@/api/test/test"
;
export
default
{
name
:
"home"
,
data
()
{
...
...
@@ -77,7 +81,9 @@ export default {
},
buttonMainMarketingClick
()
{
this
.
$router
.
push
(
"MainSale"
);
}
},
testButton
(
inCode
){}
}
};
</
script
>
...
...
ybf_wx/src/views/sideNav/discount/index.vue
View file @
303f9b86
...
...
@@ -14,7 +14,7 @@
<div
class=
"main-money"
>
{{
item
.
money
}}
元代金券
</div>
</div>
<div
class=
"buttons"
>
<button
class=
"button-send"
@
click=
"test
ApiCf
Post"
>
推送
</button>
<button
class=
"button-send"
@
click=
"test
Ea
Post"
>
推送
</button>
</div>
</div>
<div
class=
"infos-tips"
>
...
...
@@ -33,7 +33,8 @@
</
template
>
<
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);
export
default
{
...
...
@@ -77,35 +78,32 @@ export default {
dis
:
{}
};
},
created
()
{
},
created
()
{},
methods
:
{
testApiCfPost
()
{
// testEaPost() {
// let postData = {
// appCode: "0606",
// crmActionDate: "2020-01-10"
// };
// ApiEaPost(postData).then(res => {
// console.log(res);
// });
// },
testEaPost
()
{
let
postData
=
{
appCode
:
'0606'
,
crmActionDate
:
'2020-01-10'
appCode
:
"0611"
,
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
);
});
},
testApiEaPost
()
{
let
postData
=
{
appCode
:
'0606'
,
crmActionDate
:
'2020-01-10'
};
ApiTestEaPost
(
postData
).
then
(
res
=>
{
console
.
log
(
res
);
});
},
testButtonClick
()
{
this
.
testApiPost
()
},
buttonSingleMarketingClick
()
{
// 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