Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
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
高淑倩
7-Eleven
Commits
8107f5b5
Commit
8107f5b5
authored
Nov 06, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码优惠券
parent
f5ffc2b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
scanCoupon.js
src/subPackage/page/pages/scanCoupon/scanCoupon.js
+7
-7
wxService.js
src/utils/wxService.js
+7
-0
No files found.
src/subPackage/page/pages/scanCoupon/scanCoupon.js
View file @
8107f5b5
...
@@ -45,7 +45,12 @@ wxService.page({
...
@@ -45,7 +45,12 @@ wxService.page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
console
.
log
(
'--------'
,
options
)
this
.
setData
({
id
:
options
.
id
},()
=>
{
this
.
getCouponDetail
(
this
.
data
.
id
)
})
},
},
closeDialog
()
{
closeDialog
()
{
this
.
setData
({
this
.
setData
({
...
@@ -87,12 +92,7 @@ wxService.page({
...
@@ -87,12 +92,7 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'--------'
,
this
.
options
)
this
.
setData
({
id
:
'638467647583031296'
},()
=>
{
this
.
getCouponDetail
(
this
.
data
.
id
)
})
},
},
getCouponDetail
(
id
){
getCouponDetail
(
id
){
wx
.
showLoading
({
wx
.
showLoading
({
...
...
src/utils/wxService.js
View file @
8107f5b5
...
@@ -266,6 +266,10 @@ class WXService extends Http {
...
@@ -266,6 +266,10 @@ class WXService extends Http {
getTentacleContentByTentacleId
(
id
)
{
getTentacleContentByTentacleId
(
id
)
{
this
.
post
(
'/marketing/tentacleContent/queryTentacleContentById'
,
{
id
:
id
}).
then
((
res
)
=>
{
this
.
post
(
'/marketing/tentacleContent/queryTentacleContentById'
,
{
id
:
id
}).
then
((
res
)
=>
{
let
data
=
res
.
data
.
data
let
data
=
res
.
data
.
data
if
(
!
data
){
return
;
}
let
TENTACLE_CONTENT
=
{
let
TENTACLE_CONTENT
=
{
id
:
data
.
id
,
id
:
data
.
id
,
tentacleType
:
data
.
type
,
tentacleType
:
data
.
type
,
...
@@ -597,6 +601,7 @@ class WXService extends Http {
...
@@ -597,6 +601,7 @@ class WXService extends Http {
let
idParam
=
decodeURIComponent
(
item
[
'scene'
]).
split
(
'&'
)[
0
];
let
idParam
=
decodeURIComponent
(
item
[
'scene'
]).
split
(
'&'
)[
0
];
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
item
[
'id'
]
=
Integer
.
digit
(
shareId
,
64
,
10
)
item
[
'id'
]
=
Integer
.
digit
(
shareId
,
64
,
10
)
// console.log(item['id'])
id
=
item
[
'id'
];
id
=
item
[
'id'
];
}
}
...
@@ -607,6 +612,8 @@ class WXService extends Http {
...
@@ -607,6 +612,8 @@ class WXService extends Http {
_self
.
getTentacleContentByTentacleId
(
id
);
_self
.
getTentacleContentByTentacleId
(
id
);
}
}
// console.log('args ----',args)
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
},
},
onShow
:
function
(...
args
)
{
onShow
:
function
(...
args
)
{
...
...
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