Compare commits
34 Commits
x-2
...
1741f255d0
| Author | SHA1 | Date | |
|---|---|---|---|
| 1741f255d0 | |||
| 302dfdf203 | |||
| 9b89ff64b3 | |||
| 2f997b491b | |||
| c46283de7f | |||
| 8a2789f119 | |||
| 28d48c3323 | |||
| 2b43b95fdb | |||
| c3ff2e3f4f | |||
| cac565506d | |||
| 25c045418d | |||
| 7d8eb755f1 | |||
| 4be8749cf5 | |||
| 59d47ec9f5 | |||
| fb7552192b | |||
| 859bea7d0e | |||
| 23afc0fb91 | |||
| af8e85c483 | |||
| 348d06eadb | |||
| 17eb27bfa6 | |||
| 5da0adfab2 | |||
| a2a3c09731 | |||
| 7ad24e1444 | |||
| 246c28e5d0 | |||
| 8f089b4bbd | |||
| a3eeed7273 | |||
| 2a620b5a0f | |||
| 1f28b06a5c | |||
| 79debee112 | |||
| 4ee9f70fcc | |||
| 5ba0155b0b | |||
| ffb887f3bf | |||
| e70ca852d8 | |||
| 21d8f75f6a |
@@ -97,6 +97,7 @@
|
||||
"useId": true,
|
||||
"useModel": true,
|
||||
"useTemplateRef": true,
|
||||
"useListPageRequest": true
|
||||
"useListPageRequest": true,
|
||||
"useCaptcha": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
"commitlint",
|
||||
"dcloudio",
|
||||
"iconfont",
|
||||
"Kefu",
|
||||
"qrcode",
|
||||
"refresherrefresh",
|
||||
"scrolltolower",
|
||||
|
||||
@@ -7,8 +7,8 @@ VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||
VITE_APP_PUBLIC_BASE=/
|
||||
|
||||
VITE_SERVER_BASEURL = 'https://mapi.foxmail555.cc'
|
||||
VITE_UPLOAD_BASEURL = 'https://ukw0y1.laf.run/upload'
|
||||
VITE_SERVER_BASEURL = 'https://yapi.foxmail555.cc'
|
||||
VITE_UPLOAD_BASEURL = 'https://yapi.foxmail555.cc/api/common/upload'
|
||||
|
||||
# h5是否需要配置代理
|
||||
VITE_APP_PROXY=false
|
||||
|
||||
@@ -1,23 +1,9 @@
|
||||
{
|
||||
"name": "马尔代夫国际钱包",
|
||||
"name": "全民参保",
|
||||
"type": "commonjs",
|
||||
"version": "2.5.3",
|
||||
"description": "unibest - 最好的 uniapp 开发模板",
|
||||
"author": {
|
||||
"name": "feige996",
|
||||
"zhName": "菲鸽",
|
||||
"email": "1020103647@qq.com",
|
||||
"github": "https://github.com/feige996",
|
||||
"gitee": "https://gitee.com/feige996"
|
||||
},
|
||||
"description": "全民参保",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/feige996/unibest",
|
||||
"repository-gitee": "https://gitee.com/feige996/unibest",
|
||||
"repository-deprecated": "https://github.com/codercup/unibest",
|
||||
"bugs": {
|
||||
"url": "https://github.com/feige996/unibest/issues"
|
||||
},
|
||||
"homepage": "https://feige996.github.io/unibest/",
|
||||
"engines": {
|
||||
"node": ">=18",
|
||||
"pnpm": ">=7.30"
|
||||
|
||||
@@ -18,7 +18,7 @@ export default defineUniPages({
|
||||
},
|
||||
tabBar: {
|
||||
color: '#999999',
|
||||
selectedColor: '#0E57A2',
|
||||
selectedColor: '#D3B389',
|
||||
backgroundColor: '#ffffff',
|
||||
borderStyle: '#E7E7E7',
|
||||
height: '56px',
|
||||
@@ -26,25 +26,31 @@ export default defineUniPages({
|
||||
iconWidth: '20px',
|
||||
spacing: '3px',
|
||||
list: [
|
||||
// {
|
||||
// iconPath: 'static/tabbar/home.png',
|
||||
// selectedIconPath: 'static/tabbar/homeHL.png',
|
||||
// pagePath: 'pages/index/index',
|
||||
// text: '首页',
|
||||
// },
|
||||
{
|
||||
iconPath: 'static/tabbar/home.png',
|
||||
selectedIconPath: 'static/tabbar/homeHL.png',
|
||||
pagePath: 'pages/index/index',
|
||||
iconPath: 'static/tabbar/bank.png',
|
||||
selectedIconPath: 'static/tabbar/bankHL.png',
|
||||
pagePath: 'pages/bank/index',
|
||||
text: '首页',
|
||||
},
|
||||
{
|
||||
iconPath: 'static/tabbar/invite.png',
|
||||
selectedIconPath: 'static/tabbar/inviteHL.png',
|
||||
pagePath: 'pages/invite/index',
|
||||
text: '邀请福利',
|
||||
},
|
||||
|
||||
{
|
||||
iconPath: 'static/tabbar/house.png',
|
||||
selectedIconPath: 'static/tabbar/houseHL.png',
|
||||
pagePath: 'pages/invite/index',
|
||||
text: '邀请好友',
|
||||
pagePath: 'pages/invest/index',
|
||||
text: '资产平移',
|
||||
},
|
||||
// {
|
||||
// iconPath: 'static/tabbar/invest.png',
|
||||
// selectedIconPath: 'static/tabbar/investHL.png',
|
||||
// pagePath: 'pages/invest/index',
|
||||
// text: '理财',
|
||||
// },
|
||||
{
|
||||
iconPath: 'static/tabbar/personal.png',
|
||||
selectedIconPath: 'static/tabbar/personalHL.png',
|
||||
|
||||
@@ -36,7 +36,6 @@ const userStore = useUserStore()
|
||||
/* 覆盖 uniapp 自带rpx效果 */
|
||||
html {
|
||||
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
/* stylelint-disable-next-line selector-type-no-unknown */
|
||||
#app {
|
||||
@@ -131,4 +130,11 @@ uni-modal {
|
||||
}
|
||||
}
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'FARRINGTON-7B';
|
||||
src: url('@/static/FARRINGTON-7B.ttf');
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -14,7 +14,7 @@ defineProps({
|
||||
rounded-full
|
||||
p-4
|
||||
shadow-lg
|
||||
style="background: linear-gradient(45deg, #3b81f3 0%, #37e6ec 100%)"
|
||||
style="background: linear-gradient(45deg, #ffdd99 0%, #efb85a 100%)"
|
||||
>
|
||||
<image
|
||||
block
|
||||
@@ -23,7 +23,7 @@ defineProps({
|
||||
bg-gray-100
|
||||
class="h-full w-full"
|
||||
mode="aspectFill"
|
||||
:src="src ?? DefaultAavatar"
|
||||
:src="src ? src : DefaultAavatar"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -15,16 +15,27 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getLastPage } from '@/utils'
|
||||
const title = getLastPage().$page.meta.navigationBar.titleText
|
||||
const props = defineProps({
|
||||
titleColor: {
|
||||
type: String,
|
||||
default: '#fff',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
})
|
||||
const title = computed(() => {
|
||||
return props.title || getLastPage().$page.meta.navigationBar.titleText
|
||||
})
|
||||
const showBack = getCurrentPages().length > 1
|
||||
const handleClickLeft = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
:deep(.wd-navbar) {
|
||||
--wot-navbar-title-font-size: 32rpx;
|
||||
// --wot-navbar-title-font-weight: 400;
|
||||
--wot-navbar-color: v-bind('titleColor');
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
const baseUrl = import.meta.env.VITE_SERVER_BASEURL
|
||||
export const useCaptcha = () => {
|
||||
const t = ref(Date.now())
|
||||
|
||||
const codeUrl = computed(() => {
|
||||
return baseUrl + '/api/index/captcha?t=' + t.value
|
||||
})
|
||||
const refreshCode = () => {
|
||||
t.value = Date.now()
|
||||
}
|
||||
onMounted(() => {
|
||||
refreshCode()
|
||||
})
|
||||
return { codeUrl, t, refreshCode }
|
||||
}
|
||||
@@ -50,23 +50,32 @@ function useListPageRequest(
|
||||
...getPagingParams.value,
|
||||
...customParams,
|
||||
})
|
||||
console.log(data)
|
||||
data.forEach((item: any) => {
|
||||
if (String(item.createtime).length < 11) {
|
||||
item.createtime = item.createtime * 1000
|
||||
}
|
||||
item.createtime = formatTime(item.createtime)
|
||||
item.image = getImageUrl(item.image)
|
||||
})
|
||||
// totalPage.value = data.count ? Math.ceil(data.count / pagingParams.value.limit!) : 0
|
||||
// 如果当前是第一页,则清空列表,否则追加数据
|
||||
if (getPagingParams.value.page === 1) {
|
||||
list.value = []
|
||||
}
|
||||
list.value.push(...data)
|
||||
}
|
||||
|
||||
const onReload = async (params?: AnyObject) => {
|
||||
// 如果当前是第一页,则清空列表
|
||||
if (getPagingParams.value.page === 1) {
|
||||
list.value = []
|
||||
}
|
||||
loading.value = true
|
||||
pagingParams.value.page = 1
|
||||
if (params) {
|
||||
customParams = params
|
||||
}
|
||||
try {
|
||||
list.value = []
|
||||
await loadData()
|
||||
} finally {
|
||||
loading.value = false
|
||||
|
||||
@@ -56,7 +56,12 @@ function uploadFile<T>({ tempFilePath, formData, data, error, loading }) {
|
||||
name: 'file',
|
||||
formData,
|
||||
success: (uploadFileRes) => {
|
||||
data.value = uploadFileRes.data as T
|
||||
try {
|
||||
data.value = JSON.parse(uploadFileRes.data).data.fullurl as T
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
data.value = uploadFileRes.data as T
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('uni.uploadFile err->', err)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* 可以设置路由白名单,或者黑名单,看业务需要选哪一个
|
||||
* 我这里应为大部分都可以随便进入,所以使用黑名单
|
||||
*/
|
||||
import { getUserInfoAPI } from '@/service'
|
||||
import { useUserStore } from '@/store'
|
||||
import {
|
||||
getNotNeedLoginPages as _getNotNeedLoginPages,
|
||||
|
||||
@@ -1,35 +1,97 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '我的资产',
|
||||
navigationBarTitleText: '资金明细',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { getMyAssetAPI } from '@/service'
|
||||
import { useUserStore } from '@/store'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const detailInfo = ref({
|
||||
point: 1,
|
||||
score: 1000,
|
||||
suminvest: '10000',
|
||||
const tabList = computed(() => {
|
||||
return [
|
||||
{ label: '我的余额', value: 1, money: userStore.userInfo?.money },
|
||||
{ label: '社保金余额', value: 2, money: userStore.userInfo?.moneyjiu },
|
||||
{ label: '养老金余额', value: 3, money: userStore.userInfo?.moneyold },
|
||||
{ label: '团队佣金余额', value: 4, money: userStore.userInfo?.moneyyong },
|
||||
]
|
||||
})
|
||||
const { list: assetList } = useListPageRequest((params) =>
|
||||
getMyAssetAPI(params).then((res) => {
|
||||
detailInfo.value = res.data
|
||||
res.data.data = res.data.list
|
||||
return res.data
|
||||
}),
|
||||
const tabIndex = ref(0)
|
||||
|
||||
const { list: assetList, onReload } = useListPageRequest(
|
||||
(params) =>
|
||||
getMyAssetAPI(params).then((res) => {
|
||||
return res
|
||||
}),
|
||||
{
|
||||
autoRequest: false,
|
||||
},
|
||||
)
|
||||
|
||||
onLoad((options) => {
|
||||
tabIndex.value = Number(options.tabIndex ?? 0)
|
||||
})
|
||||
watch(
|
||||
() => tabIndex.value,
|
||||
(index) => {
|
||||
onReload({
|
||||
type: unref(tabList)[index].value,
|
||||
})
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
},
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="min-h-screen py-15">
|
||||
<view class="mx-15 text-16 font-bold text-#333">我的资产</view>
|
||||
<view class="asset-page pt-15 relative">
|
||||
<NavBar title-color="#333" :title="tabList[tabIndex].label" />
|
||||
<!-- <view class="flex justify-around">
|
||||
<view
|
||||
v-for="(tabItem, index) in tabList"
|
||||
@click="tabIndex = index"
|
||||
:key="tabItem.value"
|
||||
class="flex items-center bg-#DEEBFF text-#3B81F3 rounded-full justify-center py-4 px-10"
|
||||
:class="{ 'btn-gradient text-white': tabIndex === index }"
|
||||
>
|
||||
<view class="text-14">{{ tabItem.label }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="py-30 pt-80 px-25">
|
||||
<view class="text-17">{{ tabList[tabIndex].label }}</view>
|
||||
<view class="text-30">¥{{ tabList[tabIndex].money }}</view>
|
||||
</view>
|
||||
<view class="relative z-1 main-content pt-40 pb-30 rounded-t-15">
|
||||
<view class="mb-15 px-15 text-18">【{{ tabList[tabIndex].label }}】明细</view>
|
||||
<template v-if="assetList.length">
|
||||
<view
|
||||
class="flex px-15 py-12 border-b items-center border-#3333331A border-b-solid"
|
||||
v-for="item in assetList"
|
||||
:key="item.id"
|
||||
>
|
||||
<view class="flex flex-col flex-1 ml-15">
|
||||
<view class="text-14 text-#333">{{ item.memo }}</view>
|
||||
<view class="text-12 mt-4 text-#333">{{ item.createtime }}</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-17 font-bold text-gradient">{{ item.money }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<wd-status-tip image="content" tip="暂无数据" />
|
||||
</template>
|
||||
</view>
|
||||
<!-- <view class="mx-15 text-16 font-bold text-#333">我的资产</view>
|
||||
<view
|
||||
class="mt-15 mx-15 rounded-20 text-#476FFF main-content p-15 rounded-10 shadow-[0_5px_30px_rgba(149,195,255,0.4)]"
|
||||
>
|
||||
@@ -37,31 +99,18 @@ const { list: assetList } = useListPageRequest((params) =>
|
||||
<view class="text-35 mt-10 font-bold">{{ detailInfo.suminvest }}</view>
|
||||
</view>
|
||||
<view class="text-16 mx-15 mb-15 font-bold text-#333 mt-30">资产记录</view>
|
||||
<view
|
||||
class="flex px-15 py-8 border-b items-center border-#E5E5E5 border-b-solid"
|
||||
v-for="item in assetList"
|
||||
:key="item.id"
|
||||
>
|
||||
<image src="/static/images/page-sub/invite-icon.png" class="w-32 h-32 self-center" />
|
||||
<view class="flex flex-col flex-1 ml-15">
|
||||
<view class="text-14 text-#333">{{ item.memo }}</view>
|
||||
<!-- <view class="text-12 mt-10 text-#999">奖励</view> -->
|
||||
<view class="text-12 mt-10 text-#999">{{ item.createtime }}</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-14 font-bold text-#FF5F5F">{{ item.money }}</view>
|
||||
<!-- <view class="text-14 mt-10 py-4 px-10 bg-#71C78A1A text-#71C78A">已到账</view> -->
|
||||
</view>
|
||||
</view>
|
||||
-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.main-content {
|
||||
background-image: url('@/static/images/page-sub/team/main-bg.png');
|
||||
<style scoped>
|
||||
.asset-page {
|
||||
background-image: url('@/static/images/page-sub/assets-bg.jpg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
background-position: top center;
|
||||
background-size: 100%;
|
||||
}
|
||||
.main-content {
|
||||
backdrop-filter: blur(60px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<NavBar>
|
||||
<NavBar :title="title" title-color="#333">
|
||||
<template #right>
|
||||
<image
|
||||
@click="onWithdrawalDetail"
|
||||
@@ -17,26 +17,39 @@
|
||||
/>
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="p-15">
|
||||
<view
|
||||
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">
|
||||
{{ 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">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="text-14 text-#333">我的股数</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
|
||||
v-model="convertNum"
|
||||
type="number"
|
||||
placeholder="请输入股数"
|
||||
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>
|
||||
<view class="text-12 text-#889BC6 mt-15">马尔代夫股权每股价值500元</view>
|
||||
<view class="text-14 text-#889BC6 mt-30">提现说明(TIPS)</view>
|
||||
<view class="text-12 text-#889BC6 mt-15">
|
||||
<view>1、如遇到系统结算繁忙,转换将会延迟到账</view>
|
||||
<view class="mt-4">2、提现将会提现至您的工商银行卡;</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
@@ -47,7 +60,7 @@
|
||||
class="btn-gradient flex-1 text-center text-white rounded-full text-14 px-30 py-10"
|
||||
@click="onSubmit"
|
||||
>
|
||||
确认转换至余额
|
||||
确认转换至{{ type === 0 ? '余额' : '养老金' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -56,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'
|
||||
|
||||
@@ -66,19 +79,29 @@ const convertNum = ref('')
|
||||
|
||||
const onWithdrawalDetail = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/asset/index',
|
||||
url: `/pages-sub/asset/index?tabIndex=${type.value ? 3 : 2}`,
|
||||
})
|
||||
}
|
||||
|
||||
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()
|
||||
onWithdrawalDetail()
|
||||
})
|
||||
|
||||
const type = ref(0)
|
||||
onLoad((options) => {
|
||||
type.value = Number(options.type ?? 0)
|
||||
})
|
||||
|
||||
const title = computed(() => {
|
||||
return type.value === 0 ? '养老金转余额' : '团队佣金转养老金'
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '热点新闻',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="hot-news-page min-h-screen px-15 pb-100">
|
||||
<NavBar title-color="#333" />
|
||||
|
||||
<view class="bg-#fff rounded-10 px-15 py-15 mt-15" v-if="newsList.length > 0">
|
||||
<view
|
||||
class="flex mb-15"
|
||||
v-for="item in newsList"
|
||||
:key="item.id"
|
||||
@click="handleNewsDetail(item.id)"
|
||||
>
|
||||
<image class="w-85 h-85 rounded-10" :src="item.image" mode="aspectFill" />
|
||||
<view class="ml-15 flex-1 flex flex-col justify-between">
|
||||
<view text-14>{{ item.name }}</view>
|
||||
<view class="text-12 text-#999">{{ formatTime(item.createtime) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { getIntroductionAPI } from '@/service'
|
||||
import { formatTime } from '@/utils'
|
||||
|
||||
const { list: newsList } = useListPageRequest((params) =>
|
||||
getIntroductionAPI({ type: 1, ...params }),
|
||||
)
|
||||
|
||||
const handleNewsDetail = (id: number) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages-sub/news-detail/index?id=${id}`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.hot-news-page {
|
||||
background: linear-gradient(180deg, #fff3eb 0%, #ffffff 100%);
|
||||
}
|
||||
</style>
|
||||
@@ -15,9 +15,7 @@
|
||||
:src="introductionDetail.image"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="text-gray-500 mx-16 text-14 mt-15 break-all">
|
||||
{{ introductionDetail.content }}
|
||||
</view>
|
||||
<view class="text-gray-500 mx-16 text-14 mt-15 break-all" v-html="introductionDetail.content" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ const onLottery = () => {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.invite-page {
|
||||
background-image: url('@/static/images/page-sub/invite-bg.png');
|
||||
background-image: url('@/static/images/page-sub/invite-bg.jpg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-size: 100%;
|
||||
|
||||
@@ -118,7 +118,7 @@ const onEnd = () => {
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<style>
|
||||
<style scoped>
|
||||
.lottery-item {
|
||||
&.mask {
|
||||
&::after {
|
||||
|
||||
@@ -27,6 +27,6 @@ onLoad(async (options) => {
|
||||
</view>
|
||||
</view>
|
||||
<image class="w-full mt-15" mode="widthFix" :src="getImageUrl(newsDetail.image)" />
|
||||
<view class="text-14 text-gray-600 mt-15">{{ newsDetail.content }}</view>
|
||||
<view class="text-14 text-gray-600 mt-15" v-html="newsDetail.content" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '最新时讯',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="news-page">
|
||||
<NavBar />
|
||||
<view class="py-15" v-if="newsList.length > 0">
|
||||
<view
|
||||
class="bg-white rounded-10 overflow-hidden p-15 mx-15 mb-15"
|
||||
v-for="item in newsList"
|
||||
:key="item.id"
|
||||
@click="handleNewsDetail(item.id)"
|
||||
>
|
||||
<image class="rounded-10 w-full h-160" :src="item.image" mode="aspectFill" />
|
||||
<view class="mt-10 flex-1 flex flex-col justify-between">
|
||||
<view class="text-14">{{ item.name }}</view>
|
||||
<view class="text-12 text-#999 mt-10">{{ item.source }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { getIntroductionAPI } from '@/service'
|
||||
|
||||
const { list: newsList } = useListPageRequest((params) =>
|
||||
getIntroductionAPI({ type: 1, ...params }),
|
||||
)
|
||||
|
||||
const handleNewsDetail = (id: number) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages-sub/news-detail/index?id=${id}`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.news-page {
|
||||
background: linear-gradient(180deg, #3a90f2 0%, #f7f7f7 100%);
|
||||
}
|
||||
</style>
|
||||
@@ -35,10 +35,10 @@ import VueQrcode from '@chenfengyuan/vue-qrcode'
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.official-community-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
padding-bottom: 50px;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
|
||||
@@ -3,19 +3,21 @@
|
||||
style: {
|
||||
navigationBarTitleText: '实名认证',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="withdrawal-type-edit-page pb-100 min-h-screen">
|
||||
<view class="realname-page min-h-screen">
|
||||
<NavBar title-color="#333" />
|
||||
<template v-if="!realnameInfo">
|
||||
<view class="p-15 m-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view class="p-15 m-15 bg-white shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<!-- <view class="flex items-center py-15 text-14">
|
||||
<image src="@/static/images/page-sub/realname/realname-type.png" class="w-20 h-20" />
|
||||
<view class="ml-8">证件类型</view>
|
||||
<view class="flex-1 text-right text-14">身份证</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<image src="@/static/images/page-sub/realname/realname-name.png" class="w-20 h-20" />
|
||||
<view class="ml-8">真实姓名</view>
|
||||
@@ -38,6 +40,36 @@
|
||||
v-model="form.cardnum"
|
||||
/>
|
||||
</view>
|
||||
<!-- <view class="py-15 text-14">
|
||||
<view class="flex items-center">
|
||||
<image src="@/static/images/page-sub/realname/realname-card.png" class="w-20 h-20" />
|
||||
<view class="ml-8">证件照片</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex items-center justify-center mt-15 rounded-10 bg-#F1F9FC h-168 w-full"
|
||||
@click="onUploadZCardImage"
|
||||
>
|
||||
<view v-if="!zcardimage" class="text-center">
|
||||
<image src="@/static/images/page-sub/realname/upload-icon.png" class="w-40 h-40" />
|
||||
<view class="text-14 text-#999 mt-10">点击上传身份证正面</view>
|
||||
</view>
|
||||
<view v-else class="flex items-center">
|
||||
<image :src="zcardimage" class="w-315 h-168" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex items-center justify-center mt-15 rounded-10 bg-#F1F9FC h-168 w-full"
|
||||
@click="onUploadFCardImage"
|
||||
>
|
||||
<view v-if="!fcardimage" class="text-center">
|
||||
<image src="@/static/images/page-sub/realname/upload-icon.png" class="w-40 h-40" />
|
||||
<view class="text-14 text-#999 mt-10">点击上传身份证反面</view>
|
||||
</view>
|
||||
<view v-else class="flex items-center">
|
||||
<image :src="fcardimage" class="w-315 h-168" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="fixed bottom-0 left-0 right-0 pb-safe">
|
||||
<button class="btn-gradient text-white rounded-full m-15 text-16" @click="onSubmit">
|
||||
@@ -54,18 +86,22 @@
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="text-center mt-15 text-14 text-#999">您的实名认证正在审核中,请耐心等待</view>
|
||||
<button class="btn-gradient px-30 text-white rounded-full m-15 text-16" @click="onBack">
|
||||
返回
|
||||
<button
|
||||
class="btn-gradient px-30 text-white rounded-full m-15 text-16"
|
||||
@click="userStore.logout"
|
||||
>
|
||||
退出登录
|
||||
</button>
|
||||
</template>
|
||||
<template v-else-if="Number(realnameInfo.status) === 2">
|
||||
<image
|
||||
<!-- <image
|
||||
src="@/static/images/page-sub/realname/realname-success.png"
|
||||
class="w-150 h-150 block"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
/> -->
|
||||
<wd-status-tip image="comment" />
|
||||
<view class="text-center mt-15 text-14 text-#999">恭喜您,实名认证成功</view>
|
||||
<button class="btn-gradient px-30 text-white rounded-full m-15 text-16" @click="onBack">
|
||||
<button class="btn-gradient px-30 text-white rounded-full m-15 text-16" @click="onGoHome">
|
||||
返回
|
||||
</button>
|
||||
</template>
|
||||
@@ -88,11 +124,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { getRealNameAuthAPI, realNameAuthAPI } from '@/service'
|
||||
import { useUserStore } from '@/store'
|
||||
import { showModal } from '@/utils'
|
||||
import { mergeStep, showModal } from '@/utils'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const form = ref({
|
||||
realname: '',
|
||||
cardnum: '',
|
||||
@@ -102,18 +141,40 @@ const onBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (!form.value.realname || !form.value.cardnum) {
|
||||
await showModal('请填写完整信息')
|
||||
const onSubmit = mergeStep(async () => {
|
||||
if (!/^[\u4e00-\u9fa5·]{2,8}$/.test(form.value.realname)) {
|
||||
await showModal('姓名格式错误')
|
||||
return
|
||||
}
|
||||
await realNameAuthAPI(form.value)
|
||||
await showModal('提交成功,请耐心等待审核!')
|
||||
|
||||
if (!/^\d{17}[\d|x]$/i.test(form.value.cardnum)) {
|
||||
await showModal('身份证号格式错误')
|
||||
return
|
||||
}
|
||||
// if (!zcardimage.value || !fcardimage.value) {
|
||||
// await showModal('请上传身份证照片')
|
||||
// return
|
||||
// }
|
||||
const res = await realNameAuthAPI({
|
||||
...form.value,
|
||||
// zcardimage: zcardimage.value,
|
||||
// fcardimage: fcardimage.value,
|
||||
})
|
||||
await showModal(res.msg ? res.msg : '提交成功,请耐心等待审核!')
|
||||
realnameInfo.value = await getRealNameAuthAPI().then((res) => {
|
||||
return res.data
|
||||
})
|
||||
})
|
||||
|
||||
const onGoHome = () => {
|
||||
uni.reLaunch({
|
||||
url: '/',
|
||||
})
|
||||
}
|
||||
|
||||
// const { data: zcardimage, run: onUploadZCardImage } = useUpload()
|
||||
// const { data: fcardimage, run: onUploadFCardImage } = useUpload()
|
||||
|
||||
const realnameInfo = ref(null)
|
||||
onLoad(async () => {
|
||||
realnameInfo.value = await getRealNameAuthAPI().then((res) => {
|
||||
@@ -122,8 +183,16 @@ onLoad(async () => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.withdrawal-type-edit-page {
|
||||
.realname-page {
|
||||
--wot-input-placeholder-color: #889bc6;
|
||||
--wot-cell-wrapper-padding: 0;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 50px;
|
||||
// background-repeat: no-repeat;
|
||||
// background-size: cover;
|
||||
background:
|
||||
url('@/static/images/brand-person.png') right 20px bottom / 60% no-repeat,
|
||||
linear-gradient(180deg, #fff3eb 0%, #ffffff 100%);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -123,7 +123,7 @@ watch(
|
||||
<style lang="scss" scoped>
|
||||
.team-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
padding-bottom: 50px;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
|
||||
@@ -8,55 +8,62 @@
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<view
|
||||
class="flex px-15 py-8 border-b border-#E5E5E5 border-b-solid"
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
>
|
||||
<image
|
||||
src="/static/images/invest/alipay-icon.png"
|
||||
class="w-32 h-32 self-center"
|
||||
v-if="item.typedata === '支付宝'"
|
||||
/>
|
||||
<image
|
||||
src="/static/images/invest/wechat-icon.png"
|
||||
class="w-32 h-32 self-center"
|
||||
v-if="item.typedata === '微信'"
|
||||
/>
|
||||
<image
|
||||
src="/static/images/invest/unionpay-icon.png"
|
||||
class="w-32 h-32 self-center"
|
||||
v-if="item.typedata === '银联'"
|
||||
/>
|
||||
<template v-if="list.length > 0">
|
||||
<view
|
||||
class="flex px-15 py-8 border-b border-#E5E5E5 border-b-solid"
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
>
|
||||
<image
|
||||
src="/static/images/invest/alipay-icon.png"
|
||||
class="w-32 h-32 self-center"
|
||||
v-if="item.typedata === '支付宝'"
|
||||
/>
|
||||
<image
|
||||
src="/static/images/invest/wechat-icon.png"
|
||||
class="w-32 h-32 self-center"
|
||||
v-if="item.typedata === '微信'"
|
||||
/>
|
||||
<image
|
||||
src="/static/images/invest/unionpay-icon.png"
|
||||
class="w-32 h-32 self-center"
|
||||
v-if="item.typedata === '银联'"
|
||||
/>
|
||||
|
||||
<view class="flex flex-col flex-1 justify-between ml-15">
|
||||
<view class="text-14 text-#333">{{ item.typedata }}</view>
|
||||
<view class="text-12 text-#999">提现</view>
|
||||
<view class="text-12 text-#999">{{ item.createtime }}</view>
|
||||
</view>
|
||||
<view class="flex flex-col flex-1 justify-between ml-15">
|
||||
<view class="text-14 text-#333">
|
||||
{{ item.kaihuhang }}({{ item.banknum.slice(0, 4) }}****{{ item.banknum.slice(-4) }})
|
||||
</view>
|
||||
<view class="text-12 text-#999">提现</view>
|
||||
<view class="text-12 text-#999">{{ item.createtime }}</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-16 text-#FF5F5F">{{ item.money }}</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#99999990 text-#fff"
|
||||
v-if="Number(item.status) === 1"
|
||||
>
|
||||
审核中
|
||||
</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A"
|
||||
v-if="Number(item.status) === 2"
|
||||
>
|
||||
提现成功
|
||||
</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#FF5F5F90 text-#fff"
|
||||
v-if="Number(item.status) === 3"
|
||||
>
|
||||
提现失败
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-16 text-#FF5F5F">{{ item.money }}</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#99999990 text-#fff"
|
||||
v-if="Number(item.status) === 1"
|
||||
>
|
||||
审核中
|
||||
</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A"
|
||||
v-if="Number(item.status) === 2"
|
||||
>
|
||||
提现成功
|
||||
</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#FF5F5F90 text-#fff"
|
||||
v-if="Number(item.status) === 3"
|
||||
>
|
||||
提现失败
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<wd-status-tip image="content" tip="暂无内容" />
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -11,18 +11,6 @@
|
||||
<view class="withdrawal-type-edit-page pb-100 min-h-screen">
|
||||
<view class="p-15 m-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>收款类型</view>
|
||||
<wd-select-picker
|
||||
type="radio"
|
||||
custom-class="!p-0"
|
||||
custom-value-class="text-14 text-#889BC6 text-right"
|
||||
class="flex-1"
|
||||
placeholder="请选择收款类型"
|
||||
v-model="form.typedata"
|
||||
:columns="columns"
|
||||
></wd-select-picker>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14" v-if="form.typedata === 3">
|
||||
<view>开户行</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
@@ -33,25 +21,15 @@
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>{{ typeName }}账号</view>
|
||||
<view>银行卡账号</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
:placeholder="`请输入${typeName}账号`"
|
||||
placeholder="请输入银行卡账号"
|
||||
v-model="form.banknum"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>{{ form.typedata === 3 ? '持卡人' : '' }}姓名</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
:placeholder="`请输入${form.typedata === 3 ? '持卡人' : ''}姓名`"
|
||||
v-model="form.name"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- <view class="flex items-center py-15 text-14">
|
||||
<view>备注</view>
|
||||
@@ -83,24 +61,6 @@ const form = ref({
|
||||
name: '',
|
||||
banknum: '',
|
||||
})
|
||||
const columns = [
|
||||
{
|
||||
label: '支付宝',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '微信',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '银行卡',
|
||||
value: 3,
|
||||
},
|
||||
]
|
||||
|
||||
const typeName = computed(() => {
|
||||
return ['支付宝', '微信', '银行卡'][Number(form.value.typedata) - 1]
|
||||
})
|
||||
|
||||
const onAddType = mergeStep(async () => {
|
||||
if (form.value.typedata === 3) {
|
||||
@@ -113,13 +73,7 @@ const onAddType = mergeStep(async () => {
|
||||
}
|
||||
if (!form.value.banknum) {
|
||||
return uni.showToast({
|
||||
title: '请输入账号',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
if (!form.value.name) {
|
||||
return uni.showToast({
|
||||
title: '请输入姓名',
|
||||
title: '请输入银行卡账号',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '收款方式',
|
||||
navigationBarTitleText: '银行卡列表',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
@@ -16,27 +16,12 @@
|
||||
@click="onSelectType(item)"
|
||||
>
|
||||
<image
|
||||
v-if="Number(item.typedata) === 3"
|
||||
class="w-45 h-45"
|
||||
src="@/static/images/invest/unionpay-icon.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<image
|
||||
v-if="Number(item.typedata) === 1"
|
||||
class="w-45 h-45"
|
||||
src="@/static/images/invest/alipay-icon.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<image
|
||||
v-if="Number(item.typedata) === 2"
|
||||
class="w-45 h-45"
|
||||
src="@/static/images/invest/wechat-icon.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="flex-1 ml-15">
|
||||
<view class="text-16 font-bold">
|
||||
{{ ['支付宝', '微信', '银行卡'][Number(item.typedata) - 1] }}
|
||||
</view>
|
||||
<view class="text-16 font-bold">{{ item.kaihuhang }}</view>
|
||||
<view class="mt-10 text-14 text-#889BC6">{{ item.banknum }}</view>
|
||||
</view>
|
||||
<wd-icon v-if="isSelect" name="arrow-right" size="14px"></wd-icon>
|
||||
|
||||
@@ -8,16 +8,14 @@
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<NavBar>
|
||||
<template #right>
|
||||
<image
|
||||
@click="onWithdrawalDetail"
|
||||
src="/static/images/page-sub/recharge.png"
|
||||
class="w-24 h-24"
|
||||
/>
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="p-15">
|
||||
<NavBar title-color="#333" />
|
||||
<view
|
||||
class="m-15 text-white flex rounded-tl-10 rounded-br-10 justify-between items-center p-15 btn-gradient"
|
||||
>
|
||||
<view class="text-14">钱包余额</view>
|
||||
<view class="text-17 font-bold">{{ userStore.userInfo?.money }}</view>
|
||||
</view>
|
||||
<view class="p-15 bg-white shadow-[0_-2px_3px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="mt-15">
|
||||
<view class="text-14 text-#333">提现金额</view>
|
||||
<view
|
||||
@@ -29,48 +27,41 @@
|
||||
placeholder="请输入提现金额"
|
||||
class="text-14 text-#333 flex-1"
|
||||
/>
|
||||
<view class="text-12 text-#04A9F9" @click="form.money = userStore.userInfo.money">
|
||||
<view class="text-12 text-#04A9F9" @click="form.money = userStore.userInfo?.money">
|
||||
全部
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-12 text-#889BC6 mt-15">当前余额:{{ userStore.userInfo.money }}</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-50">
|
||||
<view class="text-14 text-#333">收款方式</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"
|
||||
@click="onSelectPayType"
|
||||
>
|
||||
<view class="flex-1">
|
||||
{{ typeName ? `${typeName}:${currentBank?.banknum}` : '请选择收款方式' }}
|
||||
<view class="mt-15">
|
||||
<view class="text-14 text-#333">收款方式</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"
|
||||
@click="onSelectPayType"
|
||||
>
|
||||
<view class="flex-1">
|
||||
{{
|
||||
currentBank ? `${currentBank.kaihuhang}:${currentBank.banknum}` : '请选择收款方式'
|
||||
}}
|
||||
</view>
|
||||
<wd-icon name="arrow-right" size="16px"></wd-icon>
|
||||
</view>
|
||||
<wd-icon name="arrow-right" size="16px"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-50">
|
||||
<view class="text-14 text-#333">交易密码</view>
|
||||
<view class="text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<input
|
||||
v-model="form.tpassword"
|
||||
type="password"
|
||||
placeholder="请输入交易密码"
|
||||
class="text-14 text-#333"
|
||||
/>
|
||||
<view class="text-14 text-#889BC6 mt-30">提现说明(TIPS)</view>
|
||||
<view class="text-12 text-#889BC6 mt-15">
|
||||
<view>1、如遇到系统结算繁忙,结算将会延迟到账</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="bg-white fixed bottom-0 left-0 right-0 px-15 py-10 shadow-[0_0_10px_rgba(10,68,245,0.1)]"
|
||||
>
|
||||
<view class="flex items-center pb-safe">
|
||||
<view class="text-gradient flex-1 text-14">到账CNY:{{ form.money ?? '0' }}</view>
|
||||
<view class="pb-safe">
|
||||
<view
|
||||
class="btn-gradient text-center text-white rounded-full text-14 px-30 py-10"
|
||||
@click="onSubmit"
|
||||
>
|
||||
申请提现
|
||||
提现
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -87,8 +78,6 @@ const userStore = useUserStore()
|
||||
|
||||
const form = ref({
|
||||
money: '',
|
||||
bankid: '6',
|
||||
tpassword: '',
|
||||
})
|
||||
|
||||
const onWithdrawalDetail = () => {
|
||||
@@ -97,15 +86,10 @@ const onWithdrawalDetail = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const typeName = computed(() => {
|
||||
return ['支付宝', '微信', '银行卡'][Number(unref(currentBank)?.typedata) - 1]
|
||||
})
|
||||
|
||||
const currentBank = ref<any>(null)
|
||||
const onSelectPayType = () => {
|
||||
uni.$once('withdrawal-type', (data: any) => {
|
||||
form.value.bankid = data.id
|
||||
console.log(data)
|
||||
currentBank.value = data
|
||||
})
|
||||
uni.navigateTo({
|
||||
@@ -120,21 +104,10 @@ const onSubmit = async () => {
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
if (!form.value.bankid) {
|
||||
return uni.showToast({
|
||||
title: '请选择收款方式',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
if (!form.value.tpassword) {
|
||||
return uni.showToast({
|
||||
title: '请输入交易密码',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
|
||||
await showModal('确认提现?')
|
||||
await submitWithdrawalAPI(form.value)
|
||||
await showModal('提交成功')
|
||||
const res = await submitWithdrawalAPI(form.value)
|
||||
await showModal(res.msg ? res.msg : '提交成功')
|
||||
onWithdrawalDetail()
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#999999",
|
||||
"selectedColor": "#0E57A2",
|
||||
"selectedColor": "#D3B389",
|
||||
"backgroundColor": "#ffffff",
|
||||
"borderStyle": "#E7E7E7",
|
||||
"height": "56px",
|
||||
@@ -24,16 +24,22 @@
|
||||
"spacing": "3px",
|
||||
"list": [
|
||||
{
|
||||
"iconPath": "static/tabbar/home.png",
|
||||
"selectedIconPath": "static/tabbar/homeHL.png",
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/bank.png",
|
||||
"selectedIconPath": "static/tabbar/bankHL.png",
|
||||
"pagePath": "pages/bank/index",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"iconPath": "static/tabbar/invite.png",
|
||||
"selectedIconPath": "static/tabbar/inviteHL.png",
|
||||
"pagePath": "pages/invite/index",
|
||||
"text": "邀请福利"
|
||||
},
|
||||
{
|
||||
"iconPath": "static/tabbar/house.png",
|
||||
"selectedIconPath": "static/tabbar/houseHL.png",
|
||||
"pagePath": "pages/invite/index",
|
||||
"text": "邀请好友"
|
||||
"pagePath": "pages/invest/index",
|
||||
"text": "资产平移"
|
||||
},
|
||||
{
|
||||
"iconPath": "static/tabbar/personal.png",
|
||||
@@ -45,11 +51,12 @@
|
||||
},
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"path": "pages/bank/index",
|
||||
"type": "home",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "首页"
|
||||
"navigationBarTitleText": "银行卡",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -59,21 +66,29 @@
|
||||
"navigationBarTitleText": "忘记密码",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"notNeedLogin": false
|
||||
"notNeedLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/invest/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "投资理财"
|
||||
"navigationBarTitleText": "资产平移"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/invite/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "邀请好友",
|
||||
"navigationBarTitleText": "社区",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
@@ -85,7 +100,7 @@
|
||||
"navigationBarTitleText": "登录",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"notNeedLogin": false
|
||||
"notNeedLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/my/index",
|
||||
@@ -102,7 +117,7 @@
|
||||
"navigationBarTitleText": "注册",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"notNeedLogin": false
|
||||
"notNeedLogin": true
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
@@ -113,8 +128,9 @@
|
||||
"path": "asset/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的资产",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
"navigationBarTitleText": "资金明细",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -132,6 +148,14 @@
|
||||
"navigationBarTitleText": "分包页面 标题"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "hot-news/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "热点新闻",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "introduction/index",
|
||||
"type": "page",
|
||||
@@ -182,6 +206,14 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "news/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "最新时讯",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "news-detail/index",
|
||||
"type": "page",
|
||||
@@ -204,7 +236,8 @@
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "实名认证",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -244,7 +277,7 @@
|
||||
"path": "withdrawal-type/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收款方式",
|
||||
"navigationBarTitleText": "银行卡列表",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
<route lang="json5" type="home">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '银行卡',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="bank-page min-h-screen pb-50">
|
||||
<NavBar title-color="#333" />
|
||||
<view class="bank-card mx-auto mt-24 relative w-300 h-182 rounded-15">
|
||||
<view class="absolute text-18 top-100 left-20 text-white" style="font-family: FARRINGTON-7B">
|
||||
{{ userStore.userInfo.banknum.replace(/(\d{4})(?=\d)/g, '$1 ') }}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="rounded-15 mx-auto mt-15 w-345 flex items-center justify-center text-12 px-30 py-20 text-#E5A200"
|
||||
border="1px solid #FFDD99"
|
||||
style="
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(255, 221, 153, 0.2) 0%,
|
||||
rgba(239, 184, 90, 0.2) 100%
|
||||
);
|
||||
"
|
||||
>
|
||||
云家银行专属卡是由全球各地银行联合发行的银行
|
||||
完成卡。首批发行仅限五万张,云家人的资产将全部到账到此卡,一人一卡,此专属卡无任何限制,可在全球210个国家及地区进行使用!
|
||||
</view>
|
||||
<view
|
||||
class="rounded-full mx-auto mt-15 w-345 h-45 flex items-center justify-center text-15"
|
||||
style="
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(255, 221, 153, 0.2) 0%,
|
||||
rgba(239, 184, 90, 0.2) 100%
|
||||
);
|
||||
border: 1px solid #ffdd99;
|
||||
"
|
||||
>
|
||||
卡内余额:{{ userStore.userInfo.money }}
|
||||
</view>
|
||||
<view
|
||||
class="btn-gradient rounded-full text-white mx-auto mt-10 w-345 h-40 flex items-center justify-center text-15"
|
||||
@click="onWithdraw"
|
||||
>
|
||||
提现
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="flex bg-white py-15 rounded-10 mt-150 w-345 mx-auto border-2 border-#FFDD99 border-solid"
|
||||
>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleOfficialCommunity">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-2.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">官方社群</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleOfficialCommunity">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-3.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">在线客服</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleDownload">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-4.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">下载APP</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { downloadAppAPI, getBankCardAPI } from '@/service'
|
||||
import { useUserStore } from '@/store'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const list = ref([])
|
||||
const loadData = async () => {
|
||||
list.value = (await getBankCardAPI({
|
||||
limit: 1000,
|
||||
page: 1,
|
||||
}).then((res) => res.data)) as any
|
||||
}
|
||||
onShow(async () => {
|
||||
loadData()
|
||||
})
|
||||
|
||||
function onWithdraw() {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleOfficialCommunity = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/official-community/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleDownload = () => {
|
||||
downloadAppAPI()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bank-page {
|
||||
background:
|
||||
url('@/static/images/home/bg.jpg') no-repeat top -40px center / cover,
|
||||
linear-gradient(180deg, #fff3eb 0%, #ffffff 100%);
|
||||
}
|
||||
.bank-card {
|
||||
background-image: url('@/static/images/bank/card.jpg');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -4,7 +4,7 @@
|
||||
navigationBarTitleText: '忘记密码',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
notNeedLogin: false,
|
||||
notNeedLogin: true,
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
@@ -112,12 +112,12 @@ onLoad(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.login-container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 200rpx;
|
||||
background-image: url('@/static/images/login-bg.png');
|
||||
padding-bottom: 50px;
|
||||
background-image: url('@/static/images/login-bg.jpg');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page;推荐使用json5,更强大,且允许注释 -->
|
||||
<route lang="json5" type="home">
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
@@ -10,12 +10,25 @@
|
||||
<template>
|
||||
<view class="home-page">
|
||||
<NavBar />
|
||||
<image
|
||||
class="mx-auto block w-345 h-170 mt-15 rounded-10 overflow-hidden"
|
||||
src="@/static/images/home/main-bg.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="flex bg-#F5F9FF py-15 rounded-10 m-15 border-2 border-white border-solid">
|
||||
|
||||
<swiper
|
||||
indicator-active-color="#EFB85A"
|
||||
indicator-color="rgba(0,0,0,0.1)"
|
||||
indicator-dots
|
||||
autoplay
|
||||
circular
|
||||
class="w-345 h-170 mx-auto mt-10"
|
||||
>
|
||||
<swiper-item v-for="item in bannerList" :key="item.id">
|
||||
<image
|
||||
class="block w-345 h-170 rounded-10 overflow-hidden"
|
||||
:src="getImageUrl(item.image)"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="flex bg-white py-15 rounded-10 m-15 border-2 border-white border-solid">
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleIntroduction">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-1.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">简介</text>
|
||||
@@ -24,54 +37,74 @@
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-2.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">抽奖转盘</text>
|
||||
</view> -->
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleReward">
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleOfficialCommunity">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-2.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">奖励制度</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleDownload">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-2.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">下载APP</text>
|
||||
<text class="mt-8 text-14 text-#333">官方社群</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleOfficialCommunity">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-3.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">官方社群</text>
|
||||
<text class="mt-8 text-14 text-#333">在线客服</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleDownload">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-4.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">下载APP</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex bg-white py-8 px-15 rounded-10 m-15 items-center">
|
||||
<view class="text-14 text-#333">系统公告</view>
|
||||
<view class="flex-1">
|
||||
<wd-notice-bar
|
||||
color="#999999"
|
||||
background-color="transparent"
|
||||
:text="announcementList.map((item) => item.name)"
|
||||
/>
|
||||
<view class="bg-white pt-15 px-15 rounded-10 m-15">
|
||||
<view class="flex justify-center items-center">
|
||||
<view class="text-14 text-#333">最新时讯</view>
|
||||
<!-- <view class="text-12 text-#999" @click="handleNews">查看全部</view> -->
|
||||
</view>
|
||||
<swiper
|
||||
indicator-active-color="#3B81F3"
|
||||
indicator-color="rgba(0,0,0,0.1)"
|
||||
indicator-dots
|
||||
autoplay
|
||||
circular
|
||||
class="h-200 mt-10"
|
||||
>
|
||||
<swiper-item v-for="item in newsList" :key="item.id">
|
||||
<video class="w-full h-160" :src="item.image" mode="aspectFill" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<view class="bg-white py-15 px-15 rounded-10 m-15">
|
||||
<view class="text-14 text-#333">热点新闻</view>
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="text-14 text-#333">热点新闻</view>
|
||||
<view class="text-12 text-#999" @click="handleHotNews">查看全部</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex mt-15"
|
||||
v-for="item in newsList"
|
||||
v-for="item in hotNewsList"
|
||||
:key="item.id"
|
||||
@click="handleNewsDetail(item.id)"
|
||||
>
|
||||
<image class="w-85 h-85 rounded-10" :src="item.image" mode="aspectFill" />
|
||||
<image
|
||||
class="w-85 h-85 rounded-10 bg-gray-100"
|
||||
:src="getImageUrl(item.image)"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="ml-15 flex-1 flex flex-col justify-between">
|
||||
<view text-14>{{ item.name }}</view>
|
||||
<view class="text-12 text-#999">{{ item.source }}</view>
|
||||
<view class="text-12 text-#999">{{ item.createtime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<wd-popup v-model="showRealName" custom-style="border-radius:32rpx;">
|
||||
<view class="p-15 w-345">
|
||||
<text class="custom-txt">实名立即送5000股马尔代夫股权</text>
|
||||
<wd-popup :lockScroll="false" v-model="showNotice" custom-style="border-radius:0.2rem;">
|
||||
<view class="px-30 py-30 w-330 h-457 notice-container rounded-20 flex flex-col">
|
||||
<view class="text-18 font-bold pb-15 text-center">系统公告</view>
|
||||
<view class="flex-1 overflow-y-auto">
|
||||
<view v-for="(item, index) in announcementList" :key="item.id" class="mb-15">
|
||||
<view class="mt-12 text-14 text-#333 flex-1" v-html="item.content"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
@click="handleRealName"
|
||||
class="mt-15 btn-gradient rounded-full text-center text-14 text-white py-15 mt-15"
|
||||
@click="showNotice = false"
|
||||
class="btn-gradient rounded-full text-center text-14 text-white py-8 mt-15"
|
||||
>
|
||||
去认证
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
@@ -79,23 +112,26 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Avatar from '@/components/Avatar.vue'
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { downloadAppAPI, getIntroductionAPI, getRealNameAuthAPI } from '@/service'
|
||||
import { showModal } from '@/utils'
|
||||
import {
|
||||
downloadAppAPI,
|
||||
getBannerAPI,
|
||||
getIntroductionAPI,
|
||||
getOpenPersonalAccountAPI,
|
||||
} from '@/service'
|
||||
import { useUserStore } from '@/store'
|
||||
import { getImageUrl, showModal } from '@/utils'
|
||||
|
||||
defineOptions({
|
||||
name: 'Home',
|
||||
})
|
||||
|
||||
const { list: newsList } = useListPageRequest((params) =>
|
||||
// 热门咨询
|
||||
const { list: hotNewsList } = useListPageRequest((params) =>
|
||||
getIntroductionAPI({ type: 1, ...params }),
|
||||
)
|
||||
|
||||
// 系统公告
|
||||
const { list: announcementList } = useListPageRequest((params) =>
|
||||
getIntroductionAPI({ type: 2, ...params }),
|
||||
)
|
||||
|
||||
const handleIntroduction = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/introduction/index',
|
||||
@@ -124,38 +160,62 @@ const handleDownload = () => {
|
||||
downloadAppAPI()
|
||||
}
|
||||
|
||||
const handleReward = () => {
|
||||
showModal(
|
||||
`1.注册立即送5000股马尔代夫股权;\n
|
||||
2.每股马尔代夫股权价值500元;\n
|
||||
3.每邀请一人可以获得20股马尔代夫股权`,
|
||||
{
|
||||
title: '奖励制度',
|
||||
confirmText: '我知道了',
|
||||
},
|
||||
)
|
||||
}
|
||||
const showNotice = ref(false)
|
||||
|
||||
const showRealName = ref(false)
|
||||
const handleRealName = () => {
|
||||
const handleNews = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/realname/index',
|
||||
url: '/pages-sub/news/index',
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(async () => {
|
||||
const res = await getRealNameAuthAPI()
|
||||
if (!res.data) {
|
||||
showRealName.value = true
|
||||
}
|
||||
})
|
||||
const handleHotNews = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/hot-news/index',
|
||||
})
|
||||
}
|
||||
|
||||
// 系统公告
|
||||
const { list: announcementList } = useListPageRequest((params) =>
|
||||
getIntroductionAPI({ type: 2, ...params }),
|
||||
)
|
||||
// 最新时讯
|
||||
const { list: newsList } = useListPageRequest((params) =>
|
||||
getIntroductionAPI({ type: 3, ...params }),
|
||||
)
|
||||
watch(
|
||||
() => announcementList.value.length,
|
||||
(newVal) => {
|
||||
if (newVal > 0) {
|
||||
showNotice.value = true
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const userStore = useUserStore()
|
||||
const handleOpenAccount = async () => {
|
||||
await getOpenPersonalAccountAPI()
|
||||
await showModal('开通个人养老账户成功')
|
||||
userStore.loadUserInfo()
|
||||
// showModal('开通个人养老账户时,需邀请一名用户')
|
||||
}
|
||||
|
||||
// 获取轮播图
|
||||
const bannerList = ref([])
|
||||
const getBanner = async () => {
|
||||
const res = await getBannerAPI()
|
||||
bannerList.value = res.data
|
||||
}
|
||||
onLoad(getBanner)
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.home-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
padding-bottom: 50px;
|
||||
background: linear-gradient(180deg, #fff3da 0%, #f8f8f8 100%);
|
||||
}
|
||||
.notice-container {
|
||||
background-image: url('@/static/images/home/notice-bg.jpg');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@@ -3,147 +3,66 @@
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '投资理财',
|
||||
navigationBarTitleText: '资产平移',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="invest-page">
|
||||
<NavBar>
|
||||
<template #right>
|
||||
<view @click="onGoInvestDetail" class="text-14 text-#486CCF">投资明细</view>
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="flex mt-30 flex-col mx-15 rounded-10 px-40 py-32 main-content">
|
||||
<view class="text-14 text-#6784C7">我的投资金</view>
|
||||
<view class="text-35 leading-35 mt-10 text-#BE7143 font-bold">
|
||||
{{ userStore.userInfo?.money }}
|
||||
</view>
|
||||
<view class="invest-page min-h-screen">
|
||||
<NavBar title-color="#333" />
|
||||
<view class="mt-320 pl-15 text-24 text-white" style="text-shadow: 0 0 2px #ff5153">
|
||||
银行卡恢复列表
|
||||
</view>
|
||||
|
||||
<view class="mt-100">
|
||||
<view class="mt-15 px-15 pb-15">
|
||||
<view
|
||||
v-for="item in investmentList"
|
||||
class="flex items-center mt-10 text-#333 p-15 rounded-10 bg-#FFF9F2 border-2 border-#FFDD99 border-solid"
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
class="invest-item relative flex flex-col items-center pt-15"
|
||||
>
|
||||
<view class="text-15 text-#3F88F6">{{ item.name }}</view>
|
||||
<view class="flex w-full mt-15">
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-22 text-#333 font-bold">{{ item.money }}</view>
|
||||
<view class="text-12 mt-4 text-blue-red">投资金额</view>
|
||||
</view>
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-22 text-#FF3B30 font-bold">{{ item.dividend }}</view>
|
||||
<view class="text-12 mt-4 text-blue-red">每日分红</view>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="text-15">{{ item.name }}</view>
|
||||
<view class="text-12 mt-8">邀请1人</view>
|
||||
</view>
|
||||
<view
|
||||
class="text-center px-50 absolute bottom-0 left-0 text-12 text-#fff rounded-full py-8 bg-blue-red"
|
||||
@click="onInvest(item)"
|
||||
class="btn-gradient text-white text-12 border-1 border-#EFB85A border-solid py-4 px-30 rounded-4 px-10"
|
||||
v-if="item.ishuifu"
|
||||
>
|
||||
立即投资
|
||||
已恢复
|
||||
</view>
|
||||
<view
|
||||
class="text-center px-16 absolute bottom-13 right-33 text-12 text-#fff rounded-br-10 rounded-tl-10 py-4 bg-blue-red"
|
||||
class="text-12 text-#EFB85A border-1 border-#EFB85A border-solid py-4 px-30 rounded-4 px-10"
|
||||
@click="handleRecover(item)"
|
||||
v-else
|
||||
>
|
||||
{{ item.label }}
|
||||
恢复
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<wd-action-sheet v-model="showPayType" :panels="panels" @select="onSelectPayType" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import AlipayIcon from '@/static/images/invest/alipay-icon.png'
|
||||
import WechatIcon from '@/static/images/invest/wechat-icon.png'
|
||||
import UnionpayIcon from '@/static/images/invest/unionpay-icon.png'
|
||||
import { getInvestmentListAPI, submitInvestAPI } from '@/service'
|
||||
import { useUserStore } from '@/store'
|
||||
import { mergeStep, showModal } from '@/utils'
|
||||
import { getBankCardRecoverAPI, getBankCardRecoverListAPI } from '@/service'
|
||||
import { getImageUrl, showModal } from '@/utils'
|
||||
|
||||
defineOptions({
|
||||
name: 'Home',
|
||||
})
|
||||
const showPayType = ref(false)
|
||||
const panels = ref([
|
||||
{
|
||||
iconUrl: WechatIcon,
|
||||
title: '微信支付',
|
||||
},
|
||||
{
|
||||
iconUrl: AlipayIcon,
|
||||
title: '支付宝支付',
|
||||
},
|
||||
{
|
||||
iconUrl: UnionpayIcon,
|
||||
title: '银联支付',
|
||||
},
|
||||
])
|
||||
const { list, onReload } = useListPageRequest(getBankCardRecoverListAPI)
|
||||
|
||||
const { list: investmentList } = useListPageRequest(getInvestmentListAPI)
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const onGoInvestDetail = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/invest-detail/index',
|
||||
})
|
||||
const handleRecover = async (item: any) => {
|
||||
const res = await getBankCardRecoverAPI({ id: item.id })
|
||||
showModal(res.msg ? res.msg : '恢复成功')
|
||||
onReload()
|
||||
}
|
||||
|
||||
const onSelectPayType = ({ item, index }: any) => {
|
||||
console.log(item, index)
|
||||
alert(item.title)
|
||||
}
|
||||
|
||||
const onInvest = mergeStep(async (item: any) => {
|
||||
await showModal('确认投资?')
|
||||
await submitInvestAPI({
|
||||
investid: item.id,
|
||||
type: 3,
|
||||
})
|
||||
await userStore.loadUserInfo()
|
||||
uni.showToast({
|
||||
title: '投资成功',
|
||||
icon: 'none',
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.invest-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100px;
|
||||
background-color: #ebbf92;
|
||||
background-image: url('@/static/images/invest/bg.png');
|
||||
background-image: url('@/static/images/invest/bg.png'),
|
||||
linear-gradient(to right, #e4c198, #e3bd93);
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-position: top -80rpx center;
|
||||
background-position:
|
||||
top -80px center,
|
||||
top center;
|
||||
background-size: 100%;
|
||||
}
|
||||
.invest-item {
|
||||
width: 690rpx;
|
||||
height: 352rpx;
|
||||
margin: 0 auto 30rpx;
|
||||
background-image: url('@/static/images/invest/item-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100%;
|
||||
}
|
||||
.main-content {
|
||||
background-image: url('@/static/images/invest/main-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.bg-blue-red {
|
||||
background-image: linear-gradient(90.02deg, #8bb9ff 0.02%, #be4343 100.27%);
|
||||
}
|
||||
.text-blue-red {
|
||||
background-image: linear-gradient(90.02deg, #8bb9ff 0.02%, #be4343 100.27%);
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<route lang="json5">
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '邀请好友',
|
||||
navigationBarTitleText: '社区',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
@@ -12,6 +12,13 @@
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import VueQrcode from '@chenfengyuan/vue-qrcode'
|
||||
import { useUserStore } from '@/store'
|
||||
import Avatar from '@/components/Avatar.vue'
|
||||
import {
|
||||
getCommunityInviteFirstAPI,
|
||||
getCommunityInviteRewardAPI,
|
||||
getCommunityMyInviteAPI,
|
||||
} from '@/service'
|
||||
import { showModal } from '@/utils'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -23,45 +30,178 @@ 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
|
||||
})
|
||||
})
|
||||
|
||||
const inviteInfo = ref<any>(null)
|
||||
const loadInviteInfo = async () => {
|
||||
const { data } = await getCommunityInviteFirstAPI()
|
||||
inviteInfo.value = data
|
||||
// inviteInfo.value = {
|
||||
// num: 10,
|
||||
// isuserauth: 1,
|
||||
// realrewards: '200',
|
||||
// jianglitiaojian: {
|
||||
// '10': '3000',
|
||||
// '20': '5000',
|
||||
// '30': '15000',
|
||||
// '40': '30000',
|
||||
// '50': '50000',
|
||||
// },
|
||||
// open: 1,
|
||||
// }
|
||||
}
|
||||
|
||||
onShow(async () => {
|
||||
await loadInviteInfo()
|
||||
})
|
||||
const taskList = computed(() => {
|
||||
if (!inviteInfo.value) return []
|
||||
|
||||
const inviteTask = Object.keys(inviteInfo.value.jianglitiaojian)
|
||||
const inviteTaskList = inviteTask.map((key) => ({
|
||||
title: `邀请${key}人(${inviteInfo.value.num}/${key})`,
|
||||
desc: `赠送${inviteInfo.value.jianglitiaojian[key]}元`,
|
||||
level: key,
|
||||
status: Number(inviteInfo.value.num) >= Number(key),
|
||||
open: false,
|
||||
}))
|
||||
// 查找最后一个完成的任务,并设置open为true
|
||||
const lastCompletedTask = inviteTaskList.findLast((item) => item.status)
|
||||
if (lastCompletedTask) {
|
||||
lastCompletedTask.open = inviteInfo.value.open
|
||||
}
|
||||
return [
|
||||
// {
|
||||
// title: '注册实名',
|
||||
// desc: `领取${inviteInfo.value.realrewards}元`,
|
||||
// // status: inviteInfo.value.isuserauth,
|
||||
// status: false,
|
||||
// open: false,
|
||||
// },
|
||||
// {
|
||||
// title: '签到有礼',
|
||||
// desc: `每日签到送${inviteInfo.value.qiandaojiang}元`,
|
||||
// status: false,
|
||||
// open: false,
|
||||
// },
|
||||
// {
|
||||
// title: '邀请有礼',
|
||||
// desc: `每邀请1人并实名认证获得${inviteInfo.value.yaoqingjiang}元养老金`,
|
||||
// status: 0,
|
||||
// open: false,
|
||||
// },
|
||||
...inviteTaskList,
|
||||
]
|
||||
})
|
||||
|
||||
async function onGetReward(level) {
|
||||
await getCommunityInviteRewardAPI({ level })
|
||||
showModal('领取成功')
|
||||
await loadInviteInfo()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="pb-100 min-h-screen invite-page">
|
||||
<NavBar />
|
||||
<view class="flex justify-center mt-80">
|
||||
<view class="text-white btn-gradient rounded-full px-30 py-10 text-14">邀请好友</view>
|
||||
<!-- <view class="ml-15 bg-white rounded-full px-30 py-10 text-14" @click="onLottery">
|
||||
<text class="text-gradient">幸运大转盘</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="flex flex-col items-center mt-180">
|
||||
<view
|
||||
class="flex items-center text-16 text-#333 bg-[rgba(255,255,255,0.8)] rounded-full px-15 py-4 text-12 mt-8"
|
||||
>
|
||||
<view>
|
||||
邀请码
|
||||
<text class="font-bold">{{ userStore.userInfo?.invitecode }}</text>
|
||||
<view class="flex items-center mt-286 mx-auto w-345 bg-#FFFFFFE5 p-15 rounded-20">
|
||||
<view class="text-center">
|
||||
<view class="mt-15 rounded-10 overflow-hidden flex bg-#FFFFFF50 p-10 shadow">
|
||||
<VueQrcode
|
||||
class="!w-100 !h-100 rounded-10"
|
||||
:value="qrcodeValue"
|
||||
:options="{ size: 200 }"
|
||||
/>
|
||||
</view>
|
||||
<view class="text-10 text-#333 mt-4">分享二维码给好友</view>
|
||||
</view>
|
||||
<view class="text-center p-15">
|
||||
<view class="text-14 text-#333">邀请码:{{ userStore.userInfo?.invitecode }}</view>
|
||||
<view
|
||||
class="mt-8 btn-gradient text-white rounded-full px-15 w-160 py-8 text-14 text-center"
|
||||
@click="onCopy(userStore.userInfo?.invitecode)"
|
||||
>
|
||||
复制邀请码
|
||||
</view>
|
||||
<view
|
||||
class="btn-gradient text-white rounded-full px-15 py-4 text-12 ml-10"
|
||||
@click="onCopy('99999')"
|
||||
class="mt-8 btn-gradient text-white rounded-full px-15 w-160 py-8 text-14 text-center"
|
||||
@click="onCopy(qrcodeValue)"
|
||||
>
|
||||
复制
|
||||
复制推广链接
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 rounded-10 overflow-hidden flex">
|
||||
<VueQrcode :value="qrcodeValue" :options="{ size: 200 }" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-70 w-345 mx-auto">
|
||||
<view
|
||||
class="btn-gradient text-white rounded-full text-14 px-30 py-8 mt-30"
|
||||
@click="onCopy(qrcodeValue)"
|
||||
class="bg-#FFF9F2 mt-5 rounded-10 border-#FFDD99 border-2 border-solid p-15 flex items-start"
|
||||
v-for="item of taskList"
|
||||
:key="item.title"
|
||||
>
|
||||
复制邀请链接
|
||||
<view class="flex-1">
|
||||
<view class="text-15 text-#333 font-500">{{ item.title }}</view>
|
||||
<view class="text-12 text-#333 mt-8">{{ item.desc }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view
|
||||
class="w-fit ml-auto mr-0 rounded-4 px-10 py-4 leading-12 text-white text-12 mb-8"
|
||||
style="background: linear-gradient(90deg, #ffdd99 0%, #efb85a 100%)"
|
||||
v-if="item.status"
|
||||
>
|
||||
已获取
|
||||
</view>
|
||||
<!-- <view
|
||||
class="w-fit ml-auto mr-0 bg-#F3CB3B33 rounded-4 px-10 py-4 leading-12 text-#FFA600 text-12"
|
||||
v-if="item.open"
|
||||
@click="onGetReward(item.level)"
|
||||
>
|
||||
领取
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-#FFFFFFE5 rounded-20 mt-30 w-345 mx-auto p-15 flex">
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-18 text-#333">团队人数</view>
|
||||
<view class="text-gradient text-18 mt-8">{{ inviteData.num }}</view>
|
||||
<view class="font-500 text-14 mt-4">直推人数</view>
|
||||
</view>
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-18 text-#333">我的佣金</view>
|
||||
<!-- <view class="text-18 text-#333 h-25"></view> -->
|
||||
<view class="text-gradient text-18 mt-8">{{ inviteData.performance }}</view>
|
||||
<view class="font-500 text-14 mt-4">直推业绩</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 w-345 mx-auto">
|
||||
<view class="ml-15 text-18 text-#DE9859">团队成员({{ inviteData.num }}/人)</view>
|
||||
<template v-if="list.length">
|
||||
<view
|
||||
class="mt-15 bg-white px-15 pt-15 pb-15 rounded-10"
|
||||
v-for="item of list"
|
||||
:key="item.id"
|
||||
>
|
||||
<view class="flex items-center">
|
||||
<Avatar :src="item.avatar" class="w-50 h-50" mode="aspectFill" />
|
||||
<view class="ml-15 flex-1">
|
||||
<view class="text-15 text-#333">{{ item.nickname }}</view>
|
||||
<view class="text-12 text-#333 mt-10">{{ item.jointime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="mt-15 bg-white rounded-10 p-15" v-else>
|
||||
<wd-status-tip image="content" tip="暂无内容" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -69,9 +209,10 @@ const onLottery = () => {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.invite-page {
|
||||
background-image: url('@/static/images/page-sub/invite-bg.png');
|
||||
background-image: url('@/static/images/page-sub/invite-bg.jpg'),
|
||||
linear-gradient(to right, #f1dbc3, #e8c5a3);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: top center;
|
||||
background-size: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,35 +4,49 @@
|
||||
navigationBarTitleText: '登录',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
notNeedLogin: false,
|
||||
notNeedLogin: true,
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="login-container relative">
|
||||
<NavBar />
|
||||
<view class="mt-44 text-28 pl-32 text-gradient" style="-webkit-background-clip: text">
|
||||
登录
|
||||
</view>
|
||||
<view class="login-container relative pt-44">
|
||||
<view class="text-28 pl-32 text-gradient" style="-webkit-background-clip: text">登录</view>
|
||||
<view class="pt-45">
|
||||
<view class="mx-15 px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="bg-white mx-15 px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
|
||||
<view class="text-gradient">手机号</view>
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.account"
|
||||
placeholder-class="text-#889BC6"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入用户名"
|
||||
placeholder="请输入手机号"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<view class="text-gradient">密码</view>
|
||||
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
v-model="formData.password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入登录密码"
|
||||
placeholder="请输入密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<view class="text-gradient">验证码</view>
|
||||
<input
|
||||
v-model="formData.captcha"
|
||||
placeholder-class="text-#889BC6"
|
||||
type="text"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入验证码"
|
||||
/>
|
||||
<img
|
||||
:src="codeUrl"
|
||||
class="w-100 h-30 ml-15 bg-gray-400"
|
||||
mode="widthFix"
|
||||
@click="refreshCode"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -64,12 +78,16 @@ const userStore = useUserStore()
|
||||
const formData = ref({
|
||||
account: '',
|
||||
password: '',
|
||||
captcha: '',
|
||||
})
|
||||
|
||||
const { codeUrl, t: captchaT, refreshCode } = useCaptcha()
|
||||
|
||||
let redirect = '/'
|
||||
onLoad((options) => {
|
||||
redirect = options.redirect ?? '/'
|
||||
})
|
||||
onShow(refreshCode)
|
||||
|
||||
const handleLogin = async () => {
|
||||
if (!formData.value.account || !formData.value.password) {
|
||||
@@ -78,15 +96,25 @@ const handleLogin = async () => {
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
const {
|
||||
data: {
|
||||
userinfo: { token },
|
||||
},
|
||||
} = await loginUserAPI(formData.value)
|
||||
userStore.setToken(token)
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
if (!formData.value.captcha) {
|
||||
return uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
try {
|
||||
const {
|
||||
data: {
|
||||
userinfo: { token },
|
||||
},
|
||||
} = await loginUserAPI({ ...formData.value, t: captchaT.value })
|
||||
userStore.setToken(token)
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
} catch (error) {
|
||||
refreshCode()
|
||||
}
|
||||
}
|
||||
|
||||
const handleRegister = () => {
|
||||
@@ -110,13 +138,13 @@ onLoad(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.login-container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 200rpx;
|
||||
background-image: url('@/static/images/login-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
padding-bottom: 50px;
|
||||
background:
|
||||
url('@/static/images/brand-person.png') right 20px bottom / 60% no-repeat,
|
||||
url('@/static/images/login-bg.jpg') top center / cover no-repeat;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -10,97 +10,49 @@
|
||||
<template>
|
||||
<view class="my-page">
|
||||
<NavBar />
|
||||
<view class="flex flex-col items-center justify-center mt-30">
|
||||
<Avatar class="w-80 h-80 mx-auto" :src="getImageUrl(userStore.userInfo.avatar)" />
|
||||
<view class="text-16 mt-10">{{ userStore.userInfo.nickname }}</view>
|
||||
<view class="text-12 mt-8">账号:{{ userStore.userInfo.username }}</view>
|
||||
</view>
|
||||
<view class="flex justify-center text-center mt-15 items-center px-30">
|
||||
<view class="flex-1">
|
||||
<view class="text-30 font-bold">{{ Number(userStore.userInfo.money) }}</view>
|
||||
<view class="text-14 mt-10 text-#3B81F3">我的余额</view>
|
||||
<view class="flex mt-50 text-white px-15 items-center">
|
||||
<!-- <Avatar class="w-60 h-60" :src="getImageUrl(userStore.userInfo?.avatar)" /> -->
|
||||
<Avatar class="w-60 h-60" />
|
||||
<view class="ml-15 flex-1">
|
||||
<view class="text-16">
|
||||
{{ userStore.userInfo?.realname ?? userStore.userInfo?.nickname }}
|
||||
</view>
|
||||
<view class="text-12 mt-8">账号:{{ userStore.userInfo?.username }}</view>
|
||||
</view>
|
||||
<view class="w-50 h-50 relative">
|
||||
<image
|
||||
class="w-100 h-100 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
|
||||
src="@/static/images/my/translate.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="text-30 font-bold">{{ Number(userStore.userInfo.score) }}</view>
|
||||
<view class="text-14 mt-10 text-#3B81F3">我的股数</view>
|
||||
<view
|
||||
class="flex border-#FFDD99 border-1 border-solid items-center justify-center h-32 w-100 btn-gradient rounded-full text-center text-14 text-white"
|
||||
@click="handleSignIn"
|
||||
>
|
||||
<view class="ml-5">签到</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex px-15 mt-15">
|
||||
<view
|
||||
class="flex py-30 justify-center items-center rounded-tl-10 rounded-br-10 flex-1 bg-[linear-gradient(180deg,#D9EBFF,#9EDAFF)] border-1 border-#5FAEFF80 border-solid"
|
||||
@click="handleWithdrawal"
|
||||
>
|
||||
<image class="w-40 h-40" src="@/static/images/my/withdrawal.png" mode="aspectFit" />
|
||||
<view class="text-white text-14 px-15 py-5 ml-15 rounded-full btn-gradient">提现</view>
|
||||
</view>
|
||||
<view
|
||||
class="ml-10 flex py-30 justify-center items-center rounded-tl-10 rounded-br-10 flex-1 bg-[linear-gradient(180deg,#D9EBFF,#9EDAFF)] border-1 border-#5FAEFF80 border-solid"
|
||||
@click="handleConvert"
|
||||
>
|
||||
<image class="w-40 h-40" src="@/static/images/my/top-up.png" mode="aspectFit" />
|
||||
<view class="text-white text-14 px-15 py-5 ml-15 rounded-full btn-gradient">转换</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 rounded-t-30 bg-white p-15 min-h-90vh">
|
||||
<image
|
||||
class="w-345 h-146 mx-auto block"
|
||||
src="@/static/images/my/recommend.jpg"
|
||||
mode="widthFix"
|
||||
@click="handleInvite"
|
||||
/>
|
||||
|
||||
<image
|
||||
class="w-330 h-123 mx-auto mt-15 block"
|
||||
src="@/static/images/my/recommend.png"
|
||||
mode="aspectFill"
|
||||
@click="handleInvite"
|
||||
/>
|
||||
|
||||
<view class="mt-15 grid grid-cols-2 gap-10 p-15">
|
||||
<view
|
||||
@click="handleTeam"
|
||||
class="flex items-center justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/team.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">我的邀请</view>
|
||||
</view>
|
||||
<view
|
||||
@click="handleAsset"
|
||||
class="flex items-center justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/house.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">我的资产</view>
|
||||
<view class="mt-15 grid grid-cols-2 gap-10">
|
||||
<view
|
||||
@click="item.handle"
|
||||
class="flex items-center justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#FFDD9933,#EFB85A33)] p-15 border border-#EFB85A33 border-solid"
|
||||
v-for="item in commonList"
|
||||
:key="item.title"
|
||||
>
|
||||
<image class="w-24 h-24" :src="item.icon" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
@click="handleRealName"
|
||||
class="flex items-center justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
class="mt-50 mx-auto w-294 btn-gradient rounded-full text-center text-14 text-white py-15 mt-15"
|
||||
@click="handleLogout"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/realname.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">实名认证</view>
|
||||
退出登录
|
||||
</view>
|
||||
<view
|
||||
@click="handleBankCard"
|
||||
class="flex items-center justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/card.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">我的银行卡</view>
|
||||
</view>
|
||||
<view
|
||||
@click="downloadAppAPI"
|
||||
class="flex items-center justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/download.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">下载APP</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="mt-50 mx-auto w-294 btn-gradient rounded-full text-center text-14 text-white py-15 mt-15"
|
||||
@click="handleLogout"
|
||||
>
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -109,9 +61,14 @@
|
||||
import Avatar from '@/components/Avatar.vue'
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { loginRoute } from '@/interceptors/route'
|
||||
import { downloadAppAPI } from '@/service'
|
||||
import { downloadAppAPI, getCommunityInviteFirstAPI, getSignInAPI } from '@/service'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { getImageUrl } from '@/utils'
|
||||
import { getImageUrl, showModal } from '@/utils'
|
||||
|
||||
import CommonIcon1 from '@/static/images/my/common-icon-1.png'
|
||||
import CommonIcon2 from '@/static/images/my/common-icon-2.png'
|
||||
import CommonIcon3 from '@/static/images/my/common-icon-3.png'
|
||||
import CommonIcon4 from '@/static/images/my/common-icon-4.png'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -128,9 +85,10 @@ const handleWithdrawalDetail = () => {
|
||||
}
|
||||
|
||||
const handleWithdrawal = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal/index',
|
||||
})
|
||||
return showModal('暂未开放')
|
||||
// uni.navigateTo({
|
||||
// url: '/pages-sub/withdrawal/index',
|
||||
// })
|
||||
}
|
||||
|
||||
const handleTeam = () => {
|
||||
@@ -145,9 +103,9 @@ const handleRealName = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const handleAsset = () => {
|
||||
const handleAsset = (index = 0) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/asset/index',
|
||||
url: `/pages-sub/asset/index?tabIndex=${index}`,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -163,19 +121,66 @@ const handleInvite = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const handleConvert = () => {
|
||||
const handleConvert = (type) => {
|
||||
if (type === 0) {
|
||||
return showModal('提前申请领取养老金')
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/convert/index',
|
||||
url: `/pages-sub/convert/index?type=${type}`,
|
||||
})
|
||||
}
|
||||
|
||||
const handleSignIn = async () => {
|
||||
const res = await getSignInAPI()
|
||||
if (res.msg) {
|
||||
showModal(res.msg.replace('元', '') + '元')
|
||||
} else {
|
||||
showModal('签到成功')
|
||||
}
|
||||
userStore.loadUserInfo()
|
||||
}
|
||||
|
||||
const handleKefu = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-type/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleInvestDetail = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/invest-detail/index',
|
||||
})
|
||||
}
|
||||
|
||||
const commonList = [
|
||||
{
|
||||
title: '资金明细',
|
||||
icon: CommonIcon1,
|
||||
handle: () => handleAsset(0),
|
||||
},
|
||||
{
|
||||
title: '提现明细',
|
||||
icon: CommonIcon2,
|
||||
handle: handleWithdrawalDetail,
|
||||
},
|
||||
// {
|
||||
// title: '修改密码',
|
||||
// icon: CommonIcon3,
|
||||
// // handle: handleChangePassword,
|
||||
// },
|
||||
{
|
||||
title: '银行卡',
|
||||
icon: CommonIcon4,
|
||||
handle: handleKefu,
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
background-image: url('@/static/images/my/my-bg.jpg');
|
||||
background-position: top -40px center;
|
||||
background-size: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
navigationBarTitleText: '注册',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
notNeedLogin: false,
|
||||
notNeedLogin: true,
|
||||
}
|
||||
</route>
|
||||
|
||||
@@ -22,8 +22,8 @@ const form = ref({
|
||||
password: '',
|
||||
retpassword: '',
|
||||
invitecode: '',
|
||||
tpassword: '',
|
||||
rettpassword: '',
|
||||
// tpassword: '',
|
||||
// rettpassword: '',
|
||||
})
|
||||
|
||||
let redirect = '/'
|
||||
@@ -54,27 +54,14 @@ const handleRegister = mergeStep(async () => {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!form.value.tpassword) {
|
||||
|
||||
if (!form.value.invitecode) {
|
||||
uni.showToast({
|
||||
title: '请输入支付密码',
|
||||
title: '请输入邀请码',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.tpassword !== form.value.rettpassword) {
|
||||
uni.showToast({
|
||||
title: '两次输入的支付密码不一致',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
// if (!form.value.invitecode) {
|
||||
// uni.showToast({
|
||||
// title: '请输入邀请码',
|
||||
// icon: 'none',
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
const {
|
||||
data: {
|
||||
userinfo: { token },
|
||||
@@ -96,12 +83,12 @@ onLoad(async (options) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="login-container relative">
|
||||
<NavBar />
|
||||
<view class="register-container relative">
|
||||
<NavBar title-color="#333" />
|
||||
<view class="pt-45">
|
||||
<view class="mx-15 px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="mx-15 bg-white px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
|
||||
<view class="text-gradient">手机号</view>
|
||||
<input
|
||||
v-model="form.username"
|
||||
type="text"
|
||||
@@ -111,7 +98,7 @@ onLoad(async (options) => {
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<view class="text-gradient">登录密码</view>
|
||||
<input
|
||||
v-model="form.password"
|
||||
placeholder-class="text-#889BC6"
|
||||
@@ -121,7 +108,7 @@ onLoad(async (options) => {
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<view class="text-gradient">确认登录密码</view>
|
||||
<input
|
||||
v-model="form.retpassword"
|
||||
placeholder-class="text-#889BC6"
|
||||
@@ -130,28 +117,19 @@ onLoad(async (options) => {
|
||||
placeholder="请再次输入登录密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<!-- <view class="flex items-center py-15">
|
||||
<view class="text-gradient">验证码</view>
|
||||
<input
|
||||
v-model="form.tpassword"
|
||||
v-model="form.invitecode"
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
type="text"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入支付密码"
|
||||
placeholder="请输入验证码"
|
||||
/>
|
||||
</view>
|
||||
<image class="w-60 h-24 ml-15 bg-gray-400" mode="aspectFit" />
|
||||
</view> -->
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
v-model="form.rettpassword"
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请再次输入支付密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/invite.png" mode="aspectFit" />
|
||||
<view class="text-gradient">邀请码</view>
|
||||
<input
|
||||
v-model="form.invitecode"
|
||||
placeholder-class="text-#889BC6"
|
||||
@@ -171,13 +149,15 @@ onLoad(async (options) => {
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.login-container {
|
||||
<style lang="scss" scoped>
|
||||
.register-container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 200rpx;
|
||||
background-image: url('@/static/images/login-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
padding-bottom: 50px;
|
||||
// background-repeat: no-repeat;
|
||||
// background-size: cover;
|
||||
background:
|
||||
url('@/static/images/brand-person.png') right 20px bottom / 60% no-repeat,
|
||||
url('@/static/images/login-bg.jpg') top center / cover no-repeat;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { mergeStep } from '@/utils'
|
||||
import { http } from '@/utils/http'
|
||||
|
||||
// 注册用户
|
||||
@@ -71,11 +72,12 @@ export const getInvestmentRecordAPI = (data) =>
|
||||
})
|
||||
|
||||
// 查询实名认证
|
||||
export const getRealNameAuthAPI = () =>
|
||||
export const getRealNameAuthAPI = mergeStep(() =>
|
||||
http({
|
||||
url: '/api/user/finduserauth',
|
||||
method: 'POST',
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
// 实名认证
|
||||
export const realNameAuthAPI = (data) =>
|
||||
@@ -96,7 +98,7 @@ export const getMyTeamAPI = (data) =>
|
||||
// 我的资产
|
||||
export const getMyAssetAPI = (data) =>
|
||||
http({
|
||||
url: '/api/user/myassets',
|
||||
url: '/api/user/moneyloglist',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
@@ -151,5 +153,79 @@ export const getWithdrawalRecordAPI = (data) =>
|
||||
|
||||
// 下载APP
|
||||
export const downloadAppAPI = () => {
|
||||
location.href = 'https://tiktok-test.gbnorg.com/7885922.apk'
|
||||
location.href = 'https://r2.maldiveswallet.vip/app/yjyh.apk'
|
||||
}
|
||||
|
||||
// 社区我的邀请
|
||||
export const getCommunityMyInviteAPI = (data) =>
|
||||
http({
|
||||
url: '/api/user/inviteelist',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
|
||||
// 领取奖励第一步
|
||||
export const getCommunityInviteFirstAPI = () =>
|
||||
http({
|
||||
url: '/api/user/rewardone',
|
||||
method: 'POST',
|
||||
})
|
||||
|
||||
// 领取救济金
|
||||
export const getCommunityInviteRewardAPI = (data) =>
|
||||
http({
|
||||
url: '/api/user/rewardtwo',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
|
||||
// 签到功能
|
||||
export const getSignInAPI = () =>
|
||||
http({
|
||||
url: '/api/user/signin',
|
||||
method: 'POST',
|
||||
})
|
||||
|
||||
// 开通个人养老账户
|
||||
export const getOpenPersonalAccountAPI = () =>
|
||||
http({
|
||||
url: '/api/user/activateold',
|
||||
method: 'POST',
|
||||
})
|
||||
|
||||
// 养老金转入余额
|
||||
export const getOldMoneyTransferAPI = (data) =>
|
||||
http({
|
||||
url: '/api/user/yangout',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
|
||||
// 佣金转入养老金
|
||||
export const getYongMoneyTransferAPI = (data) =>
|
||||
http({
|
||||
url: '/api/user/tuanduiout',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
// 轮播图
|
||||
export const getBannerAPI = () =>
|
||||
http({
|
||||
url: '/api/index/bannerlist',
|
||||
method: 'POST',
|
||||
})
|
||||
|
||||
// 银行卡资产恢复列表
|
||||
export const getBankCardRecoverListAPI = () =>
|
||||
http({
|
||||
url: '/api/user/bankassetslist',
|
||||
method: 'POST',
|
||||
})
|
||||
|
||||
// 银行卡资产恢复
|
||||
export const getBankCardRecoverAPI = (data) =>
|
||||
http({
|
||||
url: '/api/user/userbankassets',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
|
||||
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 999 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 860 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 857 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 951 B |
|
After Width: | Height: | Size: 867 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 174 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 860 KiB |
|
Before Width: | Height: | Size: 3.0 MiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,4 +1,4 @@
|
||||
import { getUserInfoAPI, logoutUserAPI } from '@/service'
|
||||
import { getRealNameAuthAPI, getUserInfoAPI, logoutUserAPI } from '@/service'
|
||||
import { mergeStep } from '@/utils'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
@@ -12,6 +12,16 @@ export const useUserStore = defineStore(
|
||||
const loadUserInfo = mergeStep(async () => {
|
||||
const res = await getUserInfoAPI()
|
||||
userInfo.value = res.data.userinfo
|
||||
|
||||
getRealNameAuthAPI().then((res) => {
|
||||
if (Number(res.data?.status) !== 2) {
|
||||
uni.reLaunch({
|
||||
url: '/pages-sub/realname/index',
|
||||
})
|
||||
}
|
||||
userInfo.value.realname = res.data?.realname
|
||||
return res.data
|
||||
})
|
||||
})
|
||||
|
||||
const setUserInfo = (val: IUserInfo) => {
|
||||
|
||||
@@ -75,6 +75,7 @@ declare global {
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useCaptcha: typeof import('../hooks/useCaptcha')['useCaptcha']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useId: typeof import('vue')['useId']
|
||||
@@ -172,6 +173,7 @@ declare module 'vue' {
|
||||
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
|
||||
readonly unref: UnwrapRef<typeof import('vue')['unref']>
|
||||
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
|
||||
readonly useCaptcha: UnwrapRef<typeof import('../hooks/useCaptcha')['useCaptcha']>
|
||||
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
|
||||
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
|
||||
readonly useId: UnwrapRef<typeof import('vue')['useId']>
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
// Generated by vite-plugin-uni-pages
|
||||
|
||||
interface NavigateToOptions {
|
||||
url: "/pages/index/index" |
|
||||
url: "/pages/bank/index" |
|
||||
"/pages/edit-password/index" |
|
||||
"/pages/index/index" |
|
||||
"/pages/invest/index" |
|
||||
"/pages/invite/index" |
|
||||
"/pages/login/index" |
|
||||
@@ -14,12 +15,14 @@ interface NavigateToOptions {
|
||||
"/pages-sub/asset/index" |
|
||||
"/pages-sub/convert/index" |
|
||||
"/pages-sub/demo/index" |
|
||||
"/pages-sub/hot-news/index" |
|
||||
"/pages-sub/introduction/index" |
|
||||
"/pages-sub/invest-detail/index" |
|
||||
"/pages-sub/invest-immediately/index" |
|
||||
"/pages-sub/invest-result/index" |
|
||||
"/pages-sub/invite/index" |
|
||||
"/pages-sub/lottery/index" |
|
||||
"/pages-sub/news/index" |
|
||||
"/pages-sub/news-detail/index" |
|
||||
"/pages-sub/official-community/index" |
|
||||
"/pages-sub/realname/index" |
|
||||
@@ -32,7 +35,7 @@ interface NavigateToOptions {
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
interface SwitchTabOptions {
|
||||
url: "/pages/index/index" | "/pages/invite/index" | "/pages/my/index"
|
||||
url: "/pages/bank/index" | "/pages/invite/index" | "/pages/invest/index" | "/pages/my/index"
|
||||
}
|
||||
|
||||
type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;
|
||||
|
||||
@@ -84,7 +84,7 @@ export const getAllPages = (key = 'notNeedLogin') => {
|
||||
...pages
|
||||
.filter((page) => {
|
||||
if (!key) return false
|
||||
return page[key] === false
|
||||
return page[key] === true
|
||||
})
|
||||
.map((page) => ({
|
||||
...page,
|
||||
|
||||
@@ -78,11 +78,11 @@ export default defineConfig({
|
||||
],
|
||||
['pt-safe', { 'padding-top': 'env(safe-area-inset-top)' }],
|
||||
['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
|
||||
['btn-gradient', { background: 'linear-gradient(90deg,#95C3FF,#4D72F6)' }],
|
||||
['btn-gradient', { background: 'linear-gradient(90deg,#FFDD99,#EFB85A)' }],
|
||||
[
|
||||
'text-gradient',
|
||||
{
|
||||
'background-image': 'linear-gradient(90deg,#95C3FF,#4D72F6 30%)',
|
||||
'background-image': 'linear-gradient(90deg,#FFDD99,#EFB85A)',
|
||||
'background-clip': 'text',
|
||||
color: 'transparent',
|
||||
},
|
||||
|
||||
@@ -113,12 +113,16 @@ export default ({ command, mode }) => {
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [
|
||||
autoprefixer(),
|
||||
autoprefixer({
|
||||
overrideBrowserslist: ['Android >= 4.0', 'iOS >= 8'],
|
||||
}),
|
||||
viewport({
|
||||
mobileUnit: 'rem',
|
||||
appSelector: '#app',
|
||||
selectorBlackList: ['uni-'],
|
||||
viewportWidth: 375,
|
||||
maxDisplayWidth: 600,
|
||||
rootContainingBlockSelectorList: ['van-tabbar', 'van-popup'],
|
||||
// rootContainingBlockSelectorList: ['wd-navbar__title'],
|
||||
border: true,
|
||||
}),
|
||||
],
|
||||
|
||||