home.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342
  1. <template>
  2. <view class="index tn-safe-area-inset-bottom">
  3. <tn-nav-bar customBack>
  4. <view slot="back" class='tn-custom-nav-bar__back' @click="reFetchData()">
  5. <text v-if="!loading" class="tn-icon-circle-arrow" style="font-size: 50rpx;"></text>
  6. <tn-loading v-if="loading" :size="46"></tn-loading>
  7. </view>
  8. <view slot="default" style="display: flex;">
  9. <view style="flex:1;margin-left:25px">
  10. <text>我要什么</text>
  11. </view>
  12. <view>
  13. <text class="tn-icon-add-fill" style="font-size: 30px;margin-right: 4px;" @click="addButton()"></text>
  14. </view>
  15. </view>
  16. </tn-nav-bar>
  17. <view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
  18. <uv-sticky :offsetTop="vuex_custom_bar_height + 'px'" bgColor="#ffffff">
  19. <uni-search-bar radius="15" placeholder="搜索" @confirm="search" v-model="searchValue" @blur="search"
  20. @cancel="cancel" @clear="clear" cancelButton="auto"
  21. clearButton="auto" style="border-bottom: 1rpx solid #f1f1f1cc;">
  22. </uni-search-bar></uv-sticky>
  23. <!-- 图文信息 -->
  24. <block v-for="(item,index) in content" :key="index">
  25. <view class="blogger__item">
  26. <view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
  27. <view class="justify__author__info" @click="tn('')">
  28. <view class="tn-flex tn-flex-row-center">
  29. <view class="tn-flex tn-flex-row-center tn-flex-col-center">
  30. <!-- <view class="">
  31. <tn-avatar class="" shape="circle" :src="item.userAvatar" size="lg">
  32. </tn-avatar>
  33. </view> -->
  34. <view class="tn-padding-right tn-text-ellipsis">
  35. <view class="tn-padding-right tn-color-grey tn-text-lg">
  36. {{ item.company }}
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view v-if="item.validDate" class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
  43. <text class="" style="background: #3F51B542;font-size: 12px;
  44. padding: 8px;
  45. color: #0000FF;
  46. border-radius: 24px;
  47. border-top-right-radius: 0;">{{item.validDate}}</text>
  48. </view>
  49. </view>
  50. <view
  51. class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"
  52. @click="tn('')">
  53. <!-- <view v-for="(label_item,label_index) in item.label" :key="label_index"
  54. class="blogger__desc__label tn-float-left tn-margin-right">
  55. <text class="blogger__desc__label--prefix tn-icon-topics-fill"></text>
  56. <text class="tn-text-df">{{ label_item }}</text>
  57. </view> -->
  58. <!-- 不用限制长度了,因为发布的时候限制长度了-->
  59. <text
  60. class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.content }}</text>
  61. </view>
  62. <block v-if="item.imgList">
  63. <view v-if="[1,2,4].indexOf(item.imgList.length) != -1" class="tn-padding-top-xs"
  64. @click="tn('')">
  65. <image v-for="(image_item,image_index) in item.imgList" :key="image_index"
  66. class="blogger__main-image" :class="{
  67. 'blogger__main-image--1 tn-margin-bottom-sm': item.imgList.length === 1,
  68. 'blogger__main-image--2 tn-margin-right-sm tn-margin-bottom-sm': item.imgList.length === 2 || item.imgList.length === 4
  69. }" :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  70. </view>
  71. <view v-else class="tn-padding-top-xs">
  72. <tn-grid hoverClass="none" :col="3">
  73. <block v-for="(image_item,image_index) in item.imgList" :key="image_index">
  74. <!-- #ifndef MP-WEIXIN -->
  75. <tn-grid-item style="width: 30%;margin: 10rpx;">
  76. <image class="blogger__main-image blogger__main-image--3" :src="image_item.ftpUrl"
  77. mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  78. </tn-grid-item>
  79. <!-- #endif-->
  80. <!-- #ifdef MP-WEIXIN -->
  81. <tn-grid-item style="width: 30%;margin: 10rpx;">
  82. <image class="blogger__main-image blogger__main-image--3" :src="image_item.ftpUrl"
  83. mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  84. </tn-grid-item>
  85. <!-- #endif-->
  86. </block>
  87. </tn-grid>
  88. </view>
  89. </block>
  90. <view v-for="file in item.fileDetailList" v-if="!isImage(file.fileName)">
  91. <view>
  92. <text class="tn-icon-link"></text>
  93. <view style="display: inline-block;margin-left:8px" @click="clickLink(file.ftpUrl)">{{file.fileName}}</view>
  94. </view>
  95. </view>
  96. <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
  97. <view class="justify-content-item tn-color-gray tn-text-center">
  98. <view class="tn-padding-right tn-padding-top-xs tn-color-gray">
  99. {{ item.createTime|formatDate }}
  100. </view>
  101. </view>
  102. <view class="justify-content-item tn-flex tn-flex-col-center">
  103. <text class="tn-icon-more-vertical tn-color-gray tn-text-bold tn-text-xxl"
  104. @click="showActionSheet(item)"></text>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 边距间隔 -->
  109. <view class="tn-strip-bottom" v-if="index != content.length - 1"></view>
  110. </block>
  111. <view v-if="showEmpty&&content.length==0" style="margin-top: 32vh;">
  112. <tn-empty mode="data"></tn-empty>
  113. </view>
  114. </view>
  115. <view class='tn-tabbar-height'></view>
  116. <tn-popup v-model="showSheet" mode="center" closeBtn="true" borderRadius="16">
  117. <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 300px;" v-if="!showContact">
  118. <button @click="linkTel()" style="border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-service" style="margin-right: 12px;"></text> 联系需方</button>
  119. <!-- <view>联系我们帮助对接</view> -->
  120. <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> 收&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;藏</button>
  121. <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>
  122. <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> 转&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发</button>
  123. </view>
  124. <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 300px;" v-if="showContact">
  125. <view><text v-if="curContact.company">公司名称:{{curContact.company}}</text></view>
  126. <view><text>联系人姓名:{{curContact.contactPerson}}</text> </view>
  127. <view><text>联系方式:{{curContact.contactMethod}}</text> </view>
  128. </view>
  129. </tn-popup>
  130. <tn-toast ref="toast"></tn-toast>
  131. </view>
  132. </template>
  133. <script>
  134. import request from '../../utils/request'
  135. export default {
  136. name: 'Index',
  137. data() {
  138. return {
  139. loading:false,
  140. showContact:false,
  141. curContact:{},
  142. totalSize:0,
  143. curIndex:1,
  144. showSheet: false,
  145. curItem:{},
  146. userNo:'',
  147. searchValue: '',
  148. collStatus:'',
  149. cardCur: 0,
  150. collId:'',
  151. isAndroid: true,
  152. content:[],
  153. }
  154. },
  155. filters: {
  156. formatDate(value) {
  157. if (!value) return '';
  158. const date = new Date(value);
  159. const today = new Date();
  160. const yesterday = new Date(today); // 昨天的日期
  161. yesterday.setDate(yesterday.getDate() - 1); // 将昨天的日期设置为前一天
  162. if(date.getFullYear()==today.getFullYear()&&date.getMonth()==today.getMonth()&&date.getDate()==today.getDate()){
  163. return '今天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  164. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  165. }
  166. if(date.getFullYear()==yesterday.getFullYear()&&date.getMonth()==yesterday.getMonth()&&date.getDate()==yesterday.getDate()){
  167. return '昨天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  168. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  169. }
  170. return date.toLocaleDateString() + ' ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  171. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  172. },
  173. },
  174. created() {
  175. const systemInfo = uni.getSystemInfoSync()
  176. if (systemInfo.system.toLocaleLowerCase().includes('ios')) {
  177. this.isAndroid = false
  178. } else {
  179. this.isAndroid = true
  180. }
  181. this.fetchData();
  182. },
  183. onReachBottom() {
  184. console.warn(12345);
  185. },
  186. onShareAppMessage: function() {
  187. return {
  188. title: '速立保•生物制药产业一站式产品资源供需平台',
  189. path: '/pages/index/index',
  190. // imageUrl: 'https://example.com/image.jpg'
  191. };
  192. },
  193. methods: {
  194. // cardSwiper
  195. cardSwiper(e) {
  196. this.cardCur = e.detail.current
  197. },
  198. clickLink(url){
  199. uni.navigateTo({
  200. url:'/pages/webview/web-view?url='+url,
  201. })
  202. },
  203. isImage(fileName) {
  204. const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'ico']
  205. const extension = fileName.split('.').pop().toLowerCase();
  206. return imageExtensions.includes(extension);
  207. },
  208. reFetchData(){
  209. this.loading = true;
  210. uni.showToast({
  211. title:'正在刷新...',
  212. icon:'none'
  213. });
  214. this.fetchData();
  215. },
  216. fetchData(curIndex=1) {
  217. let that = this;
  218. that.showEmpty = false;
  219. request.post('/slbResourceDemand/query', {
  220. index:curIndex,
  221. limit:10,
  222. content: that.searchValue,
  223. }).then(res => {
  224. that.loading = false;
  225. if(res.success){
  226. that.totalSize = res.total||0;
  227. let newList = res.list||[];
  228. for(let i=0;i<newList.length;i++){
  229. newList[i].imgList = [];
  230. for(let j=0;j<newList[i].fileDetailList.length;j++){
  231. if(that.isImage(newList[i].fileDetailList[j].fileName)){
  232. newList[i].imgList.push(newList[i].fileDetailList[j]);
  233. }
  234. }
  235. }
  236. if(curIndex==1){
  237. that.content=newList||[];
  238. }else{
  239. that.content= that.content.concat(newList||[]);
  240. }
  241. that.showEmpty = true;
  242. }
  243. console.warn(res);
  244. })
  245. },
  246. // 跳转
  247. tn(e) {
  248. uni.navigateTo({
  249. url: e,
  250. });
  251. },
  252. showActionSheet(item) {
  253. let that = this;
  254. console.warn(item);
  255. this.curItem = item;
  256. this.collStatus = false;
  257. this.showSheet = true;
  258. that.showContact = false;
  259. if(uni.getStorageSync('userNo')){
  260. let params = {};
  261. params = {
  262. fkBisNo:that.curItem.bisNo,
  263. userNo: uni.getStorageSync('userNo'),
  264. };
  265. request.post('/slbCollect/query', params).then(res => {
  266. if(res.success){
  267. if(res.list&&res.list.length>0){
  268. that.collStatus = true;
  269. that.collId = res.list[0].id;
  270. }
  271. }
  272. })
  273. }
  274. },
  275. linkTel(){
  276. if(!uni.getStorageSync('userNo')){
  277. uni.showToast({
  278. title:'请登录'
  279. })
  280. uni.navigateTo({
  281. url:'/pages/login/login'
  282. })
  283. return false;
  284. }
  285. let that = this;
  286. let params = {};
  287. params.slbBisContact = JSON.stringify({
  288. fkBisNo:that.curItem.bisNo,
  289. bisType:'1',
  290. type:'1',
  291. userNo: uni.getStorageSync('userNo'),
  292. });
  293. request.post('/slbBisContact/add', params).then(res => {
  294. if(res.success){
  295. that.showContact = true;
  296. that.curContact.company = that.curItem.company;
  297. that.curContact.contactMethod = res.resultMap.contactMethod;
  298. that.curContact.contactPerson = res.resultMap.contactPerson;
  299. }else{
  300. that.showContact = false;
  301. uni.showToast({
  302. title: res.msg,
  303. icon:'none'
  304. })
  305. }
  306. })
  307. },
  308. addColl(){
  309. if(!uni.getStorageSync('userNo')){
  310. uni.showToast({
  311. title:'请登录'
  312. })
  313. uni.navigateTo({
  314. url:'/pages/login/login'
  315. })
  316. return false;
  317. }
  318. let that = this;
  319. let params = {};
  320. params.slbCollect = JSON.stringify({
  321. fkBisNo:that.curItem.bisNo,
  322. bisType:'1',
  323. userNo: uni.getStorageSync('userNo'),
  324. });
  325. request.post('/slbCollect/add', params).then(res => {
  326. if(res.success){
  327. uni.showToast({
  328. title: '信息已收藏,请在我的收藏里查看阅读',
  329. duration: 2000,
  330. icon:'none'
  331. });
  332. that.showSheet = false;
  333. }else{
  334. uni.showToast({
  335. title: res.msg
  336. })
  337. }
  338. })
  339. },
  340. delColl(){
  341. let that = this;
  342. request.post('/slbCollect/del', {
  343. id: that.collId
  344. }).then(res => {
  345. if(res.success){
  346. uni.showToast({
  347. title:'取消成功'
  348. })
  349. that.showSheet = false;
  350. }else{
  351. uni.showToast({
  352. title: res.msg
  353. })
  354. }
  355. })
  356. },
  357. showImg(items, index){
  358. let urls = [];
  359. for(let i=0;i<items.length;i++){
  360. urls.push(items[i].ftpUrl);
  361. }
  362. // 预览图片
  363. uni.previewImage({
  364. urls: urls,
  365. current:index,
  366. });
  367. },
  368. addButton(){
  369. if(!uni.getStorageSync('userNo')){
  370. uni.showToast({
  371. title:'请登录'
  372. })
  373. uni.navigateTo({
  374. url:'/pages/login/login'
  375. })
  376. return false;
  377. }else{
  378. uni.navigateTo({
  379. url:'/circlePages/circle'
  380. })
  381. }
  382. //未登录,去登录
  383. //已登录,去新增第一步
  384. },
  385. loadMore(){
  386. if(this.totalSize>this.content.length){
  387. this.fetchData(this.curIndex+1);
  388. }
  389. console.error('正在加载更多');
  390. },
  391. search(){
  392. this.fetchData();
  393. },
  394. cancel(){
  395. this.searchValue='';
  396. this.fetchData();
  397. },
  398. clear(){
  399. this.searchValue='';
  400. this.fetchData();
  401. }
  402. }
  403. }
  404. </script>
  405. <style lang="scss" scoped>
  406. .index {
  407. max-height: 100vh;
  408. }
  409. /* 底部安全边距 start*/
  410. .tn-tabbar-height {
  411. min-height: 120rpx;
  412. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  413. height: calc(140rpx + constant(safe-area-inset-bottom));
  414. }
  415. /* 轮播视觉差 start */
  416. .card-swiper {
  417. height: 330rpx !important;
  418. }
  419. .card-swiper swiper-item {
  420. width: 750rpx !important;
  421. left: 0rpx;
  422. box-sizing: border-box;
  423. padding: 40rpx 30rpx 30rpx 30rpx;
  424. overflow: initial;
  425. }
  426. .card-swiper swiper-item .swiper-item {
  427. width: 100%;
  428. display: block;
  429. height: 100%;
  430. border-radius: 15rpx;
  431. transform: scale(1);
  432. transition: all 0.2s ease-in 0s;
  433. // overflow: hidden;
  434. }
  435. .card-swiper swiper-item.cur .swiper-item {
  436. transform: none;
  437. transition: all 0.2s ease-in 0s;
  438. }
  439. .card-swiper swiper-item .swiper-item-text {
  440. margin-top: -160rpx;
  441. text-align: center;
  442. width: 100%;
  443. display: block;
  444. height: 50%;
  445. border-radius: 10rpx;
  446. transform: translate(100rpx, -60rpx) scale(0.9, 0.9);
  447. transition: all 0.6s ease 0s;
  448. overflow: hidden;
  449. }
  450. .card-swiper swiper-item.cur .swiper-item-text {
  451. margin-top: -220rpx;
  452. width: 100%;
  453. transform: translate(0rpx, 0rpx) scale(0.9, 0.9);
  454. transition: all 0.6s ease 0s;
  455. }
  456. .image-banner {
  457. border: 1rpx solid #F8F7F8;
  458. display: flex;
  459. align-items: center;
  460. justify-content: center;
  461. }
  462. .image-banner image {
  463. width: 100%;
  464. height: 100%;
  465. }
  466. /* 轮播指示点 start*/
  467. .indication {
  468. z-index: 9999;
  469. width: 100%;
  470. height: 36rpx;
  471. position: absolute;
  472. display: flex;
  473. flex-direction: row;
  474. align-items: center;
  475. justify-content: center;
  476. }
  477. .spot {
  478. background-color: #FFFFFF;
  479. opacity: 0.6;
  480. width: 10rpx;
  481. height: 10rpx;
  482. border-radius: 20rpx;
  483. top: -70rpx;
  484. margin: 0 8rpx !important;
  485. position: relative;
  486. }
  487. .spot.active {
  488. opacity: 1;
  489. width: 30rpx;
  490. background-color: #FFFFFF;
  491. }
  492. /* 图标容器12 start */
  493. .tn-three {
  494. position: absolute;
  495. top: 50%;
  496. right: 50%;
  497. bottom: 50%;
  498. left: 50%;
  499. transform: translate(-38rpx, -20rpx) rotateX(20deg) rotateY(10deg) rotateZ(-20deg);
  500. text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
  501. }
  502. .icon12 {
  503. &__item {
  504. width: 30%;
  505. background-color: #FFFFFF;
  506. border-radius: 10rpx;
  507. padding: 30rpx;
  508. margin: 20rpx 10rpx;
  509. transform: scale(1);
  510. transition: transform 0.3s linear;
  511. transform-origin: center center;
  512. &--icon {
  513. width: 100rpx;
  514. height: 100rpx;
  515. font-size: 60rpx;
  516. border-radius: 50%;
  517. margin-bottom: 18rpx;
  518. position: relative;
  519. z-index: 1;
  520. &::after {
  521. content: " ";
  522. position: absolute;
  523. z-index: -1;
  524. width: 100%;
  525. height: 100%;
  526. left: 0;
  527. bottom: 0;
  528. border-radius: inherit;
  529. opacity: 1;
  530. transform: scale(1, 1);
  531. background-size: 100% 100%;
  532. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);
  533. }
  534. }
  535. }
  536. }
  537. /* 自定义导航栏内容 start */
  538. .custom-nav {
  539. height: 100%;
  540. &__back {
  541. margin: auto 5rpx;
  542. font-size: 40rpx;
  543. margin-right: 10rpx;
  544. margin-left: 30rpx;
  545. flex-basis: 5%;
  546. }
  547. &__search {
  548. flex-basis: 70%;
  549. width: 100%;
  550. height: 100%;
  551. &__box {
  552. width: 100%;
  553. height: 70%;
  554. padding: 10rpx 0;
  555. margin: 0 30rpx;
  556. border-radius: 60rpx 60rpx 0 60rpx;
  557. font-size: 24rpx;
  558. }
  559. &__icon {
  560. padding-right: 10rpx;
  561. margin-left: 20rpx;
  562. font-size: 30rpx;
  563. }
  564. &__text {
  565. // color: #AAAAAA;
  566. }
  567. }
  568. }
  569. .logo-image {
  570. width: 65rpx;
  571. height: 65rpx;
  572. position: relative;
  573. border: 1rpx solid #F8F7F8;
  574. border-radius: 50%;
  575. }
  576. .logo-pic {
  577. background-size: cover;
  578. background-repeat: no-repeat;
  579. // background-attachment:fixed;
  580. background-position: top;
  581. border-radius: 50%;
  582. }
  583. /* 自定义导航栏内容 end */
  584. /* 热门图片 start*/
  585. .image-tuniao1 {
  586. padding: 165rpx 0rpx;
  587. font-size: 40rpx;
  588. font-weight: 300;
  589. position: relative;
  590. }
  591. .image-tuniao2 {
  592. padding: 75rpx 0rpx;
  593. font-size: 40rpx;
  594. font-weight: 300;
  595. position: relative;
  596. }
  597. .image-tuniao3 {
  598. padding: 90rpx 0rpx;
  599. font-size: 40rpx;
  600. font-weight: 300;
  601. position: relative;
  602. }
  603. .image-pic {
  604. border: 1rpx solid #F8F7F8;
  605. background-size: cover;
  606. background-repeat: no-repeat;
  607. // background-attachment:fixed;
  608. background-position: top;
  609. border-radius: 10rpx;
  610. }
  611. /* 文章内容 start*/
  612. .tn-blogger-content {
  613. &__wrap {
  614. margin: 30rpx;
  615. }
  616. &__info {
  617. &__btn {
  618. margin-right: -12rpx;
  619. opacity: 0.5;
  620. }
  621. }
  622. &__label {
  623. &__item {
  624. color: #1D2541;
  625. background-color: #F3F2F7;
  626. border-radius: 10rpx;
  627. font-size: 22rpx;
  628. padding: 5rpx 15rpx;
  629. margin: 5rpx 0 0 18rpx;
  630. &--prefix {
  631. font-size: 24rpx;
  632. color: #1D2541;
  633. padding-right: 10rpx;
  634. }
  635. }
  636. &__desc {
  637. line-height: 55rpx;
  638. }
  639. }
  640. &__main-image {
  641. border: 1rpx solid #F8F7F8;
  642. border-radius: 16rpx;
  643. &--1 {
  644. max-width: 690rpx;
  645. min-width: 690rpx;
  646. max-height: 400rpx;
  647. min-height: 400rpx;
  648. }
  649. &--2 {
  650. max-width: 260rpx;
  651. max-height: 260rpx;
  652. }
  653. &--3 {
  654. height: 212rpx;
  655. width: 100%;
  656. }
  657. }
  658. &__count-icon {
  659. font-size: 40rpx;
  660. padding-right: 5rpx;
  661. }
  662. }
  663. .image-wallpaper {
  664. padding: 160rpx 0rpx;
  665. font-size: 40rpx;
  666. font-weight: 300;
  667. position: relative;
  668. }
  669. .image-pic {
  670. background-size: cover;
  671. background-repeat: no-repeat;
  672. // background-attachment:fixed;
  673. background-position: top;
  674. border-radius: 10rpx;
  675. }
  676. /* 文章内容 end*/
  677. .circle {
  678. max-height: 100vh;
  679. }
  680. /* 底部安全边距 start*/
  681. .tn-tabbar-height {
  682. min-height: 120rpx;
  683. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  684. height: calc(140rpx + constant(safe-area-inset-bottom));
  685. }
  686. /* 自定义导航栏内容 start */
  687. .custom-nav {
  688. height: 100%;
  689. &__back {
  690. margin: auto 5rpx;
  691. font-size: 40rpx;
  692. margin-right: 10rpx;
  693. margin-left: 30rpx;
  694. flex-basis: 5%;
  695. }
  696. &__search {
  697. flex-basis: 60%;
  698. width: 100%;
  699. height: 100%;
  700. &__box {
  701. width: 100%;
  702. height: 70%;
  703. padding: 10rpx 0;
  704. margin: 0 30rpx;
  705. border-radius: 60rpx 60rpx 0 60rpx;
  706. font-size: 24rpx;
  707. }
  708. &__icon {
  709. padding-right: 10rpx;
  710. margin-left: 20rpx;
  711. font-size: 30rpx;
  712. }
  713. &__text {
  714. color: #AAAAAA;
  715. }
  716. }
  717. }
  718. .logo-image {
  719. width: 60rpx;
  720. height: 60rpx;
  721. position: relative;
  722. margin-top: -15rpx;
  723. }
  724. .logo-pic {
  725. background-size: cover;
  726. background-repeat: no-repeat;
  727. // background-attachment:fixed;
  728. background-position: top;
  729. border-radius: 50%;
  730. }
  731. /* 自定义导航栏内容 end */
  732. /* 博主头像 start*/
  733. .image-circle {
  734. // padding: 95rpx;
  735. width: 190rpx;
  736. height: 190rpx;
  737. font-size: 40rpx;
  738. font-weight: 300;
  739. position: relative;
  740. }
  741. .image-pic {
  742. border: 1rpx solid #F8F7F8;
  743. background-size: cover;
  744. background-repeat: no-repeat;
  745. // background-attachment:fixed;
  746. background-position: top;
  747. border-radius: 10rpx;
  748. }
  749. .tn-color-cat {
  750. color: #1D2541;
  751. }
  752. .tn-bg-cat {
  753. background-color: #1D2541;
  754. }
  755. /* 文章内容 start*/
  756. .blogger {
  757. &__item {
  758. padding: 30rpx;
  759. }
  760. &__author {
  761. &__btn {
  762. margin-right: -12rpx;
  763. opacity: 0.5;
  764. }
  765. }
  766. &__desc {
  767. line-height: 30rpx;
  768. &__label {
  769. color: #1D2541;
  770. background-color: #F3F2F7;
  771. border-radius: 10rpx;
  772. font-size: 22rpx;
  773. padding: 5rpx 15rpx;
  774. margin: 5rpx 18rpx 0 0;
  775. &--prefix {
  776. font-size: 24rpx;
  777. color: #1D2541;
  778. padding-right: 10rpx;
  779. }
  780. }
  781. &__content {
  782. line-height: 50rpx;
  783. }
  784. }
  785. &__content {
  786. margin-top: 18rpx;
  787. padding-right: 18rpx;
  788. &__data {
  789. line-height: 46rpx;
  790. text-align: justify;
  791. overflow: hidden;
  792. transition: all 0.25s ease-in-out;
  793. }
  794. &__status {
  795. margin-top: 10rpx;
  796. font-size: 26rpx;
  797. color: #82B2FF;
  798. }
  799. }
  800. &__main-image {
  801. border: 1rpx solid #F8F7F8;
  802. border-radius: 16rpx;
  803. &--1 {
  804. max-width: 80%;
  805. max-height: 300rpx;
  806. }
  807. &--2 {
  808. max-width: 260rpx;
  809. max-height: 260rpx;
  810. }
  811. &--3 {
  812. height: 212rpx;
  813. width: 100%;
  814. }
  815. }
  816. &__count-icon {
  817. font-size: 40rpx;
  818. padding-right: 5rpx;
  819. }
  820. &__ad {
  821. width: 100%;
  822. height: 500rpx;
  823. transform: translate3d(0px, 0px, 0px) !important;
  824. ::v-deep .uni-swiper-slide-frame {
  825. transform: translate3d(0px, 0px, 0px) !important;
  826. }
  827. .uni-swiper-slide-frame {
  828. transform: translate3d(0px, 0px, 0px) !important;
  829. }
  830. &__item {
  831. position: absolute;
  832. width: 100%;
  833. height: 100%;
  834. transform-origin: left center;
  835. transform: translate3d(100%, 0px, 0px) scale(1) !important;
  836. transition: transform 0.25s ease-in-out;
  837. z-index: 1;
  838. &--0 {
  839. transform: translate3d(0%, 0px, 0px) scale(1) !important;
  840. z-index: 4;
  841. }
  842. &--1 {
  843. transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
  844. z-index: 3;
  845. }
  846. &--2 {
  847. transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
  848. z-index: 2;
  849. }
  850. }
  851. &__content {
  852. border-radius: 40rpx;
  853. width: 640rpx;
  854. height: 500rpx;
  855. overflow: hidden;
  856. }
  857. &__image {
  858. width: 100%;
  859. height: 100%;
  860. }
  861. }
  862. }
  863. /* 文章内容 end*/
  864. /* 间隔线 start*/
  865. .tn-strip-bottom {
  866. width: 100%;
  867. border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
  868. }
  869. /* 间隔线 end*/
  870. /* 广告内容 start */
  871. .ad-image {
  872. width: 80rpx;
  873. height: 80rpx;
  874. position: relative;
  875. }
  876. .ad-pic {
  877. background-size: cover;
  878. background-repeat: no-repeat;
  879. // background-attachment:fixed;
  880. background-position: top;
  881. border-radius: 20%;
  882. }
  883. /* 自定义导航栏内容 end */
  884. /* 全屏轮播 start*/
  885. .card-swiper {
  886. height: 100vh !important;
  887. }
  888. .card-swiper swiper-item {
  889. width: 750rpx !important;
  890. left: 0rpx;
  891. box-sizing: border-box;
  892. overflow: initial;
  893. }
  894. .card-swiper swiper-item .swiper-item {
  895. width: 100%;
  896. display: block;
  897. height: 100vh;
  898. border-radius: 0rpx;
  899. transform: scale(1);
  900. transition: all 0.2s ease-in 0s;
  901. overflow: hidden;
  902. }
  903. .card-swiper swiper-item.cur .swiper-item {
  904. transform: none;
  905. transition: all 0.2s ease-in 0s;
  906. }
  907. .card-swiper swiper-item .swiper-item-png {
  908. margin-top: -50vh;
  909. width: 100%;
  910. display: block;
  911. border-radius: 0rpx;
  912. transform: translate(1040rpx, 20rpx) scale(0.5, 0.5);
  913. transition: all 0.6s ease 0s;
  914. // overflow: hidden;
  915. }
  916. .card-swiper swiper-item.cur .swiper-item-png {
  917. margin-top: -100vh;
  918. width: 900rpx;
  919. transform: translate(-80rpx, 0rpx) scale(1, 1);
  920. transition: all 0.6s ease 0s;
  921. }
  922. .image-banner {
  923. display: flex;
  924. align-items: center;
  925. justify-content: center;
  926. }
  927. .image-banner image {
  928. width: 100%;
  929. }
  930. /* 轮播指示点 start*/
  931. .indication {
  932. z-index: 9999;
  933. width: 100%;
  934. height: 36rpx;
  935. position: fixed;
  936. // display:flex;
  937. display: block;
  938. flex-direction: row;
  939. align-items: center;
  940. justify-content: center;
  941. }
  942. .spot {
  943. background-color: #000;
  944. opacity: 0.3;
  945. width: 10rpx;
  946. height: 10rpx;
  947. border-radius: 20rpx;
  948. margin: 20rpx 0 !important;
  949. left: 95vw;
  950. top: -60vh;
  951. position: relative;
  952. }
  953. .spot.active {
  954. opacity: 0.6;
  955. height: 30rpx;
  956. background-color: #000;
  957. }
  958. /* 资讯主图 start*/
  959. .image-article {
  960. border-radius: 8rpx;
  961. border: 1rpx solid #F8F7F8;
  962. width: 200rpx;
  963. height: 200rpx;
  964. position: relative;
  965. }
  966. .image-pic {
  967. background-size: cover;
  968. background-repeat: no-repeat;
  969. // background-attachment:fixed;
  970. background-position: top;
  971. border-radius: 10rpx;
  972. }
  973. .article-shadow {
  974. border-radius: 15rpx;
  975. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  976. }
  977. /* 文字截取*/
  978. .clamp-text-1 {
  979. -webkit-line-clamp: 1;
  980. display: -webkit-box;
  981. -webkit-box-orient: vertical;
  982. text-overflow: ellipsis;
  983. overflow: hidden;
  984. }
  985. .clamp-text-2 {
  986. -webkit-line-clamp: 2;
  987. display: -webkit-box;
  988. -webkit-box-orient: vertical;
  989. text-overflow: ellipsis;
  990. overflow: hidden;
  991. }
  992. /* 标签内容 start*/
  993. .tn-tag-content {
  994. &__item {
  995. display: inline-block;
  996. line-height: 35rpx;
  997. color: #1D2541;
  998. background-color: #F3F2F7;
  999. border-radius: 10rpx;
  1000. font-size: 22rpx;
  1001. padding: 5rpx 15rpx;
  1002. &--prefix {
  1003. padding-right: 10rpx;
  1004. }
  1005. }
  1006. }
  1007. /* 图标容器9 start */
  1008. .icon9 {
  1009. &__item {
  1010. width: 30%;
  1011. background-color: #FFFFFF;
  1012. border-radius: 10rpx;
  1013. padding: 30rpx;
  1014. margin: 20rpx 10rpx;
  1015. transform: scale(1);
  1016. transition: transform 0.3s linear;
  1017. transform-origin: center center;
  1018. &--icon {
  1019. width: 110rpx;
  1020. height: 110rpx;
  1021. font-size: 65rpx;
  1022. border-radius: 50%;
  1023. margin: 20rpx 40rpx;
  1024. position: relative;
  1025. z-index: 1;
  1026. &::after {
  1027. content: " ";
  1028. position: absolute;
  1029. z-index: -1;
  1030. width: 100%;
  1031. height: 100%;
  1032. left: 0;
  1033. bottom: 0;
  1034. border-radius: inherit;
  1035. opacity: 1;
  1036. transform: scale(1, 1);
  1037. background-size: 100% 100%;
  1038. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
  1039. }
  1040. }
  1041. }
  1042. }
  1043. /* 悬浮 */
  1044. .tnxuanfu {
  1045. animation: suspension 3s ease-in-out infinite;
  1046. }
  1047. @keyframes suspension {
  1048. 0%,
  1049. 100% {
  1050. transform: translateY(0);
  1051. }
  1052. 50% {
  1053. transform: translateY(-0.8rem);
  1054. }
  1055. }
  1056. /* 悬浮按钮 */
  1057. .button-shop {
  1058. width: 90rpx;
  1059. height: 90rpx;
  1060. display: flex;
  1061. flex-direction: row;
  1062. position: fixed;
  1063. /* bottom:200rpx;
  1064. right: 20rpx; */
  1065. left: 5rpx;
  1066. top: 5rpx;
  1067. z-index: 1001;
  1068. border-radius: 100px;
  1069. opacity: 0.9;
  1070. }
  1071. /* 按钮 */
  1072. .edit {
  1073. bottom: 300rpx;
  1074. right: 75rpx;
  1075. position: fixed;
  1076. z-index: 9999;
  1077. }
  1078. .pa,
  1079. .pa0 {
  1080. position: absolute
  1081. }
  1082. .pa0 {
  1083. left: 0;
  1084. top: 0
  1085. }
  1086. .bg0 {
  1087. width: 100rpx;
  1088. height: 100rpx;
  1089. top: 50%;
  1090. left: 50%;
  1091. transform: translate(-50%, -50%);
  1092. }
  1093. .bg1 {
  1094. width: 100%;
  1095. height: 100%;
  1096. }
  1097. .hx-box {
  1098. top: 50%;
  1099. left: 50%;
  1100. width: 100rpx;
  1101. height: 100rpx;
  1102. transform-style: preserve-3d;
  1103. transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
  1104. }
  1105. .hx-box .pr {
  1106. width: 100rpx;
  1107. height: 100rpx;
  1108. transform-style: preserve-3d;
  1109. animation: hxz 20s linear infinite;
  1110. }
  1111. @keyframes hxz {
  1112. 0% {
  1113. transform: rotateX(0deg);
  1114. }
  1115. 100% {
  1116. transform: rotateX(-360deg);
  1117. }
  1118. }
  1119. .hx-box .pr .pa0 {
  1120. width: 100rpx;
  1121. height: 100rpx;
  1122. /* border: 4px solid #5ec0ff; */
  1123. border-radius: 1000px;
  1124. }
  1125. .hx-box .pr .pa0 .span {
  1126. display: block;
  1127. width: 100%;
  1128. height: 100%;
  1129. background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc4.png) no-repeat center center;
  1130. background-size: 100% 100%;
  1131. animation: hx 4s linear infinite;
  1132. }
  1133. @keyframes hx {
  1134. to {
  1135. transform: rotate(360deg);
  1136. }
  1137. }
  1138. .hx-k1 {
  1139. transform: rotateX(-60deg) rotateZ(-60deg)
  1140. }
  1141. .hx-k2 {
  1142. transform: rotateX(-30deg) rotateZ(-30deg)
  1143. }
  1144. .hx-k3 {
  1145. transform: rotateX(0deg) rotateZ(0deg)
  1146. }
  1147. .hx-k4 {
  1148. transform: rotateX(30deg) rotateZ(30deg)
  1149. }
  1150. .hx-k5 {
  1151. transform: rotateX(60deg) rotateZ(60deg)
  1152. }
  1153. .hx-k6 {
  1154. transform: rotateX(90deg) rotateZ(90deg)
  1155. }
  1156. /deep/ .tn-toast{
  1157. background-color: #000c !important;
  1158. }
  1159. </style>