2025-10-24
金融修改
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/finance/service",
|
||||
"path": "pages/my/commonProblem",
|
||||
"style": {
|
||||
"navigationBarTitleText": "客服中心",
|
||||
"navigationStyle": "custom"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="finance-container">
|
||||
<u-navbar :is-back="false" title="金融理财" :background="{ background: 'transparent' }" title-color="#FFFFFF"></u-navbar>
|
||||
<u-navbar :is-back="false" title="金融理财" :border-bottom="false" :background="{ background: 'transparent' }"
|
||||
title-color="#FFFFFF"></u-navbar>
|
||||
<!-- 可滚动的内容区域 -->
|
||||
<view class="content-container" :style="'height:'+height+'px'">
|
||||
<view class="searchFilter" id="searchFilterId">
|
||||
@@ -11,19 +12,18 @@
|
||||
</view>
|
||||
|
||||
<view class="product-list" :style="'height:'+scrollHeight+'px'">
|
||||
<scroll-view scroll-y="true" style="height: 100%;" v-if="productList.length!=0" @scrolltolower="loadData">
|
||||
<view class="product-item" v-for="item in productList" :key="item.id">
|
||||
<scroll-view scroll-y="true" style="height: 100%;" v-if="productList.length!=0"
|
||||
@scrolltolower="loadData">
|
||||
<view class="product-item" v-for="item in productList" :key="item.id"
|
||||
@click="handleproduction(item)">
|
||||
<view class="product-name">
|
||||
{{item.name}}
|
||||
{{item.productName}}
|
||||
</view>
|
||||
<view class="product-rate">
|
||||
利率:{{item.rate}}%
|
||||
利率:{{item.expectedReturnRate}}%
|
||||
</view>
|
||||
<view class="product-intro">
|
||||
产品简介:{{item.introduction}}
|
||||
</view>
|
||||
<view class="product-detail-link" @click="handleproduction(item)">
|
||||
查看详情
|
||||
公司:{{item.company}}
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore color="#666" :status="status" />
|
||||
@@ -53,10 +53,10 @@
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
let screenHeight = res.screenHeight
|
||||
uni.createSelectorQuery().in(instance?.proxy).select("#tabbarId").boundingClientRect((data: any) => {
|
||||
uni.createSelectorQuery().in(instance?.proxy).select("#tabbarId").boundingClientRect((data : any) => {
|
||||
height.value = screenHeight - data.height
|
||||
}).exec()
|
||||
uni.createSelectorQuery().in(instance?.proxy).select("#searchFilterId").boundingClientRect((data: any) => {
|
||||
uni.createSelectorQuery().in(instance?.proxy).select("#searchFilterId").boundingClientRect((data : any) => {
|
||||
scrollHeight.value = height.value - data.height
|
||||
}).exec()
|
||||
}
|
||||
@@ -76,62 +76,31 @@
|
||||
// 加载数据
|
||||
const loadData = () => {
|
||||
if (status.value == 'nomore') return
|
||||
|
||||
|
||||
financeAPI.getList(params.value).then(res => {
|
||||
console.log('API返回数据:', res)
|
||||
|
||||
if (res.data && res.data.list) {
|
||||
// 检查数据结构并映射字段
|
||||
const mappedList = res.data.list.map((item: any, index: number) => ({
|
||||
id: item.id || index,
|
||||
name: item.productName || item.name || '未知产品',
|
||||
rate: item.interestRate || item.rate || '0',
|
||||
introduction: item.desc || item.introduction || item.productDesc || '暂无简介'
|
||||
}))
|
||||
|
||||
productList.value = productList.value.concat(mappedList)
|
||||
console.log('当前产品列表:', productList.value)
|
||||
productList.value = productList.value.concat(res.data.list)
|
||||
}
|
||||
|
||||
status.value = 'nomore'
|
||||
uni.stopPullDownRefresh()
|
||||
}).catch(err => {
|
||||
console.error('API调用失败:', err)
|
||||
status.value = 'nomore'
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
}
|
||||
|
||||
// 查看详情 - 传递完整产品数据
|
||||
const handleproduction = (item: any) => {
|
||||
console.log('点击查看详情,产品数据:', item)
|
||||
|
||||
// 确保数据包含必要的字段
|
||||
const productData = {
|
||||
name: item.name || '未知产品',
|
||||
rate: item.rate || '0',
|
||||
introduction: item.introduction || '暂无简介'
|
||||
}
|
||||
|
||||
console.log('准备传递的产品数据:', productData)
|
||||
|
||||
// 将产品数据转换为JSON字符串传递
|
||||
const encodedData = encodeURIComponent(JSON.stringify(productData))
|
||||
console.log('编码后的数据:', encodedData)
|
||||
|
||||
const handleproduction = (item : any) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/finance/production?productData=${encodedData}`
|
||||
url: `/pages/finance/production?id=${item.id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 查询
|
||||
const handleSearch = () => {
|
||||
params.value = {
|
||||
page: 1,
|
||||
size: defaultSize,
|
||||
keyword: params.value.keyword
|
||||
}
|
||||
params.value.page = 1
|
||||
productList.value = []
|
||||
status.value = 'loadmore'
|
||||
loadData()
|
||||
}
|
||||
|
||||
@@ -199,12 +168,12 @@
|
||||
|
||||
// 移除产品简介显示 */
|
||||
.product-intro {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 20rpx;
|
||||
display: block; // 确保显示
|
||||
}
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 20rpx;
|
||||
display: block; // 确保显示
|
||||
}
|
||||
|
||||
.product-detail-link {
|
||||
font-size: 24rpx;
|
||||
|
||||
@@ -4,87 +4,51 @@
|
||||
back-icon-color="#fff" title-color="#fff">
|
||||
</u-navbar>
|
||||
|
||||
|
||||
|
||||
<!-- 产品头部信息 -->
|
||||
<view class="product-header">
|
||||
<view class="product-name">
|
||||
{{ productInfo.name }}
|
||||
{{ productInfo.productName }}
|
||||
</view>
|
||||
<view class="product-date">
|
||||
开始时间:{{ productInfo.startDate }}
|
||||
产品代码:{{ productInfo.productCode }}
|
||||
</view>
|
||||
<view class="product-date">
|
||||
开始时间:{{ productInfo.createDate }}
|
||||
</view>
|
||||
<view class="profit-info">
|
||||
近期盈亏:{{ productInfo.recentProfit }}
|
||||
近期盈亏:{{ productInfo.expectedReturnRate }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 基本信息卡片 -->
|
||||
<view class="card">
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" class="card-name">所在地</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.location }}</u-col>
|
||||
<u-col span="6" class="card-name">风险等级</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.riskLevel }}</u-col>
|
||||
</u-row>
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" class="card-name">详细地址</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.detailAddress }}</u-col>
|
||||
<u-col span="6" class="card-name">产品类型</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.productType }}</u-col>
|
||||
</u-row>
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" class="card-name">联系人</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.contactPerson }}</u-col>
|
||||
</u-row>
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" class="card-name">结算方式</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.settlementMethod }}</u-col>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<u-col span="6" class="card-name">产品企业</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.company }}</u-col>
|
||||
</u-row>
|
||||
<u-row v-if="productInfo.user">
|
||||
<u-col span="6" class="card-name">联系人</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.user.username }}</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
|
||||
<!-- 产品需求 -->
|
||||
<view class="card">
|
||||
<view class="card-title">
|
||||
产品需求<span>(4)</span>
|
||||
<view class="icon">
|
||||
<image style="width: 100%;height: 100%;" src="/static/icon/card-title-icon.png" mode=""></image>
|
||||
</view>
|
||||
项目介绍<span></span>
|
||||
</view>
|
||||
<view class="card-body">
|
||||
<u-row class="sub-title u-m-b-20">
|
||||
<u-col span="12">需求名称</u-col>
|
||||
</u-row>
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" text-align="left" class="card-name">产品简介</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.introduction }}</u-col>
|
||||
</u-row>
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" text-align="left" class="card-name">限价</u-col>
|
||||
<u-col span="6" class="card-value">详情</u-col>
|
||||
</u-row>
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" text-align="left" class="card-name">时间</u-col>
|
||||
<u-col span="6" class="card-value">详情</u-col>
|
||||
</u-row>
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" text-align="left" class="card-name">其他要求</u-col>
|
||||
<u-col span="6" class="card-value">详情</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 产品动态 -->
|
||||
<view class="card">
|
||||
<view class="card-title">
|
||||
产品动态
|
||||
</view>
|
||||
<view class="card-body">
|
||||
<u-row class="u-m-b-20">
|
||||
<u-col span="6" text-align="left" class="card-name">发布时间</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.publishDate }}</u-col>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<u-col span="6" text-align="left" class="card-name">年化增长</u-col>
|
||||
<u-col span="6" class="card-value">{{ productInfo.rate }}%</u-col>
|
||||
</u-row>
|
||||
<view class="u-m-t-10 editor-content-view">
|
||||
<view v-html="productInfo.introduction"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -93,77 +57,42 @@
|
||||
<u-button class="consult-btn" @click="handleConsult">立即咨询</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-toast ref="msgToast"></u-toast>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { financeAPI } from '../../api/finnancial';
|
||||
|
||||
const msgToast = ref()
|
||||
|
||||
// 产品信息响应式数据
|
||||
const productInfo = ref({
|
||||
name: '理财产品名称',
|
||||
startDate: '2025/09/13',
|
||||
recentProfit: 'XXXX',
|
||||
location: '浙江-宁波',
|
||||
detailAddress: 'xx区xx路xxx号',
|
||||
contactPerson: 'XXX',
|
||||
settlementMethod: '按月结算,次月支付50%',
|
||||
company: 'xxxx公司',
|
||||
publishDate: '2025-09-13',
|
||||
rate: '0',
|
||||
introduction: '暂无简介'
|
||||
})
|
||||
|
||||
// 立即咨询
|
||||
const handleConsult = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/finance/service'
|
||||
});
|
||||
msgToast.value.show({
|
||||
title: '暂未开发,请耐心等待~'
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
console.log('=== 详情页面开始加载 ===')
|
||||
console.log('接收到的参数:', options)
|
||||
|
||||
// 解析传递过来的产品数据
|
||||
if (options.productData) {
|
||||
try {
|
||||
console.log('原始 productData:', options.productData)
|
||||
|
||||
// 解码数据
|
||||
const decodedData = decodeURIComponent(options.productData)
|
||||
console.log('解码后的数据:', decodedData)
|
||||
|
||||
// 解析JSON
|
||||
const receivedData = JSON.parse(decodedData)
|
||||
console.log('解析后的数据对象:', receivedData)
|
||||
console.log('接收到的产品名称:', receivedData.name)
|
||||
console.log('接收到的产品利率:', receivedData.rate)
|
||||
console.log('接收到的产品简介:', receivedData.introduction)
|
||||
|
||||
// 直接更新产品信息
|
||||
if (receivedData.name) {
|
||||
productInfo.value.name = receivedData.name
|
||||
}
|
||||
if (receivedData.rate) {
|
||||
productInfo.value.rate = receivedData.rate
|
||||
}
|
||||
if (receivedData.introduction) {
|
||||
productInfo.value.introduction = receivedData.introduction
|
||||
}
|
||||
|
||||
console.log('=== 更新后的产品信息 ===')
|
||||
console.log('产品名称:', productInfo.value.name)
|
||||
console.log('产品利率:', productInfo.value.rate)
|
||||
console.log('产品简介:', productInfo.value.introduction)
|
||||
|
||||
} catch (error) {
|
||||
console.error('解析产品数据失败:', error)
|
||||
console.log('错误详情:', error.message)
|
||||
}
|
||||
} else {
|
||||
console.log('未接收到 productData 参数')
|
||||
}
|
||||
// 产品信息响应式数据
|
||||
const productInfo = ref({})
|
||||
const id = ref()
|
||||
|
||||
const loadData = () => {
|
||||
financeAPI.getProgram(id.value).then(res => {
|
||||
productInfo.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((val) => {
|
||||
id.value = val.id
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
loadData()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -179,20 +108,20 @@
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
margin: 0 80rpx;
|
||||
|
||||
|
||||
.product-name {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
|
||||
.product-date {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 15rpx;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
|
||||
.profit-info {
|
||||
font-size: 28rpx;
|
||||
opacity: 0.9;
|
||||
@@ -214,7 +143,7 @@
|
||||
margin-bottom: 25rpx;
|
||||
padding-bottom: 15rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
|
||||
|
||||
span {
|
||||
color: #666;
|
||||
font-size: 28rpx;
|
||||
@@ -226,7 +155,7 @@
|
||||
background: #f8f9fa;
|
||||
border-radius: 12rpx;
|
||||
padding: 25rpx;
|
||||
|
||||
|
||||
.sub-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
@@ -261,7 +190,7 @@
|
||||
padding: 20rpx 30rpx;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
|
||||
.consult-btn {
|
||||
background: #1a5fd8;
|
||||
color: #fff;
|
||||
@@ -271,7 +200,7 @@
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 4rpx 12rpx rgba(26, 95, 216, 0.3);
|
||||
|
||||
|
||||
&:active {
|
||||
background: #164db3;
|
||||
transform: translateY(1rpx);
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
我的客户
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-item">
|
||||
<view class="menu-item" @click="navigatoCommonProblem">
|
||||
<u-image src="/static/my/04.png" width="40%" mode="widthFix"></u-image>
|
||||
<view class="menu-text">
|
||||
常见问题
|
||||
@@ -213,6 +213,11 @@
|
||||
url: '/pages/my/car'
|
||||
})
|
||||
}
|
||||
const navigatoCommonProblem = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/commonProblem'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<view class="icon">
|
||||
<image style="width: 100%;height: 100%;" src="/static/icon/card-title-icon.png" mode=""></image>
|
||||
</view>
|
||||
项目需求<span>(4)</span>
|
||||
项目简介<span></span>
|
||||
</view>
|
||||
<view class="u-m-t-10 editor-content-view">
|
||||
<view v-html="program.introduction"></view>
|
||||
|
||||
Reference in New Issue
Block a user