Commit 971bbd47 authored by 徐光星's avatar 徐光星

feat: 调整数美key

parent 4a1fd6a4
......@@ -50,7 +50,7 @@ export default {
return http.get(`${config.apiHost}/editor/getServerTime`);
},
getTongDunIdByKey(params) {
getShumeiIdByKey(params) {
return http.post(`${config.kdspHost}/api/kdsp/fraud/getDeviceId`, params);
},
};
\ No newline at end of file
......@@ -54,8 +54,8 @@ if (EASY_ENV_IS_BROWSER) {
if (json.event === 'getTokenSuccess') {
EventBus.$emit('NATIVE_EVENT_GET_TOKEN', json);
}
if (json.event === 'getTongdunIdSuccess') {
EventBus.$emit('NATIVE_EVENT_GET_TDONGDUN_ID', json);
if (json.event === 'getShuMeiIdSuccess') {
EventBus.$emit('NATIVE_EVENT_GET_SHUMEI_ID', json);
}
};
}
......
......@@ -178,30 +178,32 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
// 获取优惠券弹窗相关配置
if (this.pageData?.props?.couponModal && this.pageData?.props?.couponModal.length) {
const couponPushIdList = this.pageData.props.couponModal.join(',');
let tongdunDeviceId = '';
let shumeiDeviceId = '';
// 先获取同盾ID,再调用优惠券弹窗推送接口
if (EASY_ENV_IS_BROWSER) {
if (isApp) {
// app的时候通过事件获取同盾id
EventBus.$on('NATIVE_EVENT_GET_TDONGDUN_ID', res => {
console.log('getTongdunIdInAppSuccess', JSON.stringify(res));
tongdunDeviceId = res.data.tongdunDeviceId || '';
this.getCouponModalDetailReq(couponPushIdList, tongdunDeviceId);
EventBus.$on('NATIVE_EVENT_GET_SHUMEI_ID', res => {
console.log('getShuMeiIdInAppSuccess', JSON.stringify(res));
shumeiDeviceId = res.data.shumeiDeviceId || '';
this.getCouponModalDetailReq(couponPushIdList, shumeiDeviceId);
});
const bridge = new Bridge();
bridge.run({
event: 'getTongdunId',
event: 'getShuMeiId',
data: {},
});
}
}
}
},
async getCouponModalDetailReq(couponPushIdList) {
}
async getCouponModalDetailReq(couponPushIdList, shumeiDeviceId) {
// 获取推送弹窗数据
shumeiDeviceId = shumeiDeviceId || '';
if (!couponPushIdList) { return; }
const [res, err] = await modalApi.getCouponModal({
couponPushIdList,
shumeiDeviceId
});
if (err) { return; }
if (res && Object.keys(res).length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment