|
@@ -1,6 +1,9 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
|
|
+import { useRequest } from 'alova/client'
|
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
|
|
+import { getAccountCount } from '@/api/home'
|
|
|
|
|
+import { getUnlockAmountByUserId } from '@/api/income'
|
|
|
import CustomNavigationBar from '@/components/CustomNavigationBar.vue'
|
|
import CustomNavigationBar from '@/components/CustomNavigationBar.vue'
|
|
|
import { LOGIN_PAGE } from '@/router/config'
|
|
import { LOGIN_PAGE } from '@/router/config'
|
|
|
import { useUserStore } from '@/store'
|
|
import { useUserStore } from '@/store'
|
|
@@ -16,13 +19,15 @@ definePage({
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
const tokenStore = useTokenStore()
|
|
const tokenStore = useTokenStore()
|
|
|
|
|
+const { hasLogin } = storeToRefs(tokenStore)
|
|
|
|
|
+
|
|
|
// 使用storeToRefs解构userInfo
|
|
// 使用storeToRefs解构userInfo
|
|
|
const { userInfo } = storeToRefs(userStore)
|
|
const { userInfo } = storeToRefs(userStore)
|
|
|
|
|
|
|
|
function menuClick(page: string) {
|
|
function menuClick(page: string) {
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pages-A/${page}/index`,
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages-A/${page}/index`,
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const show = ref(false)
|
|
const show = ref(false)
|
|
@@ -37,6 +42,26 @@ function cancel() {
|
|
|
function close() {
|
|
function close() {
|
|
|
show.value = false
|
|
show.value = false
|
|
|
}
|
|
}
|
|
|
|
|
+const unlockAmount = ref(0)
|
|
|
|
|
+
|
|
|
|
|
+// 发券人账户表-通过userId查询账户信息
|
|
|
|
|
+const { send: getAccountCountRequest, data: accountCountData } = useRequest(getAccountCount, {
|
|
|
|
|
+ immediate: false,
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const { send: getUnlockAmountByUserIdRequest, data: unlockAmountData } = useRequest(getUnlockAmountByUserId, {
|
|
|
|
|
+ immediate: false,
|
|
|
|
|
+})
|
|
|
|
|
+// 移除重复声明,已在下方统一声明
|
|
|
|
|
+onShow(async () => {
|
|
|
|
|
+ // 登录后查询收益数据
|
|
|
|
|
+ if (hasLogin) {
|
|
|
|
|
+ await getAccountCountRequest()
|
|
|
|
|
+ await getUnlockAmountByUserIdRequest()
|
|
|
|
|
+ unlockAmount.value = unlockAmountData
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
function showTimeFilter() {
|
|
function showTimeFilter() {
|
|
|
show.value = true
|
|
show.value = true
|
|
|
}
|
|
}
|
|
@@ -45,8 +70,13 @@ const activeTab = ref('pending')
|
|
|
function changeTab(tab: string) {
|
|
function changeTab(tab: string) {
|
|
|
activeTab.value = tab
|
|
activeTab.value = tab
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-const unlockAmount = ref('')
|
|
|
|
|
|
|
+function submitPay() {
|
|
|
|
|
+ // 提示联系管理员
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '联系管理员解锁收益!',
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -55,14 +85,20 @@ const unlockAmount = ref('')
|
|
|
<CustomNavigationBar title="解锁收益" background-color="transparent" />
|
|
<CustomNavigationBar title="解锁收益" background-color="transparent" />
|
|
|
|
|
|
|
|
<!-- 顶部区域 -->
|
|
<!-- 顶部区域 -->
|
|
|
- <view class="income-header" style="background: url('../../static/images/income/income-bg.png') no-repeat center center; background-size: cover;">
|
|
|
|
|
- <view class="income-header-avatar-info" :style="{ paddingTop: `${safeAreaInsets.top + menuButtonInfo.height + 12}px` }">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="income-header"
|
|
|
|
|
+ style="background: url('../../static/images/income/income-bg.png') no-repeat center center; background-size: cover;"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="income-header-avatar-info"
|
|
|
|
|
+ :style="{ paddingTop: `${safeAreaInsets.top + menuButtonInfo.height + 12}px` }"
|
|
|
|
|
+ >
|
|
|
<view class="income-header-balance">
|
|
<view class="income-header-balance">
|
|
|
锁定余额(元)
|
|
锁定余额(元)
|
|
|
</view>
|
|
</view>
|
|
|
<view class="income-header-balance-num">
|
|
<view class="income-header-balance-num">
|
|
|
<view class="income-header-balance-num-amount">
|
|
<view class="income-header-balance-num-amount">
|
|
|
- 7297491.08
|
|
|
|
|
|
|
+ {{ accountCountData?.balance }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="income-header-balance-num-btns">
|
|
<view class="income-header-balance-num-btns">
|
|
|
<view class="income-header-balance-num-btn js">
|
|
<view class="income-header-balance-num-btn js">
|
|
@@ -74,7 +110,7 @@ const unlockAmount = ref('')
|
|
|
<view class="income-header-tips">
|
|
<view class="income-header-tips">
|
|
|
<view class="income-header-tips-item">
|
|
<view class="income-header-tips-item">
|
|
|
<view class="income-header-tips-item-num">
|
|
<view class="income-header-tips-item-num">
|
|
|
- 729000.00
|
|
|
|
|
|
|
+ {{ accountCountData?.withdrawableAmount }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="income-header-tips-item-des">
|
|
<view class="income-header-tips-item-des">
|
|
|
锁定金额
|
|
锁定金额
|
|
@@ -82,7 +118,7 @@ const unlockAmount = ref('')
|
|
|
</view>
|
|
</view>
|
|
|
<view class="income-header-tips-item">
|
|
<view class="income-header-tips-item">
|
|
|
<view class="income-header-tips-item-num">
|
|
<view class="income-header-tips-item-num">
|
|
|
- 1,125
|
|
|
|
|
|
|
+ {{ accountCountData?.unsettledAmount }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="income-header-tips-item-des">
|
|
<view class="income-header-tips-item-des">
|
|
|
未结算金额
|
|
未结算金额
|
|
@@ -97,15 +133,10 @@ const unlockAmount = ref('')
|
|
|
</view>
|
|
</view>
|
|
|
<view class="income-header-menu-input">
|
|
<view class="income-header-menu-input">
|
|
|
<text class="income-header-menu-input-symbol">¥</text>
|
|
<text class="income-header-menu-input-symbol">¥</text>
|
|
|
- <u-input
|
|
|
|
|
- v-model="unlockAmount"
|
|
|
|
|
- type="number"
|
|
|
|
|
- border="none"
|
|
|
|
|
- placeholder="请输入解锁金额"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <u-input v-model="unlockAmount" type="number" border="none" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="income-header-menu-btn">
|
|
|
|
|
|
|
+ <view class="income-header-menu-btn" @click="submitPay">
|
|
|
立即充值
|
|
立即充值
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -116,45 +147,55 @@ const unlockAmount = ref('')
|
|
|
height: 80rpx !important;
|
|
height: 80rpx !important;
|
|
|
font-size: 80rpx !important;
|
|
font-size: 80rpx !important;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.profile-container {
|
|
.profile-container {
|
|
|
font-family: Alibaba PuHuiTi;
|
|
font-family: Alibaba PuHuiTi;
|
|
|
min-height: 100vh;
|
|
min-height: 100vh;
|
|
|
background-color: #f5f5f5;
|
|
background-color: #f5f5f5;
|
|
|
line-height: 1;
|
|
line-height: 1;
|
|
|
|
|
+
|
|
|
// padding-top: 44px; /* 为固定导航栏留出空间 */
|
|
// padding-top: 44px; /* 为固定导航栏留出空间 */
|
|
|
.income-header {
|
|
.income-header {
|
|
|
height: 525rpx;
|
|
height: 525rpx;
|
|
|
|
|
+
|
|
|
.income-header-avatar-info {
|
|
.income-header-avatar-info {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
gap: 30rpx;
|
|
gap: 30rpx;
|
|
|
padding: 0 24rpx;
|
|
padding: 0 24rpx;
|
|
|
|
|
+
|
|
|
.income-header-balance {
|
|
.income-header-balance {
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.income-header-balance-num {
|
|
.income-header-balance-num {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+
|
|
|
.income-header-balance-num-amount {
|
|
.income-header-balance-num-amount {
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
font-size: 65rpx;
|
|
font-size: 65rpx;
|
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.income-header-balance-num-btns {
|
|
.income-header-balance-num-btns {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
gap: 15rpx;
|
|
gap: 15rpx;
|
|
|
|
|
+
|
|
|
.income-header-balance-num-btn {
|
|
.income-header-balance-num-btn {
|
|
|
padding: 20rpx 40rpx;
|
|
padding: 20rpx 40rpx;
|
|
|
border-radius: 33rpx;
|
|
border-radius: 33rpx;
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
|
|
+
|
|
|
&.js {
|
|
&.js {
|
|
|
background: #da4c47;
|
|
background: #da4c47;
|
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
&.tx {
|
|
&.tx {
|
|
|
background: #bfbfbf;
|
|
background: #bfbfbf;
|
|
|
color: #747474;
|
|
color: #747474;
|
|
@@ -163,12 +204,14 @@ const unlockAmount = ref('')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.income-header-tips {
|
|
.income-header-tips {
|
|
|
height: 124rpx;
|
|
height: 124rpx;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
background: linear-gradient(114deg, #f67873, #fb847f, #f67873);
|
|
background: linear-gradient(114deg, #f67873, #fb847f, #f67873);
|
|
|
border-radius: 10rpx;
|
|
border-radius: 10rpx;
|
|
|
margin: 47rpx 24rpx 0 24rpx;
|
|
margin: 47rpx 24rpx 0 24rpx;
|
|
|
|
|
+
|
|
|
.income-header-tips-item {
|
|
.income-header-tips-item {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -181,6 +224,7 @@ const unlockAmount = ref('')
|
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
|
line-height: 1;
|
|
line-height: 1;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
+
|
|
|
&:first-child:after {
|
|
&:first-child:after {
|
|
|
content: '';
|
|
content: '';
|
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -191,9 +235,11 @@ const unlockAmount = ref('')
|
|
|
height: 40rpx;
|
|
height: 40rpx;
|
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.income-header-tips-item-num {
|
|
.income-header-tips-item-num {
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.income-header-tips-item-des {
|
|
.income-header-tips-item-des {
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
@@ -208,6 +254,7 @@ const unlockAmount = ref('')
|
|
|
border-radius: 10rpx;
|
|
border-radius: 10rpx;
|
|
|
margin: 24rpx 24rpx 0;
|
|
margin: 24rpx 24rpx 0;
|
|
|
margin-top: -30rpx;
|
|
margin-top: -30rpx;
|
|
|
|
|
+
|
|
|
.income-header-menu-title {
|
|
.income-header-menu-title {
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
@@ -215,11 +262,13 @@ const unlockAmount = ref('')
|
|
|
padding: 34rpx 20rpx;
|
|
padding: 34rpx 20rpx;
|
|
|
border-bottom: 2rpx solid #eeeeee;
|
|
border-bottom: 2rpx solid #eeeeee;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.income-header-menu-input {
|
|
.income-header-menu-input {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: flex-end;
|
|
align-items: flex-end;
|
|
|
gap: 17rpx;
|
|
gap: 17rpx;
|
|
|
padding: 66rpx 20rpx;
|
|
padding: 66rpx 20rpx;
|
|
|
|
|
+
|
|
|
.income-header-menu-input-symbol {
|
|
.income-header-menu-input-symbol {
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
font-size: 60rpx;
|
|
font-size: 60rpx;
|
|
@@ -227,6 +276,7 @@ const unlockAmount = ref('')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.income-header-menu-btn {
|
|
.income-header-menu-btn {
|
|
|
width: 600rpx;
|
|
width: 600rpx;
|
|
|
line-height: 80rpx;
|
|
line-height: 80rpx;
|