feat: 对接完接口
This commit is contained in:
@@ -21,7 +21,9 @@
|
||||
class="m-15 text-white flex rounded-tl-10 rounded-br-10 justify-between items-center p-15 bg-[linear-gradient(90deg,rgba(59,129,243,0.5),#3B81F3)]"
|
||||
>
|
||||
<view class="text-14">{{ type === 0 ? '养老金' : '团队佣金' }}余额</view>
|
||||
<view class="text-17 font-bold">{{ userStore.userInfo.money }}</view>
|
||||
<view class="text-17 font-bold">
|
||||
{{ type === 0 ? userStore.userInfo.moneyold : userStore.userInfo.moneyyong }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="p-15 bg-white shadow-[0_-2px_3px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="mt-15">
|
||||
@@ -34,7 +36,12 @@
|
||||
placeholder="转出金额"
|
||||
class="text-14 text-#333 flex-1"
|
||||
/>
|
||||
<view class="text-12 text-gradient" @click="convertNum = userStore.userInfo.score">
|
||||
<view
|
||||
class="text-12 text-gradient"
|
||||
@click="
|
||||
convertNum = type === 0 ? userStore.userInfo.moneyold : userStore.userInfo.moneyyong
|
||||
"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
</view>
|
||||
@@ -62,7 +69,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { convertScoreAPI } from '@/service'
|
||||
import { convertScoreAPI, getOldMoneyTransferAPI, getYongMoneyTransferAPI } from '@/service'
|
||||
import { useUserStore } from '@/store'
|
||||
import { mergeStep, showModal } from '@/utils'
|
||||
|
||||
@@ -78,8 +85,9 @@ const onWithdrawalDetail = () => {
|
||||
|
||||
const onSubmit = mergeStep(async () => {
|
||||
await showModal('确认转换?')
|
||||
await convertScoreAPI({
|
||||
score: convertNum.value,
|
||||
const request = type.value === 0 ? getOldMoneyTransferAPI : getYongMoneyTransferAPI
|
||||
await request({
|
||||
money: convertNum.value,
|
||||
})
|
||||
await showModal('转换成功')
|
||||
userStore.loadUserInfo()
|
||||
|
||||
Reference in New Issue
Block a user