|
@@ -36,9 +36,20 @@
|
|
|
<text class="earn-value">¥{{ formatMoney(stats.todayEstimate) }}</text>
|
|
<text class="earn-value">¥{{ formatMoney(stats.todayEstimate) }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="withdraw-bar" v-if="stats.availableBalance >= 10000" @click="goWithdraw">
|
|
|
|
|
- <text class="withdraw-text">立即提现</text>
|
|
|
|
|
- <text class="withdraw-arrow">›</text>
|
|
|
|
|
|
|
+ <!-- L1/L2 commission breakdown -->
|
|
|
|
|
+ <view class="earnings-breakdown" v-if="l1Total > 0 || l2Total > 0">
|
|
|
|
|
+ <view class="breakdown-row">
|
|
|
|
|
+ <text class="breakdown-label">一级推广佣金</text>
|
|
|
|
|
+ <text class="breakdown-value">¥{{ formatMoney(l1Total) }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="breakdown-row">
|
|
|
|
|
+ <text class="breakdown-label">二级推广佣金</text>
|
|
|
|
|
+ <text class="breakdown-value">¥{{ formatMoney(l2Total) }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- Withdraw notice -->
|
|
|
|
|
+ <view class="withdraw-notice">
|
|
|
|
|
+ <text class="withdraw-notice-text">💳 提现功能即将开放,敬请期待</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -153,7 +164,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, computed, onMounted } from 'vue'
|
|
|
import { onPullDownRefresh } from '@dcloudio/uni-app'
|
|
import { onPullDownRefresh } from '@dcloudio/uni-app'
|
|
|
import { useUserStore } from '@/stores/user'
|
|
import { useUserStore } from '@/stores/user'
|
|
|
import { commissionApi } from '@/utils/api'
|
|
import { commissionApi } from '@/utils/api'
|
|
@@ -174,6 +185,18 @@ const stats = ref({
|
|
|
totalCommissions: 0
|
|
totalCommissions: 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+// L1/L2 commission breakdown from commissions list
|
|
|
|
|
+const l1Total = computed(() => {
|
|
|
|
|
+ return commissions.value
|
|
|
|
|
+ .filter(c => c.level === 1 && c.status === 'settled')
|
|
|
|
|
+ .reduce((sum, c) => sum + (c.amount || 0), 0)
|
|
|
|
|
+})
|
|
|
|
|
+const l2Total = computed(() => {
|
|
|
|
|
+ return commissions.value
|
|
|
|
|
+ .filter(c => c.level === 2 && c.status === 'settled')
|
|
|
|
|
+ .reduce((sum, c) => sum + (c.amount || 0), 0)
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
// US-6.5 §2-3: Only paid users can access
|
|
// US-6.5 §2-3: Only paid users can access
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
if (!userStore.isVipActive) {
|
|
if (!userStore.isVipActive) {
|
|
@@ -429,6 +452,45 @@ function formatDate(dateStr) {
|
|
|
color: #C9A84C;
|
|
color: #C9A84C;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/* ===== Earnings Breakdown ===== */
|
|
|
|
|
+.earnings-breakdown {
|
|
|
|
|
+ margin-top: 12px;
|
|
|
|
|
+ padding: 10px 14px;
|
|
|
|
|
+ background: rgba(255,255,255,0.03);
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+.breakdown-row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 4px 0;
|
|
|
|
|
+}
|
|
|
|
|
+.breakdown-label {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: rgba(255,255,255,0.5);
|
|
|
|
|
+}
|
|
|
|
|
+.breakdown-value {
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ color: rgba(255,255,255,0.75);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* ===== Withdraw Notice ===== */
|
|
|
|
|
+.withdraw-notice {
|
|
|
|
|
+ margin-top: 14px;
|
|
|
|
|
+ padding: 10px 0;
|
|
|
|
|
+ background: rgba(255,255,255,0.03);
|
|
|
|
|
+ border: 1px solid rgba(255,255,255,0.06);
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+}
|
|
|
|
|
+.withdraw-notice-text {
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ color: rgba(255,255,255,0.4);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/* ===== Team ===== */
|
|
/* ===== Team ===== */
|
|
|
.team-grid {
|
|
.team-grid {
|
|
|
display: grid;
|
|
display: grid;
|