| | |
| | | <view class="scroll_box"> |
| | | <scroll-view class="scroll" scroll-x="true" upper-threshode="50"> |
| | | <view :class="category_id == 0?'scroll-view-item_H active':'scroll-view-item_H'" @click="changeCategory(0)">全部</view> |
| | | <view :class="category_id == '-1'?'scroll-view-item_H active':'scroll-view-item_H'" @click="changeCategory('-1')">推荐</view> |
| | | <view v-for="(item,index) in category_list" :key="index" :class="category_id==item.category_id?'scroll-view-item_H active':'scroll-view-item_H'" @click="changeCategory(item.category_id)">{{item.name}}</view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!--列表--> |
| | | <view class="list d-s-c f-w"> |
| | | <!-- <view class="list d-s-c f-w"> |
| | | <view class="item d-stretch" v-for="(item, index) in listData" :key="index" > |
| | | <view class="product-info d-b-c d-c" @click="gotoDetail(item)"> |
| | | <view style="border-bottom: 1px solid #ccc; width: 100%; display: flex; justify-content: flex-start; align-items: center; padding-bottom: 5rpx;"> |
| | | <image style="width:100rpx;height: 100rpx; border-radius: 50%; margin-right: 10rpx;" :src="item.user.avatarUrl" mode="widthFix"></image> |
| | | {{ item.user.nickName }} |
| | | <view> |
| | | {{ item.user.nickName }} |
| | | <view v-if="item.grade" style="width:50rpx;height: 50rpx;"><image style="width:50rpx;height: 50rpx;" :src="item.grade.img"></image></view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="product-title f26 gray3"> |
| | | {{ item.name }} |
| | |
| | | <view class="people-num price d-b-c"> |
| | | <text class="gray9 f26">{{ item.create_time }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="list d-s-c f-w"> |
| | | <view class="item d-stretch" v-for="(item, index) in listData" :key="index" > |
| | | <view class="product-info d-s-c"> |
| | | <view class="img" @click="gotoDetail(item)"><image :src="item.image" mode="widthFix"></image></view> |
| | | |
| | | <view class="content"> |
| | | <view class="product-title f26 gray3"> |
| | | <view @click="gotoDetail(item)"><text class="category">{{ item.category.name }}</text>{{ item.name }}</view> |
| | | <view class="chat" @click="jump(item)">咨询</view> |
| | | </view> |
| | | <view class="product_content" @click="gotoDetail(item)"> |
| | | {{ item.product_content }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | category_id:'', |
| | | product_type:0, |
| | | category_list:[], |
| | | is_check:0, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | self.getlist(); |
| | | }, |
| | | |
| | | jump(item) { |
| | | let self = this; |
| | | let you_user_id = item.user_id; |
| | | let nickname = item.user.nickName; |
| | | let avatarurl =item.user.avatarUrl; |
| | | this.gotoPage('/pages3/release/chat/chat?you_user_id='+you_user_id+'&nickname='+nickname+'&avatarurl='+avatarurl); |
| | | }, |
| | | |
| | | |
| | | /*搜索*/ |
| | | gotoSearch() { |
| | |
| | | function(res) { |
| | | self.loading = false; |
| | | self.category_list = res.data.category_list; |
| | | self.is_check = res.data.is_check; |
| | | self.listData = res.data.list.data; |
| | | self.last_page = res.data.list.last_page; |
| | | if (res.data.list.last_page <= 1) { |
| | |
| | | |
| | | /*跳转详情*/ |
| | | gotoDetail(e) { |
| | | let url = 'pages3/release/project/detail?project_id=' + e.project_id |
| | | this.gotoPage(url); |
| | | if(this.is_check == 1){ |
| | | let url = 'pages3/release/project/detail?project_id=' + e.project_id |
| | | this.gotoPage(url); |
| | | }else{ |
| | | uni.showToast({ |
| | | title: '请开通查看权限' |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | } |
| | | }; |
| | |
| | | |
| | | .bargain-list .list .item { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | padding: 20rpx; |
| | | margin-bottom: 20rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 16rpx; |
| | |
| | | flex: 1; |
| | | //padding-left: 20rpx; |
| | | overflow: hidden; |
| | | align-items: normal; |
| | | } |
| | | |
| | | .bargain-list .product-cover .people-num { |
| | |
| | | |
| | | .bargain-list .product-title { |
| | | width: 100%; |
| | | min-height: 40rpx; |
| | | height: 40rpx; |
| | | line-height: 40rpx; |
| | | font-size: 32rpx; |
| | | color: #333333; |
| | |
| | | .scroll-view-item_H.active{ |
| | | color: red; |
| | | } |
| | | .img{ |
| | | width:160rpx; |
| | | height:160rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .img img{ max-width: 100%;} |
| | | .product-title{ |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | overflow: hidden; |
| | | } |
| | | .content{ |
| | | width:100%; |
| | | padding:5px; |
| | | } |
| | | .product-title .category{ |
| | | margin-right: 10rpx; |
| | | padding: 2rpx 18rpx; |
| | | background: red; |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .product-title .chat{ |
| | | width:70rpx; |
| | | border: 1rpx solid red; |
| | | color: red; |
| | | font-size: 24rpx; |
| | | margin-left: 10rpx; |
| | | text-align: center; |
| | | } |
| | | .product_content{ |
| | | margin-top:10px; |
| | | height:80rpx; |
| | | line-height: 40rpx; |
| | | font-size: 26rpx; |
| | | color:#ccc; |
| | | overflow: hidden; |
| | | } |
| | | </style> |