This commit is contained in:
2026-06-29 14:09:46 +08:00
parent 4f041ffa37
commit 7e73312838
23 changed files with 365 additions and 1250 deletions

View File

@@ -1,22 +1,10 @@
<script setup>
import { computed } from 'vue'
import bgIcon from '/static/images/bg_icon.png'
import bannerImg from '/static/images/index/banner_1.png'
import bannerImg2 from '/static/images/index/banner_2.png'
import bannerImg3 from '/static/images/index/banner_3.png'
import honestyBanner from '/static/images/index/banner_B.png'
import companyIcon from '/static/images/index/company_bg.png'
import housekeepingRiskIcon from '/static/images/index/housekeeping_risk_bg.png'
import loanCheckIcon from '/static/images/index/loan_check_bg.png'
import marriageRiskIcon from '/static/images/index/marriage_risk_bg.png'
import personalDataIcon from '/static/images/index/personal_data_bg.png'
import preLoanRiskIcon from '/static/images/index/preloan_risk_bg.png'
import rentalInfoBg from '/static/images/index/rentalinfo_bg.png'
import rightIcon from '/static/images/index/right.png'
import indexPromoteIcon from '/static/images/index/tgbg.png'
import indexMyReportIcon from '/static/images/index/wdbg.png'
import indexInvitationIcon from '/static/images/index/yqhy.png'
import { useAppConfig } from '@/composables/useAppConfig'
import { ensurePrivacyConsentIfNeeded } from '@/composables/usePrivacyConsent'
definePage({ layout: 'home' })
@@ -27,28 +15,6 @@ onShow(() => {
const banners = [bannerImg, bannerImg2, bannerImg3]
const services = [
{ title: '个人大数据', name: 'personalData', bg: personalDataIcon },
{ title: '婚恋风险', name: 'marriage', bg: marriageRiskIcon },
{ title: '入职背调', name: 'backgroundcheck', bg: preLoanRiskIcon },
]
const riskServices = [
{ title: '小微', name: 'companyinfo', bg: companyIcon },
{ title: '家政', name: 'homeservice', bg: housekeepingRiskIcon },
{ title: '贷前', name: 'preloanbackgroundcheck', bg: loanCheckIcon },
{ title: '诚信租赁', name: 'rentalinfo', bg: rentalInfoBg },
]
const { appConfig, loadAppConfig } = useAppConfig()
const queryRetentionDaysText = computed(() => `${appConfig.value.query.retention_days}`)
void loadAppConfig()
function toInquire(name) {
uni.navigateTo({
url: `/pages/inquire?feature=${encodeURIComponent(name)}`,
})
}
function toInvitation() {
uni.navigateTo({ url: '/pages/invitation' })
}
@@ -56,112 +22,70 @@ function toInvitation() {
function toPromote() {
uni.navigateTo({ url: '/pages/promote' })
}
function toHistory() {
uni.navigateTo({ url: '/pages/history-query' })
}
</script>
<template>
<view class="box-border min-h-screen">
<view class="relative p-4">
<swiper class="banner-swiper overflow-hidden rounded-xl" circular autoplay :interval="3000" indicator-dots
indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#ffffff">
<swiper-item v-for="(item, index) in banners" :key="index">
<view class="box-border min-h-screen bg-[#f5faff] pb-4">
<view class="m-4 overflow-hidden rounded-2xl">
<swiper
class="banner-swiper w-full"
circular
autoplay
:interval="3000"
indicator-dots
indicator-color="rgba(255,255,255,0.45)"
indicator-active-color="#ffffff"
>
<swiper-item v-for="(item, index) in banners" :key="index" class="h-full w-full">
<image :src="item" class="h-full w-full" mode="aspectFill" />
</swiper-item>
</swiper>
</view>
<view class="px-6">
<view class="grid grid-cols-3 gap-3">
<view class="flex flex-col items-center justify-center text-center" @click="toPromote">
<view
class="box-content h-16 w-16 flex items-center justify-center rounded-full from-white to-blue-100/10 bg-gradient-to-b p-1 shadow-lg">
<image :src="indexPromoteIcon" class="h-12 w-12" mode="aspectFit" />
</view>
<text class="mt-1 text-center font-bold">
推广报告
</text>
</view>
<view class="flex flex-col items-center justify-center text-center" @click="toInvitation">
<view
class="box-content h-16 w-16 flex items-center justify-center rounded-full from-white to-blue-100/10 bg-gradient-to-b p-1 shadow-lg">
<image :src="indexInvitationIcon" class="h-12 w-12" mode="aspectFit" />
</view>
<text class="mt-1 text-center font-bold">
邀请下级
</text>
</view>
<view class="flex flex-col items-center justify-center text-center" @click="toHistory">
<view
class="box-content h-16 w-16 flex items-center justify-center rounded-full from-white to-blue-100/10 bg-gradient-to-b p-1 shadow-lg">
<image :src="indexMyReportIcon" class="h-12 w-12" mode="aspectFit" />
</view>
<text class="mt-1 text-center font-bold">
我的报告
</text>
</view>
</view>
</view>
<view class="relative p-4 pt-0">
<view class="grid grid-cols-2 my-4 gap-4" style="grid-template-rows: repeat(2, 1fr);">
<view v-for="(service, index) in services" :key="index"
class="relative min-h-18 flex flex-col rounded-xl px-4 py-2 shadow-lg"
:class="index === 0 ? 'row-span-2' : ''"
:style="`background: url(${service.bg}) no-repeat; background-size: 100% 100%; background-position: center;`"
@click="toInquire(service.name)">
<view class="min-h-18 flex items-end">
<!-- <text class="text-base text-gray-700 font-semibold">
{{ service.title }}
</text> -->
</view>
</view>
<view class="mt-2 px-4">
<view class="mb-2 text-base text-gray-800 font-bold">
即刻赚佣金
</view>
<scroll-view scroll-x class="risk-scroll my-4 px-1 pb-4 pt-2 -mx-1">
<view class="inline-flex gap-2">
<view v-for="(service, index) in riskServices" :key="index"
class="relative h-24 w-[107px] flex-shrink-0 rounded-xl shadow-lg"
:style="`background: url(${service.bg}) no-repeat; background-size: 100% 100%; background-position: center;`"
@click="toInquire(service.name)">
<view class="h-full flex items-end px-2 py-2">
<!-- <text class="text-sm text-gray-700 font-semibold">
{{ service.title }}
</text> -->
</view>
<view
class="card-gradient-1 mb-4 flex items-center rounded-2xl p-0 shadow-xl"
@click="toPromote"
>
<view class="flex flex-1 flex-col items-start justify-center py-4 pl-4">
<view class="mb-1 text-[20px] text-blue-700 font-bold">
直推报告
</view>
<view class="mb-4 text-xs text-gray-700">
选择所需报告类型灵活定价一键分享客户客户下单即结算佣金实时到账
</view>
<wd-button plain>
立即推广
</wd-button>
</view>
</scroll-view>
<view class="mb-3 mt-6 flex items-center">
<view class="bg-primary h-5 w-1.5 rounded-xl" />
<text class="ml-2 text-lg text-gray-800">
诚信专栏
</text>
<image class="mx-4 my-4 h-20 w-20" :src="indexPromoteIcon" mode="aspectFit" />
</view>
<view class="mt-4 overflow-hidden rounded-xl bg-white shadow-xl">
<image :src="honestyBanner" class="block w-full" mode="widthFix" />
<view
class="card-gradient-2 flex items-center rounded-2xl p-0 shadow-xl"
@click="toInvitation"
>
<view class="flex flex-1 flex-col items-start justify-center py-4 pl-4">
<view class="mb-1 text-[20px] text-teal-700 font-bold">
邀请下级代理
</view>
<view class="mb-4 text-xs text-gray-700">
邀请好友成为代理好友推广获客客户支付即返佣团队收益轻松到手
</view>
<wd-button plain>
立即邀请
</wd-button>
</view>
<image class="mx-4 my-4 h-20 w-20" :src="indexInvitationIcon" mode="aspectFit" />
</view>
<view class="mt-4 box-border h-14 w-full flex items-center rounded-lg bg-white px-4 text-gray-700 shadow-lg"
@click="toHistory">
<view class="mr-4 h-full flex items-center justify-center">
<image class="h-10 w-10" :src="bgIcon" mode="aspectFit" />
</view>
<view class="flex-1">
<view class="text-gray-800">
我的历史查询记录
</view>
<view class="text-xs text-gray-500">
查询记录有效期为{{ queryRetentionDaysText }}
</view>
</view>
<image :src="rightIcon" class="h-6 w-6" mode="aspectFit" />
<view class="relative mt-4 h-[120px] overflow-hidden rounded-2xl shadow-xl">
<image class="absolute inset-0 h-full w-full" :src="honestyBanner" mode="aspectFill" />
<view class="absolute inset-0 bg-black/5" />
</view>
</view>
</view>
@@ -172,7 +96,17 @@ function toHistory() {
height: 160px;
}
.risk-scroll {
white-space: nowrap;
.card-gradient-1 {
background: linear-gradient(135deg, #e3f0ff 0%, #fafdff 100%);
box-shadow:
0 6px 24px 0 rgba(60, 120, 255, 0.1),
0 1.5px 4px 0 rgba(60, 120, 255, 0.08);
}
.card-gradient-2 {
background: linear-gradient(135deg, #e6f7fa 0%, #fafdff 100%);
box-shadow:
0 6px 24px 0 rgba(0, 200, 180, 0.1),
0 1.5px 4px 0 rgba(0, 200, 180, 0.08);
}
</style>