2021-08-19 06:40:59 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 状态栏 -->
|
2022-03-04 08:48:40 +00:00
|
|
|
|
<status-nav :titleVal="'关于我们'" :statusTitle="true"></status-nav>
|
2022-02-15 08:02:16 +00:00
|
|
|
|
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32 pad-x180">
|
2021-08-19 06:40:59 +00:00
|
|
|
|
<!-- 自定义轮播 -->
|
|
|
|
|
<view class="mar-s20">
|
2021-11-17 03:12:06 +00:00
|
|
|
|
<swiper-pu :isplay="isAutoPlay" :bannerList="bannerList" :newHeight="'200'" :newRadius="'10'" :newBottom="'5'"></swiper-pu>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
<!-- 导航 -->
|
|
|
|
|
<view class="mar-s50 pad-s10">
|
|
|
|
|
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" :isCenter="cateListTwo.length<=4?false:true" :newbmo="'#F5F5F5'" @choosecateEv="chooseTwo" :newcateList="cateListTwo"></cate-pu>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<view v-if="dataList.length!=0" class="mar-x20">
|
|
|
|
|
<view @tap="goDetail(index)" class="pad-sx30 width100 disjb bbot" v-for="(item,index) in dataList" :key="index">
|
|
|
|
|
<view class="disjb fc">
|
|
|
|
|
<view class="fon30 col3 clips2" style="height: 84rpx;">{{item.title}}</view>
|
|
|
|
|
<view class="fon24 col9 mar-s25">{{item.time}}</view>
|
|
|
|
|
</view>
|
2021-08-19 09:27:37 +00:00
|
|
|
|
<image v-if="item.imgSrc!=''" class="flexs mar-z30" style="width: 140rpx;height: 140rpx;" :src="item.imgSrc" mode="aspectFill"></image>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 20%;">
|
|
|
|
|
<image class="zanw-img" src="/static/public/zanwn.png" mode="aspectFill"></image>
|
|
|
|
|
<view class="fon24 col3">暂无内容</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2021-08-26 09:57:04 +00:00
|
|
|
|
<!-- 底部客服 -->
|
2022-02-15 08:02:16 +00:00
|
|
|
|
<!-- <public-customer :nbottom="100"></public-customer> -->
|
2021-08-19 06:40:59 +00:00
|
|
|
|
<!-- 返回顶部 -->
|
|
|
|
|
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
2022-03-04 08:48:40 +00:00
|
|
|
|
<!-- 用户信息授权,手机号授权 -->
|
|
|
|
|
<auth-userInfo-mobileInfo></auth-userInfo-mobileInfo>
|
2022-02-15 08:02:16 +00:00
|
|
|
|
<!-- 底部导航 -->
|
|
|
|
|
<view class="posixzy">
|
|
|
|
|
<bottom-tab></bottom-tab>
|
|
|
|
|
</view>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import swiperPu from '@/components/swiper-pu.vue';
|
2021-08-22 08:53:12 +00:00
|
|
|
|
import {checkBanner} from '@/jsFile/publicAPI.js';
|
2022-02-15 08:02:16 +00:00
|
|
|
|
import bottomTab from '@/components/bottom-tab.vue';
|
2021-08-19 06:40:59 +00:00
|
|
|
|
export default {
|
|
|
|
|
components:{
|
2022-02-15 08:02:16 +00:00
|
|
|
|
swiperPu,
|
|
|
|
|
bottomTab
|
2021-08-19 06:40:59 +00:00
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2022-03-04 08:48:40 +00:00
|
|
|
|
statusHNH:uni.getStorageSync('electric_nav_height'),
|
2021-08-19 06:40:59 +00:00
|
|
|
|
cateListTwo:[
|
|
|
|
|
// {title:'热门问题'},
|
|
|
|
|
// {title:'公司新闻'},
|
|
|
|
|
// {title:'热点资讯'},
|
|
|
|
|
// {title:'热点资讯'},
|
|
|
|
|
],
|
|
|
|
|
dataList:[
|
|
|
|
|
// {title:'网红水果排毒真的减脂排毒吗?',time:'2021-07-08 10:30',imgSrc:'/static/public/like.png'},
|
|
|
|
|
// {title:'网红水果排毒真的减脂排毒吗?美食创作人',time:'2021-07-08 10:30',imgSrc:'/static/public/like.png'},
|
|
|
|
|
// {title:'网红水果排毒真的减脂排毒吗?美食创作人',time:'2021-07-08 10:30',imgSrc:'/static/public/like.png'},
|
|
|
|
|
// {title:'网红水果排毒真的减脂排毒吗?美食创作人',time:'2021-07-08 10:30',imgSrc:'/static/public/like.png'},
|
|
|
|
|
// {title:'网红水果排毒真的减脂排毒吗?美食创作人',time:'2021-07-08 10:30',imgSrc:'/static/public/like.png'},
|
|
|
|
|
// {title:'网红水果排毒真的减脂排毒吗?美食创作人',time:'2021-07-08 10:30',imgSrc:'/static/public/like.png'},
|
|
|
|
|
// {title:'网红水果排毒真的减脂排毒吗?美食创作人',time:'2021-07-08 10:30',imgSrc:'/static/public/like.png'},
|
|
|
|
|
],
|
|
|
|
|
showTop:false,
|
|
|
|
|
newCurrent:0,
|
|
|
|
|
category_id:'',
|
|
|
|
|
page:1,
|
|
|
|
|
size:10,
|
|
|
|
|
total:'',//总数
|
|
|
|
|
isZanw:true,
|
2021-11-17 03:12:06 +00:00
|
|
|
|
bannerList:[],
|
2021-12-02 09:31:26 +00:00
|
|
|
|
isAutoPlay:false,
|
2021-08-19 06:40:59 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2022-04-02 09:56:53 +00:00
|
|
|
|
computed: {
|
|
|
|
|
// 主题颜色
|
|
|
|
|
publicColor() {
|
|
|
|
|
return this.$store.state.publicColor
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-19 06:40:59 +00:00
|
|
|
|
onPageScroll(e) {
|
|
|
|
|
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
|
|
|
|
},
|
|
|
|
|
onReachBottom() {//触底事件
|
|
|
|
|
if(this.total!=this.dataList.length){
|
|
|
|
|
this.page++
|
|
|
|
|
this.checkAbout(this.category_id)//调用自主预约列表事件
|
|
|
|
|
} else {
|
|
|
|
|
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
|
|
|
|
|
this.isZanw = false
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-22 08:53:12 +00:00
|
|
|
|
onShow() {
|
2021-11-17 03:12:06 +00:00
|
|
|
|
this.isAutoPlay = true;
|
2022-03-04 08:48:40 +00:00
|
|
|
|
this.$toolAll.tools.isLogin();
|
2021-11-17 03:12:06 +00:00
|
|
|
|
},
|
|
|
|
|
onUnload() {
|
|
|
|
|
this.isAutoPlay = false;
|
|
|
|
|
},
|
|
|
|
|
onHide() {
|
|
|
|
|
this.isAutoPlay = false;
|
2021-08-22 08:53:12 +00:00
|
|
|
|
},
|
2021-12-02 09:31:26 +00:00
|
|
|
|
onLoad(options) {
|
2021-08-22 08:53:12 +00:00
|
|
|
|
this.checkSwi()
|
2022-03-21 01:44:07 +00:00
|
|
|
|
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
2022-03-04 08:48:40 +00:00
|
|
|
|
this.checkAbout(this.category_id)
|
|
|
|
|
}
|
2021-08-19 06:40:59 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-08-22 08:53:12 +00:00
|
|
|
|
checkSwi(){
|
2021-08-24 00:54:50 +00:00
|
|
|
|
checkBanner({position:'about-banner'}).then(res=>{
|
2021-08-22 08:53:12 +00:00
|
|
|
|
if(res.code==0){
|
|
|
|
|
if(res.data.length!=0){
|
|
|
|
|
res.data.forEach(item=>{
|
|
|
|
|
let isVideo = false
|
|
|
|
|
if(item.type!='img') isVideo = true
|
|
|
|
|
let haveImg = ''
|
|
|
|
|
if(item.src!='') haveImg = this.$http + item.src
|
|
|
|
|
let banObj = {
|
|
|
|
|
imgSrc:haveImg,
|
|
|
|
|
url:item.url,
|
|
|
|
|
isVideo:isVideo,
|
|
|
|
|
poster:this.$http + item.src,
|
|
|
|
|
}
|
|
|
|
|
this.bannerList.push(banObj)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2021-08-19 06:40:59 +00:00
|
|
|
|
checkAbout(category_id){
|
|
|
|
|
let params = {
|
|
|
|
|
category_id:category_id,
|
|
|
|
|
page:this.page,
|
|
|
|
|
size:this.size
|
|
|
|
|
}
|
|
|
|
|
this.$requst.post('archives/about',params).then(res=>{
|
|
|
|
|
// console.log('关于我们:',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
if(this.cateListTwo.length==0){
|
|
|
|
|
if(res.data.category.length!=0){
|
|
|
|
|
res.data.category.forEach(item=>{
|
|
|
|
|
let cateObj = {
|
|
|
|
|
id:item.id,
|
|
|
|
|
mode_id:item.mode_id,
|
|
|
|
|
title:item.title
|
|
|
|
|
}
|
|
|
|
|
this.cateListTwo.push(cateObj)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(this.page==1) this.dataList = []
|
|
|
|
|
if(res.data.list.list.length!=0){
|
|
|
|
|
this.total = res.data.list.total
|
|
|
|
|
res.data.list.list.forEach(item=>{
|
|
|
|
|
let newImg = ''
|
|
|
|
|
if(item.cover=='') newImg = '/static/public/logo.png'
|
|
|
|
|
else newImg = this.$http + item.cover
|
|
|
|
|
let aobj = {
|
|
|
|
|
id:item.id,
|
|
|
|
|
title:item.title,
|
|
|
|
|
time:item.published_at,
|
|
|
|
|
imgSrc:newImg
|
|
|
|
|
}
|
|
|
|
|
this.dataList.push(aobj)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
},
|
|
|
|
|
chooseTwo(index){//二级分类选择
|
|
|
|
|
this.newCurrent = index
|
|
|
|
|
console.log('二级分类:',index);
|
|
|
|
|
this.isZanw = true
|
|
|
|
|
this.page = 1
|
2021-08-29 01:36:29 +00:00
|
|
|
|
this.category_id = this.cateListTwo[index].id
|
2021-08-19 06:40:59 +00:00
|
|
|
|
this.checkAbout(this.cateListTwo[index].id)
|
|
|
|
|
},
|
|
|
|
|
goDetail(index){
|
|
|
|
|
uni.navigateTo({
|
2021-08-29 01:36:29 +00:00
|
|
|
|
url:'/pagesB/articleDetail/articleDetail?id='+this.dataList[index].id +"&category_id="+this.category_id
|
2021-08-19 06:40:59 +00:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
backTop(){//回到顶部事件
|
|
|
|
|
uni.pageScrollTo({
|
|
|
|
|
scrollTop: 0,
|
|
|
|
|
duration: 300
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|