Browse Source

feat(market): 重构 firm_info 页面

- 重新设计页面布局,使用 scroll-view 实现滚动加载
- 添加校区信息获取功能- 优化数据展示逻辑,支持多条目展示
-调整样式,增加列表项间隔和边框
master
liutong 10 months ago
parent
commit
754d4b07a5
  1. 8
      api/apiRoute.js
  2. 173
      pages/market/my/firm_info.vue

8
api/apiRoute.js

@ -67,6 +67,13 @@ export default {
return res; return res;
}) })
}, },
//公共端-教师/销售端验证旧密码是否正确
common_getPersonnelCampus(data = {}) {
let url = '/campus/getPersonnelCampus'
return http.get(url, data).then(res => {
return res;
})
},
@ -228,6 +235,7 @@ export default {
//↑↑↑↑↑↑↑↑↑↑↑↑-----销售接口相关-----↑↑↑↑↑↑↑↑↑↑↑ //↑↑↑↑↑↑↑↑↑↑↑↑-----销售接口相关-----↑↑↑↑↑↑↑↑↑↑↑

173
pages/market/my/firm_info.vue

@ -3,63 +3,67 @@
<view class="assemble"> <view class="assemble">
<view style="height: 30rpx;"></view> <view style="height: 30rpx;"></view>
<view class="section_1"> <scroll-view
<image class="pic" :src="$util.img(dataInfo.cover)" mode="aspectFit"></image> class="ul"
</view> scroll-y="true"
:lower-threshold="lowerThreshold"
<view class="title_section">基本信息</view> @scrolltolower="loadMoreData_1"
style="height: 80vh;"
<view class="section_2"> >
<view class="item"> <view class="li" v-for="(v,k) in tableList" :key="k">
<view class="title">企业名称</view> <!--企业图-->
<view class="content">{{dataInfo.enterprise_name}}</view> <view class="section_1">
</view> <image class="pic" v-if="v.campus_preview_image" :src="v.campus_preview_image" mode="aspectFit"></image>
</view>
<view class="item">
<view class="title">企业简称</view> <view class="title_section">基本信息</view>
<view class="content">{{dataInfo.enterprise_abbreviation}}</view> <view class="section_2">
<view class="item">
<view class="title">企业名称</view>
<view class="content">{{v.campus_name}}</view>
</view>
<view class="item">
<view class="title">企业地址</view>
<view class="content">{{v.campus_address}}</view>
</view>
</view>
<view class="title_section">企业介绍</view>
<view class="section_3">
<view class="html" v-html="v.
campus_introduction"></view>
</view>
</view> </view>
</scroll-view>
<view class="item">
<view class="title">企业电话</view>
<view class="content">{{dataInfo.phone}}</view>
</view>
<view class="item">
<view class="title">所属行业</view>
<view class="content">{{dataInfo.profession}}</view>
</view>
<view class="item">
<view class="title">企业网址</view>
<view class="content">{{dataInfo.website}}</view>
</view>
<view class="item">
<view class="title">成立时间</view>
<view class="content">{{dataInfo.establishment_time}}</view>
</view>
</view>
<view class="title_section">企业介绍</view>
<view class="section_3">
<view class="html" v-html="dataInfo.
content"></view>
</view>
</view> </view>
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
data() { data() {
return { return {
dataInfo:{},// dataInfo:{},//
loading:false,//
lowerThreshold: 100,//
isReachedBottom: false,//|true=|false=
//
filteredData:{
personnel_id:'',
},
//
tableList:[],
} }
}, },
onShow(){ onShow(){
@ -68,13 +72,28 @@ import memberApi from '@/api/member.js';
methods: { methods: {
// //
async init(){ async init(){
await this.getEnterpriseInformation() await this.getUserInfo()
await this.getPersonnelCampus()
},
//
async getUserInfo(){
let res = await apiRoute.getPersonnelInfo({})
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.filteredData.personnel_id = res.data.id//id
}, },
// //
async getEnterpriseInformation(){ async getPersonnelCampus(){
let data = {} let params = {...this.filteredData}
let res = await memberApi.getEnterpriseInformation(data) let res = await apiRoute.common_getPersonnelCampus(params)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -83,8 +102,8 @@ import memberApi from '@/api/member.js';
return return
} }
this.dataInfo = res.data this.tableList = res.data
console.log(123,this.dataInfo) console.log(123,this.tableList)
}, },
} }
@ -99,36 +118,44 @@ import memberApi from '@/api/member.js';
color: #fff; color: #fff;
} }
.section_1{ .ul{
.pic{
width: 100%;
height: 300rpx;
}
}
.title_section{
padding: 20rpx 40rpx;
color: #fff;
font-size: 24rpx;
}
.section_2{
background-color: #434544;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.item{ gap: 40rpx;
padding: 40rpx; .li{
padding-left: 40rpx; border-top: 1px solid #434544;
display: flex; .section_1{
gap: 30rpx; .pic{
width: 100%;
height: 300rpx;
}
}
.title_section{
padding: 20rpx 40rpx;
color: #fff;
font-size: 24rpx;
}
.section_2{
background-color: #434544;
display: flex;
flex-direction: column;
.item{
padding: 40rpx;
padding-left: 40rpx;
display: flex;
gap: 30rpx;
}
}
.section_3{
padding: 20rpx 22rpx;
padding-bottom: 250rpx;
.html{
color: #fff;
}
}
} }
} .li:nth-child(1){
border: 0px solid #434544;
.section_3{
padding: 20rpx 22rpx;
padding-bottom: 250rpx;
.html{
color: #fff;
} }
} }
</style> </style>

Loading…
Cancel
Save