周星
This commit is contained in:
parent
ff755b449e
commit
ab884ed9da
BIN
activity/weekly-star/assets/coin.png
Normal file
BIN
activity/weekly-star/assets/coin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
@ -7,7 +7,7 @@
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"
|
||||
/>
|
||||
<title>Weekly Star</title>
|
||||
<link rel="stylesheet" href="./style.css?v=20260605" />
|
||||
<link rel="stylesheet" href="./style.css?v=20260609" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-viewport" id="appViewport">
|
||||
@ -111,6 +111,6 @@
|
||||
</div>
|
||||
<script src="../../common/api.js?v=20260606"></script>
|
||||
<script src="../../common/params.js?v=20260606"></script>
|
||||
<script src="./script.js?v=20260606"></script>
|
||||
<script src="./script.js?v=20260609"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
var dateText = document.querySelector('.date-text');
|
||||
var note = document.querySelector('.note');
|
||||
var historyDate = document.querySelector('.history-date');
|
||||
var COIN_IMAGE = './assets/coin.png';
|
||||
|
||||
var mockRanks = [
|
||||
{ rank: 1, name: 'hanneem', score: '337700', avatar: './assets/avatar-top.png' },
|
||||
@ -73,6 +74,7 @@
|
||||
return [
|
||||
'<div class="reward-item',
|
||||
item.single ? ' is-single' : '',
|
||||
item.coin ? ' is-coin' : '',
|
||||
'">',
|
||||
'<div class="gift-card">',
|
||||
'<img class="gift-frame" src="./assets/gift-card.png" alt="" />',
|
||||
@ -151,16 +153,19 @@
|
||||
return {
|
||||
label: name + suffix,
|
||||
resource_group_id: reward.resource_group_id || reward.resourceGroupId || group.group_id || group.groupId,
|
||||
coin: walletType === 'COIN',
|
||||
image:
|
||||
item.image ||
|
||||
item.image_url ||
|
||||
item.imageUrl ||
|
||||
resource.asset_url ||
|
||||
resource.assetUrl ||
|
||||
resource.preview_url ||
|
||||
resource.previewUrl ||
|
||||
resource.animation_url ||
|
||||
resource.animationUrl,
|
||||
walletType === 'COIN'
|
||||
? COIN_IMAGE
|
||||
: item.image ||
|
||||
item.image_url ||
|
||||
item.imageUrl ||
|
||||
resource.preview_url ||
|
||||
resource.previewUrl ||
|
||||
resource.asset_url ||
|
||||
resource.assetUrl ||
|
||||
resource.animation_url ||
|
||||
resource.animationUrl,
|
||||
single: false,
|
||||
};
|
||||
});
|
||||
@ -170,7 +175,22 @@
|
||||
var cards = Array.prototype.slice.call(document.querySelectorAll('.gift-strip .gift-card'));
|
||||
cards.forEach(function (card, index) {
|
||||
var gift = (gifts || [])[index] || {};
|
||||
var img = gift.image_url || gift.imageUrl || gift.icon_url || gift.iconUrl || gift.asset_url || gift.assetUrl;
|
||||
var resource = gift.resource || {};
|
||||
var img =
|
||||
gift.image_url ||
|
||||
gift.imageUrl ||
|
||||
gift.cover_url ||
|
||||
gift.coverUrl ||
|
||||
gift.preview_url ||
|
||||
gift.previewUrl ||
|
||||
gift.icon_url ||
|
||||
gift.iconUrl ||
|
||||
resource.preview_url ||
|
||||
resource.previewUrl ||
|
||||
gift.asset_url ||
|
||||
gift.assetUrl ||
|
||||
resource.asset_url ||
|
||||
resource.assetUrl;
|
||||
var label = gift.name || gift.display_name || gift.displayName || gift.gift_id || gift.giftId || '';
|
||||
var image = card.querySelector('.gift-img');
|
||||
if (image && img) image.src = img;
|
||||
|
||||
@ -426,6 +426,13 @@ button {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.reward-item.is-coin .gift-img {
|
||||
left: 66px;
|
||||
top: 70px;
|
||||
width: 126px;
|
||||
height: 126px;
|
||||
}
|
||||
|
||||
.reward-label {
|
||||
position: absolute;
|
||||
left: -18px;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
(function () {
|
||||
var remoteBridgeVersion = '20260608.1';
|
||||
var remoteBridgeVersion = '20260609.1';
|
||||
|
||||
function safeCall(fn, args) {
|
||||
try {
|
||||
@ -27,6 +27,33 @@
|
||||
return String(value).trim();
|
||||
}
|
||||
|
||||
function readPositiveInteger(value) {
|
||||
if (typeof value === 'number' && isFinite(value)) {
|
||||
return value > 0 ? Math.floor(value) : 0;
|
||||
}
|
||||
var text = readString(value);
|
||||
if (!/^[0-9]+$/.test(text)) {
|
||||
return 0;
|
||||
}
|
||||
var parsed = Number(text);
|
||||
return isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : 0;
|
||||
}
|
||||
|
||||
function normalizeAdapterConfig(config, adapter) {
|
||||
if (adapter !== 'vivagames_v1') {
|
||||
return config;
|
||||
}
|
||||
var appId = readPositiveInteger(config.app_id);
|
||||
if (appId <= 0) {
|
||||
appId = readPositiveInteger(config.appId);
|
||||
}
|
||||
if (appId > 0) {
|
||||
config.app_id = appId;
|
||||
config.appId = appId;
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
function post(action, body) {
|
||||
var message = JSON.stringify({ action: action, payload: body || {} });
|
||||
if (postToChannel('GameBridgeChannel', message)) {
|
||||
@ -153,6 +180,7 @@
|
||||
var config = launchConfig();
|
||||
var payload = launchPayload();
|
||||
var adapter = detectAdapter(config, payload);
|
||||
config = normalizeAdapterConfig(config, adapter);
|
||||
var normalized = readString(action);
|
||||
if (normalized === 'getConfig') {
|
||||
post('getConfig', body || {});
|
||||
@ -177,6 +205,7 @@
|
||||
var payload = launchPayload();
|
||||
var entry = launchEntry();
|
||||
var adapter = detectAdapter(config, payload);
|
||||
config = normalizeAdapterConfig(config, adapter);
|
||||
var nativeBridge = window.NativeBridge || {};
|
||||
var oldPostMessage =
|
||||
typeof nativeBridge.postMessage === 'function'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user