1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342 |
- <template>
- <view class="index tn-safe-area-inset-bottom">
-
- <tn-nav-bar customBack>
- <view slot="back" class='tn-custom-nav-bar__back' @click="reFetchData()">
- <text v-if="!loading" class="tn-icon-circle-arrow" style="font-size: 50rpx;"></text>
- <tn-loading v-if="loading" :size="46"></tn-loading>
- </view>
-
- <view slot="default" style="display: flex;">
- <view style="flex:1;margin-left:25px">
- <text>我要什么</text>
- </view>
- <view>
- <text class="tn-icon-add-fill" style="font-size: 30px;margin-right: 4px;" @click="addButton()"></text>
- </view>
- </view>
- </tn-nav-bar>
-
- <view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
- <uv-sticky :offsetTop="vuex_custom_bar_height + 'px'" bgColor="#ffffff">
- <uni-search-bar radius="15" placeholder="搜索" @confirm="search" v-model="searchValue" @blur="search"
- @cancel="cancel" @clear="clear" cancelButton="auto"
- clearButton="auto" style="border-bottom: 1rpx solid #f1f1f1cc;">
- </uni-search-bar></uv-sticky>
- <!-- 图文信息 -->
- <block v-for="(item,index) in content" :key="index">
- <view class="blogger__item">
- <view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
- <view class="justify__author__info" @click="tn('')">
- <view class="tn-flex tn-flex-row-center">
- <view class="tn-flex tn-flex-row-center tn-flex-col-center">
- <!-- <view class="">
- <tn-avatar class="" shape="circle" :src="item.userAvatar" size="lg">
- </tn-avatar>
- </view> -->
- <view class="tn-padding-right tn-text-ellipsis">
- <view class="tn-padding-right tn-color-grey tn-text-lg">
- {{ item.company }}
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-if="item.validDate" class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
- <text class="" style="background: #3F51B542;font-size: 12px;
- padding: 8px;
- color: #0000FF;
- border-radius: 24px;
- border-top-right-radius: 0;">{{item.validDate}}</text>
- </view>
- </view>
- <view
- class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"
- @click="tn('')">
- <!-- <view v-for="(label_item,label_index) in item.label" :key="label_index"
- class="blogger__desc__label tn-float-left tn-margin-right">
- <text class="blogger__desc__label--prefix tn-icon-topics-fill"></text>
- <text class="tn-text-df">{{ label_item }}</text>
- </view> -->
- <!-- 不用限制长度了,因为发布的时候限制长度了-->
- <text
- class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.content }}</text>
- </view>
-
- <block v-if="item.imgList">
- <view v-if="[1,2,4].indexOf(item.imgList.length) != -1" class="tn-padding-top-xs"
- @click="tn('')">
- <image v-for="(image_item,image_index) in item.imgList" :key="image_index"
- class="blogger__main-image" :class="{
- 'blogger__main-image--1 tn-margin-bottom-sm': item.imgList.length === 1,
- 'blogger__main-image--2 tn-margin-right-sm tn-margin-bottom-sm': item.imgList.length === 2 || item.imgList.length === 4
- }" :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
- </view>
- <view v-else class="tn-padding-top-xs">
- <tn-grid hoverClass="none" :col="3">
- <block v-for="(image_item,image_index) in item.imgList" :key="image_index">
- <!-- #ifndef MP-WEIXIN -->
- <tn-grid-item style="width: 30%;margin: 10rpx;">
- <image class="blogger__main-image blogger__main-image--3" :src="image_item.ftpUrl"
- mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
- </tn-grid-item>
- <!-- #endif-->
- <!-- #ifdef MP-WEIXIN -->
- <tn-grid-item style="width: 30%;margin: 10rpx;">
- <image class="blogger__main-image blogger__main-image--3" :src="image_item.ftpUrl"
- mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
- </tn-grid-item>
- <!-- #endif-->
- </block>
- </tn-grid>
- </view>
- </block>
- <view v-for="file in item.fileDetailList" v-if="!isImage(file.fileName)">
- <view>
- <text class="tn-icon-link"></text>
- <view style="display: inline-block;margin-left:8px" @click="clickLink(file.ftpUrl)">{{file.fileName}}</view>
-
- </view>
- </view>
-
- <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
- <view class="justify-content-item tn-color-gray tn-text-center">
- <view class="tn-padding-right tn-padding-top-xs tn-color-gray">
- {{ item.createTime|formatDate }}
- </view>
- </view>
- <view class="justify-content-item tn-flex tn-flex-col-center">
- <text class="tn-icon-more-vertical tn-color-gray tn-text-bold tn-text-xxl"
- @click="showActionSheet(item)"></text>
- </view>
- </view>
- </view>
- <!-- 边距间隔 -->
- <view class="tn-strip-bottom" v-if="index != content.length - 1"></view>
- </block>
- <view v-if="showEmpty&&content.length==0" style="margin-top: 32vh;">
- <tn-empty mode="data"></tn-empty>
- </view>
-
-
- </view>
-
- <view class='tn-tabbar-height'></view>
- <tn-popup v-model="showSheet" mode="center" closeBtn="true" borderRadius="16">
- <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 300px;" v-if="!showContact">
- <button @click="linkTel()" style="border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-service" style="margin-right: 12px;"></text> 联系需方</button>
- <!-- <view>联系我们帮助对接</view> -->
- <button v-if="!collStatus" @click="addColl" style="margin-top:10px;border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-star" style="margin-right: 12px;"></text> 收 藏</button>
- <button v-if="collStatus" @click="delColl" style="margin-top:10px;border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-star-fill" style="margin-right: 12px;"></text> 取消收藏</button>
- <button open-type="share" style="margin-top:10px;border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-send" style="margin-right: 12px;"></text> 转 发</button>
- </view>
- <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 300px;" v-if="showContact">
- <view><text v-if="curContact.company">公司名称:{{curContact.company}}</text></view>
- <view><text>联系人姓名:{{curContact.contactPerson}}</text> </view>
- <view><text>联系方式:{{curContact.contactMethod}}</text> </view>
- </view>
-
- </tn-popup>
- <tn-toast ref="toast"></tn-toast>
- </view>
- </template>
- <script>
- import request from '../../utils/request'
- export default {
- name: 'Index',
-
- data() {
- return {
- loading:false,
- showContact:false,
- curContact:{},
- totalSize:0,
- curIndex:1,
- showSheet: false,
- curItem:{},
- userNo:'',
- searchValue: '',
- collStatus:'',
- cardCur: 0,
- collId:'',
- isAndroid: true,
- content:[],
-
- }
- },
- filters: {
- formatDate(value) {
- if (!value) return '';
- const date = new Date(value);
- const today = new Date();
- const yesterday = new Date(today); // 昨天的日期
- yesterday.setDate(yesterday.getDate() - 1); // 将昨天的日期设置为前一天
-
- if(date.getFullYear()==today.getFullYear()&&date.getMonth()==today.getMonth()&&date.getDate()==today.getDate()){
- return '今天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
- .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
- }
- if(date.getFullYear()==yesterday.getFullYear()&&date.getMonth()==yesterday.getMonth()&&date.getDate()==yesterday.getDate()){
- return '昨天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
- .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
- }
- return date.toLocaleDateString() + ' ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
- .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
- },
-
-
- },
- created() {
- const systemInfo = uni.getSystemInfoSync()
- if (systemInfo.system.toLocaleLowerCase().includes('ios')) {
- this.isAndroid = false
- } else {
- this.isAndroid = true
- }
- this.fetchData();
- },
- onReachBottom() {
- console.warn(12345);
- },
- onShareAppMessage: function() {
- return {
- title: '速立保•生物制药产业一站式产品资源供需平台',
- path: '/pages/index/index',
- // imageUrl: 'https://example.com/image.jpg'
- };
- },
- methods: {
- // cardSwiper
- cardSwiper(e) {
- this.cardCur = e.detail.current
- },
- clickLink(url){
- uni.navigateTo({
- url:'/pages/webview/web-view?url='+url,
- })
- },
- isImage(fileName) {
- const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'ico']
- const extension = fileName.split('.').pop().toLowerCase();
- return imageExtensions.includes(extension);
- },
- reFetchData(){
- this.loading = true;
- uni.showToast({
- title:'正在刷新...',
- icon:'none'
- });
- this.fetchData();
- },
- fetchData(curIndex=1) {
- let that = this;
- that.showEmpty = false;
- request.post('/slbResourceDemand/query', {
- index:curIndex,
- limit:10,
- content: that.searchValue,
- }).then(res => {
- that.loading = false;
- if(res.success){
- that.totalSize = res.total||0;
- let newList = res.list||[];
- for(let i=0;i<newList.length;i++){
- newList[i].imgList = [];
- for(let j=0;j<newList[i].fileDetailList.length;j++){
- if(that.isImage(newList[i].fileDetailList[j].fileName)){
- newList[i].imgList.push(newList[i].fileDetailList[j]);
- }
- }
- }
- if(curIndex==1){
- that.content=newList||[];
- }else{
- that.content= that.content.concat(newList||[]);
- }
- that.showEmpty = true;
- }
- console.warn(res);
- })
- },
- // 跳转
- tn(e) {
- uni.navigateTo({
- url: e,
- });
- },
- showActionSheet(item) {
- let that = this;
- console.warn(item);
- this.curItem = item;
- this.collStatus = false;
- this.showSheet = true;
- that.showContact = false;
- if(uni.getStorageSync('userNo')){
- let params = {};
-
- params = {
- fkBisNo:that.curItem.bisNo,
- userNo: uni.getStorageSync('userNo'),
- };
- request.post('/slbCollect/query', params).then(res => {
- if(res.success){
- if(res.list&&res.list.length>0){
- that.collStatus = true;
- that.collId = res.list[0].id;
- }
- }
- })
- }
- },
- linkTel(){
-
- if(!uni.getStorageSync('userNo')){
- uni.showToast({
- title:'请登录'
- })
- uni.navigateTo({
- url:'/pages/login/login'
- })
- return false;
- }
- let that = this;
- let params = {};
- params.slbBisContact = JSON.stringify({
- fkBisNo:that.curItem.bisNo,
- bisType:'1',
- type:'1',
- userNo: uni.getStorageSync('userNo'),
- });
- request.post('/slbBisContact/add', params).then(res => {
- if(res.success){
- that.showContact = true;
- that.curContact.company = that.curItem.company;
- that.curContact.contactMethod = res.resultMap.contactMethod;
- that.curContact.contactPerson = res.resultMap.contactPerson;
- }else{
- that.showContact = false;
- uni.showToast({
- title: res.msg,
- icon:'none'
- })
- }
- })
- },
-
- addColl(){
- if(!uni.getStorageSync('userNo')){
- uni.showToast({
- title:'请登录'
- })
- uni.navigateTo({
- url:'/pages/login/login'
- })
- return false;
- }
- let that = this;
- let params = {};
- params.slbCollect = JSON.stringify({
- fkBisNo:that.curItem.bisNo,
- bisType:'1',
- userNo: uni.getStorageSync('userNo'),
- });
- request.post('/slbCollect/add', params).then(res => {
- if(res.success){
- uni.showToast({
- title: '信息已收藏,请在我的收藏里查看阅读',
- duration: 2000,
- icon:'none'
- });
- that.showSheet = false;
- }else{
- uni.showToast({
- title: res.msg
- })
- }
- })
-
- },
- delColl(){
- let that = this;
- request.post('/slbCollect/del', {
- id: that.collId
- }).then(res => {
- if(res.success){
- uni.showToast({
- title:'取消成功'
- })
- that.showSheet = false;
- }else{
- uni.showToast({
- title: res.msg
- })
- }
- })
- },
- showImg(items, index){
- let urls = [];
- for(let i=0;i<items.length;i++){
- urls.push(items[i].ftpUrl);
- }
-
- // 预览图片
- uni.previewImage({
- urls: urls,
- current:index,
-
- });
- },
- addButton(){
- if(!uni.getStorageSync('userNo')){
- uni.showToast({
- title:'请登录'
- })
- uni.navigateTo({
- url:'/pages/login/login'
- })
- return false;
- }else{
- uni.navigateTo({
- url:'/circlePages/circle'
- })
- }
- //未登录,去登录
- //已登录,去新增第一步
- },
- loadMore(){
- if(this.totalSize>this.content.length){
- this.fetchData(this.curIndex+1);
- }
- console.error('正在加载更多');
- },
- search(){
- this.fetchData();
- },
- cancel(){
- this.searchValue='';
- this.fetchData();
- },
- clear(){
- this.searchValue='';
- this.fetchData();
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .index {
- max-height: 100vh;
- }
- /* 底部安全边距 start*/
- .tn-tabbar-height {
- min-height: 120rpx;
- height: calc(140rpx + env(safe-area-inset-bottom) / 2);
- height: calc(140rpx + constant(safe-area-inset-bottom));
- }
- /* 轮播视觉差 start */
- .card-swiper {
- height: 330rpx !important;
- }
- .card-swiper swiper-item {
- width: 750rpx !important;
- left: 0rpx;
- box-sizing: border-box;
- padding: 40rpx 30rpx 30rpx 30rpx;
- overflow: initial;
- }
- .card-swiper swiper-item .swiper-item {
- width: 100%;
- display: block;
- height: 100%;
- border-radius: 15rpx;
- transform: scale(1);
- transition: all 0.2s ease-in 0s;
- // overflow: hidden;
- }
- .card-swiper swiper-item.cur .swiper-item {
- transform: none;
- transition: all 0.2s ease-in 0s;
- }
- .card-swiper swiper-item .swiper-item-text {
- margin-top: -160rpx;
- text-align: center;
- width: 100%;
- display: block;
- height: 50%;
- border-radius: 10rpx;
- transform: translate(100rpx, -60rpx) scale(0.9, 0.9);
- transition: all 0.6s ease 0s;
- overflow: hidden;
- }
- .card-swiper swiper-item.cur .swiper-item-text {
- margin-top: -220rpx;
- width: 100%;
- transform: translate(0rpx, 0rpx) scale(0.9, 0.9);
- transition: all 0.6s ease 0s;
- }
- .image-banner {
- border: 1rpx solid #F8F7F8;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .image-banner image {
- width: 100%;
- height: 100%;
- }
- /* 轮播指示点 start*/
- .indication {
- z-index: 9999;
- width: 100%;
- height: 36rpx;
- position: absolute;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- }
- .spot {
- background-color: #FFFFFF;
- opacity: 0.6;
- width: 10rpx;
- height: 10rpx;
- border-radius: 20rpx;
- top: -70rpx;
- margin: 0 8rpx !important;
- position: relative;
- }
- .spot.active {
- opacity: 1;
- width: 30rpx;
- background-color: #FFFFFF;
- }
- /* 图标容器12 start */
- .tn-three {
- position: absolute;
- top: 50%;
- right: 50%;
- bottom: 50%;
- left: 50%;
- transform: translate(-38rpx, -20rpx) rotateX(20deg) rotateY(10deg) rotateZ(-20deg);
- text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
- }
- .icon12 {
- &__item {
- width: 30%;
- background-color: #FFFFFF;
- border-radius: 10rpx;
- padding: 30rpx;
- margin: 20rpx 10rpx;
- transform: scale(1);
- transition: transform 0.3s linear;
- transform-origin: center center;
- &--icon {
- width: 100rpx;
- height: 100rpx;
- font-size: 60rpx;
- border-radius: 50%;
- margin-bottom: 18rpx;
- position: relative;
- z-index: 1;
- &::after {
- content: " ";
- position: absolute;
- z-index: -1;
- width: 100%;
- height: 100%;
- left: 0;
- bottom: 0;
- border-radius: inherit;
- opacity: 1;
- transform: scale(1, 1);
- background-size: 100% 100%;
- background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);
- }
- }
- }
- }
- /* 自定义导航栏内容 start */
- .custom-nav {
- height: 100%;
- &__back {
- margin: auto 5rpx;
- font-size: 40rpx;
- margin-right: 10rpx;
- margin-left: 30rpx;
- flex-basis: 5%;
- }
- &__search {
- flex-basis: 70%;
- width: 100%;
- height: 100%;
- &__box {
- width: 100%;
- height: 70%;
- padding: 10rpx 0;
- margin: 0 30rpx;
- border-radius: 60rpx 60rpx 0 60rpx;
- font-size: 24rpx;
- }
- &__icon {
- padding-right: 10rpx;
- margin-left: 20rpx;
- font-size: 30rpx;
- }
- &__text {
- // color: #AAAAAA;
- }
- }
- }
- .logo-image {
- width: 65rpx;
- height: 65rpx;
- position: relative;
- border: 1rpx solid #F8F7F8;
- border-radius: 50%;
- }
- .logo-pic {
- background-size: cover;
- background-repeat: no-repeat;
- // background-attachment:fixed;
- background-position: top;
- border-radius: 50%;
- }
- /* 自定义导航栏内容 end */
- /* 热门图片 start*/
- .image-tuniao1 {
- padding: 165rpx 0rpx;
- font-size: 40rpx;
- font-weight: 300;
- position: relative;
- }
- .image-tuniao2 {
- padding: 75rpx 0rpx;
- font-size: 40rpx;
- font-weight: 300;
- position: relative;
- }
- .image-tuniao3 {
- padding: 90rpx 0rpx;
- font-size: 40rpx;
- font-weight: 300;
- position: relative;
- }
- .image-pic {
- border: 1rpx solid #F8F7F8;
- background-size: cover;
- background-repeat: no-repeat;
- // background-attachment:fixed;
- background-position: top;
- border-radius: 10rpx;
- }
- /* 文章内容 start*/
- .tn-blogger-content {
- &__wrap {
- margin: 30rpx;
- }
- &__info {
- &__btn {
- margin-right: -12rpx;
- opacity: 0.5;
- }
- }
- &__label {
- &__item {
- color: #1D2541;
- background-color: #F3F2F7;
- border-radius: 10rpx;
- font-size: 22rpx;
- padding: 5rpx 15rpx;
- margin: 5rpx 0 0 18rpx;
- &--prefix {
- font-size: 24rpx;
- color: #1D2541;
- padding-right: 10rpx;
- }
- }
- &__desc {
- line-height: 55rpx;
- }
- }
- &__main-image {
- border: 1rpx solid #F8F7F8;
- border-radius: 16rpx;
- &--1 {
- max-width: 690rpx;
- min-width: 690rpx;
- max-height: 400rpx;
- min-height: 400rpx;
- }
- &--2 {
- max-width: 260rpx;
- max-height: 260rpx;
- }
- &--3 {
- height: 212rpx;
- width: 100%;
- }
- }
- &__count-icon {
- font-size: 40rpx;
- padding-right: 5rpx;
- }
- }
- .image-wallpaper {
- padding: 160rpx 0rpx;
- font-size: 40rpx;
- font-weight: 300;
- position: relative;
- }
- .image-pic {
- background-size: cover;
- background-repeat: no-repeat;
- // background-attachment:fixed;
- background-position: top;
- border-radius: 10rpx;
- }
- /* 文章内容 end*/
- .circle {
- max-height: 100vh;
- }
- /* 底部安全边距 start*/
- .tn-tabbar-height {
- min-height: 120rpx;
- height: calc(140rpx + env(safe-area-inset-bottom) / 2);
- height: calc(140rpx + constant(safe-area-inset-bottom));
- }
- /* 自定义导航栏内容 start */
- .custom-nav {
- height: 100%;
- &__back {
- margin: auto 5rpx;
- font-size: 40rpx;
- margin-right: 10rpx;
- margin-left: 30rpx;
- flex-basis: 5%;
- }
- &__search {
- flex-basis: 60%;
- width: 100%;
- height: 100%;
- &__box {
- width: 100%;
- height: 70%;
- padding: 10rpx 0;
- margin: 0 30rpx;
- border-radius: 60rpx 60rpx 0 60rpx;
- font-size: 24rpx;
- }
- &__icon {
- padding-right: 10rpx;
- margin-left: 20rpx;
- font-size: 30rpx;
- }
- &__text {
- color: #AAAAAA;
- }
- }
- }
- .logo-image {
- width: 60rpx;
- height: 60rpx;
- position: relative;
- margin-top: -15rpx;
- }
- .logo-pic {
- background-size: cover;
- background-repeat: no-repeat;
- // background-attachment:fixed;
- background-position: top;
- border-radius: 50%;
- }
- /* 自定义导航栏内容 end */
- /* 博主头像 start*/
- .image-circle {
- // padding: 95rpx;
- width: 190rpx;
- height: 190rpx;
- font-size: 40rpx;
- font-weight: 300;
- position: relative;
- }
- .image-pic {
- border: 1rpx solid #F8F7F8;
- background-size: cover;
- background-repeat: no-repeat;
- // background-attachment:fixed;
- background-position: top;
- border-radius: 10rpx;
- }
- .tn-color-cat {
- color: #1D2541;
- }
- .tn-bg-cat {
- background-color: #1D2541;
- }
- /* 文章内容 start*/
- .blogger {
- &__item {
- padding: 30rpx;
- }
- &__author {
- &__btn {
- margin-right: -12rpx;
- opacity: 0.5;
- }
- }
- &__desc {
- line-height: 30rpx;
- &__label {
- color: #1D2541;
- background-color: #F3F2F7;
- border-radius: 10rpx;
- font-size: 22rpx;
- padding: 5rpx 15rpx;
- margin: 5rpx 18rpx 0 0;
- &--prefix {
- font-size: 24rpx;
- color: #1D2541;
- padding-right: 10rpx;
- }
- }
- &__content {
- line-height: 50rpx;
- }
- }
- &__content {
- margin-top: 18rpx;
- padding-right: 18rpx;
- &__data {
- line-height: 46rpx;
- text-align: justify;
- overflow: hidden;
- transition: all 0.25s ease-in-out;
- }
- &__status {
- margin-top: 10rpx;
- font-size: 26rpx;
- color: #82B2FF;
- }
- }
- &__main-image {
- border: 1rpx solid #F8F7F8;
- border-radius: 16rpx;
- &--1 {
- max-width: 80%;
- max-height: 300rpx;
- }
- &--2 {
- max-width: 260rpx;
- max-height: 260rpx;
- }
- &--3 {
- height: 212rpx;
- width: 100%;
- }
- }
- &__count-icon {
- font-size: 40rpx;
- padding-right: 5rpx;
- }
- &__ad {
- width: 100%;
- height: 500rpx;
- transform: translate3d(0px, 0px, 0px) !important;
- ::v-deep .uni-swiper-slide-frame {
- transform: translate3d(0px, 0px, 0px) !important;
- }
- .uni-swiper-slide-frame {
- transform: translate3d(0px, 0px, 0px) !important;
- }
- &__item {
- position: absolute;
- width: 100%;
- height: 100%;
- transform-origin: left center;
- transform: translate3d(100%, 0px, 0px) scale(1) !important;
- transition: transform 0.25s ease-in-out;
- z-index: 1;
- &--0 {
- transform: translate3d(0%, 0px, 0px) scale(1) !important;
- z-index: 4;
- }
- &--1 {
- transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
- z-index: 3;
- }
- &--2 {
- transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
- z-index: 2;
- }
- }
- &__content {
- border-radius: 40rpx;
- width: 640rpx;
- height: 500rpx;
- overflow: hidden;
- }
- &__image {
- width: 100%;
- height: 100%;
- }
- }
- }
- /* 文章内容 end*/
- /* 间隔线 start*/
- .tn-strip-bottom {
- width: 100%;
- border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
- }
- /* 间隔线 end*/
- /* 广告内容 start */
- .ad-image {
- width: 80rpx;
- height: 80rpx;
- position: relative;
- }
- .ad-pic {
- background-size: cover;
- background-repeat: no-repeat;
- // background-attachment:fixed;
- background-position: top;
- border-radius: 20%;
- }
- /* 自定义导航栏内容 end */
- /* 全屏轮播 start*/
- .card-swiper {
- height: 100vh !important;
- }
- .card-swiper swiper-item {
- width: 750rpx !important;
- left: 0rpx;
- box-sizing: border-box;
- overflow: initial;
- }
- .card-swiper swiper-item .swiper-item {
- width: 100%;
- display: block;
- height: 100vh;
- border-radius: 0rpx;
- transform: scale(1);
- transition: all 0.2s ease-in 0s;
- overflow: hidden;
- }
- .card-swiper swiper-item.cur .swiper-item {
- transform: none;
- transition: all 0.2s ease-in 0s;
- }
- .card-swiper swiper-item .swiper-item-png {
- margin-top: -50vh;
- width: 100%;
- display: block;
- border-radius: 0rpx;
- transform: translate(1040rpx, 20rpx) scale(0.5, 0.5);
- transition: all 0.6s ease 0s;
- // overflow: hidden;
- }
- .card-swiper swiper-item.cur .swiper-item-png {
- margin-top: -100vh;
- width: 900rpx;
- transform: translate(-80rpx, 0rpx) scale(1, 1);
- transition: all 0.6s ease 0s;
- }
- .image-banner {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .image-banner image {
- width: 100%;
- }
- /* 轮播指示点 start*/
- .indication {
- z-index: 9999;
- width: 100%;
- height: 36rpx;
- position: fixed;
- // display:flex;
- display: block;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- }
- .spot {
- background-color: #000;
- opacity: 0.3;
- width: 10rpx;
- height: 10rpx;
- border-radius: 20rpx;
- margin: 20rpx 0 !important;
- left: 95vw;
- top: -60vh;
- position: relative;
- }
- .spot.active {
- opacity: 0.6;
- height: 30rpx;
- background-color: #000;
- }
- /* 资讯主图 start*/
- .image-article {
- border-radius: 8rpx;
- border: 1rpx solid #F8F7F8;
- width: 200rpx;
- height: 200rpx;
- position: relative;
- }
- .image-pic {
- background-size: cover;
- background-repeat: no-repeat;
- // background-attachment:fixed;
- background-position: top;
- border-radius: 10rpx;
- }
- .article-shadow {
- border-radius: 15rpx;
- box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
- }
- /* 文字截取*/
- .clamp-text-1 {
- -webkit-line-clamp: 1;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- text-overflow: ellipsis;
- overflow: hidden;
- }
- .clamp-text-2 {
- -webkit-line-clamp: 2;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- text-overflow: ellipsis;
- overflow: hidden;
- }
- /* 标签内容 start*/
- .tn-tag-content {
- &__item {
- display: inline-block;
- line-height: 35rpx;
- color: #1D2541;
- background-color: #F3F2F7;
- border-radius: 10rpx;
- font-size: 22rpx;
- padding: 5rpx 15rpx;
- &--prefix {
- padding-right: 10rpx;
- }
- }
- }
- /* 图标容器9 start */
- .icon9 {
- &__item {
- width: 30%;
- background-color: #FFFFFF;
- border-radius: 10rpx;
- padding: 30rpx;
- margin: 20rpx 10rpx;
- transform: scale(1);
- transition: transform 0.3s linear;
- transform-origin: center center;
- &--icon {
- width: 110rpx;
- height: 110rpx;
- font-size: 65rpx;
- border-radius: 50%;
- margin: 20rpx 40rpx;
- position: relative;
- z-index: 1;
- &::after {
- content: " ";
- position: absolute;
- z-index: -1;
- width: 100%;
- height: 100%;
- left: 0;
- bottom: 0;
- border-radius: inherit;
- opacity: 1;
- transform: scale(1, 1);
- background-size: 100% 100%;
- background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
- }
- }
- }
- }
- /* 悬浮 */
- .tnxuanfu {
- animation: suspension 3s ease-in-out infinite;
- }
- @keyframes suspension {
- 0%,
- 100% {
- transform: translateY(0);
- }
- 50% {
- transform: translateY(-0.8rem);
- }
- }
- /* 悬浮按钮 */
- .button-shop {
- width: 90rpx;
- height: 90rpx;
- display: flex;
- flex-direction: row;
- position: fixed;
- /* bottom:200rpx;
- right: 20rpx; */
- left: 5rpx;
- top: 5rpx;
- z-index: 1001;
- border-radius: 100px;
- opacity: 0.9;
- }
- /* 按钮 */
- .edit {
- bottom: 300rpx;
- right: 75rpx;
- position: fixed;
- z-index: 9999;
- }
- .pa,
- .pa0 {
- position: absolute
- }
- .pa0 {
- left: 0;
- top: 0
- }
- .bg0 {
- width: 100rpx;
- height: 100rpx;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .bg1 {
- width: 100%;
- height: 100%;
- }
- .hx-box {
- top: 50%;
- left: 50%;
- width: 100rpx;
- height: 100rpx;
- transform-style: preserve-3d;
- transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
- }
- .hx-box .pr {
- width: 100rpx;
- height: 100rpx;
- transform-style: preserve-3d;
- animation: hxz 20s linear infinite;
- }
- @keyframes hxz {
- 0% {
- transform: rotateX(0deg);
- }
- 100% {
- transform: rotateX(-360deg);
- }
- }
- .hx-box .pr .pa0 {
- width: 100rpx;
- height: 100rpx;
- /* border: 4px solid #5ec0ff; */
- border-radius: 1000px;
- }
- .hx-box .pr .pa0 .span {
- display: block;
- width: 100%;
- height: 100%;
- background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc4.png) no-repeat center center;
- background-size: 100% 100%;
- animation: hx 4s linear infinite;
- }
- @keyframes hx {
- to {
- transform: rotate(360deg);
- }
- }
- .hx-k1 {
- transform: rotateX(-60deg) rotateZ(-60deg)
- }
- .hx-k2 {
- transform: rotateX(-30deg) rotateZ(-30deg)
- }
- .hx-k3 {
- transform: rotateX(0deg) rotateZ(0deg)
- }
- .hx-k4 {
- transform: rotateX(30deg) rotateZ(30deg)
- }
- .hx-k5 {
- transform: rotateX(60deg) rotateZ(60deg)
- }
- .hx-k6 {
- transform: rotateX(90deg) rotateZ(90deg)
- }
- /deep/ .tn-toast{
- background-color: #000c !important;
- }
-
- </style>
|