幼教产品B2B生态平台小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

222 lines
4.6 KiB

12 months ago
<template>
<view class="wrap">
11 months ago
<view class="top">
<view class="name">{{ form.classificationName }}</view>
11 months ago
<view class="slogan" v-html="form.slogan"></view>
12 months ago
</view>
11 months ago
<view class="block">
12 months ago
<ul class="tabs">
<li :class="{active: curTab === 0}" @click="tabChange(0)">主页</li>
11 months ago
<li :class="{active: curTab === 1}" @click="tabChange(1)">商品</li>
12 months ago
</ul>
11 months ago
<view v-if="!curTab" class="detail">
<view class="title">公司简介</view>
<uni-swiper-dot class="pics" :info="desPics" :current="curPic" mode="round" :dots-styles="dotsStyles">
<swiper class="swiper-box" @change="picChange">
<swiper-item v-for="(item ,i) in desPics" :key="i">
<image class="pic" :src="item"></image>
</swiper-item>
</swiper>
</uni-swiper-dot>
<view class="des" v-html="form.briefIntroduction"></view>
12 months ago
</view>
11 months ago
<view v-else class="list">
<!-- <view class="item">
<image class="pic" src="@/static/image/info-bg.jpg"></image>
<view class="texts">
<view class="name">测试标题</view>
<view class="price">12.8</view>
</view>
12 months ago
</view>
11 months ago
<view class="item">
<image class="pic" src="@/static/image/info-bg.jpg"></image>
<view class="texts">
<view class="name">测试标题</view>
<view class="price">12.8</view>
</view>
12 months ago
</view>
11 months ago
<view class="item">
<image class="pic" src="@/static/image/info-bg.jpg"></image>
<view class="texts">
<view class="name">测试标题</view>
<view class="price">12.8</view>
</view>
12 months ago
</view>
11 months ago
<view class="item">
<image class="pic" src="@/static/image/info-bg.jpg"></image>
<view class="texts">
<view class="name">测试标题</view>
<view class="price">12.8</view>
</view>
</view> -->
</view>
</view>
<view class="block">
<view class="title">联系我们</view>
<view class="">
</view>
12 months ago
</view>
</view>
</template>
<script>
11 months ago
import { queryTeamInfo } from '@/apis/modules/user.js'
12 months ago
export default {
data() {
return {
11 months ago
teamId: '',
12 months ago
curTab: 0,
form: {
11 months ago
classificationName: '',
11 months ago
slogan: '',
11 months ago
briefIntroduction: ''
12 months ago
},
11 months ago
desPics: [],
curPic: 0,
12 months ago
dotsStyles: {
backgroundColor: 'rgba(83, 200, 249,0.3)',
border: '1px rgba(83, 200, 249,0.3) solid',
color: '#fff',
11 months ago
selectedBackgroundColor: 'rgba(255, 255, 249,0.9)',
selectedBorder: '1px rgba(251, 251, 251,0.9) solid'
12 months ago
},
mpStyle: {
p: 'font-size: 25rpx !important;font-family: Microsoft Yahei !important;font-weight: 400 !important;color: #333 !important;',
span: 'font-size: 25rpx !important;font-family: Microsoft Yahei !important;font-weight: 400 !important;color: #333 !important;'
}
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
11 months ago
this.teamId = options.teamId
12 months ago
this.getInfo()
},
methods: {
// 获取详情
11 months ago
async getInfo() {
12 months ago
uni.showLoading({
title: '加载中'
})
11 months ago
const res = await queryTeamInfo({
teamId: this.teamId
12 months ago
})
11 months ago
const data = res.teamInfo
if (data) {
// 处理描述图片
if (data.pictureUrl) {
this.desPics = data.pictureUrl.split(',')
}
}
this.form = data
11 months ago
uni.hideLoading()
12 months ago
},
11 months ago
// 描述图片切换
picChange(e) {
this.curPic = e.detail.current;
},
12 months ago
// tab切换
tabChange(id) {
this.curTab = id
},
}
}
</script>
<style scoped lang="scss">
.wrap {
padding-bottom: 140rpx;
}
11 months ago
.top {
padding: 20rpx;
.name {
12 months ago
font-size: 30rpx;
11 months ago
font-weight: 600;
}
.slogan {
margin: 20rpx 0;
font-size: 28rpx;
12 months ago
}
}
.tabs {
display: flex;
justify-content: center;
margin-bottom: 32rpx;
li {
width: 33.33%;
text-align: center;
font-size: 28rpx;
color: #333;
white-space: nowrap;
}
.active {
color: #007EFF;
&:after {
content: '';
display: block;
width: 40rpx;
height: 8rpx;
margin: 18rpx auto 0;
border-radius: 4px;
background-color: #007EFF;
}
}
}
11 months ago
.block {
padding: 24rpx;
}
12 months ago
.detail {
11 months ago
.title {
margin-bottom: 20rpx;
font-size: 28rpx;
font-weight: 600;
}
.pics {
margin: 20rpx 0;
.pic {
width: 100%;
height: 300rpx;
}
}
.des {
margin-top: 20rpx;
font-size: 26rpx;
line-height: 1.6;
}
12 months ago
}
.list {
display: flex;
flex-wrap: wrap;
padding: 0 10rpx;
.item {
width: calc((100% - 40rpx) / 2);
margin: 20rpx 10rpx;
background-color: #fff;
border-radius: 8px;
overflow: hidden;
}
.pic {
width: 100%;
height: 200rpx;
}
.texts {
padding: 20rpx;
}
.name {
margin-bottom: 10rpx;
font-size: 30rpx;
font-weight: 600;
}
.price {
font-size: 26rpx;
color: #ff0047;
}
}
</style>