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

feat: 调整数美key

parent 4a1fd6a4
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
return http.get(`${config.apiHost}/editor/getServerTime`); return http.get(`${config.apiHost}/editor/getServerTime`);
}, },
getTongDunIdByKey(params) { getShumeiIdByKey(params) {
return http.post(`${config.kdspHost}/api/kdsp/fraud/getDeviceId`, 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) { ...@@ -54,8 +54,8 @@ 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 === 'getShuMeiIdSuccess') {
EventBus.$emit('NATIVE_EVENT_GET_TDONGDUN_ID', json); EventBus.$emit('NATIVE_EVENT_GET_SHUMEI_ID', json);
} }
}; };
} }
......
...@@ -178,30 +178,32 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle ...@@ -178,30 +178,32 @@ 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 = ''; let shumeiDeviceId = '';
// 先获取同盾ID,再调用优惠券弹窗推送接口 // 先获取同盾ID,再调用优惠券弹窗推送接口
if (EASY_ENV_IS_BROWSER) { if (EASY_ENV_IS_BROWSER) {
if (isApp) { if (isApp) {
// app的时候通过事件获取同盾id // app的时候通过事件获取同盾id
EventBus.$on('NATIVE_EVENT_GET_TDONGDUN_ID', res => { EventBus.$on('NATIVE_EVENT_GET_SHUMEI_ID', res => {
console.log('getTongdunIdInAppSuccess', JSON.stringify(res)); console.log('getShuMeiIdInAppSuccess', JSON.stringify(res));
tongdunDeviceId = res.data.tongdunDeviceId || ''; shumeiDeviceId = res.data.shumeiDeviceId || '';
this.getCouponModalDetailReq(couponPushIdList, tongdunDeviceId); this.getCouponModalDetailReq(couponPushIdList, shumeiDeviceId);
}); });
const bridge = new Bridge(); const bridge = new Bridge();
bridge.run({ bridge.run({
event: 'getTongdunId', event: 'getShuMeiId',
data: {}, data: {},
}); });
} }
} }
} }
}, }
async getCouponModalDetailReq(couponPushIdList) { async getCouponModalDetailReq(couponPushIdList, shumeiDeviceId) {
// 获取推送弹窗数据 // 获取推送弹窗数据
shumeiDeviceId = shumeiDeviceId || '';
if (!couponPushIdList) { return; } if (!couponPushIdList) { return; }
const [res, err] = await modalApi.getCouponModal({ const [res, err] = await modalApi.getCouponModal({
couponPushIdList, couponPushIdList,
shumeiDeviceId
}); });
if (err) { return; } if (err) { return; }
if (res && Object.keys(res).length) { 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