Commit 1cde9018 authored by zhangsan's avatar zhangsan

更新版本

parent 297588c1
......@@ -29,7 +29,7 @@ function handleChange(active1) {
<var-bottom-navigation v-if="show" v-model:active="active" fixed @change="handleChange">
<var-bottom-navigation-item name="home" label="首页" />
<var-bottom-navigation-item name="sqhz" label="申请化债" />
<var-bottom-navigation-item name="product" label="产品" />
<var-bottom-navigation-item name="product" label="不良债权认购" />
<var-bottom-navigation-item name="my" label="个人中心" />
</var-bottom-navigation>
</template>
......@@ -20,6 +20,7 @@ const MY_ICONS = {
}
const MENU_ITEMS = [
{ name: "实名认证", icon: MY_ICONS.withdraw, path: "/user/shiming" },
{ name: "提现记录", icon: MY_ICONS.withdraw, path: "/user/withdraw" },
{ name: "我的产品", icon: MY_ICONS.products, path: "/user/product" },
{ name: "房产兑换记录", icon: MY_ICONS.house, path: "/user/house" },
......@@ -167,7 +168,7 @@ onMounted(fetchData)
<!-- 快捷操作 -->
<div class="quick-actions">
<div v-for="(action, index) in [
{ icon: png4, title: '实名银行卡', type: 1 },
{ icon: png4, title: '绑定银行卡', type: 1 },
{ icon: png5, title: '我的团队', type: 2 }
]" :key="index" class="action-card" v-ripple @click="handleClick1(action.type)">
<img :src="action.icon" :alt="action.title" />
......
......@@ -6,6 +6,11 @@ import png2 from '~/static/pages/product/2.png'
import png3 from '~/static/pages/product/3.png'
import png4 from '~/static/pages/product/4.png'
import png5 from '~/static/pages/product/5.png'
import pnga1 from '~/static/pages/product/a1.png'
import pnga2 from '~/static/pages/product/a1.png'
import pnga3 from '~/static/pages/product/a3.png'
import pnga4 from '~/static/pages/product/a4.png'
import pnga5 from '~/static/pages/product/a5.png'
const pngArr = [
png1,
png2,
......@@ -13,7 +18,13 @@ const pngArr = [
png4,
png5
]
const pngArr1 = [
pnga1,
pnga2,
pnga3,
pnga4,
pnga5
]
definePageMeta({
layout: 'main',
title: '产品信息',
......@@ -56,7 +67,9 @@ const handleJump = (item, index) => {
showFailToast('信用分不足')
}
}
const preview = (index) => {
ImagePreview(pngArr1[index])
}
onMounted(fetchData)
</script>
......@@ -65,18 +78,20 @@ onMounted(fetchData)
<var-loading description="加载中..." :loading="loading">
<transition-group name="card-list" tag="div" class="card-container">
<div v-for="(item, index) in companyList" :key="item.id" class="card"
:class="{ 'card-active': activeIndex === index }" @click="handleJump(item, index)">
:class="{ 'card-active': activeIndex === index }">
<img :src="pngArr[item.id - 1]" :alt="item.a1" class="card-image">
<div class="title">{{ item.a1 }}</div>
<transition name="fade">
<div v-if="userInfo.q0 < item.a2" class="overlay">
<var-icon name="lock-outline" class="lock-icon" />
<span>信用分达到{{ item.a2 }}分解锁</span>
</div>
</transition>
<div class="btn">查看详情</div>
<div class="btngroup">
<div v-if="!(userInfo.q0 < item.a2)" class="btn btn1">查看营业执照</div>
<div class="btn" @click="handleJump(item, index)">查看详情</div>
<div @click="preview(index)" v-if="!(userInfo.q0 < item.a2)" class="btn btn1">查看授权委托书</div>
</div>
</div>
</transition-group>
</var-loading>
......@@ -149,8 +164,8 @@ onMounted(fetchData)
flex-direction: column;
justify-content: center;
align-items: center;
background: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(4px);
background: rgba(0, 0, 0, 0.6);
// backdrop-filter: blur(1px);
color: #fff;
gap: 8px;
......@@ -162,13 +177,26 @@ onMounted(fetchData)
.btn {
width: 100%;
padding: 12px;
padding: 12px 0;
background-color: #e5212a;
color: #fff;
text-align: center;
font-weight: 500;
transition: all 0.3s ease;
border-radius: 0;
}
.btngroup {
display: flex;
.btn {
flex: 1;
font-size: 14px;
}
.btn1 {
background: #7966af;
}
}
// 动画
......
......@@ -24,7 +24,7 @@ getUserInfo()
function handleSubmit() {
// 使用可选链和空值合并运算符进行安全检查
const { a6, a7, a8, a4, a9 } = formData.value ?? {}
if (!a6?.trim() || !a7?.trim() || !a8?.trim() || !a4?.trim() || !a9?.trim()) {
showFailToast('请填写完整信息')
return
......@@ -50,6 +50,13 @@ function handleSubmit() {
})
}
function searchCredit() {
if (userinfo.value.data != 'true') {
showFailToast("请先进行实名认证")
setTimeout(() => {
}, 2000);
return false
}
if (extend2.value == 1) {
post("/yw1/add", {}).then(res => {
showToast('查询已提交,请等待查询结果')
......@@ -70,8 +77,17 @@ function searchCredit1() {
<div class="extend21" v-if="extend2 == 1 || extend2 == 2">
<div class="title">查询我的个人</div>
<div class="title">征信信用分报告</div>
<var-form scroll-to-error="start" style="color: #fff;width: calc(100% - 80px);margin: 0 auto;">
<var-space direction="column" :size="[8, 0]">
<var-input v-model="userinfo.nickName" readonly placeholder="申请人姓名" />
<var-input v-model="userinfo.identityId" readonly placeholder="申请人身份证" />
<var-input v-model="userinfo.q0" readonly placeholder="当前信用分" />
</var-space>
</var-form>
<div class="tips" v-if="extend2 == 2">您好,您的个人征信报告信用分正在查询中,请24小时后再来查看您的个人信用分</div>
<var-button class="btn" size="large" block type="primary" @click="searchCredit">{{ extend2 == 1 ? '点击查询' :
'查询中' }}</var-button>
'查询中' }}
</var-button>
</div>
<div class="extend22" v-if="extend2 == 3">
<div class="zhanwei"></div>
......@@ -127,10 +143,10 @@ function searchCredit1() {
</div>
<div class="extend22" v-if="extend2 == 5">
<div class="card" style="display: flex;flex-direction: column;align-items: center;">
<var-icon name="history" size="100" color="#029ae0"/>
<div class="title">您的征信报告正在审核中,请耐心等待...</div>
<var-divider />
<var-form scroll-to-error="start" style="width: 100%;">
<var-icon name="history" size="100" color="#029ae0" />
<div class="title">您的征信报告正在审核中,请耐心等待...</div>
<var-divider />
<var-form scroll-to-error="start" style="width: 100%;">
<var-space direction="column" :size="[8, 0]">
<var-input v-model="userinfo.nickName" readonly placeholder="申请人姓名" />
<var-input v-model="userinfo.identityId" readonly placeholder="申请人身份证" />
......@@ -151,12 +167,17 @@ function searchCredit1() {
padding: 10px;
.extend21 {
height: 100%;
height: calc(100vh - 52px);
display: flex;
width: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
.tips {
margin: 20px 40px 0;
}
.title {
font-size: 28px;
}
......
<template>
<div class="bgimg in container">
<div class="bgimg ind">
<div class="header-text">
</div>
<div class="card">
<var-form ref="form" scroll-to-error="start">
<var-space direction="column" :size="[14, 0]">
<var-input placeholder="姓名:" :rules="v => !!v || '姓名不能为空'" v-model="username" />
<var-input placeholder="身份证号:" :rules="v => !!v || '身份证号不能为空'" v-model="identityId" />
</var-space>
</var-form>
</div>
<div class="card">
<div class="warpcontent">
<h4 class="content-title">(认证目的)</h4>
<p>
我们致力于提供真实、权威、可信的信息,让每一位用户都能够得到更好的服务和保障。认证是为了核实个人、企业、机构等信息的真实性和可信度,同时保障用户权益。
</p>
<p>为有效保障您的资金安全,提升订单处理效率,请仔细填写您身份证一致的信息。</p>
</div>
</div>
<var-button class="btn" size="large" @click="add" v-if="change" block type="danger">立即认证</var-button>
<var-button class="btn" size="large" v-else block type="primary">认证成功</var-button>
</div>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { encrypt } from "~/utils/encrypt"
import { isValidIDCard } from '~/utils/userInfoCheck'
import { get, post } from '~/utils/request'
definePageMeta({
layout: "default",
title: "实名认证",
name: "shiming",
keepalive: true,
})
const xs = ref(-1)
const title = ref('未实名认证')
const change = ref(true)
const username = ref('')
const identityId = ref('')
// 判断用户是否实名
const shiming = async () => {
try {
const res = await get("/system/user/")
if (res.xsCode || res.xsCode == 0) {
xs.value = res.xsCode
}
if (res.data == "true") {
change.value = false
title.value = "已实名"
username.value = res.nickName
identityId.value = res.identityId
}
} catch (error) {
console.error('获取实名信息失败:', error)
}
}
// 确定提交
const add = async () => {
if (username.value === '' || identityId.value === '') {
showToast('内容不能为空!')
return
}
if (!isValidIDCard(identityId.value)) {
showToast("请输入正确的身份证号")
return
}
try {
const data = {
nickName: username.value,
identityId: encrypt(identityId.value),
}
const res = await post("/system/user/certified", data)
if (res.code == 200) {
showToast({
message: res.msg,
type: 'success'
})
setTimeout(() => {
navigateTo('/')
}, 1000)
} else {
showToast(res.msg)
}
} catch (error) {
console.error('认证失败:', error)
showToast('认证失败,请重试')
}
}
onMounted(() => {
shiming()
})
</script>
<style lang="scss" scoped>
.container {
font-family: pingfang, sans-serif;
min-height: 100vh;
background: #195482;
}
.ind {
box-sizing: border-box;
padding-top: 20px;
}
.header-text {
color: #000;
padding: 0 10px;
font-size: 16px;
margin: 15px 0 10px;
}
.card {
background: #fff;
border-radius: 8px;
padding: 15px;
margin: 10px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
.card-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 15px;
}
}
.warpcontent {
color: #ff4d4f;
.content-title {
font-size: 16px;
font-weight: 700;
text-align: center;
margin-bottom: 10px;
}
p {
text-indent: 2em;
margin-bottom: 10px;
line-height: 1.5;
}
}
.btn{
margin: 0 auto;
width: calc(100% - 20px);
}
</style>
\ No newline at end of file
<template>
<view class="container">
<view class="pop">
<view class="top">
<text class="title">支付金额</text>
<text class="money">¥ {{ mony }}</text>
</view>
<view class="product-name">
商品名称:{{ title }}
</view>
<view class="pays">
<u-radio-group v-model="radiovalue" placement="column">
<uni-card class="payment-card">
<uv-cell class="item" v-for="(item, index) in paymentMethods" v-if="item.visible" :key="index">
<template v-slot:title>
<view class="leftbox">
<image :src="item.icon" mode="" class="payment-icon"></image>
<view class="text">{{ item.label }}</view>
</view>
</template>
<template v-slot:right-icon>
<u-radio :name="item.name" activeColor="#07c160"></u-radio>
</template>
</uv-cell>
</uni-card>
</u-radio-group>
</view>
</view>
<button class="btn-submit" @click="submit">立即支付</button>
</view>
</template>
<script>
import wx from '@/static/payup/wx.svg'
import zfb from '@/static/payup/zfb.svg'
import yinlian from '@/static/payup/yinlian.svg'
import jlj from '@/static/payup/jlj.svg'
import fh from '@/static/payup/fh.svg'
import yj from '@/static/payup/yj.svg'
function generateUniqueValue() {
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let result = '';
for (let i = 0; i < 99; i++) {
const randomIndex = Math.floor(Math.random() * chars.length);
result += chars[randomIndex];
}
return result;
}
const generateUniqueKey = generateUniqueValue()
export default {
props: {
isBindpay: { default: false },
isBindc: { default: false },
dw: { default: '' },
notifyData: { default: '' },
zfsm: { default: '' },
withdrawType: { default: null },
bankId: { default: null },
productId: { default: null },
password: { default: false },
payway: { default: null },
type: { default: null },
wechat: { default: 0 },
zfb: { default: 0 },
ysf: { default: 0 },
tzj: { default: 0 },
jtqb: { default: 0 },
dtqb: { default: 0 },
title: { default: '你好' },
subjoin: { default: '' },
show: { default: false },
mony: { default: 0 },
btn: { default: '确认支付' },
needCheck: { default: false },
url: { default: '' },
},
data() {
return {
paymentMethods: [
{ name: 'wechat', label: '微信支付', icon: wx, visible: this.wechat == 1 },
{ name: 'ali', label: '支付宝支付', icon: zfb, visible: this.zfb == 1 },
{ name: 'yl', label: '云闪付', icon: yinlian, visible: this.ysf == 1 },
{ name: 'tzj', label: '保额', icon: jlj, visible: this.tzj == 1 },
{ name: 'jtqb', label: '体验金', icon: fh, visible: this.jtqb == 1 },
{ name: 'dtqb', label: '动态钱包', icon: yj, visible: this.dtqb == 1 }
],
mm: null,
seconds: 6,
iscould: false,
passshow: false,
pass: '',
radiovalue: 'ali',
zhifulist: [],
text1: '该笔费用为开通国际银行卡跨国转账至中国境内银行卡手续费,该费用由中国银保监会收取',
text2: '该笔款项是一带一路银行卡绑定第三方支付手续费,费用由第三方收取',
}
},
methods: {
countDown() {
if (this.seconds > 0) {
this.seconds--;
setTimeout(this.countDown, 1000);
} else {
this.iscould = ""
this.seconds = 6;
}
},
close() {
this.$emit('close', false)
},
passclose() {
this.pass = ''
this.passshow = false
},
finish(e) {
if (this.pass == this.mm) {
this.pay()
} else {
uni.showToast({
title: '密码输入错误',
icon: 'none'
})
}
this.passclose()
this.close()
},
submit() {
if (this.password) {
this.$request("/system/user/", {}, "get").then((res) => {
this.mm = res.data.email
this.passshow = true
})
this.passshow = true
this.close()
} else {
this.needCheck ? this.$emit('beforeClick', generateUniqueKey) : ''
this.pay()
}
},
pay() {
this.iscould = "false"
let timer1 = setTimeout(() => {
this.countDown()
clearTimeout(timer1);
}, 1000);
if (!this.radiovalue) {
uni.showToast({
title: "请选择支付方式",
icon: "none"
})
return
}
let data = {
productId: this.productId,
remark: this.radiovalue,
balance: this.mony,
type: this.type,
}
this.needCheck ? data.bakCol3 = generateUniqueKey : ''
this.$request(`${this.url}`, data, 'post', true).then((res) => {
if (res.data.code == 200) {
let script = res.data.msg
location.href = script
this.close()
} else {
uni.showToast({
title: res.data.msg,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.container {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: #f5f5f5;
min-height: 100vh;
}
.pop {
background: #ffffff;
.top {
text-align: center;
padding: 30rpx 20rpx;
background: #fff;
border-bottom: 1px solid #eee;
.title {
font-size: 28rpx;
color: #333;
margin-bottom: 16rpx;
}
.money {
font-size: 40rpx;
color: #333;
font-weight: 500;
}
}
}
.payment-card {
background: #fff;
margin: 0;
padding: 0;
box-shadow: none;
}
.item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx 32rpx;
background: #fff;
border-bottom: 1px solid #eee;
.leftbox {
display: flex;
align-items: center;
gap: 20rpx;
.payment-icon {
width: 44rpx;
height: 44rpx;
}
.text {
font-size: 28rpx;
color: #333;
}
}
}
// 右侧单选框样式
:deep(.u-radio) {
.u-radio__icon {
color: #07c160;
font-size: 36rpx;
}
}
.btn-submit {
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: 0;
height: 90rpx;
background-color: #07c160;
color: white;
font-size: 32rpx;
border: none;
border-radius: 0;
&:active {
opacity: 0.9;
}
}
// 商品名称样式
.product-name {
font-size: 26rpx;
color: #999;
padding: 20rpx 32rpx;
background: #fff;
border-bottom: 1px solid #eee;
}
</style>
\ No newline at end of file
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