home.vue 29 KB

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