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

229 lines
4.6 KiB

12 months ago
<template>
<view :class="[{oh: !per}]">
<view class="page">
<view class="search-wrap">
11 months ago
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="initList" @clear="clearKeyword" />
12 months ago
</view>
12 months ago
<image class="banner" src="https://occupationlab.com/images/preschoolEdu/supplier-banner.jpg" mode="widthFix"></image>
12 months ago
12 months ago
<view class="wrap">
<sideSelect :menus="menus" @menuClick="menuClick" />
<view class="list">
<view class="item" v-for="(item, i) in list" :key="i" @click="toDetail(item)">
<view class="pro-name">
11 months ago
<image class="icon" :src="item.logoUrl ? item.logoUrl : 'https://occupationlab.com/images/preschoolEdu/preSchool-icon.png'"></image>
{{ item.companyName }}
12 months ago
</view>
12 months ago
<view class="info">
11 months ago
<view class="meta">{{ item.briefIntroduction }}</view>
<view class="meta">{{ item.province }}-{{ item.city }}</view>
12 months ago
</view>
</view>
12 months ago
</view>
12 months ago
</view>
</view>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
</view>
</template>
<script>
11 months ago
import { selectEnterpriseCertificationList } from '@/apis/modules/supplier.js'
12 months ago
export default {
data() {
return {
per: true, // 是否有权限
teamId: uni.getStorageSync('teamId') || '',
12 months ago
menus: [
{
id: '',
name: '全部'
},
{
id: 1,
name: '服装'
},
{
id: 2,
name: '教具'
},
{
id: 3,
name: '课程'
},
{
id: 4,
name: '家具'
},
{
12 months ago
id: 5,
12 months ago
name: '设备'
},
{
12 months ago
id: 6,
12 months ago
name: '服务'
},
{
12 months ago
id: 7,
12 months ago
name: '其它'
},
],
12 months ago
list: [],
11 months ago
reachBottom: 0, // 是否是上拉加载。0->否,1->是,-1->加载完所有数据
status: 'more', // 上拉加载状态 more|loading|noMore
12 months ago
keyword: '',
tags: [],
hotProducts: [],
offcialProducts: [],
11 months ago
page: 1,
pageSize: 5,
12 months ago
total: 0,
curTab: 0,
tabs: [
{
name: '全部',
id: 0
},
{
name: '论坛',
id: 1
}
],
}
},
11 months ago
// 下拉刷新
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
// 上拉加载
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
12 months ago
onShow() {
this.keyword = ''
this.per = true
11 months ago
this.initList()
12 months ago
},
methods: {
11 months ago
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
12 months ago
},
11 months ago
// 列表
getList() {
11 months ago
uni.showLoading({
title: '加载中'
})
11 months ago
selectEnterpriseCertificationList({
auditStatus: null,
authenticationStatus: 2,
pageNum: this.page,
pageSize: this.pageSize,
platformSource: 6,
keyWord: this.keyword,
}).then(async ({ data }) => {
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
this.page++ // 每次获取了数据后page+1
const noMore = this.list.length === data.total // 是否加载完所有数据
this.status = noMore ? 'noMore' : 'more' // 加载完了则设置为noMore
this.reachBottom = noMore ? -1 : 0 // 加载完了则设置为-1
11 months ago
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
12 months ago
},
11 months ago
// keyword清除回调
clearKeyword() {
this.keyword = ''
this.initList()
12 months ago
},
// 跳转学习详情
toDetail(item) {
11 months ago
this.$util.to('/other/supplierDetail/supplierDetail?teamId=' + item.teamId)
12 months ago
},
// tab切换
tabChange(tab) {
this.curTab = tab.id
// this.initList()
},
}
}
</script>
<style scoped lang="scss">
.banner {
12 months ago
display: block;
width: 100%;
border: 0;
}
.wrap {
display: flex;
align-items: flex-start;
12 months ago
}
.list {
12 months ago
flex: 1;
.item {
12 months ago
padding: 24rpx;
margin: 16rpx 24rpx;
background-color: #fff;
border-radius: 16rpx;
}
.pro-name {
display: flex;
align-items: center;
padding: 18rpx 0;
font-size: 30rpx;
font-weight: 600;
color: #333;
border-bottom: 1px solid #E6E8ED;
.icon {
width: 58rpx;
min-width: 58rpx;
height: 58rpx;
margin-right: 20rpx;
border-radius: 4px;
}
}
.info {
padding: 12rpx 0;
}
.line {
display: flex;
padding: 12rpx 0;
}
.name {
margin-right: 10rpx;
font-size: 28rpx;
color: #999;
}
11 months ago
.meta {
11 months ago
margin: 10rpx 0;
12 months ago
font-size: 28rpx;
color: #333;
}
.ell-wrap {
display: inline-flex;
align-items: center;
}
.ell {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.toggle {
margin-left: 10rpx;
white-space: nowrap;
font-size: 24rpx;
color: #0e92ef;
}
}
</style>