Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks-h5
Commits
f0ec9398
Commit
f0ec9398
authored
Nov 16, 2022
by
徐光星
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 去除优惠券弹窗需要同盾ID逻辑
parent
d3660e7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
index.ts
app/web/component/layout/activity/index.ts
+3
-3
index.ts
app/web/page/activity/view/activity/index.ts
+14
-15
No files found.
app/web/component/layout/activity/index.ts
View file @
f0ec9398
...
@@ -54,9 +54,9 @@ if (EASY_ENV_IS_BROWSER) {
...
@@ -54,9 +54,9 @@ if (EASY_ENV_IS_BROWSER) {
if
(
json
.
event
===
'
getTokenSuccess
'
)
{
if
(
json
.
event
===
'
getTokenSuccess
'
)
{
EventBus
.
$emit
(
'
NATIVE_EVENT_GET_TOKEN
'
,
json
);
EventBus
.
$emit
(
'
NATIVE_EVENT_GET_TOKEN
'
,
json
);
}
}
if
(
json
.
event
===
'
getTongdunIdSuccess
'
)
{
//
if (json.event === 'getTongdunIdSuccess') {
EventBus
.
$emit
(
'
NATIVE_EVENT_GET_TDONGDUN_ID
'
,
json
);
//
EventBus.$emit('NATIVE_EVENT_GET_TDONGDUN_ID', json);
}
//
}
};
};
}
}
@
Component
({
@
Component
({
...
...
app/web/page/activity/view/activity/index.ts
View file @
f0ec9398
...
@@ -178,31 +178,30 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
...
@@ -178,31 +178,30 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
// 获取优惠券弹窗相关配置
// 获取优惠券弹窗相关配置
if
(
this
.
pageData
?.
props
?.
couponModal
&&
this
.
pageData
?.
props
?.
couponModal
.
length
)
{
if
(
this
.
pageData
?.
props
?.
couponModal
&&
this
.
pageData
?.
props
?.
couponModal
.
length
)
{
const
couponPushIdList
=
this
.
pageData
.
props
.
couponModal
.
join
(
'
,
'
);
const
couponPushIdList
=
this
.
pageData
.
props
.
couponModal
.
join
(
'
,
'
);
let
tongdunDeviceId
=
''
;
// 先获取同盾ID,再调用优惠券弹窗推送接口
// 先获取同盾ID,再调用优惠券弹窗推送接口
if
(
EASY_ENV_IS_BROWSER
)
{
if
(
EASY_ENV_IS_BROWSER
)
{
if
(
isApp
)
{
if
(
isApp
)
{
// app的时候通过事件获取同盾id
this
.
getCouponModalDetailReq
(
couponPushIdList
);
EventBus
.
$on
(
'
NATIVE_EVENT_GET_TDONGDUN_ID
'
,
res
=>
{
// // app的时候通过事件获取同盾id
console
.
log
(
'
getTongdunIdInAppSuccess
'
,
JSON
.
stringify
(
res
));
// EventBus.$on('NATIVE_EVENT_GET_TDONGDUN_ID', res => {
tongdunDeviceId
=
res
.
data
.
tongdunDeviceId
||
''
;
// console.log('getTongdunIdInAppSuccess', JSON.stringify(res));
this
.
getCouponModalDetailReq
(
couponPushIdList
,
tongdunDeviceId
);
// tongdunDeviceId = res.data.tongdunDeviceId || '';
});
// this.getCouponModalDetailReq(couponPushIdList, tongdunDeviceId);
const
bridge
=
new
Bridge
();
// });
bridge
.
run
({
// const bridge = new Bridge();
event
:
'
getTongdunId
'
,
// bridge.run({
data
:
{},
// event: 'getTongdunId',
});
// data: {},
// });
}
}
}
}
}
}
},
},
async
getCouponModalDetailReq
(
couponPushIdList
,
tongdunDeviceId
)
{
async
getCouponModalDetailReq
(
couponPushIdList
)
{
// 获取推送弹窗数据
// 获取推送弹窗数据
if
(
!
couponPushIdList
||
!
tongdunDeviceId
)
{
return
;
}
if
(
!
couponPushIdList
)
{
return
;
}
const
[
res
,
err
]
=
await
modalApi
.
getCouponModal
({
const
[
res
,
err
]
=
await
modalApi
.
getCouponModal
({
couponPushIdList
,
couponPushIdList
,
tongdunDeviceId
});
});
if
(
err
)
{
return
;
}
if
(
err
)
{
return
;
}
if
(
res
&&
Object
.
keys
(
res
).
length
)
{
if
(
res
&&
Object
.
keys
(
res
).
length
)
{
...
...
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