提交
This commit is contained in:
124
pages/talents/index.vue
Normal file
124
pages/talents/index.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<z-nav-bar title="太湖英才" bgColor="#5188e5" fontColor="#fff"></z-nav-bar>
|
||||
<view class="talents_list">
|
||||
<view class="talents_item" v-for="(item,index) in list" :key="index" @click="goToDetail(item.id)">
|
||||
<image :src="item.icon" class="item_image" mode="aspectFit"></image>
|
||||
<view class="item_right">
|
||||
<view class="item_top">
|
||||
<text class="item_name">{{item.name}}</text>
|
||||
<text class="item_title">{{item.title}}</text>
|
||||
</view>
|
||||
<text class="item_con">{{item.introduce}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
region: '',
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.hideTabBar();
|
||||
this.getData();
|
||||
},
|
||||
onShow() {
|
||||
uni.removeStorageSync('homeParams');
|
||||
},
|
||||
methods: {
|
||||
//获取数据
|
||||
getData() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.$http.request({
|
||||
url: 'common/taihuTalent/getTaihuTalents',
|
||||
method: "POST",
|
||||
data: {
|
||||
name: this.name,
|
||||
region: this.region
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
uni.hideLoading();
|
||||
if (res.list&&res.list.length>0) {
|
||||
this.list = res.list;
|
||||
}
|
||||
});
|
||||
},
|
||||
//详情
|
||||
goToDetail(id){
|
||||
uni.navigateTo({
|
||||
url: '/pages/talents/detail?id='+id,
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/mixin.scss';
|
||||
.content{
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
}
|
||||
.talents_list{
|
||||
margin: 20rpx 30rpx;
|
||||
}
|
||||
.talents_item{
|
||||
border: 1rpx solid $themeColor;
|
||||
border-radius: 15rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 25rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.item_image{
|
||||
display: block;
|
||||
width: 160rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
.item_right{
|
||||
width: calc(100% - 200rpx);
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.item_top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.item_name{
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.item_title{
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.item_con{
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
margin-top: 10rpx;
|
||||
line-height: 40rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user