Commit b68942c0 authored by zhangsan's avatar zhangsan

1

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