| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <template>
- <view class="page">
- <!-- Hero area -->
- <view class="hero">
- <text class="hero-icon">✦</text>
- <text class="price">¥398</text>
- <text class="per">/年</text>
- <text class="desc">每天仅 ¥1.09,让数字能量成为你的生产力</text>
- </view>
- <!-- Benefits -->
- <view class="card">
- <view class="benefit" v-for="item in benefits" :key="item">
- <text class="check-icon">◆</text>
- <text>{{ item }}</text>
- </view>
- </view>
- <!-- Compare table -->
- <view class="compare-card">
- <view class="compare-header">
- <text class="col">功能</text>
- <text class="col">普通用户</text>
- <text class="col pro">能量师</text>
- </view>
- <view class="compare-row" v-for="row in compareData" :key="row.label">
- <text class="col">{{ row.label }}</text>
- <text class="col free">{{ row.free }}</text>
- <text class="col pro">{{ row.pro }}</text>
- </view>
- </view>
- <!-- Pay button -->
- <button class="pay-btn" @click="onPay" :disabled="paying">
- {{ paying ? '处理中...' : '立即开通 · 能量师 ¥398/年' }}
- </button>
- <text class="note">支付即表示同意《订阅协议》</text>
- </view>
- </template>
- <script setup>
- import { ref } from 'vue'
- import { payApi } from '@/utils/api'
- const paying = ref(false)
- const benefits = [
- '无限命盘生成,不限次数',
- 'AI 五区完整解读,随问随答',
- '无限分享 & PDF 导出',
- '全部历史记录',
- '推广赚佣金,¥119.4/人'
- ]
- const compareData = [
- { label: '命盘生成', free: '3次/天', pro: '不限' },
- { label: 'AI 解读', free: '3轮/天', pro: '无限次' },
- { label: '分享', free: '1次/天', pro: '不限' },
- { label: '推广佣金', free: '--', pro: '最高¥159.2/人' },
- ]
- async function onPay() {
- paying.value = true
- try {
- const res = await payApi.create({ totalFee: 39800, payType: 'wxpay' })
- uni.showToast({ title: '开通成功!', icon: 'success' })
- setTimeout(() => uni.navigateBack(), 1500)
- } catch (e) {
- uni.showToast({ title: '支付失败,请重试', icon: 'none' })
- }
- paying.value = false
- }
- </script>
- <style scoped lang="scss">
- .page {
- padding: 20px;
- min-height: 100vh;
- background: linear-gradient(180deg, #0c0a1a 0%, #120d28 60%, #0f0c1e 100%);
- }
- .hero {
- background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(217, 119, 6, 0.06));
- border: 1px solid rgba(251, 191, 36, 0.12);
- border-radius: 18px;
- padding: 36px 20px;
- text-align: center;
- color: #fff;
- margin-bottom: 16px;
- }
- .hero-icon {
- display: block;
- font-size: 20px;
- color: #fbbf24;
- margin-bottom: 12px;
- opacity: 0.6;
- }
- .price {
- font-size: 48px;
- font-weight: 700;
- color: #fbbf24;
- text-shadow: 0 0 30px rgba(251, 191, 36, 0.2);
- }
- .per {
- font-size: 16px;
- color: rgba(255, 255, 255, 0.5);
- margin-left: 4px;
- }
- .desc {
- display: block;
- font-size: 13px;
- color: rgba(255, 255, 255, 0.4);
- margin-top: 14px;
- letter-spacing: 1px;
- }
- .card {
- background: rgba(255, 255, 255, 0.03);
- border: 1px solid rgba(255, 255, 255, 0.06);
- border-radius: 14px;
- padding: 20px;
- margin-bottom: 16px;
- }
- .benefit {
- padding: 8px 0;
- font-size: 14px;
- color: rgba(255, 255, 255, 0.7);
- display: flex;
- align-items: center;
- }
- .check-icon {
- color: #fbbf24;
- margin-right: 12px;
- font-size: 10px;
- opacity: 0.6;
- }
- .compare-card {
- background: rgba(255, 255, 255, 0.03);
- border: 1px solid rgba(255, 255, 255, 0.06);
- border-radius: 14px;
- overflow: hidden;
- margin-bottom: 20px;
- }
- .compare-header,
- .compare-row {
- display: flex;
- padding: 14px 16px;
- font-size: 13px;
- }
- .compare-header {
- background: rgba(251, 191, 36, 0.06);
- font-weight: 600;
- color: rgba(255, 255, 255, 0.7);
- }
- .compare-row {
- border-bottom: 1px solid rgba(255, 255, 255, 0.04);
- }
- .compare-row:last-child {
- border-bottom: none;
- }
- .col {
- flex: 1;
- text-align: center;
- color: rgba(255, 255, 255, 0.5);
- }
- .col:first-child {
- text-align: left;
- flex: 1.5;
- color: rgba(255, 255, 255, 0.7);
- }
- .free {
- color: rgba(255, 255, 255, 0.3);
- }
- .pro {
- color: #fbbf24;
- }
- .pay-btn {
- width: 100%;
- padding: 16px;
- background: linear-gradient(135deg, #f59e0b, #d97706);
- color: #fff;
- border: none;
- border-radius: 14px;
- font-size: 17px;
- font-weight: 600;
- letter-spacing: 2px;
- margin-bottom: 8px;
- }
- .pay-btn[disabled] {
- opacity: 0.4;
- }
- .note {
- display: block;
- text-align: center;
- font-size: 12px;
- color: rgba(255, 255, 255, 0.25);
- }
- </style>
|