release: freeze V1.2 demo acceptance 2026-10-25
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (push) Waiting to run
CI/CD Pipeline / Backend Build & Test (push) Waiting to run
CI/CD Pipeline / Admin Web Build (push) Waiting to run
CI/CD Pipeline / Mini Program Compile Check (push) Waiting to run
CI/CD Pipeline / Migration Validation (push) Blocked by required conditions
CI/CD Pipeline / UI Contracts (source-structure gates) (push) Waiting to run
CI/CD Pipeline / E2E (live stack) (push) Blocked by required conditions

This commit is contained in:
WorkBuddy
2026-10-25 14:29:29 +08:00
parent f6744d3f91
commit 377429995c
137 changed files with 4136 additions and 175 deletions
@@ -0,0 +1,31 @@
const { serviceConsentService } = require('../../services');
Page({
data: { documents: [], saving: false, error: '', canAgree: false, hasAgreed: false },
onShow() { this.load(); },
async load() {
try {
const documents = await serviceConsentService.getState();
this.setData({ documents, canAgree: documents.length === 2, hasAgreed: documents.some(item => item.agreed), error: '' });
} catch (err) { this.setData({ error: err.message || '授权状态加载失败' }); }
},
async onAgree() {
if (!this.data.canAgree || this.data.saving) return;
this.setData({ saving: true, error: '' });
try {
const versions = {};
this.data.documents.forEach(item => { versions[item.consentType] = item.documentVersion; });
await serviceConsentService.agree(versions);
wx.showToast({ title: '授权已确认', icon: 'success' });
await this.load();
} catch (err) { this.setData({ error: err.message || '授权确认失败' }); }
finally { this.setData({ saving: false }); }
},
onWithdraw() {
wx.showActionSheet({ itemList: ['撤回婚恋服务授权', '撤回隐私与安全授权'], success: ({ tapIndex }) => this.withdraw(tapIndex === 0 ? 'service_terms' : 'privacy_safety') });
},
async withdraw(consentType) {
try { await serviceConsentService.withdraw(consentType); wx.showToast({ title: '已撤回', icon: 'success' }); await this.load(); }
catch (err) { this.setData({ error: err.message || '撤回失败' }); }
},
});
@@ -0,0 +1 @@
{"navigationBarTitleText":"服务授权","usingComponents":{}}
@@ -0,0 +1,11 @@
<view class="page service-consent-page">
<view class="hero"><text class="title">服务授权</text><text class="subtitle">确认两份授权后,才能使用匹配、搜索、活动和公益服务。</text></view>
<view class="notice">两份授权分别记录。任一撤回后,相关服务会立即暂停。</view>
<view class="document" wx:for="{{documents}}" wx:key="consentType">
<view class="document-main"><text class="document-title">{{item.consentType === 'service_terms' ? '婚恋服务授权书' : '隐私与安全授权书'}}</text><text class="document-version">版本 {{item.documentVersion}}</text></view>
<text class="document-status {{item.agreed ? 'agreed' : 'required'}}">{{item.agreed ? '已确认' : '待确认'}}</text>
</view>
<button class="primary" loading="{{saving}}" disabled="{{saving || !canAgree}}" bindtap="onAgree">确认两份授权</button>
<view class="withdraw-row" wx:if="{{hasAgreed}}"><text>需要停止服务?</text><text class="withdraw" bindtap="onWithdraw">撤回授权</text></view>
<view class="error" wx:if="{{error}}">{{error}}</view>
</view>
@@ -0,0 +1 @@
.service-consent-page{padding:32rpx;background:#f4f5fa;min-height:100vh;box-sizing:border-box}.hero{padding:18rpx 4rpx 28rpx}.title{display:block;font-size:42rpx;font-weight:700;color:#172a72}.subtitle{display:block;margin-top:14rpx;color:#68708f;line-height:1.6}.notice{padding:22rpx;background:#fff5e8;color:#8a5b20;border-radius:12rpx;line-height:1.6}.document{margin-top:20rpx;padding:26rpx 22rpx;background:#fff;border-radius:12rpx;display:flex;align-items:center;justify-content:space-between}.document-main{display:flex;flex-direction:column;gap:10rpx}.document-title{font-size:30rpx;color:#20284d}.document-version{font-size:24rpx;color:#8b91aa}.document-status{font-size:26rpx}.agreed{color:#18864b}.required{color:#d26b20}.primary{margin-top:36rpx;background:#f4005a;color:#fff;border-radius:12rpx}.withdraw-row{margin-top:28rpx;text-align:center;color:#858ba3}.withdraw{margin-left:10rpx;color:#d44c4c}.error{margin-top:22rpx;color:#c0392b;text-align:center}