10 Commits

Author SHA1 Message Date
anonymous 3868901358 fix: bug 2025-01-17 08:49:16 +08:00
anonymous 2516c3e049 fix: bug 2025-01-04 09:49:06 +08:00
anonymous 4ff9d1d182 fix: 修复bug 2025-01-03 22:39:31 +08:00
anonymous db653bba97 fix: 银行卡管理 2025-01-02 17:14:57 +08:00
anonymous e315d8d752 fix: 重载时清空数组 2025-01-02 16:39:36 +08:00
anonymous 0a3c768629 fix: 用户名称显示 2025-01-02 16:31:42 +08:00
anonymous 77316fd1ff chore: 切换生产环境 2025-01-02 13:45:26 +08:00
anonymous 3a3e9e3d7c 取消反向代理 2025-01-02 11:25:36 +08:00
anonymous 01bc4b186c fix: bug 2025-01-02 11:11:08 +08:00
anonymous ea852b97c1 fix: bug 2025-01-02 11:10:22 +08:00
15 changed files with 162 additions and 91 deletions
+1 -1
View File
@@ -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>
Vendored
+3 -3
View File
@@ -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
View File
@@ -12,7 +12,9 @@ onLaunch((options) => {
// },
})
} else {
userStore.loadUserInfo()
if (userStore.isLogged) {
userStore.loadUserInfo()
}
}
})
+1
View File
@@ -60,6 +60,7 @@ function useListPageRequest(
customParams = params
}
try {
list.value = []
await loadData()
} finally {
loading.value = false
+4 -2
View File
@@ -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>
+47 -35
View File
@@ -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>
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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 = () => {
+1 -1
View File
@@ -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>
+19 -1
View File
@@ -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>
+10
View File
@@ -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
+63 -38
View File
@@ -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>
+5 -4
View File
@@ -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>
+1 -1
View File
@@ -124,7 +124,7 @@ import { useUserStore } from '@/store/user'
const userStore = useUserStore()
const handleLogout = async () => {
logoutAPI()
// logoutAPI()
userStore.logout()
uni.reLaunch({
url: loginRoute,
+2 -2
View File
@@ -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')
}
/** 申请提现 */