diff --git a/pwuniapp/pages/activity/list.vue b/pwuniapp/pages/activity/list.vue index 03febc8..802ca94 100644 --- a/pwuniapp/pages/activity/list.vue +++ b/pwuniapp/pages/activity/list.vue @@ -22,6 +22,15 @@ + + + + 发布陪玩需求(平台派单) + 不指定大神 · 5km 内认证大神抢单 · 30 分钟无人接单自动退款 + + › + + { currentTab.value = tab; }; +const goPublishDemand = () => { + if (!ensureLoginOrRedirect('/pages/activity/list')) return; + uni.navigateTo({ url: '/pages/order/create' }); +}; + const switchCategory = (cat) => { currentCategory.value = cat; }; @@ -393,6 +408,40 @@ const createActivity = () => { padding: 0 32rpx calc(180rpx + env(safe-area-inset-bottom)); } +.demand-entry { + margin: 0 32rpx 20rpx; + display: flex; + align-items: center; + justify-content: space-between; + gap: 16rpx; + padding: 20rpx 24rpx; + border-radius: 20rpx; + border: 1rpx solid rgba(99, 102, 241, 0.35); + background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.10)); + + .demand-entry-left { + display: flex; + flex-direction: column; + gap: 6rpx; + } + + .demand-entry-title { + font-size: 26rpx; + font-weight: 600; + color: var(--text-primary, #F8FAFC); + } + + .demand-entry-desc { + font-size: 21rpx; + color: var(--text-muted, #94A3B8); + } + + .demand-entry-arrow { + font-size: 36rpx; + color: var(--color-brand, #6366F1); + } +} + .header-search { padding-top: var(--safe-header-gap, 36rpx); padding-bottom: 24rpx; diff --git a/server/src/index.ts b/server/src/index.ts index 8682766..7169759 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -509,9 +509,9 @@ async function resolveTencentMapKey(): Promise { return key; } -function httpsGetJsonOnce(url: string, headers: Record, timeoutMs = 4000): Promise { +function httpsGetJson(url: string, timeoutMs = 4000): Promise { return new Promise((resolve, reject) => { - const req = https.get(url, { headers }, (resp) => { + const req = https.get(url, (resp) => { let data = ''; resp.on('data', (chunk) => { data += chunk; @@ -529,15 +529,6 @@ function httpsGetJsonOnce(url: string, headers: Record, timeoutM }); } -async function httpsGetJson(url: string, timeoutMs = 4000): Promise { - const referer = String(process.env.TENCENT_MAP_REFERER || 'http://118.184.172.94/').trim(); - const data = await httpsGetJsonOnce(url, referer ? { Referer: referer } : {}, timeoutMs); - if (data && (data.status === 110 || data.status === 105) && referer) { - return httpsGetJsonOnce(url, {}, timeoutMs); - } - return data; -} - const geocodeCache = new Map(); /** 地址 -> 坐标(腾讯 WebService 地理编码),带进程内缓存 */ @@ -2970,7 +2961,7 @@ async function loadDemoAccounts(): Promise a.userId > 0) + .filter((a) => a.userId > 0) .slice(0, 10); } catch (e) { logServerError('loadDemoAccounts', e);