feat: 接口对接完成

This commit is contained in:
anonymous
2025-01-03 16:44:05 +08:00
parent 0889d068a8
commit 2d19bbce4c
37 changed files with 1220 additions and 398 deletions
+26 -20
View File
@@ -21,13 +21,20 @@
<view class="mt-15">
<view class="flex items-center justify-between">
<view class="text-14 text-#333">我的股数</view>
<view class="text-12 text-#999">可转换股数1202.45</view>
<view class="text-12 text-#999">可转换股数{{ userStore.userInfo.score }}</view>
</view>
<view
class="flex items-center text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10"
>
<input type="number" placeholder="请输入股数" class="text-14 text-#333 flex-1" />
<view class="text-12 text-gradient">全部</view>
<input
v-model="convertNum"
type="number"
placeholder="请输入股数"
class="text-14 text-#333 flex-1"
/>
<view class="text-12 text-gradient" @click="convertNum = userStore.userInfo.score">
全部
</view>
</view>
<view class="text-12 text-#889BC6 mt-15">马尔代夫股权每股价值500元</view>
</view>
@@ -49,30 +56,29 @@
<script setup lang="ts">
import NavBar from '@/components/NavBar.vue'
import { convertScoreAPI } from '@/service'
import { useUserStore } from '@/store'
import { mergeStep, showModal } from '@/utils'
const userStore = useUserStore()
const convertNum = ref('')
const onWithdrawalDetail = () => {
uni.navigateTo({
url: '/pages-sub/withdrawal-detail/index',
url: '/pages-sub/asset/index',
})
}
const onSelectPayType = () => {
uni.$once('withdrawal-type', (data: any) => {
console.log(data)
const onSubmit = mergeStep(async () => {
await showModal('确认转换?')
await convertScoreAPI({
score: convertNum.value,
})
uni.navigateTo({
url: '/pages-sub/withdrawal-type/index?type=select',
})
}
const onSubmit = () => {
uni.showModal({
title: '提示',
content: '转换成功',
showCancel: false,
})
uni.navigateBack()
}
await showModal('转换成功')
userStore.loadUserInfo()
onWithdrawalDetail()
})
</script>
<style scoped></style>