feat: 完善登录流程、UI适配及协议文档更新
本次提交包含以下修改: 1. 新增微信登录相关服务及页面逻辑,实现首次微信绑定手机号流程 2. 优化产品匹配卡片 UI,移除不必要状态显示 3. 调整首页 scroll-view 属性及 banner 背景样式 4. 完善积分规则校验逻辑,增加时区及策略格式验证 5. 更新协议草案文档,补充资料清单及功能说明 6. 修复分析结果路由路径,适配新的匹配结果页面 7. 调整品牌 Logo 安卓端字体对齐样式
This commit is contained in:
@@ -13,14 +13,14 @@
|
||||
</view>
|
||||
<view v-if="errorMessage.length > 0" class="inline-error"><text class="inline-error-copy">{{ errorMessage }}</text><text class="inline-error-action" @click="load">重新加载</text></view>
|
||||
<view class="task-grid">
|
||||
<view class="task" v-for="item in taskViews" :key="item.id" @click="doTask(item)">
|
||||
<button class="task" v-for="item in taskViews" :key="item.id" :open-type="item.id == 'share' ? 'share' : ''" @click="doTask(item)">
|
||||
<AppIcon :name="item.icon" :size="52" />
|
||||
<text class="task-name">{{ item.name }}</text>
|
||||
<text :class="item.status == 'completed' ? 'task-caption completed-caption' : 'task-caption'">{{ taskCaption(item) }}</text>
|
||||
</view>
|
||||
</button>
|
||||
</view>
|
||||
<view class="invite-panel">
|
||||
<text class="panel-title">邀请与资料奖励</text><text class="invite-copy">当前只展示已发布的积分规则,邀请和资料奖励尚未开放。</text>
|
||||
<text class="panel-title">分享与邀请</text><text class="invite-copy">将小程序分享给好友,分享和邀请奖励尚未开放。</text>
|
||||
</view>
|
||||
<view class="records">
|
||||
<view class="record-head" @click="toggleRecords"><text class="panel-title">积分明细</text><view class="record-toggle"><text class="more">{{ recordsExpanded ? '收起' : '展开' }}</text><AppIcon name="chevron-right" :size="26" :class="recordsExpanded ? 'record-arrow expanded-arrow' : 'record-arrow'" muted /></view></view>
|
||||
@@ -48,7 +48,7 @@
|
||||
type TaskView = { id: string, icon: string, name: string, status: string, reward: number | null, ruleVersion: string | null }
|
||||
const taskDefinitions: UTSJSONObject[] = [
|
||||
{ id: 'checkin', icon: 'calendar-check', name: '签到' },
|
||||
{ id: 'profile', icon: 'edit-file', name: '完善资料' },
|
||||
{ id: 'share', icon: 'share', name: '分享' },
|
||||
{ id: 'invitation', icon: 'gift', name: '邀请好友' }
|
||||
]
|
||||
const pendingKey = 'finance.points.checkin.pending'
|
||||
@@ -75,6 +75,7 @@
|
||||
const pointsNote = computed((): string => {
|
||||
if (points.value == null) return '正在同步账户数据'
|
||||
if (points.value.balanceState == 'anomaly') return '账户积分状态异常,请稍后重试'
|
||||
if (rules.value?.status == 'paused') return '签到已暂停,已有积分和明细仍可查看'
|
||||
if (rules.value == null || rules.value.status != 'published') return '积分服务尚未发布,签到暂不可用'
|
||||
return '服务器同步 · ' + points.value.serverDate
|
||||
})
|
||||
@@ -125,6 +126,7 @@
|
||||
const checkInTask = taskPage.items.find((item: PointsTask): boolean => item.task == 'checkin')
|
||||
if (summary.serverDate != taskPage.serverDate || summary.timezone != taskPage.timezone || summary.timezone != currentRules.timezone
|
||||
|| summary.ruleVersion != currentRules.ruleVersion || summary.checkInReward != currentRules.checkInReward || checkInTask == null
|
||||
|| (summary.checkInEnabled && currentRules.status != 'published')
|
||||
|| checkInTask.ruleVersion != summary.ruleVersion || checkInTask.reward != summary.checkInReward
|
||||
|| (checkInTask.status == 'completed') != (summary.ruleVersion != null && summary.signedToday)
|
||||
|| (checkInTask.status == 'available') != (summary.checkInEnabled && !summary.signedToday)) throw new Error('积分状态已变化,请重新加载')
|
||||
@@ -164,12 +166,14 @@
|
||||
if (!sameAccount()) return
|
||||
const currentRules = rules.value
|
||||
if (currentRules == null) { uni.showModal({ title: '积分规则', content: '积分规则暂时无法读取,请稍后重试。', showCancel: false, confirmText: '知道了' }); return }
|
||||
if (currentRules.status != 'published' || currentRules.checkInReward == null || currentRules.ruleVersion == null) {
|
||||
if (currentRules.status == 'draft' || currentRules.publishedRules == null || currentRules.checkInReward == null || currentRules.ruleVersion == null) {
|
||||
uni.showModal({ title: '积分规则', content: '积分服务尚未发布,签到和奖励暂未开放。', showCancel: false, confirmText: '知道了' }); return
|
||||
}
|
||||
uni.showModal({ title: '积分规则', content: '当前规则版本:' + currentRules.ruleVersion + '\n每日签到奖励:' + currentRules.checkInReward.toString() + ' 分\n每日限签到 1 次,不支持补签。', showCancel: false, confirmText: '知道了' })
|
||||
const statusNote = currentRules.status == 'paused' ? '签到已暂停,已有积分和明细仍可查看。\n\n' : ''
|
||||
uni.showModal({ title: '积分规则', content: statusNote + '每日签到奖励:' + currentRules.checkInReward.toString() + ' 分\n按北京时间每日0点划分,每日限签到1次,不支持补签。\n连续签到无额外加成,分享和邀请奖励暂未开放。\n积分不过期,不影响会员等级。\n暂不支持兑换、提现或抵扣AI调用额度。', showCancel: false, confirmText: '知道了' })
|
||||
}
|
||||
const taskCaption = (item: TaskView): string => {
|
||||
if (item.id == 'share') return '分享小程序'
|
||||
if (item.id == 'checkin' && checkingIn.value) return '正在确认…'
|
||||
if (item.id == 'checkin' && pendingRequest.value != null) return '确认上次状态'
|
||||
if (item.status == 'completed') return '今日已完成'
|
||||
@@ -209,9 +213,17 @@
|
||||
const doTask = (item: TaskView): void => {
|
||||
if (!sameAccount()) return
|
||||
if (item.id == 'checkin') { checkIn(); return }
|
||||
if (item.id == 'profile') { uni.navigateTo({ url: '/packages/finance/archive/archive' }); return }
|
||||
if (item.id == 'share') {
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.showModal({ title: '分享', content: '请使用浏览器或客户端的分享功能,将页面分享给好友。', showCancel: false, confirmText: '知道了' })
|
||||
// #endif
|
||||
return
|
||||
}
|
||||
uni.showToast({ title: '邀请奖励暂未开放', icon: 'none' })
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: 'AI融资 · 智能融资分析与产品匹配', path: '/pages/home/home' }))
|
||||
// #endif
|
||||
const recordName = (item: PointsLedgerItem): string => item.businessType == 'checkin' ? '每日签到' : '历史积分记录'
|
||||
const recordDate = (item: PointsLedgerItem): string => item.businessDate ?? item.createdAt ?? '日期待核实'
|
||||
const deltaLabel = (item: PointsLedgerItem): string => item.delta >= 0 ? '+' + item.delta.toString() : item.delta.toString()
|
||||
@@ -236,7 +248,11 @@
|
||||
.inline-error-copy { flex: 1; color: #b0473e; font-size: 23rpx; line-height: 34rpx; }
|
||||
.inline-error-action { color: #0868f7; font-size: 23rpx; margin-left: 18rpx; }
|
||||
.task-grid { min-height: 186rpx; flex-direction: row; background-color: #ffffff; border-radius: 18rpx; margin-top: 20rpx; }
|
||||
.task { flex: 1; align-items: center; justify-content: center; padding: 24rpx 0; }
|
||||
.task { flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 24rpx 0; margin: 0; border-radius: 0; background-color: transparent; line-height: 1.5;
|
||||
/* #ifndef APP */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
}
|
||||
.task-name { margin-top: 14rpx; font-size: 24rpx; color: #172640; font-weight: 600; }
|
||||
.task-caption { margin-top: 7rpx; font-size: 22rpx; color: #66758a; }
|
||||
.completed-caption { color: #168454; }
|
||||
|
||||
Reference in New Issue
Block a user