|
@@ -88,6 +88,28 @@
|
|
|
padding:0 5px;
|
|
padding:0 5px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /** App 分享链 contentNumber:店铺打卡在 POI 行前展示「第 N 次」 */
|
|
|
|
|
+ .checkin-head__ordinal {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ line-height: 1.55;
|
|
|
|
|
+ color: var(--text);
|
|
|
|
|
+ margin-bottom: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .checkin-head__ordinal.is-visible {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .checkin-head__ordinal .checkin-head__ordinal-num {
|
|
|
|
|
+ font-size: 1.28em;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: var(--orange);
|
|
|
|
|
+ line-height: 1.25;
|
|
|
|
|
+ vertical-align: baseline;
|
|
|
|
|
+ padding: 0 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.checkin-head__accent {
|
|
.checkin-head__accent {
|
|
|
color: var(--orange);
|
|
color: var(--orange);
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
@@ -479,6 +501,7 @@
|
|
|
<div class="checkin-head__main">
|
|
<div class="checkin-head__main">
|
|
|
<div class="checkin-head__name" id="userName">用户名称</div>
|
|
<div class="checkin-head__name" id="userName">用户名称</div>
|
|
|
<p class="checkin-head__status" id="checkInHeadStatus"></p>
|
|
<p class="checkin-head__status" id="checkInHeadStatus"></p>
|
|
|
|
|
+ <div class="checkin-head__ordinal" id="checkInContentNumberLine" aria-live="polite"></div>
|
|
|
<div class="checkin-head__loc">
|
|
<div class="checkin-head__loc">
|
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
|
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/>
|
|
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/>
|
|
@@ -1223,6 +1246,25 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /** App buildCheckInShareH5FullUrl:contentNumber 为 JSON 数组,店铺为 ["N"],地点为 ["年","M"] */
|
|
|
|
|
+ function parseContentNumberArrayFromUrl() {
|
|
|
|
|
+ var raw = getMergedParam('contentNumber') || q('contentNumber');
|
|
|
|
|
+ if (!raw || !String(raw).trim()) return null;
|
|
|
|
|
+ try {
|
|
|
|
|
+ var s = tryDecode(String(raw).trim());
|
|
|
|
|
+ var arr = JSON.parse(s);
|
|
|
|
|
+ if (!Array.isArray(arr) || !arr.length) return null;
|
|
|
|
|
+ var out = [];
|
|
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
|
|
+ var t = String(arr[i] == null ? '' : arr[i]).trim();
|
|
|
|
|
+ if (t) out.push(t);
|
|
|
|
|
+ }
|
|
|
|
|
+ return out.length ? out : null;
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function pushUniqueUrl(list, u) {
|
|
function pushUniqueUrl(list, u) {
|
|
|
u = String(u == null ? '' : u).trim();
|
|
u = String(u == null ? '' : u).trim();
|
|
|
if (!u) return;
|
|
if (!u) return;
|
|
@@ -1509,6 +1551,30 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ var elOrdinal = document.getElementById('checkInContentNumberLine');
|
|
|
|
|
+ if (elOrdinal) {
|
|
|
|
|
+ elOrdinal.classList.remove('is-visible');
|
|
|
|
|
+ elOrdinal.innerHTML = '';
|
|
|
|
|
+ var cnArr = parseContentNumberArrayFromUrl();
|
|
|
|
|
+ var cis = mergedQ('clockInStore');
|
|
|
|
|
+ var isShop = false;
|
|
|
|
|
+ if (cis === '' || cis == null) {
|
|
|
|
|
+ isShop = !!(cnArr && cnArr.length === 1);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ isShop = cis !== '0';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (cnArr && cnArr.length && isShop) {
|
|
|
|
|
+ var ord = String(cnArr[cnArr.length - 1] || '').trim();
|
|
|
|
|
+ if (/^\d+$/.test(ord)) {
|
|
|
|
|
+ elOrdinal.innerHTML =
|
|
|
|
|
+ '我在该店铺的第<span class="checkin-head__ordinal-num">' +
|
|
|
|
|
+ escapeHtmlForStatus(ord) +
|
|
|
|
|
+ '</span>次打卡';
|
|
|
|
|
+ elOrdinal.classList.add('is-visible');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
var poiName = getMergedParam('poiName') || getMergedParam('locationName') || q('poiName') || q('locationName');
|
|
var poiName = getMergedParam('poiName') || getMergedParam('locationName') || q('poiName') || q('locationName');
|
|
|
if (!poiName && item) {
|
|
if (!poiName && item) {
|
|
|
poiName = item.poiName || item.addressName || item.storeName || '';
|
|
poiName = item.poiName || item.addressName || item.storeName || '';
|