Commit 8c588b34 authored by qd01's avatar qd01

1

parent 1cde9018
import { getHttp } from './http'
export async function getProse() {
const http = getHttp()
return await http('/api/prose', {
method: 'GET',
})
}
......@@ -2,7 +2,7 @@ import type { RouteLocationNormalized } from 'vue-router'
import useKeepalive from '~/composables/keepalive'
export default defineNuxtRouteMiddleware((to: RouteLocationNormalized) => {
useKeepalive().addRoute(to)
// useKeepalive().addRoute(to)
useHead({
title: to.meta.title,
})
......
......@@ -40,7 +40,9 @@ import { validatePhone, validatePassword } from '@/utils/validate'
import { encrypt } from '@/utils/encrypt'
import { post } from '@/utils/request'
import { useDebounceFn } from '@vueuse/core'
import { useProseStore } from '@/stores/prose'
const proseStore = useProseStore()
proseStore.clearProse()
definePageMeta({
layout: 'empty',
})
......
......@@ -7,10 +7,15 @@ 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 pnga2 from '~/static/pages/product/a2.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'
import pngb1 from '~/static/pages/product/b1.png'
import pngb2 from '~/static/pages/product/b2.png'
import pngb3 from '~/static/pages/product/b3.png'
import pngb4 from '~/static/pages/product/b4.png'
import pngb5 from '~/static/pages/product/b5.png'
const pngArr = [
png1,
png2,
......@@ -25,6 +30,13 @@ const pngArr1 = [
pnga4,
pnga5
]
const pngArr2 = [
pngb1,
pngb2,
pngb3,
pngb4,
pngb5
]
definePageMeta({
layout: 'main',
title: '产品信息',
......@@ -70,6 +82,9 @@ const handleJump = (item, index) => {
const preview = (index) => {
ImagePreview(pngArr1[index])
}
const preview1 = (index) => {
ImagePreview(pngArr2[index])
}
onMounted(fetchData)
</script>
......@@ -88,7 +103,7 @@ onMounted(fetchData)
</div>
</transition>
<div class="btngroup">
<div v-if="!(userInfo.q0 < item.a2)" class="btn btn1">查看营业执照</div>
<div @click="preview1(index)" 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>
......
......@@ -11,6 +11,10 @@ const getUserInfo = async () => {
const res = await get("/system/user/")
extend2.value = res.extend2 || 1
userinfo.value = res
if (res.data != 'true') {
showFailToast('请先进行实名认证')
window.history.back()
}
if (extend2.value == 4) {
get("/yw2/getByUser", {}).then(res => {
if (res.code == 200) {
......@@ -75,8 +79,11 @@ function searchCredit1() {
<template>
<div class="container">
<div class="extend21" v-if="extend2 == 1 || extend2 == 2">
<div class="title">查询我的个人</div>
<div class="title">征信信用分报告</div>
<div class="warpbox">
<img src="/static/common/logo.png" alt="">
<div class="title">全国个人征信</div>
<div class="title" style="margin-bottom: 20px;">信用分查询中心</div>
</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="申请人姓名" />
......@@ -84,8 +91,11 @@ function searchCredit1() {
<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 ? '点击查询' :
<div class="tips1" v-if="extend2 == 2">正在查询中...</div>
<div class="tips" style="margin-top: 20px;" v-if="extend2 == 2">请24小时后再来查看个人征信信用分</div>
<div class="tips" v-if="extend2 == 2">根据个人信用分来申请化债额度,最低50万起</div>
<var-button class="btn" v-if="extend2 == 1" size="large" block type="primary" @click="searchCredit">{{ extend2 ==
1 ? '点击查询' :
'查询中' }}
</var-button>
</div>
......@@ -164,23 +174,54 @@ function searchCredit1() {
min-height: 100vh;
width: 100%;
box-sizing: border-box;
padding: 10px;
.extend21 {
height: calc(100vh - 52px);
display: flex;
width: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
.tips {
margin: 20px 40px 0;
.warpbox {
display: flex;
flex-direction: column;
align-items: center;
background: #1a5482;
color: #fff;
width: 100%;
padding-top: 50px;
img {
width: 50px;
margin-bottom: 20px;
}
.title {
font-size: 28px;
font-weight: 700;
}
}
.title {
.tips1 {
font-size: 28px;
font-weight: 700;
color: #656565;
}
.tips {
color: #656565;
font-size: 14px;
font-weight: 700;
}
.tips1 {
margin: 20px 40px 0;
font-size: 26px;
font-weight: 700;
}
}
.extend22 {
......
......@@ -52,5 +52,24 @@ const signIn = async () => {
getSignInInfo()
</script>
<template>
<singIn @change="signIn" type="sign" lang="zh" :checkinDays="checkinDays" :already="signInDates" />
</template>
\ No newline at end of file
<div class="container">
<singIn @change="signIn" type="sign" :isIntegral='true' :integral="2" lang="zh" :checkinDays="checkinDays" :already="signInDates" />
<div class="tips">信用分:用于申请化债,扶贫所用</div>
<div class="tips">生活补贴:可直接提现到本人银行卡直接使用</div>
<div class="tips">每天签到获得2信用分,获得5000生活补贴</div>
<div class="tips">签到满10天获得50信用分</div>
<div class="tips">签到满20天获得200信用分</div>
<div class="tips">签到满30天获得一份中国东方资产管理有限公司的不良资产债权500元扶贫产品(每日可以提现)永久收益</div>
</div>
</template>
<style lang="scss" scoped>
.container{
font-family: pingfang;
.tips{
font-size: 14px;
color: red;
text-align: center;
margin-top: 10px;
}
}</style>
\ No newline at end of file
import { defineStore } from 'pinia'
import { getProse } from '~/api/prose'
import { defineStore } from 'pinia';
export const useProseStore = defineStore(
'prose',
() => {
const prose = ref<string>('')
const prose = ref<string>('');
function initProse(val: string) {
if (!prose.value) {
prose.value = ''
prose.value = val; // 初始化用户数据
if (process.client) {
localStorage.setItem('userData', val); // 存储到 localStorage
}
prose.value = val
}
function clearProse() {
prose.value = ''
prose.value = '';
if (process.client) {
localStorage.removeItem('userData'); // 清空 localStorage
}
}
async function fetchProse() {
const res = await getProse()
initProse(res.result)
function getProseData() {
if (process.client) {
return prose.value || JSON.parse(localStorage.getItem('userData') || '{}'); // 从 localStorage 获取用户数据
}
return {}; // 服务器端返回空对象
}
const loadProseFromStorage = () => {
if (process.client) {
const storedData = localStorage.getItem('userData');
if (storedData) {
prose.value = storedData; // 初始化
}
}
};
loadProseFromStorage(); // 加载数据
return {
prose,
initProse,
clearProse,
fetchProse,
}
getProseData,
};
},
)
);
\ No newline at end of file
......@@ -88,19 +88,18 @@ export default defineNuxtConfig({
],
},
},
vite: {
// plugins: [
// obfuscatorPlugin({
// include: ["src/path/to/file.js", "path/anyjs/**/*.js", /foo.js$/],
// exclude: [/node_modules/],
// apply: "build",
// debugger: true,
// options: {
// debugProtection: true,
// },
// }),
// ],
plugins: [
obfuscatorPlugin({
include: ["src/path/to/file.js", "path/anyjs/**/*.js", /foo.js$/],
exclude: [/node_modules/],
apply: "build",
debugger: true,
options: {
debugProtection: true,
},
}),
],
build: {
target: "esnext",
},
......@@ -112,7 +111,30 @@ export default defineNuxtConfig({
experimental: {
typedPages: true,
},
generate: {
// 在生成的文件名中包含哈希值
subFolders: false,
dir: 'dist',
routes: ['/'],
fallback: true,
interval: 0,
concurrency: 500,
devtools: false,
quiet: false,
analyze: false,
watch: false,
cache: {
maxAge: 1000 * 60 * 60 * 24 * 30 // 30 days
},
http2: {
push: true,
cache: {
maxAge: 1000 * 60 * 60 * 24 * 30 // 30 days
}
},
// 添加版本号或哈希值到文件名
filenameHashing: true
},
devtools: {
enabled: 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