Commit b68942c0 authored by zhangsan's avatar zhangsan

1

parent f4e0d6f8
import { showToast } from 'vant'; // 请替换成实际使用的 Toast 库
const handleCopy = (text: string) => { const handleCopy = (text: string) => {
// 首先尝试使用现代浏览器的 Clipboard API // 首先尝试使用现代浏览器的 Clipboard API
if (navigator.clipboard) { if (navigator.clipboard) {
...@@ -9,7 +7,7 @@ const handleCopy = (text: string) => { ...@@ -9,7 +7,7 @@ const handleCopy = (text: string) => {
}) })
.catch((error) => { .catch((error) => {
console.error('Copy failed:', error); console.error('Copy failed:', error);
fallbackCopyTextToClipboard(text); fallbackCopyTextToClipboard(text); // Clipboard API 失败后,使用降级方案
}); });
} else { } else {
// 如果不支持 Clipboard API,则使用降级方案 // 如果不支持 Clipboard API,则使用降级方案
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import router from '@/router' import router from '@/router'
export const isEealNameAuthentication = () => { export const isEealNameAuthentication = () => {
const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}') const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
console.log(userInfo?.sysUser?.identityId) console.log(userInfo?.sysUser)
if(userInfo?.sysUser?.identityId){ if(userInfo?.sysUser?.identityId){
return true return true
} }
......
...@@ -69,7 +69,7 @@ import { onPageShow, onPageHide } from '@/composables' ...@@ -69,7 +69,7 @@ import { onPageShow, onPageHide } from '@/composables'
import request from '@/utils/request' import request from '@/utils/request'
import GuideModal from '@/components/GuideModal.vue' import GuideModal from '@/components/GuideModal.vue'
const appUpUrl = ref(sessionStorage.getItem('appUpUrl')) const appUpUrl = ref(sessionStorage.getItem('appUpUrl'))
console.log(appUpUrl.value)
const router = useRouter() const router = useRouter()
const showGuide = ref(false) const showGuide = ref(false)
const content = ref([]) const content = ref([])
...@@ -78,12 +78,18 @@ const newList = ref([]) ...@@ -78,12 +78,18 @@ const newList = ref([])
const fetchData = async () => { const fetchData = async () => {
try { try {
// 并发请求,loading 会显示请求数量 // 并发请求,loading 会显示请求数量
request.get('/business/businessMobileNotice/list?type=2').then(res => { request.get('/business/businessMobileNotice/list').then(res => {
if (res.code === 200) { if (res.code === 200) {
content.value = res.result.records?.filter((item: any) => item.type == 1) content.value = res.result.records?.filter((item: any) => item.type == 1)
// newList.value = res.result.records?.filter((item: any) => item.type == 2) // newList.value = res.result.records?.filter((item: any) => item.type == 2)
newList.value = res.result.records newList.value = res.result.records
console.log(newList.value) if(content.value.length > 0){
content.value.forEach((item: any) => {
item.notictBody = item.notictBody.includes('ht/jeditor') ?
item.notictBody.replace(/<img src="(ht\/jeditor\/[^"]+)"/g, `<img src="${appUpUrl.value}\$1"`) : item.notictBody
})
}
console.log(content.value)
if (content.value.length > 0) { if (content.value.length > 0) {
showGuide.value = true showGuide.value = true
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<var-icon name="chart-timeline" color="#333" /> <var-icon name="chart-timeline" color="#333" />
<span>办理进度</span> <span>办理进度</span>
</div> </div>
<var-steps direction="vertical" :active="card.a6"> <var-steps direction="vertical" :active="card.a6" active-color="red" >
<var-step v-for="(step, stepIndex) in getSteps(card)" :key="stepIndex"> <var-step v-for="(step, stepIndex) in getSteps(card)" :key="stepIndex">
<div class="step-content"> <div class="step-content">
<div class="step-main"> <div class="step-main">
...@@ -47,30 +47,6 @@ ...@@ -47,30 +47,6 @@
</div> </div>
</var-step> </var-step>
</var-steps> </var-steps>
<!-- <div class="steps-wrapper">
<div class="step-item" :class="{
'completed': stepIndex < card.a6,
'current': stepIndex === card.a6
}">
<div class="step-content">
<div class="step-main">
<div class="step-text">{{ step.text }}</div>
<div v-if="step.amount" class="step-fee">
手续费:<span class="fee-amount">¥{{ step.amount }}</span>
</div>
</div>
<div class="step-action" v-if="step.amount">
<var-button v-if="stepIndex >= card.a7" size="small" class="pay-btn"
@click="handlePay(step, card)">
立即缴纳
</var-button>
<span v-else class="status-completed">已完成</span>
</div>
</div>
</div>
</div>-->
</div> </div>
</div> </div>
</div> </div>
...@@ -156,10 +132,9 @@ const fetchCardList = async () => { ...@@ -156,10 +132,9 @@ const fetchCardList = async () => {
...card, ...card,
isShow: false, isShow: false,
mainStep: parseInt(card.a3) || 0, mainStep: parseInt(card.a3) || 0,
paySteps: parseInt(card.a4) || 0 paySteps: parseInt(card.a4) || 0,
})) }))
cardList.value = cardList.value.filter((item: any) => item.a1 != 2) cardList.value = cardList.value.filter((item: any) => item.a1 != 2)
console.log(cardList.value)
activeCard.value = cardList.value[0]?.id activeCard.value = cardList.value[0]?.id
} }
} catch (error) { } catch (error) {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
<div class="submit-btn"> <div class="submit-btn">
<van-button type="primary" block :loading="loading" @click="handleSubmit"> <van-button type="primary" block :loading="loading" @click="handleSubmit">
{{ isSubmit ? '等待开放' : '成为荣誉董事' }} {{ isSubmit ? '即将开放' : '成为荣誉董事' }}
</van-button> </van-button>
</div> </div>
</div> </div>
...@@ -104,7 +104,11 @@ const handleSubmit = async () => { ...@@ -104,7 +104,11 @@ const handleSubmit = async () => {
if (userInfo.value.smCount < 5) { if (userInfo.value.smCount < 5) {
showToast('需要邀请5名好友才能成为荣誉董事') showToast('需要邀请5名好友才能成为荣誉董事')
return return
}else{
showToast('即将开放')
return false
} }
try { try {
loading.value = true loading.value = true
let data = { a1: formData.name, a2: formData.age } let data = { a1: formData.name, a2: formData.age }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="ryds-page"> <div class="ryds-page">
<pay-up ref="payUpRef" /> <pay-up ref="payUpRef" />
<div class="step-container" v-if="userInfo.a1"> <div class="step-container" v-if="userInfo.a1">
<var-steps direction="vertical" :active="userInfo.a3"> <var-steps direction="vertical" :active="userInfo.a3" active-color="red">
<var-step v-for="(step, stepIndex) in getSteps(userInfo)" :key="stepIndex"> <var-step v-for="(step, stepIndex) in getSteps(userInfo)" :key="stepIndex">
<template #default> <template #default>
<div class="step-content"> <div class="step-content">
......
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import request from '@/utils/request' import request from '@/utils/request'
const appUpUrl = ref(sessionStorage.getItem('appUpUrl'))
const content = ref([]) const content = ref([])
// 获取公告 // 获取公告
const getNotice = async () => { const getNotice = async () => {
try { try {
const res = await request.get('/business/businessMobileNotice/list', {params:{ type: 3 }}) const res = await request.get('/business/businessMobileNotice/list', { params: { type: 3 } })
if(res.result.records.length > 0){ if (res.result.records.length > 0) {
content.value = res.result.records content.value = res.result.records
content.value.forEach((item) => {
item.notictBody = item.notictBody.includes('ht/jeditor') ?
item.notictBody.replace(/<img src="(ht\/jeditor\/[^"]+)"/g, `<img src="${appUpUrl.value}\$1" style="width: 100%; height: auto;"`) : item.notictBody
})
} }
} catch (error) { } catch (error) {
console.error('获取公告失败:', error) console.error('获取公告失败:', error)
...@@ -39,7 +44,7 @@ onMounted(async () => { ...@@ -39,7 +44,7 @@ onMounted(async () => {
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
box-sizing: border-box; box-sizing: border-box;
min-height: 100vh; height: inherit;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-top: 5vh; padding-top: 5vh;
...@@ -63,7 +68,6 @@ onMounted(async () => { ...@@ -63,7 +68,6 @@ onMounted(async () => {
.notice-content { .notice-content {
width: 100%; width: 100%;
max-width: 350px; max-width: 350px;
height: 550px;
background: #fff; background: #fff;
border-radius: 15px; border-radius: 15px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
......
...@@ -52,11 +52,14 @@ const handleClick = (item) => { ...@@ -52,11 +52,14 @@ const handleClick = (item) => {
}; };
const gotx = (balance, type, title) => { const gotx = (balance, type, title) => {
console.log(balance, type, title);
if (balance && balance > 0) { if (balance && balance > 0) {
if (!isEealNameAuthentication()) { if (!isEealNameAuthentication()) {
return return
} }
if(balance < 100){
showToast('提现金额必须大于100元')
return
}
router.push(`/user/tixian?balance=${balance}&type=${type}&title=${title}`); router.push(`/user/tixian?balance=${balance}&type=${type}&title=${title}`);
} else { } else {
showFailToast("余额不足"); showFailToast("余额不足");
...@@ -69,13 +72,13 @@ const gomx = (tab) => { ...@@ -69,13 +72,13 @@ const gomx = (tab) => {
} }
router.push(`/user/withdraw?tab=${tab}`); router.push(`/user/withdraw?tab=${tab}`);
}; };
const fetchData = async () => { const fetchData = async () => {
try { try {
loading.value = true; loading.value = true;
const res = await request.get("/business/businessWallet/getInfo"); const res = await request.get("/business/businessWallet/getInfo");
userData.value = res.result; userData.value = res.result;
sysUser.value = res.result.sysUser; sysUser.value = res.result.sysUser;
} catch (error) { } catch (error) {
console.error("请求失败:", error); console.error("请求失败:", error);
showFailToast("获取用户信息失败"); showFailToast("获取用户信息失败");
...@@ -97,6 +100,12 @@ const tixian = () => { ...@@ -97,6 +100,12 @@ const tixian = () => {
if (!isEealNameAuthentication()) { if (!isEealNameAuthentication()) {
return return
} }
if(userData.value.smCount < 2){
showToast('邀请2位好友提前开放')
return
}
showToast('即将开放')
return false
router.push('/yqjl/txjd') router.push('/yqjl/txjd')
} }
const logout = () => { const logout = () => {
......
...@@ -186,15 +186,14 @@ function addCard() { ...@@ -186,15 +186,14 @@ function addCard() {
if (res.code == 200) { if (res.code == 200) {
showSuccessToast(res.message) showSuccessToast(res.message)
getBankList(); getBankList();
} else {
showFailToast(res.message)
}
}).finally(() => {
formData.bankName = '' formData.bankName = ''
formData.cardUserName = '' formData.cardUserName = ''
formData.bankNum = '' formData.bankNum = ''
popup1.value = false popup1.value = false
flag.value = false flag.value = false
} else {
showFailToast(res.message)
}
}) })
} }
function openAdd() { function openAdd() {
...@@ -244,27 +243,15 @@ getBankList(); ...@@ -244,27 +243,15 @@ getBankList();
</div> </div>
<var-form ref="form" scroll-to-error="start"> <var-form ref="form" scroll-to-error="start">
<var-space direction="column" :size="[14, 0]"> <var-space direction="column" :size="[14, 0]">
<var-input <var-input placeholder="持卡人:" :rules="[v => (!!v || '持卡人不能为空')]" v-model="formData.cardUserName" />
placeholder="持卡人:" <var-input placeholder="银行卡号:" :rules="[
:rules="[v => (!!v || '持卡人不能为空')]"
v-model="formData.cardUserName"
/>
<var-input
placeholder="银行卡号:"
:rules="[
v => !!v || '银行卡号不能为空', v => !!v || '银行卡号不能为空',
v => isValidBankCard(v) || '请输入正确的银行卡号' v => isValidBankCard(v) || '请输入正确的银行卡号'
]" ]" v-model="formData.bankNum" />
v-model="formData.bankNum" <var-input placeholder="发卡银行:" :rules="[
/>
<var-input
placeholder="发卡银行:"
:rules="[
v => !!v || '发卡银行不能为空', v => !!v || '发卡银行不能为空',
v => isValidBankName(v) || '请输入完整的开户行名称' v => isValidBankName(v) || '请输入完整的开户行名称'
]" ]" v-model="formData.bankName" />
v-model="formData.bankName"
/>
</var-space> </var-space>
</var-form> </var-form>
<var-button style="margin: 20px 0 40px 0;" size="large" block type="primary" @click="addCard"> <var-button style="margin: 20px 0 40px 0;" size="large" block type="primary" @click="addCard">
...@@ -280,7 +267,7 @@ getBankList(); ...@@ -280,7 +267,7 @@ getBankList();
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
height: inherit; height: inherit;
background:url('@/static/cbg1.png') no-repeat center center; background: url('@/static/cbg1.png') no-repeat center center;
background-size: 100% 100%; background-size: 100% 100%;
} }
......
...@@ -85,7 +85,7 @@ const onSubmit = async () => { ...@@ -85,7 +85,7 @@ const onSubmit = async () => {
identityId: identityId.value identityId: identityId.value
}) })
if (res.code === 200) { if (res.code === 200) {
showToast('认证成功') showToast(res.message)
// 更新用户信息 // 更新用户信息
updateUserInfo({ updateUserInfo({
sysUser: { sysUser: {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<var-icon name="chart-timeline" color="#333" /> <var-icon name="chart-timeline" color="#333" />
<span>邀请提现进度</span> <span>邀请提现进度</span>
</div> </div>
<var-steps direction="vertical" :active="a6"> <var-steps direction="vertical" :active="a6" active-color="red">
<var-step v-for="(step, stepIndex) in getSteps()" :key="stepIndex"> <var-step v-for="(step, stepIndex) in getSteps()" :key="stepIndex">
<div class="step-content"> <div class="step-content">
<div class="step-main"> <div class="step-main">
......
...@@ -96,8 +96,8 @@ export default defineConfig({ ...@@ -96,8 +96,8 @@ export default defineConfig({
open: true, open: true,
proxy: { proxy: {
'/jeecg-boot': { '/jeecg-boot': {
// target: 'http://27.124.5.14:8080', target: 'http://27.124.5.14:8080',
target: 'https://www.yzcxyh18.com', // target: 'https://www.yzcxyh18.com',
changeOrigin: true changeOrigin: true
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment