2025-10-24
金融修改
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/finance/service",
|
"path": "pages/my/commonProblem",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "客服中心",
|
"navigationBarTitleText": "客服中心",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="finance-container">
|
<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="content-container" :style="'height:'+height+'px'">
|
||||||
<view class="searchFilter" id="searchFilterId">
|
<view class="searchFilter" id="searchFilterId">
|
||||||
@@ -11,19 +12,18 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="product-list" :style="'height:'+scrollHeight+'px'">
|
<view class="product-list" :style="'height:'+scrollHeight+'px'">
|
||||||
<scroll-view scroll-y="true" style="height: 100%;" v-if="productList.length!=0" @scrolltolower="loadData">
|
<scroll-view scroll-y="true" style="height: 100%;" v-if="productList.length!=0"
|
||||||
<view class="product-item" v-for="item in productList" :key="item.id">
|
@scrolltolower="loadData">
|
||||||
|
<view class="product-item" v-for="item in productList" :key="item.id"
|
||||||
|
@click="handleproduction(item)">
|
||||||
<view class="product-name">
|
<view class="product-name">
|
||||||
{{item.name}}
|
{{item.productName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="product-rate">
|
<view class="product-rate">
|
||||||
利率:{{item.rate}}%
|
利率:{{item.expectedReturnRate}}%
|
||||||
</view>
|
</view>
|
||||||
<view class="product-intro">
|
<view class="product-intro">
|
||||||
产品简介:{{item.introduction}}
|
公司:{{item.company}}
|
||||||
</view>
|
|
||||||
<view class="product-detail-link" @click="handleproduction(item)">
|
|
||||||
查看详情
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore color="#666" :status="status" />
|
<u-loadmore color="#666" :status="status" />
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success(res) {
|
success(res) {
|
||||||
let screenHeight = res.screenHeight
|
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
|
height.value = screenHeight - data.height
|
||||||
}).exec()
|
}).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
|
scrollHeight.value = height.value - data.height
|
||||||
}).exec()
|
}).exec()
|
||||||
}
|
}
|
||||||
@@ -78,60 +78,29 @@
|
|||||||
if (status.value == 'nomore') return
|
if (status.value == 'nomore') return
|
||||||
|
|
||||||
financeAPI.getList(params.value).then(res => {
|
financeAPI.getList(params.value).then(res => {
|
||||||
console.log('API返回数据:', res)
|
|
||||||
|
|
||||||
if (res.data && res.data.list) {
|
if (res.data && res.data.list) {
|
||||||
// 检查数据结构并映射字段
|
productList.value = productList.value.concat(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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status.value = 'nomore'
|
status.value = 'nomore'
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error('API调用失败:', err)
|
|
||||||
status.value = 'nomore'
|
status.value = 'nomore'
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查看详情 - 传递完整产品数据
|
// 查看详情 - 传递完整产品数据
|
||||||
const handleproduction = (item: any) => {
|
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)
|
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/finance/production?productData=${encodedData}`
|
url: `/pages/finance/production?id=${item.id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询
|
// 查询
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
params.value = {
|
params.value.page = 1
|
||||||
page: 1,
|
|
||||||
size: defaultSize,
|
|
||||||
keyword: params.value.keyword
|
|
||||||
}
|
|
||||||
productList.value = []
|
productList.value = []
|
||||||
|
status.value = 'loadmore'
|
||||||
loadData()
|
loadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,12 +168,12 @@
|
|||||||
|
|
||||||
// 移除产品简介显示 */
|
// 移除产品简介显示 */
|
||||||
.product-intro {
|
.product-intro {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
display: block; // 确保显示
|
display: block; // 确保显示
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-detail-link {
|
.product-detail-link {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|||||||
@@ -4,87 +4,51 @@
|
|||||||
back-icon-color="#fff" title-color="#fff">
|
back-icon-color="#fff" title-color="#fff">
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 产品头部信息 -->
|
<!-- 产品头部信息 -->
|
||||||
<view class="product-header">
|
<view class="product-header">
|
||||||
<view class="product-name">
|
<view class="product-name">
|
||||||
{{ productInfo.name }}
|
{{ productInfo.productName }}
|
||||||
</view>
|
</view>
|
||||||
<view class="product-date">
|
<view class="product-date">
|
||||||
开始时间:{{ productInfo.startDate }}
|
产品代码:{{ productInfo.productCode }}
|
||||||
|
</view>
|
||||||
|
<view class="product-date">
|
||||||
|
开始时间:{{ productInfo.createDate }}
|
||||||
</view>
|
</view>
|
||||||
<view class="profit-info">
|
<view class="profit-info">
|
||||||
近期盈亏:{{ productInfo.recentProfit }}
|
近期盈亏:{{ productInfo.expectedReturnRate }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 基本信息卡片 -->
|
<!-- 基本信息卡片 -->
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<u-row class="u-m-b-20">
|
<u-row class="u-m-b-20">
|
||||||
<u-col span="6" class="card-name">所在地</u-col>
|
<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-value">{{ productInfo.riskLevel }}</u-col>
|
||||||
</u-row>
|
</u-row>
|
||||||
<u-row class="u-m-b-20">
|
<u-row class="u-m-b-20">
|
||||||
<u-col span="6" class="card-name">详细地址</u-col>
|
<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-value">{{ productInfo.productType }}</u-col>
|
||||||
</u-row>
|
</u-row>
|
||||||
<u-row class="u-m-b-20">
|
<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-name">产品企业</u-col>
|
||||||
<u-col span="6" class="card-value">{{ productInfo.company }}</u-col>
|
<u-col span="6" class="card-value">{{ productInfo.company }}</u-col>
|
||||||
</u-row>
|
</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>
|
||||||
|
|
||||||
<!-- 产品需求 -->
|
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="card-title">
|
<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>
|
||||||
<view class="card-body">
|
<view class="u-m-t-10 editor-content-view">
|
||||||
<u-row class="sub-title u-m-b-20">
|
<view v-html="productInfo.introduction"></view>
|
||||||
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -93,77 +57,42 @@
|
|||||||
<u-button class="consult-btn" @click="handleConsult">立即咨询</u-button>
|
<u-button class="consult-btn" @click="handleConsult">立即咨询</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<u-toast ref="msgToast"></u-toast>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
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 = () => {
|
const handleConsult = () => {
|
||||||
uni.navigateTo({
|
msgToast.value.show({
|
||||||
url: '/pages/finance/service'
|
title: '暂未开发,请耐心等待~'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
// 产品信息响应式数据
|
||||||
console.log('=== 详情页面开始加载 ===')
|
const productInfo = ref({})
|
||||||
console.log('接收到的参数:', options)
|
const id = ref()
|
||||||
|
|
||||||
// 解析传递过来的产品数据
|
const loadData = () => {
|
||||||
if (options.productData) {
|
financeAPI.getProgram(id.value).then(res => {
|
||||||
try {
|
productInfo.value = res.data
|
||||||
console.log('原始 productData:', options.productData)
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 解码数据
|
onLoad((val) => {
|
||||||
const decodedData = decodeURIComponent(options.productData)
|
id.value = val.id
|
||||||
console.log('解码后的数据:', decodedData)
|
})
|
||||||
|
|
||||||
// 解析JSON
|
onMounted(() => {
|
||||||
const receivedData = JSON.parse(decodedData)
|
loadData()
|
||||||
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 参数')
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
我的客户
|
我的客户
|
||||||
</view>
|
</view>
|
||||||
</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>
|
<u-image src="/static/my/04.png" width="40%" mode="widthFix"></u-image>
|
||||||
<view class="menu-text">
|
<view class="menu-text">
|
||||||
常见问题
|
常见问题
|
||||||
@@ -213,6 +213,11 @@
|
|||||||
url: '/pages/my/car'
|
url: '/pages/my/car'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const navigatoCommonProblem = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/my/commonProblem'
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<view class="icon">
|
<view class="icon">
|
||||||
<image style="width: 100%;height: 100%;" src="/static/icon/card-title-icon.png" mode=""></image>
|
<image style="width: 100%;height: 100%;" src="/static/icon/card-title-icon.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
项目需求<span>(4)</span>
|
项目简介<span></span>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-10 editor-content-view">
|
<view class="u-m-t-10 editor-content-view">
|
||||||
<view v-html="program.introduction"></view>
|
<view v-html="program.introduction"></view>
|
||||||
|
|||||||
Reference in New Issue
Block a user