Compare commits
10 Commits
30369077af
...
3868901358
| Author | SHA1 | Date | |
|---|---|---|---|
| 3868901358 | |||
| 2516c3e049 | |||
| 4ff9d1d182 | |||
| db653bba97 | |||
| e315d8d752 | |||
| 0a3c768629 | |||
| 77316fd1ff | |||
| 3a3e9e3d7c | |||
| 01bc4b186c | |||
| ea852b97c1 |
@@ -5,5 +5,5 @@
|
||||
</p>
|
||||
|
||||
<h1 align="center">
|
||||
<a href="https://github.com/feige996/unibest" target="_blank">unibest - 最好的 uniapp 开发框架</a>
|
||||
<a href="https://github.com/feige996/unibest" target="_blank">x-1</a>
|
||||
</h1>
|
||||
|
||||
@@ -7,9 +7,9 @@ VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||
VITE_APP_PUBLIC_BASE=/
|
||||
|
||||
VITE_SERVER_BASEURL = 'http://api.divine913.com'
|
||||
VITE_UPLOAD_BASEURL = 'http://api.divine913.com/api/v1/UploadFile'
|
||||
VITE_SERVER_BASEURL = 'https://api.divine913.com'
|
||||
VITE_UPLOAD_BASEURL = 'https://api.divine913.com/api/v1/UploadFile'
|
||||
|
||||
# h5是否需要配置代理
|
||||
VITE_APP_PROXY=true
|
||||
VITE_APP_PROXY=false
|
||||
VITE_APP_PROXY_PREFIX = '/api'
|
||||
|
||||
+3
-1
@@ -12,7 +12,9 @@ onLaunch((options) => {
|
||||
// },
|
||||
})
|
||||
} else {
|
||||
userStore.loadUserInfo()
|
||||
if (userStore.isLogged) {
|
||||
userStore.loadUserInfo()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ function useListPageRequest(
|
||||
customParams = params
|
||||
}
|
||||
try {
|
||||
list.value = []
|
||||
await loadData()
|
||||
} finally {
|
||||
loading.value = false
|
||||
|
||||
@@ -44,11 +44,13 @@
|
||||
</view>
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-14 font-bold text-#FF5F5F">{{ item.money }}</view>
|
||||
<view class="text-14 font-bold text-#FF5F5F">
|
||||
{{ item.action === 1 ? '+' : '-' }}{{ item.money }}
|
||||
</view>
|
||||
<!-- <view class="text-14 font-bold text-#FF5F5F">+2000 RMB</view> -->
|
||||
<!-- <view class="text-14 font-bold text-#FF5F5F">+30 点</view> -->
|
||||
<view class="text-14 mt-10 py-4 px-10 bg-#71C78A1A text-#71C78A" v-if="item.status === 1">
|
||||
已到账
|
||||
{{ item.action === 1 ? '已到账' : '已扣除' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -9,7 +9,47 @@
|
||||
|
||||
<template>
|
||||
<view class="withdrawal-type-edit-page pb-100 min-h-screen">
|
||||
<template v-if="Number(userStore.userInfo?.member_certification) === 0">
|
||||
<template v-if="Number(userStore.userInfo?.member_certification) === 2">
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-checking.png"
|
||||
class="w-150 mx-auto h-150 block"
|
||||
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>
|
||||
</template>
|
||||
<template v-else-if="Number(userStore.userInfo?.member_certification) === 1">
|
||||
<view class="flex flex-col items-center">
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-success.png"
|
||||
class="w-150 h-150 block"
|
||||
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>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else-if="Number(userStore.userInfo?.member_certification) === 3">
|
||||
<view class="flex flex-col items-center">
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-checking.png"
|
||||
class="w-150 h-150 block"
|
||||
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="onReachBottom"
|
||||
>
|
||||
重新提交
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<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">
|
||||
<image src="@/static/images/page-sub/realname/realname-type.png" class="w-20 h-20" />
|
||||
@@ -45,38 +85,6 @@
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else-if="Number(userStore.userInfo?.member_certification) === 2">
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-checking.png"
|
||||
class="w-150 mx-auto h-150 block"
|
||||
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>
|
||||
</template>
|
||||
<template v-else-if="Number(userStore.userInfo?.member_certification) === 1">
|
||||
<view class="flex flex-col items-center" v-if="false">
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-success.png"
|
||||
class="w-150 h-150 block"
|
||||
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>
|
||||
<!--
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-checking.png"
|
||||
class="w-150 h-150 block"
|
||||
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">重新提交</button> -->
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -87,7 +95,6 @@ import { showModal } from '@/utils'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const notSubmit = ref(true)
|
||||
|
||||
const form = ref({
|
||||
credentials_name: '',
|
||||
@@ -98,13 +105,18 @@ const onBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const onReachBottom = () => {
|
||||
userStore.userInfo.member_certification = null
|
||||
}
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (!form.value.credentials_name || !form.value.credentials_number) {
|
||||
await showModal('请填写完整信息')
|
||||
return
|
||||
}
|
||||
await createAuthUser(form.value)
|
||||
notSubmit.value = false
|
||||
await showModal('提交成功')
|
||||
userStore.loadUserInfo()
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
class="text-14 mt-18 py-4 px-10 bg-gray-400 text-white"
|
||||
v-if="item.change_status === 0"
|
||||
>
|
||||
充值中
|
||||
审核中
|
||||
</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A"
|
||||
|
||||
@@ -205,7 +205,7 @@ const onSubmit = mergeStep(async () => {
|
||||
await rechargeAPI(form.value)
|
||||
await showModal('充值成功')
|
||||
uni.redirectTo({
|
||||
url: '/pages-sub/invest-result/index',
|
||||
url: '/pages-sub/recharge-detail/index',
|
||||
})
|
||||
})
|
||||
const handlePreview = () => {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<Avatar class="w-40 h-40" :src="item.member_portrait" />
|
||||
<view class="flex-1 flex flex-col ml-15">
|
||||
<view class="text-14 text-#333">{{ item.nickname }}</view>
|
||||
<view class="text-12 mt-10 text-#999">{{ item.member_username }}</view>
|
||||
<view class="text-12 mt-10 text-#999">{{ item.from_username }}</view>
|
||||
<view class="text-12 mt-10 text-#999">{{ item.create_time }}</view>
|
||||
</view>
|
||||
<view class="bg-#71C78A80 text-white text-12 rounded-10 px-10 py-5">邀请成功</view>
|
||||
|
||||
@@ -37,7 +37,25 @@
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-16 text-#FF5F5F">-{{ item.cash_money }} RMB</view>
|
||||
<view class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A">{{ item.message }}</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-gray-400 text-white"
|
||||
v-if="item.cash_status === 0"
|
||||
>
|
||||
审核中
|
||||
</view>
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A"
|
||||
v-else-if="item.cash_status === 1"
|
||||
>
|
||||
提现成功
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="text-14 mt-18 py-4 px-10 bg-#FF5F5F text-white"
|
||||
v-else-if="item.cash_status === 2"
|
||||
>
|
||||
提现失败
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -32,6 +32,16 @@
|
||||
v-model="form.bank_name"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14" v-if="form.card_type === 1">
|
||||
<view>开户行地址</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
placeholder="请输入开户行地址"
|
||||
v-model="form.bank_address"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>{{ typeName }}账号</view>
|
||||
<input
|
||||
|
||||
@@ -10,38 +10,46 @@
|
||||
<template>
|
||||
<view class="withdrawal-type-page min-h-screen pb-100">
|
||||
<template v-if="list.length > 0">
|
||||
<view
|
||||
class="flex items-center justify-between py-15 text-14 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10 m-15 p-15"
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
@click="onSelectType(item)"
|
||||
>
|
||||
<image
|
||||
v-if="Number(item.card_type) === 1"
|
||||
class="w-45 h-45"
|
||||
src="@/static/images/invest/unionpay-icon.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<image
|
||||
v-if="Number(item.card_type) === 2"
|
||||
class="w-45 h-45"
|
||||
src="@/static/images/invest/alipay-icon.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<image
|
||||
v-if="Number(item.card_type) === 3"
|
||||
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.card_type) - 1] }}
|
||||
<wd-swipe-action v-for="item in list" :key="item.id">
|
||||
<view
|
||||
class="flex items-center justify-between py-15 text-14 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10 m-15 p-15"
|
||||
@click="onSelectType(item)"
|
||||
>
|
||||
<image
|
||||
v-if="Number(item.card_type) === 1"
|
||||
class="w-45 h-45"
|
||||
src="@/static/images/invest/unionpay-icon.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<image
|
||||
v-if="Number(item.card_type) === 2"
|
||||
class="w-45 h-45"
|
||||
src="@/static/images/invest/alipay-icon.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<image
|
||||
v-if="Number(item.card_type) === 3"
|
||||
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.card_type) - 1] }}
|
||||
</view>
|
||||
<view class="mt-10 text-14 text-#889BC6">{{ item.card_account }}</view>
|
||||
</view>
|
||||
<view class="mt-10 text-14 text-#889BC6">{{ item.card_account }}</view>
|
||||
<wd-icon v-if="isSelect" name="arrow-right" size="14px"></wd-icon>
|
||||
</view>
|
||||
<wd-icon name="arrow-right" size="14px"></wd-icon>
|
||||
</view>
|
||||
<template #right>
|
||||
<view
|
||||
class="px-15 mr-15 rounded-10 bg-#ff000040 h-full flex items-center text-14 text-red-600"
|
||||
@click="onDelete(item)"
|
||||
>
|
||||
删除
|
||||
</view>
|
||||
</template>
|
||||
</wd-swipe-action>
|
||||
</template>
|
||||
<template v-else>
|
||||
<wd-status-tip image="content" tip="暂无内容" />
|
||||
@@ -55,24 +63,25 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getBankCardListAPI } from '@/service'
|
||||
import { deleteBankCardAPI, getBankCardListAPI } from '@/service'
|
||||
import { showModal } from '@/utils'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
let isSelect = false
|
||||
const isSelect = ref(false)
|
||||
onLoad((options) => {
|
||||
if (options.type === 'select') {
|
||||
isSelect = true
|
||||
isSelect.value = true
|
||||
}
|
||||
})
|
||||
|
||||
const onSelectType = (item) => {
|
||||
if (isSelect) {
|
||||
if (isSelect.value) {
|
||||
uni.$emit('withdrawal-type', item)
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-type/edit?id=1',
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: '/pages-sub/withdrawal-type/edit?id=1',
|
||||
// })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,5 +91,21 @@ const onAddType = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const { list } = useListPageRequest(getBankCardListAPI)
|
||||
const onDelete = async (item) => {
|
||||
await showModal('确认删除?')
|
||||
await deleteBankCardAPI({
|
||||
card_account: item.card_account,
|
||||
})
|
||||
await showModal('删除成功')
|
||||
loadData()
|
||||
}
|
||||
|
||||
const list = ref([])
|
||||
const loadData = async () => {
|
||||
list.value = (await getBankCardListAPI().then((res) => res.data)) as any
|
||||
}
|
||||
|
||||
onShow(async () => {
|
||||
loadData()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
/>
|
||||
<view
|
||||
class="text-12 text-#04A9F9"
|
||||
@click="form.cash_money = Number(userStore.userInfo.member_balance ?? 0)"
|
||||
@click="form.cash_money = Number(userStore.userInfo.member_dividend ?? 0)"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-12 text-#889BC6 mt-15">
|
||||
当前余额:{{ userStore.userInfo.member_balance }}
|
||||
当前余额:{{ userStore.userInfo.member_dividend }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
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:13123.00</view>
|
||||
<view class="text-gradient flex-1 text-14">到账CNY:{{ form.cash_money }}</view>
|
||||
<view
|
||||
class="btn-gradient text-center text-white rounded-full text-14 px-30 py-10"
|
||||
@click="onSubmit"
|
||||
@@ -148,8 +148,9 @@ const onSubmit = async () => {
|
||||
}
|
||||
await applyWithdrawalAPI(form.value)
|
||||
await showModal('申请成功')
|
||||
userStore.loadUserInfo()
|
||||
uni.redirectTo({
|
||||
url: '/pages-sub/invest-result/index',
|
||||
url: '/pages-sub/withdrawal-detail/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -124,7 +124,7 @@ import { useUserStore } from '@/store/user'
|
||||
const userStore = useUserStore()
|
||||
|
||||
const handleLogout = async () => {
|
||||
logoutAPI()
|
||||
// logoutAPI()
|
||||
userStore.logout()
|
||||
uni.reLaunch({
|
||||
url: loginRoute,
|
||||
|
||||
@@ -99,8 +99,8 @@ export const deleteBankCardAPI = (data) => {
|
||||
}
|
||||
|
||||
/** 获取银行卡列表 */
|
||||
export const getBankCardListAPI = (data) => {
|
||||
return http.post<{ list: any[] }>('/api/v1/getCardList', data)
|
||||
export const getBankCardListAPI = () => {
|
||||
return http.post('/api/v1/getCardList')
|
||||
}
|
||||
|
||||
/** 申请提现 */
|
||||
|
||||
Reference in New Issue
Block a user