|
|
@@ -232,7 +232,9 @@ async function run() {
|
|
|
const userLang = getUserLanguage(user);
|
|
|
const fcmToken = user.fmToken;
|
|
|
const data1 = getMessageDataFromTemplate(messageData.template1, userLang);
|
|
|
- data1.image = `https://d1e6q48ob2nxw1.cloudfront.net/thumbs/v2/page/640/${artwork1Id}.png`;
|
|
|
+ // 添加随机选择逻辑,随机选择 fcm 或 page 路径
|
|
|
+ const isFcmPath = Math.random() < 0.5;
|
|
|
+ data1.image = isFcmPath ? `https://d1e6q48ob2nxw1.cloudfront.net/thumbs/v2/fcm/640/${artwork1Id}.png` : `https://d1e6q48ob2nxw1.cloudfront.net/thumbs/v2/page/640/${artwork1Id}.png`;
|
|
|
data1.bigger = "true";
|
|
|
data1.action = "go/art";
|
|
|
data1.param = artwork1Id;
|