detail.vue 3.83 KB
<template>
	<view style="background-color: #F7F7F7;">
		<view class="top flex flex-wrap justify-content-between">
			<view class="top-list " v-for="(item,index) of info.category" :key="index" @click="goNavT(item.id)">
					<view class="img">
						<image :src="'http://app.xn--43vp3ce98aj8m.com/'+item.image" v-if="item.image" mode="aspectFill"></image>
					</view>
					<view style="padding: 15rpx;">
						<view style="font-size: 28rpx;font-weight: bold;" class="title">
							{{item.name}}
						</view>
						<view class="text">
							详情请与客服沟通后再下单
						</view>
					</view>
			</view>
		</view>

		<!-- <view class="btn flex justify-content-center">
			<view >点击查看更多{{show}}</view>
			<uni-icons type="bottom" size="20" color="#3D3D3D"></uni-icons>
		</view> -->

		<view style="margin: 20rpx 15rpx;padding-bottom: 20rpx;">
			<view class="flex justify-content-between list_user" v-for="(item,index) of info.user">
				<view class="flex" style="align-items: center;">
					<view style="width: 120rpx;">
						<image :src="'http://app.xn--43vp3ce98aj8m.com/'+item.image" style="width: 100%;" mode="widthFix"></image>
					</view>
					<view style="color: #A8A8A8;font-size: 26rpx;margin-left: 20rpx;max-width: 180rpx;" class="title">{{item.name}}</view>
					<view v-if="item.type==1" class="type">村长</view>
					<view v-if="item.type==2" class="type1">社长</view>
					<view v-if="item.type==3" class="type2">村民</view>
				</view>

				<view class="flex justify-content-between">
					<view class="fa" @click="goNav('/pages/message/index')">发消息</view>
					<view class="shi" @click="goNav('/pages/meeting/meeting')">视频连线</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{},
				show:false
			}
		},
		onLoad(e) {
			this.id=e.id
			this.API.wanlshopGetShopInfo({
				id:this.id
			}).then(res=>{
				this.info=res.data
				this.info.user=this.info.user.sort((a,b)=>{
					return a.type-b.type
				})
				this.$forceUpdate()
				uni.setNavigationBarTitle({
				    title: res.data.shopname
				   });
			})
		},
		methods:{
			goNav(url){
				uni.navigateTo({
					url:url
				})
			},
			goNavT(id){
				uni.navigateTo({
					url: `/pages/product/goods?id=${id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.text {
		color: #9E9E9E;
		font-size: 22rpx;
		padding: 10rpx 0 15rpx;
	}

	.top {
		padding-top: 25rpx;
		margin: 0 25rpx 0;
	}

	.top-list {
		width: 48%;

		image {
			width: 100%;
			height: 240rpx;
			border-radius: 15rpx;
		}

		background-color: #fff;
		margin-bottom:30rpx;
	}

	.img {
		width: 100%;
	}

	.title {
		white-space: nowrap; //文本强制不换行;
		text-overflow: ellipsis; // 文本溢出显示省略号;
		overflow: hidden; //溢出的部分隐藏;
	}

	.btn {
		margin: 0 25rpx 25rpx;
		background-color: #fff;
		text-align: center;
		height: 80rpx;
		font-size: 24rpx;
		align-items: center;
		border-radius: 15rpx;
	}

	.list_user {
		background-color: #fff;
		padding: 20rpx;
		border-radius: 15rpx;
		align-items: center;
		margin-bottom: 20rpx;
	}

	.fa {
		padding: 10rpx;
		color: #fff;
		font-size: 24rpx;
		background: linear-gradient(to right, #F06FD4, #F06FD4);
		border-radius: 15rpx;
	}

	.shi {
		padding: 10rpx;
		color: #fff;
		font-size: 24rpx;
		background: linear-gradient(207deg, #D669BE 0%, #AF9FFF 100%);
		border-radius: 15rpx;
		margin-left: 10rpx;
	}
	.type{
		color: #2E607C;
		background-color: #E3F5FF;
		font-size: 24rpx;
		border-radius: 15rpx;
		padding: 5rpx 20rpx ;
		margin-left: 20rpx;
	}
	.type1{
		color: #2E7C3B;
		background-color: #E3FFEE;
		font-size: 24rpx;
		border-radius: 15rpx;
		padding: 5rpx 20rpx ;
		margin-left: 20rpx;
	}
	.type2{
		color: #7d71b6;
		background-color: #e1e5ff;
		font-size: 24rpx;
		border-radius: 15rpx;
		padding: 5rpx 20rpx ;
		margin-left: 20rpx;
	}
</style>