diff --git a/app.json b/app.json index 5993e03..fe8181e 100644 --- a/app.json +++ b/app.json @@ -16,6 +16,7 @@ "pages/chat/chat", "pages/chat-detail/chat-detail", "pages/profile/profile", + "pages/membership-benefits/membership-benefits", "pages/login/login", "pages/recharge/recharge", "pages/character-detail/character-detail", diff --git a/auto_sync.ps1 b/auto_sync.ps1 new file mode 100644 index 0000000..f558839 --- /dev/null +++ b/auto_sync.ps1 @@ -0,0 +1,47 @@ +$ErrorActionPreference = "Stop" + +$gitPath = "" +$commonPaths = @( + "C:\Program Files\Git\bin\git.exe", + "C:\Program Files (x86)\Git\bin\git.exe", + "$env:LocalAppData\Programs\Git\bin\git.exe", + "D:\Git\bin\git.exe", + "D:\Program Files\Git\bin\git.exe" +) + +foreach ($path in $commonPaths) { + if (Test-Path $path) { + $gitPath = $path + break + } +} + +if (-not $gitPath) { + try { + $gitPath = Get-Command git -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source + } catch {} +} + +if (-not $gitPath) { + Write-Host "Error: Git not found. Please run this in your local terminal where Git is installed." -ForegroundColor Red + exit 1 +} + +Write-Host "Found Git: $gitPath" -ForegroundColor Green + +try { + Write-Host "--- Syncing started ---" -ForegroundColor Yellow + + & $gitPath add -A + + $date = Get-Date -Format "yyyy-MM-dd HH:mm" + $message = "feat: UI and logic updates ($date)" + & $gitPath commit -m $message | Out-Null + + Write-Host "Pushing to remote..." -ForegroundColor Yellow + & $gitPath push + + Write-Host "--- Sync successful! ---" -ForegroundColor Green +} catch { + Write-Host "Error during sync: $($_.Exception.Message)" -ForegroundColor Red +} diff --git a/components/icon/icon.js b/components/icon/icon.js index e4d0af9..248dcee 100644 --- a/components/icon/icon.js +++ b/components/icon/icon.js @@ -30,6 +30,7 @@ const ICONS = { 'scan': '', 'camera': '', 'clipboard': '', + 'credit-card': '', 'trending-up': '', 'map-pin': '', 'heart': '', diff --git a/git-push.bat b/git-push.bat index 7181697..0125864 100644 --- a/git-push.bat +++ b/git-push.bat @@ -7,25 +7,19 @@ echo. cd /d "%~dp0" +set /p msg=请输入提交信息(例如: feat: 更新小程序代码): +if "%msg%"=="" set msg=chore: sync + echo [1/5] 添加所有更改... git add -A echo. echo [2/5] 提交更改... -git commit -m "feat: 更新小程序代码 - 2026-02-02" +git commit -m "%msg%" echo. -echo [3/5] 添加 tag... -git tag -a v1.0.0 -m "Version 1.0.0 - 2026-02-02" - -echo. -echo [4/5] 推送到远程仓库... -echo 请输入密码: zy12345678 -git push https://zhiyun:zy12345678@git.maimanji.com/adminzy/ai-c.git master --force - -echo. -echo [5/5] 推送 tag... -git push https://zhiyun:zy12345678@git.maimanji.com/adminzy/ai-c.git v1.0.0 +echo [3/4] 推送到远程仓库... +git push echo. echo ======================== diff --git a/git-push.sh b/git-push.sh index b59368b..770340f 100644 --- a/git-push.sh +++ b/git-push.sh @@ -1,6 +1,4 @@ #!/bin/bash -# Git 提交脚本 - cd "$(dirname "$0")" echo "========================" @@ -8,24 +6,21 @@ echo "Git 提交脚本" echo "========================" echo "" -echo "[1/5] 添加所有更改..." +read -r -p "请输入提交信息(例如: feat: 更新小程序代码): " msg +if [ -z "$msg" ]; then + msg="chore: sync" +fi + +echo "[1/3] 添加所有更改..." git add -A echo "" -echo "[2/5] 提交更改..." -git commit -m "feat: 更新小程序代码 - 2026-02-02" +echo "[2/3] 提交更改..." +git commit -m "$msg" echo "" -echo "[3/5] 添加 tag..." -git tag -a v1.0.0 -m "Version 1.0.0 - 2026-02-02" - -echo "" -echo "[4/5] 推送到远程仓库..." -git push https://zhiyun:zy12345678@git.maimanji.com/adminzy/ai-c.git master --force - -echo "" -echo "[5/5] 推送 tag..." -git push https://zhiyun:zy12345678@git.maimanji.com/adminzy/ai-c.git v1.0.0 +echo "[3/3] 推送到远程仓库..." +git push echo "" echo "========================" diff --git a/images/logo.jpg b/images/logo.jpg new file mode 100644 index 0000000..1925f57 Binary files /dev/null and b/images/logo.jpg differ diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..ef749cf Binary files /dev/null and b/images/logo.png differ diff --git a/pages/activity-detail/activity-detail.wxml b/pages/activity-detail/activity-detail.wxml index c6a180d..fad2e00 100644 --- a/pages/activity-detail/activity-detail.wxml +++ b/pages/activity-detail/activity-detail.wxml @@ -165,11 +165,11 @@ - - + + + + + \ No newline at end of file diff --git a/pages/membership-benefits/membership-benefits.wxss b/pages/membership-benefits/membership-benefits.wxss new file mode 100644 index 0000000..e6b0fbf --- /dev/null +++ b/pages/membership-benefits/membership-benefits.wxss @@ -0,0 +1,145 @@ +.page { + min-height: 100vh; + background: #F9FAFB; +} + +.content { + padding: 32rpx; +} + +.loading-state, .empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-top: 200rpx; + color: #9CA3AF; + font-size: 28rpx; +} + +.empty-state text { + margin-top: 24rpx; + margin-bottom: 48rpx; +} + +.back-btn { + background: #B06AB3; + color: #ffffff; + padding: 20rpx 60rpx; + border-radius: 999rpx; + font-size: 28rpx; +} + +/* Package Header */ +.package-header { + border-radius: 48rpx; + padding: 60rpx 48rpx; + color: #ffffff; + position: relative; + overflow: hidden; + box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1); + margin-bottom: 48rpx; +} + +.header-main { + display: flex; + align-items: center; + gap: 32rpx; + position: relative; + z-index: 2; +} + +.header-info { + display: flex; + flex-direction: column; + gap: 8rpx; +} + +.package-title { + font-size: 48rpx; + font-weight: 900; + letter-spacing: 2rpx; +} + +.package-subtitle { + font-size: 28rpx; + opacity: 0.9; +} + +.header-decoration { + position: absolute; + right: -40rpx; + bottom: -40rpx; + width: 240rpx; + height: 240rpx; + background: rgba(255, 255, 255, 0.1); + border-radius: 50%; + z-index: 1; +} + +/* Benefits Section */ +.benefits-section { + background: #ffffff; + border-radius: 40rpx; + padding: 48rpx 40rpx; + box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.02); +} + +.section-title { + display: flex; + align-items: center; + justify-content: center; + gap: 24rpx; + margin-bottom: 48rpx; +} + +.section-title text { + font-size: 32rpx; + font-weight: 800; + color: #111827; +} + +.title-line { + flex: 1; + height: 2rpx; + background: #F3F4F6; + max-width: 80rpx; +} + +.benefits-list { + display: flex; + flex-direction: column; + gap: 32rpx; +} + +.benefit-item { + display: flex; + align-items: flex-start; + gap: 24rpx; +} + +.check-icon { + width: 48rpx; + height: 48rpx; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, 0.03); + border-radius: 50%; + flex-shrink: 0; + margin-top: 4rpx; +} + +.benefit-text { + font-size: 30rpx; + color: #374151; + line-height: 1.6; + font-weight: 500; +} + +.footer-tip { + text-align: center; + margin-top: 60rpx; + color: #9CA3AF; + font-size: 24rpx; +} \ No newline at end of file diff --git a/pages/outdoor-activities/outdoor-activities.wxss b/pages/outdoor-activities/outdoor-activities.wxss index bed3e97..b6fe0ac 100644 --- a/pages/outdoor-activities/outdoor-activities.wxss +++ b/pages/outdoor-activities/outdoor-activities.wxss @@ -447,20 +447,25 @@ page { /* 空状态 */ .empty-state { - padding: 120rpx 32rpx; - text-align: center; + padding: 160rpx 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } .empty-icon { - width: 200rpx; - height: 200rpx; - margin: 0 auto 32rpx; - opacity: 0.5; + width: 320rpx; + height: 320rpx; + margin-bottom: 32rpx; + opacity: 0.8; } .empty-text { - font-size: 28rpx; - color: #81C784; + font-size: 30rpx; + color: #94A3B8; + font-weight: 500; + letter-spacing: 2rpx; } /* 列表底部 */ diff --git a/pages/profile/profile.js b/pages/profile/profile.js index 1b8e888..0d73a14 100644 --- a/pages/profile/profile.js +++ b/pages/profile/profile.js @@ -74,6 +74,9 @@ Page({ } else { this.setData({ me: { nickname: '未登录', avatar: this.data.defaultAvatar }, + vip: { levelText: '', levelClass: '' }, + isDistributor: false, + distributorRole: '', balances: { grass: 0, commission: '0.00' }, counts: { orders: 0, team: 0, performance: 0 }, totalUnread: 0 @@ -143,10 +146,13 @@ Page({ 'partner': { text: '城市合伙人', class: 'vip-partner' } }; - if (user.isDistributor && roleMap[distributorRole]) { + if (roleMap[distributorRole]) { const info = roleMap[distributorRole]; roleText = info.text; roleClass = info.class; + } else if (user.isDistributor) { + roleText = '分销商'; + roleClass = 'vip-normal'; } else { // Fallback to VIP const vipLevel = Number(user.vip_level || 0); @@ -159,7 +165,8 @@ Page({ this.setData({ me: { id, idShort, nickname, avatar, phone }, vip: { levelText: roleText || '', levelClass: roleClass }, - isDistributor: !!user.isDistributor + isDistributor: !!user.isDistributor, + distributorRole: distributorRole // 保存角色以供权益页面使用 }); // CRITICAL: Update global data and local storage to ensure avatar consistency across pages @@ -287,6 +294,20 @@ Page({ wx.navigateTo({ url: '/pages/recharge/recharge' }); } }, + showBenefits() { + if (this.requireLogin()) { + const { distributorRole, vip } = this.data; + // 如果没有角色且不是VIP,则跳转到充值页面 + if (!distributorRole && !vip.levelText) { + this.goRecharge(); + return; + } + + wx.navigateTo({ + url: `/pages/membership-benefits/membership-benefits?role=${distributorRole || ''}&level=${vip.levelText || ''}` + }); + } + }, goOrders() { if (this.requireLogin()) { wx.navigateTo({ url: '/pages/orders/orders' }); diff --git a/pages/profile/profile.wxml b/pages/profile/profile.wxml index 06f8d16..f76c1a8 100644 --- a/pages/profile/profile.wxml +++ b/pages/profile/profile.wxml @@ -15,7 +15,7 @@ {{me.nickname}} - + {{vip.levelText}} @@ -168,7 +168,7 @@ - 修改资料 + 个人资料 diff --git a/pages/profile/profile.wxss b/pages/profile/profile.wxss index 4ea4400..6d04669 100644 --- a/pages/profile/profile.wxss +++ b/pages/profile/profile.wxss @@ -96,27 +96,32 @@ page { .name-row { display: flex; align-items: center; - gap: 24rpx; + gap: 16rpx; margin-bottom: 16rpx; + width: 100%; } .nickname { - font-size: 40rpx; + font-size: 36rpx; font-weight: 900; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + max-width: 240rpx; + flex-shrink: 1; } .vip-badge { background: linear-gradient(90deg, #B06AB3, #8E44AD); /* Default/fallback */ - padding: 4rpx 20rpx; + padding: 4rpx 16rpx; border-radius: 999rpx; display: flex; align-items: center; - gap: 8rpx; + gap: 6rpx; box-shadow: 0 2rpx 4rpx rgba(0,0,0,0.1); + flex-shrink: 0; + white-space: nowrap; } .vip-badge.vip-soulmate { diff --git a/pages/singles-party/singles-party.wxss b/pages/singles-party/singles-party.wxss index 31f5557..4cd684f 100644 --- a/pages/singles-party/singles-party.wxss +++ b/pages/singles-party/singles-party.wxss @@ -410,20 +410,25 @@ page { /* 空状态 */ .empty-state { - padding: 120rpx 32rpx; - text-align: center; + padding: 160rpx 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } .empty-icon { - width: 200rpx; - height: 200rpx; - margin: 0 auto 32rpx; - opacity: 0.5; + width: 320rpx; + height: 320rpx; + margin-bottom: 32rpx; + opacity: 0.8; } .empty-text { - font-size: 28rpx; - color: #F06292; + font-size: 30rpx; + color: #94A3B8; + font-weight: 500; + letter-spacing: 2rpx; } /* 列表底部 */ @@ -481,18 +486,20 @@ page { position: absolute; top: 32rpx; right: 32rpx; - width: 72rpx; - height: 72rpx; - background: #F1F5F9; + width: 80rpx; + height: 80rpx; + background: #F8FAFC; border-radius: 50%; display: flex; align-items: center; justify-content: center; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); } .close-icon { - width: 40rpx; - height: 40rpx; + width: 48rpx; + height: 48rpx; + opacity: 0.6; } .modal-title { diff --git a/pages/support/support.wxml b/pages/support/support.wxml index cc5c1b6..5ed94f1 100644 --- a/pages/support/support.wxml +++ b/pages/support/support.wxml @@ -117,8 +117,9 @@ /> - + + 发送 diff --git a/pages/support/support.wxss b/pages/support/support.wxss index 793e906..c00cc9c 100644 --- a/pages/support/support.wxss +++ b/pages/support/support.wxss @@ -279,9 +279,9 @@ flex: 1; background: #F9FAFB; border: 2rpx solid #F3F4F6; - border-radius: 32rpx; + border-radius: 40rpx; padding: 0 32rpx; - height: 96rpx; + height: 120rpx; display: flex; align-items: center; } @@ -289,22 +289,43 @@ .figma-text-input { width: 100%; height: 100%; - font-size: 34rpx; + font-size: 38rpx; color: #101828; } .figma-send-btn { - width: 88rpx; + width: 180rpx; height: 88rpx; - background: #914584; - border-radius: 50%; + background: #F3F4F6; + border-radius: 44rpx; display: flex; align-items: center; justify-content: center; + gap: 8rpx; flex-shrink: 0; + transition: all 0.3s ease; +} + +.figma-send-btn.active { + background: #914584; } .figma-btn-icon { - width: 44rpx; - height: 44rpx; + width: 36rpx; + height: 36rpx; + filter: grayscale(1) opacity(0.5); +} + +.figma-send-btn.active .figma-btn-icon { + filter: brightness(0) invert(1); +} + +.send-text { + font-size: 28rpx; + font-weight: 700; + color: #9CA3AF; +} + +.figma-send-btn.active .send-text { + color: #FFFFFF; } diff --git a/pages/team/team.js b/pages/team/team.js index 6925008..8a74a7d 100644 --- a/pages/team/team.js +++ b/pages/team/team.js @@ -37,16 +37,52 @@ Page({ try { const statsRes = await request({ url: '/api/commission?action=stats', method: 'GET' }); const statsBody = statsRes.data || {}; + + let currentRoleText = '守护会员'; // 默认 + + // 尝试从本地存储获取当前用户信息来判断角色 + try { + const userStr = wx.getStorageSync('user'); + if (userStr) { + const user = JSON.parse(userStr); + // 优先使用 distributorRole,其次 userRole,再次 vip_level + const role = user.distributorRole || user.userRole; + const roleMap = { + 'soulmate': '心伴会员', + 'guardian': '守护会员', + 'companion': '陪伴会员', + 'listener': '倾听会员', + 'partner': '城市合伙人' + }; + if (role && roleMap[role]) { + currentRoleText = roleMap[role]; + } else if (user.isDistributor) { + // 如果是分销商但没有明确role,可能是早期数据,根据cardType判断 + // 但这里更直接用API返回的 + } + } + } catch (e) { + console.error('解析用户信息失败', e); + } + if (statsBody.success) { const d = statsBody.data || {}; + // 如果API返回了明确的等级名称或类型,优先使用API的 + if (d.cardType || d.level) { + currentRoleText = this.getCardTitle(d.cardType || d.level); + } + this.setData({ stats: { todayReferrals: Number(d.todayReferrals || d.today_referrals || 0), totalReferrals: Number(d.totalReferrals || d.total_referrals || 0), totalContribution: Number(d.totalContribution || d.total_contribution || 0).toFixed(2) }, - cardTitle: this.getCardTitle(d.cardType || d.level || 'guardian_card') + cardTitle: currentRoleText }); + } else { + // API不成功,使用本地推断的角色 + this.setData({ cardTitle: currentRoleText }); } const res = await request({ url: '/api/commission?action=referrals&page=1&pageSize=50', method: 'GET' }); @@ -137,11 +173,17 @@ Page({ const map = { 'guardian_card': '守护会员', 'companion_card': '陪伴会员', + 'soulmate_card': '心伴会员', + 'listener_card': '倾听会员', + 'guardian': '守护会员', + 'companion': '陪伴会员', + 'soulmate': '心伴会员', + 'listener': '倾听会员', 'identity_card': '身份会员', 'vip': 'VIP会员', 'partner': '城市合伙人' }; - return map[type] || '守护会员'; + return map[type] || type || '守护会员'; } }); diff --git a/pages/theme-travel/theme-travel.wxss b/pages/theme-travel/theme-travel.wxss index fe5c385..6271eec 100644 --- a/pages/theme-travel/theme-travel.wxss +++ b/pages/theme-travel/theme-travel.wxss @@ -453,20 +453,25 @@ page { /* 空状态 */ .empty-state { - padding: 120rpx 32rpx; - text-align: center; + padding: 160rpx 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } .empty-icon { - width: 200rpx; - height: 200rpx; - margin: 0 auto 32rpx; - opacity: 0.5; + width: 320rpx; + height: 320rpx; + margin-bottom: 32rpx; + opacity: 0.8; } .empty-text { - font-size: 28rpx; - color: #9575CD; + font-size: 30rpx; + color: #94A3B8; + font-weight: 500; + letter-spacing: 2rpx; } /* 二维码弹窗 */ diff --git a/pages/withdraw/withdraw.wxml b/pages/withdraw/withdraw.wxml index d450c5e..a83af6c 100644 --- a/pages/withdraw/withdraw.wxml +++ b/pages/withdraw/withdraw.wxml @@ -53,6 +53,17 @@ + + + + 提现说明: + + 1. 单笔提现10-2000元,支持分多笔申请; + 2. 提现扣除一定手续费,实际到账金额实时展示; + 3. T+1工作日到账(不含节假日/周末),收款账户需实名一致; + 4. 禁止违规获利,否则平台有权拒绝提现。 + + diff --git a/pages/withdraw/withdraw.wxss b/pages/withdraw/withdraw.wxss index ffd984a..0b881c2 100644 --- a/pages/withdraw/withdraw.wxss +++ b/pages/withdraw/withdraw.wxss @@ -184,6 +184,39 @@ box-shadow: none; } +/* 提现说明 */ +.instruction-section { + margin-top: 64rpx; + padding: 40rpx; + background: #F9FAFB; + border-radius: 32rpx; + border: 2rpx dashed #E5E7EB; + margin-bottom: 40rpx; +} + +.instruction-title { + font-size: 32rpx; + font-weight: 800; + color: #374151; + margin-bottom: 24rpx; + display: block; +} + +.instruction-list { + display: flex; + flex-direction: column; + gap: 20rpx; +} + +.instruction-item { + font-size: 28rpx; + color: #4B5563; + line-height: 1.7; + position: relative; + padding-left: 4rpx; +} + + /* Records Section */ .records-section { margin-top: 48rpx; diff --git a/project.private.config.json b/project.private.config.json index 264cc82..c9e0981 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,6 +1,6 @@ { "libVersion": "3.13.1", - "projectname": "%E5%BF%83%E4%BC%B4", + "projectname": "ai-c", "condition": {}, "setting": { "urlCheck": false,