feat: 对接部分接口
This commit is contained in:
+19
-15
@@ -13,6 +13,7 @@ import NavBar from '@/components/NavBar.vue'
|
||||
import VueQrcode from '@chenfengyuan/vue-qrcode'
|
||||
import { useUserStore } from '@/store'
|
||||
import Avatar from '@/components/Avatar.vue'
|
||||
import { getCommunityMyInviteAPI } from '@/service'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -24,11 +25,18 @@ const onCopy = (code: string) => {
|
||||
data: code,
|
||||
})
|
||||
}
|
||||
const onLottery = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/lottery/index',
|
||||
const inviteData = ref({
|
||||
num: 0,
|
||||
performance: 0,
|
||||
})
|
||||
const { list } = useListPageRequest((params) => {
|
||||
return getCommunityMyInviteAPI(params).then((res) => {
|
||||
inviteData.value.num = res.data.num
|
||||
inviteData.value.performance = res.data.performance
|
||||
res.data.data = res.data.list
|
||||
return res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -77,7 +85,7 @@ const onLottery = () => {
|
||||
<view class="flex-1">
|
||||
<view class="text-15 text-#333 font-500">
|
||||
邀请10人
|
||||
<text class="text-#50D0FF">(10</text>
|
||||
<text class="text-#50D0FF">({{ inviteData.num }}</text>
|
||||
<text class="text-#50D0FF">/10)</text>
|
||||
</view>
|
||||
<view class="text-12 text-#333 mt-8">每月额外领取3000元数济金</view>
|
||||
@@ -134,25 +142,21 @@ const onLottery = () => {
|
||||
</view>
|
||||
<view class="mt-15 w-345 mx-auto">
|
||||
<view class="ml-15 text-18 text-white">团队成员(3/人)</view>
|
||||
<view
|
||||
class="mt-15 bg-white px-15 pt-15 pb-4 rounded-10"
|
||||
v-for="(item, index) of 3"
|
||||
:key="index"
|
||||
>
|
||||
<view class="mt-15 bg-white px-15 pt-15 pb-4 rounded-10" v-for="item of list" :key="item.id">
|
||||
<view class="flex items-center">
|
||||
<Avatar class="w-50 h-50" />
|
||||
<Avatar :src="item.avatar" class="w-50 h-50" mode="aspectFill" />
|
||||
<view class="ml-15 flex-1">
|
||||
<view class="text-15 text-#333">Aaron</view>
|
||||
<view class="text-12 text-#333 mt-10">2024-03-08</view>
|
||||
<view class="text-15 text-#333">{{ item.nickname }}</view>
|
||||
<view class="text-12 text-#333 mt-10">{{ item.jointime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex mt-16 py-8">
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-gradient">2</view>
|
||||
<view class="text-gradient">{{ item.yiliao }}</view>
|
||||
<view class="text-15 text-#333">医疗(份)</view>
|
||||
</view>
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-gradient">2</view>
|
||||
<view class="text-gradient">{{ item.yanglao }}</view>
|
||||
<view class="text-15 text-#333">养老(份)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user