Commit 969f8366 by Sweet Zhang

Merge branch 'sw0826' into sw1029

parents 6d93ee70 eb02ed96
...@@ -439,6 +439,9 @@ export default { ...@@ -439,6 +439,9 @@ export default {
// 数据字典查询 // 数据字典查询
metaQuery(params){ metaQuery(params){
return request(`${apiURL}/metadata/dropOptionsQuery`,'POST',params) return request(`${apiURL}/metadata/dropOptionsQuery`,'POST',params)
},
// 持牌人佣金查询
queryRate(params){
return request(`${apiURL}/insurance_product/query/rate?planBizId=${params.planBizId}&userId=${params.userId}`, "GET")
} }
} }
<template>
<view class="container">
<!-- 头部 -->
<view class="header">
<view class="title">产品佣率查询</view>
</view>
<!-- 搜索区域 -->
<view class="search-box">
<input
class="search-input"
type="text"
placeholder="请输入产品名称"
v-model="searchKeyword"
/>
<view class="search-icon" @click="fetchProducts(1)">🔍</view>
</view>
<!-- 产品列表 -->
<view class="product-list" v-if="!loading && products.length > 0">
<view
class="product-item"
v-for="product in products"
:key="product.planBizId"
@click="goToCommissionDetail(product)"
>
<view class="product-header">
<view class="product-name">{{ product.planName }}</view>
<!-- <view class="product-term">{{ product.term }}</view> -->
</view>
<view class="product-info">
<view class="info-item">
<text class="info-label">保险公司:</text>
<text class="info-value">{{ product.companyName }}</text>
</view>
<view class="info-item">
<text class="info-label">险种类别:</text>
<text class="info-value">{{ product.categoryName }}</text>
</view>
</view>
<view class="arrow"></view>
</view>
</view>
<!-- 加载状态 -->
<view class="loading" v-if="loading">
<text>加载中...</text>
</view>
<!-- 空状态 -->
<view class="empty" v-if="!loading && products.length === 0">
<text>暂无产品数据</text>
</view>
</view>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue'
import api from '@/api/api';
// 响应式数据
const searchKeyword = ref('')
const products = ref([])
const loading = ref(false)
// 方法
const handleSearch = () => {
// 实际项目中可以添加防抖
}
const goToCommissionDetail = (product) => {
uni.navigateTo({
url: `/myPackageA/product-list/commission-detail?planBizId=${product.planBizId}`
})
}
// 获取产品数据
const fetchProducts = async (type=0) => {
loading.value = true
try {
let params = {
name:searchKeyword.value
}
// 搜索时,默认只查询10条
if(type===1){
params = {
name:searchKeyword.value,
paginationInfo:{
noLimitFlag:'',
number: 1,
size:10
}
}
}
// 实际API调用
const response = await api.productSearch(params)
if(response.success){
products.value = response.data.list || [];
}
} catch (err) {
console.error('获取产品列表失败:', err)
// 使用模拟数据
products.value = []
} finally {
loading.value = false
}
}
// 生命周期
onMounted(() => {
fetchProducts()
})
</script>
<style scoped>
.container {
padding: 20rpx;
background-color: #f5f7fa;
min-height: 100vh;
}
.header {
text-align: center;
margin-bottom: 20px;
}
.title {
font-size: 18px;
font-weight: bold;
color: #333;
}
.search-box {
position: relative;
background-color: white;
border-radius: 8px;
margin-bottom: 15px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.search-input {
width: 100%;
padding: 24rpx 80rpx 24rpx 30rpx;
font-size: 28rpx;
}
.search-icon {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
color: #999;
}
.product-list {
margin-bottom: 15px;
}
.product-item {
background-color: white;
border-radius: 8px;
padding: 15px;
margin-bottom: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
position: relative;
}
.product-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 10px;
}
.product-name {
font-size: 16px;
font-weight: bold;
color: #333;
flex: 1;
}
.product-term {
font-size: 28rpx;
color: #007AFF;
background-color: #f0f7ff;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
.product-info {
margin-bottom: 10rpx;
}
.info-item {
margin-bottom: 10rpx;
}
.info-label {
color: #666;
font-size: 28rpx;
}
.info-value {
color: #333;
font-size: 28rpx;
font-weight: 500;
}
.arrow {
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
color: #999;
font-size: 36rpx;
}
.loading, .empty {
text-align: center;
padding: 80rpx 40rpx;
color: #666;
}
</style>
\ No newline at end of file
<template> <template>
<scroll-view @scroll="handleScroll" scroll-y="true" class="scroll-Y"> <scroll-view @scroll="handleScroll" scroll-y="true" class="scroll-Y">
<view class="product-list-page"> <view class="product-list-page">
<!-- 顶部搜索和筛选 --> <!-- 顶部搜索和筛选 -->
<view class="search-bar"> <view class="search-bar">
......
...@@ -585,6 +585,17 @@ ...@@ -585,6 +585,17 @@
"style": { "style": {
"navigationBarTitleText": "产品对比" "navigationBarTitleText": "产品对比"
} }
},{
"path": "product-list/product-commission",
"style": {
"navigationBarTitleText": "持牌人佣金"
}
},
{
"path": "product-list/commission-detail",
"style": {
"navigationBarTitleText": "佣金详情"
}
} }
] ]
......
...@@ -224,6 +224,7 @@ ...@@ -224,6 +224,7 @@
{key:'policies',title:'制度',icon:'icon-xiaoshoue',link:'/pages/personalCenter/detail',isOpen:true,isShow:false,identity: true,type:4}, {key:'policies',title:'制度',icon:'icon-xiaoshoue',link:'/pages/personalCenter/detail',isOpen:true,isShow:false,identity: true,type:4},
{key:'products',title:'产品分析',icon:'icon-shujufenxi',link:'/pages/personalCenter/detail',isOpen:true,isShow:false,identity: true,type:3}, {key:'products',title:'产品分析',icon:'icon-shujufenxi',link:'/pages/personalCenter/detail',isOpen:true,isShow:false,identity: true,type:3},
{key:'cases',title:'案例分享',icon:'icon-shiyongjiaocheng',link:'/pages/personalCenter/detail',isOpen:true,isShow:false,identity: true,type:2}, {key:'cases',title:'案例分享',icon:'icon-shiyongjiaocheng',link:'/pages/personalCenter/detail',isOpen:true,isShow:false,identity: true,type:2},
{key:'commission',title:'持牌人佣金',icon:'icon-shiyongjiaocheng',link:'/myPackageA/product-list/product-commission',isOpen:true,isShow:false,identity: true},
], ],
},{id:'04',categoryName:'海外资产配置', },{id:'04',categoryName:'海外资产配置',
children:[ children:[
......
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