幼教产品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.

186 lines
3.8 KiB

12 months ago
<template>
<view class="wrap">
11 months ago
<view class="top">
<view class="name">{{ form.classificationName }}</view>
12 months ago
</view>
<view class="detail">
<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>
</view>
<view v-if="!curTab" class="detail">
<view class="title">公司简介</view>
11 months ago
<view v-html="form.briefIntroduction"></view>
12 months ago
</view>
<view v-else class="list">
11 months ago
<!-- <view class="item">
12 months ago
<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 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 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 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>
11 months ago
</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,
tabs: [
{
name: '详情介绍',
id: 0
},
{
name: '界面图',
id: 1
},
{
name: '参数',
id: 2
}
],
form: {
11 months ago
classificationName: '',
briefIntroduction: ''
12 months ago
},
shopCartTotal: 0,
types: [],
dotsStyles: {
backgroundColor: 'rgba(83, 200, 249,0.3)',
border: '1px rgba(83, 200, 249,0.3) solid',
color: '#fff',
selectedBackgroundColor: 'rgba(83, 200, 249,0.9)',
selectedBorder: '1px rgba(83, 200, 249,0.9) solid'
},
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
this.form = res.teamInfo
uni.hideLoading()
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;
}
}
.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;
}
}
}
.detail {
padding: 34rpx 32rpx;
margin: 16rpx 0;
border-radius: 20px;
background-color: #fff;
}
.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>