12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502 |
- <template>
- <view class="index tn-safe-area-inset-bottom" style="background: #f7f7f7;min-height: 100vh;">
- <tn-nav-bar customBack>
- <view slot="back" class='tn-custom-nav-bar__back' >
-
- <image style="width: 28px;height: 28px;margin-left:4px" @click="reFetchData()" src="../../static/tu/reload.png"></image>
- <image style="width: 28px;height: 28px;margin-left:12px" @click="addButton()" src="../../static/tu/add.png"></image>
-
- </view>
-
- <view slot="default" style="display: flex;">
- <view style="flex:1;">
- <text :style="{fontSize:(wxFontSize)+'px'}">我要什么</text>
- </view>
-
- </view>
- </tn-nav-bar>
-
- <scroll-view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="height: 100vh;" class="custom-tabbar-page" lower-threshold="60" scroll-y :refresher-enabled="true" :refresher-triggered="triggered" @refresherpulling="onPulling" @refresherrestore="onRestore" @refresherrefresh="onRefresh" enable-back-to-top @scrolltolower="tabbarPageScrollLower">
- <view >
- <uv-sticky bgColor="#ffffff">
- <uni-search-bar radius="15" placeholder="搜索" @confirm="search" v-model="searchValue" @blur="search"
- @cancel="cancel" @clear="clear" cancelButton="auto" bgColor="#fff" clearButton="auto" :fontSize="(wxFontSize-2)"
- style="background: #f7f7f7;">
- <template v-slot:searchIcon>
- <image src="../../static/tu/search.png" style="width: 26px;height: 26px"></image>
- </template>
- </uni-search-bar></uv-sticky>
- <!-- 图文信息 -->
- <block v-for="(item,index) in content" :key="item.id" >
- <view class="blogger__item" style="border-radius: 12px;margin: 12px 16px 12px 16px; background-color: #fff;" :style="{marginTop:index==0?'0':'12px'}">
- <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="" style="width: 5px;height: 5px;background: #E18730;border-radius: 50%;margin-right: 4px;">
- </view>
- <view class="tn-padding-right">
- <view class="tn-padding-right tn-text-lg" style="color:#333" :style="{fontSize:(wxFontSize)+'px'}">
- {{ 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: #E6E8F4;font-size: 12px;word-break: keep-all;padding: 8px;color: #8383F7;border-radius: 24px;border-top-right-radius: 0;" :style="{fontSize:(wxFontSize-6)+'px'}" @click="showValid(item.validDate)">{{item.validDate}}</text>
- </view>
- </view>
- <view style="margin-top: 20rpx;border-radius: 0px 0px 0px 0px;width:calc(100% + 32px);margin-left:-16px;border-bottom: 1px solid #E6E6E6;"></view>
-
- <view
- class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"
- >
-
- <text
- class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df" style="color:#747E87" :style="{fontSize:(wxFontSize-2)+'px'}">{{ 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">
- <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" style="background-color:#005da60d ;margin-bottom: 4px;padding: 4px 8px;border-radius: 4px;" :key="file.id" v-if="!isImage(file.fileName)" @click="clickLink(file.ftpUrl,file.fileName)">
- <view>
- <image src="../../static/tu/link.png" style="width: 18px;height: 18px;vertical-align: bottom;"></image>
- <view style="display: inline;margin-left:8px;color:#005DA6;" :style="{fontSize:(wxFontSize-3)+'px'}">
- {{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" :style="{fontSize:(wxFontSize-3)+'px',color:'#777'}">
- {{ item.createTime|formatDate }}
- </view>
- </view>
- <view class="justify-content-item tn-flex tn-flex-col-center" style="position: relative;">
-
- <image style="width: 30px;height:30px;" @click="showActionSheet(item)" src="../../static/tu/more.png"></image>
- <!-- <text class="tn-icon-more-vertical tn-text-bold tn-text-xxl" style="color: #005DA6;transform: rotate(90deg);"
- @click="showActionSheet(item)"></text> -->
-
- <view v-if="curItem.id==item.id&&showSheet" class="pop-dia" style="position: absolute;background: #E4F1FB;display: block;right: 10px;top: 24px;border-radius: 6px;z-index: 900;">
-
- <view class="content" style="padding: 8px;font-size: 16px;line-height: 24px; width: 180px;border-radius: 6px;z-index: -1;"
- v-if="!showContact">
- <button @click="linkTel()" style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;border-bottom: 1px solid rgb(0 93 166 / 0.2);">
- <image src="../../static/tu/call.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;"> 联系需方</button>
- <!-- <view>联系我们帮助对接</view> -->
- <button v-if="!collStatus" @click="addColl"
- style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;border-bottom: 1px solid rgb(0 93 166 / 0.2);" type="default" plain="true">
- <image src="../../static/tu/coll.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;">
- 收 藏</button>
- <button v-if="collStatus" @click="delColl"
- style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;border-bottom: 1px solid rgb(0 93 166 / 0.2);" type="default" plain="true">
- <image src="../../static/tu/coll.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;"> 取消收藏</button>
- <button open-type="share"
- style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;" type="default" plain="true" :data-coupon="curItem">
- <image src="../../static/tu/share.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;">
- 转 发</button>
- </view>
- <view class="content " style="position: relative;background: linear-gradient( 180deg, #DAECFA 0%, #FFFFFF 27%, #FFFFFF 100%);padding: 24px 40px;padding-bottom: 32px;font-size: 16px;width: calc(100vw - 80px);line-height: 24px;border-radius: 12px;"
- v-if="showContact">
- <view><text style="font-size: 19px;font-weight: bold;color: #333;" v-if="curContact.company">{{curContact.company}}</text></view>
- <view style="margin-top:10px;font-size: 17px;text-align: center;color:#333">
- <image src="../../static/tu/person.png" style="width: 24px;height: 24px;vertical-align: sub;">
- <text style="margin-left: 6px;">{{curContact.contactPerson}}</text> </view>
- <view style="margin-top:10px;font-size: 17px;text-align: center;color:#333" @click="showTel(curContact.contactMethod)">
- <image src="../../static/tu/tel.png" style="width: 24px;height: 24px;vertical-align: middle;">
- <text style="margin-left: 4px;">{{curContact.contactMethod}}</text>
- </view>
-
- <image src="../../static/tu/close.png" style="width: 40px;height: 40px;position: absolute; left: calc(50vw - 60px);bottom: -64px;" @click="hideSheet()"></image>
- </view>
- <view style="position: fixed;top: 0;left: 0;height: 100000vh;width: 100%;background: rgb(0 0 0 / 0.5);z-index: -1;" @click="hideSheet()" v-if="showContact"></view>
- </view>
- </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="list"></tn-empty>
- </view>
- <!-- 结尾 -->
- <view v-if="content.length==totalSize&&totalSize!=0" style="background-color: #f7f7f7;padding: 16px 0;" :style="{paddingTop:showSheet?'166px':'16px'}">
- <tn-load-more status="nomore" :loadText="loadText" :fontSize="(wxFontSize+11)"></tn-load-more>
- </view>
- </view>
- </scroll-view>
- </view>
- </template>
- <script>
- import request from '../../utils/request'
- export default {
- name: 'Index',
- data() {
- return {
- loading: false,
- loadText: {
- loadmore: '下拉加载',
- loading: '快速加载中...',
- nomore: '恭喜你,已阅读完所有需求信息哦!'
- },
- showContact: false,
- curContact: {},
- totalSize: 0,
- curIndex: 1,
- showSheet: false,
- curItem: {},
- userNo: '',
- searchValue: '',
- collStatus: '',
- cardCur: 0,
- collId: '',
- isAndroid: true,
- content: [],
- showEmpty:false,
- wxFontSize:17,
- triggered: false,
- _freshing: false,
- shareData:{},
- }
- },
- 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 appBaseInfo = wx.getAppBaseInfo();
- this.wxFontSize = uni.getStorageSync('fontSize')||appBaseInfo.fontSizeSetting||17;
-
- // const accountInfo = uni.getAccountInfoSync();
- // if(accountInfo&&accountInfo.miniProgram.envVersion&&accountInfo.miniProgram.version){
- //正式上线版本
- this.fetchData();
- // }
-
- },
- methods: {
- // 瀑布流导航页面滚动到底部
- tabbarPageScrollLower(e) {
- this.loadMore();
- },
- onPulling(e) {
- console.log("onpulling", e);
- if(e.detail.deltaY<0){
- return
- }
- this.triggered = true
- },
- onRefresh(){
- if (this._freshing) return;
- this._freshing = true;
-
-
- this.reFetchData();
-
- setTimeout(() => {
- this.triggered = false;
- this._freshing = false;
- }, 2000)
- },
- onRestore() {
- this.triggered = false; // 需要重置
- },
- addLog(shareData){
- const that = this;
- let params= {
- bisNo:shareData.bisNo,
- bisType:'1',
- userNo:uni.getStorageSync('userNo')
- };
-
- request.post('/slbForward/add',{slbForward:JSON.stringify(params)},{
- headers: {
- 'Content-Type': 'application/json', // 默认值
- },
- }).then(res=>{
-
- })
- },
- sleep(time) {
- return new Promise((resolve) => setTimeout(resolve, time));
- },
- onShareAppMessage: function(option) {
- if(option.from=="button"){
-
- this.hideSheet();
- this.shareData=option.target.dataset.coupon;
- this.addLog(this.shareData);
- const promise = new Promise(async (resolve) => {
-
- await this.sleep(500);
- resolve({
- // title: `速立保`,
- path: `/pages/index/detail/detail?id=`+this.shareData.bisNo+'&isNeed=1',
- // imageUrl: url,
- });
- });
- // 默认参数
- return {
- // title: `速立保`,
- path: `/pages/index/detail/detail?id=`+this.shareData.bisNo+'&isNeed=1',
- promise,
- };
-
- }else{
- return {
- // title: '速立保',
- path: '/pages/index/index',
- };
- }
- },
- clickLink(url,fileName) {
- // uni.navigateTo({
- // url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title='+fileName+'&url='+ url),
- // })
- uni.downloadFile({
- url: url,
- filePath: wx.env.USER_DATA_PATH + "/" + fileName,
- success: function (res) {
- const filePath = res.filePath
- uni.openDocument({
- filePath: filePath,
- showMenu: true,
- success: function (res) {
- console.log('打开文档成功')
- },
- fail: function(){
- uni.navigateTo({
- url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title='+fileName+'&url='+ 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;
- this.curIndex = curIndex;
- request.post('/slbResourceDemand/query', {
- index: curIndex,
- limit: 10,
- content: that.searchValue,
- }).then(res => {
- that.loading = false;
- if (res&&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;
- })
- },
- // 跳转
- tn(e) {
- uni.navigateTo({
- url: e,
- });
- },
- hideSheet(){
- this.curItem = {}
- this.showSheet = false;
- },
- showActionSheet(item) {
- let that = this;
- if(!this.curItem.id){
- this.curItem = item;
- }else{
- this.curItem = {}
- this.showSheet = false;
- return false;
- }
-
- this.curItem.isNeed = 1;
- 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: '请登录',
- icon:'none'
- })
- 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',
- company: that.curItem.company,
- companyNo: that.curItem.companyNo,
- 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: '请登录',
- icon:'none'
- })
- 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) {
-
- that.curItem = {}
- that.showSheet = false;
-
- uni.showToast({
- title: '信息已收藏,请在我的收藏里查看阅读',
- icon:'none',
- duration: 2000
- });
-
- } else {
- uni.showToast({
- title: res.msg,
- icon:'none'
- })
- }
- })
- },
- delColl() {
- let that = this;
-
- request.post('/slbCollect/del', {
- id: that.collId
- }).then(res => {
- if (res.success) {
- that.curItem = {}
- that.showSheet = false;
-
-
- wx.showToast({
- title: '此需求信息将不会保存在我的收藏里',
- icon:'none',
- duration: 2000
- });
-
- } else {
- uni.showToast({
- title: res.msg,
- icon:'none'
- })
- }
- })
- },
- showImg(items, index) {
- let urls = [];
- for (let i = 0; i < items.length; i++) {
- urls.push(items[i].ftpUrl);
- }
- // 预览图片
- uni.previewImage({
- urls: urls,
- current: index,
- });
- },
- showValid(text){
- uni.showToast({
- title: '有效期:'+text,
- icon: 'none'
- })
- },
- addButton() {
- if (!uni.getStorageSync('userNo')) {
- uni.showToast({
- title: '请登录',
- icon:'none'
- })
- 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();
- },
- showTel(tel){
- uni.makePhoneCall({
- phoneNumber: tel,
- });
- },
- showDetail(item){
- uni.navigateTo({
- url: '/pages/index/detail/detail?id='+item.bisNo+'&isNeed=1'
- })
- }
- }
- }
- </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)
- }
- </style>
|