home.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383
  1. <template>
  2. <view class="index tn-safe-area-inset-bottom">
  3. <view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
  4. <uv-sticky :offsetTop="vuex_custom_bar_height + 'px'" 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'></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. userNo: uni.getStorageSync('userNo'),
  308. });
  309. request.post('/slbBisContact/add', params).then(res => {
  310. if (res.success) {
  311. that.showContact = true;
  312. that.curContact.company = that.curItem.company;
  313. that.curContact.contactMethod = res.resultMap.contactMethod;
  314. that.curContact.contactPerson = res.resultMap.contactPerson;
  315. } else {
  316. that.showContact = false;
  317. uni.showToast({
  318. title: res.msg,
  319. icon: 'none'
  320. })
  321. }
  322. })
  323. },
  324. addColl() {
  325. if (!uni.getStorageSync('userNo')) {
  326. uni.showToast({
  327. title: '请登录'
  328. })
  329. uni.navigateTo({
  330. url: '/pages/login/login'
  331. })
  332. return false;
  333. }
  334. let that = this;
  335. let params = {};
  336. params.slbCollect = JSON.stringify({
  337. fkBisNo: that.curItem.bisNo,
  338. bisType: '1',
  339. userNo: uni.getStorageSync('userNo'),
  340. });
  341. request.post('/slbCollect/add', params).then(res => {
  342. if (res.success) {
  343. uni.showToast({
  344. title: '信息已收藏,请在我的收藏里查看阅读',
  345. duration: 2000,
  346. icon: 'none'
  347. });
  348. that.showSheet = false;
  349. } else {
  350. uni.showToast({
  351. title: res.msg
  352. })
  353. }
  354. })
  355. },
  356. delColl() {
  357. let that = this;
  358. request.post('/slbCollect/del', {
  359. id: that.collId
  360. }).then(res => {
  361. if (res.success) {
  362. uni.showToast({
  363. title: '取消成功'
  364. })
  365. that.showSheet = false;
  366. } else {
  367. uni.showToast({
  368. title: res.msg
  369. })
  370. }
  371. })
  372. },
  373. showImg(items, index) {
  374. let urls = [];
  375. for (let i = 0; i < items.length; i++) {
  376. urls.push(items[i].ftpUrl);
  377. }
  378. // 预览图片
  379. uni.previewImage({
  380. urls: urls,
  381. current: index,
  382. });
  383. },
  384. showValid(text){
  385. uni.showToast({
  386. title: '有效期:'+text,
  387. icon: 'none'
  388. })
  389. },
  390. addButton() {
  391. if (!uni.getStorageSync('userNo')) {
  392. uni.showToast({
  393. title: '请登录',
  394. icon:'none'
  395. })
  396. uni.navigateTo({
  397. url: '/pages/login/login'
  398. })
  399. return false;
  400. } else {
  401. uni.navigateTo({
  402. url: '/circlePages/circle'
  403. })
  404. }
  405. //未登录,去登录
  406. //已登录,去新增第一步
  407. },
  408. loadMore() {
  409. if (this.totalSize > this.content.length) {
  410. this.fetchData(this.curIndex + 1);
  411. }
  412. console.error('正在加载更多');
  413. },
  414. search() {
  415. this.fetchData();
  416. },
  417. cancel() {
  418. this.searchValue = '';
  419. this.fetchData();
  420. },
  421. clear() {
  422. this.searchValue = '';
  423. this.fetchData();
  424. },
  425. showTel(tel){
  426. uni.makePhoneCall({
  427. phoneNumber: tel,
  428. });
  429. },
  430. showDetail(item){
  431. uni.navigateTo({
  432. url: '/pages/index/detail/detail?id='+item.bisNo+'&isNeed=1'
  433. })
  434. }
  435. }
  436. }
  437. </script>
  438. <style lang="scss" scoped>
  439. .index {
  440. max-height: 100vh;
  441. }
  442. /* 底部安全边距 start*/
  443. .tn-tabbar-height {
  444. min-height: 120rpx;
  445. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  446. height: calc(140rpx + constant(safe-area-inset-bottom));
  447. }
  448. /* 轮播视觉差 start */
  449. .card-swiper {
  450. height: 330rpx !important;
  451. }
  452. .card-swiper swiper-item {
  453. width: 750rpx !important;
  454. left: 0rpx;
  455. box-sizing: border-box;
  456. padding: 40rpx 30rpx 30rpx 30rpx;
  457. overflow: initial;
  458. }
  459. .card-swiper swiper-item .swiper-item {
  460. width: 100%;
  461. display: block;
  462. height: 100%;
  463. border-radius: 15rpx;
  464. transform: scale(1);
  465. transition: all 0.2s ease-in 0s;
  466. // overflow: hidden;
  467. }
  468. .card-swiper swiper-item.cur .swiper-item {
  469. transform: none;
  470. transition: all 0.2s ease-in 0s;
  471. }
  472. .card-swiper swiper-item .swiper-item-text {
  473. margin-top: -160rpx;
  474. text-align: center;
  475. width: 100%;
  476. display: block;
  477. height: 50%;
  478. border-radius: 10rpx;
  479. transform: translate(100rpx, -60rpx) scale(0.9, 0.9);
  480. transition: all 0.6s ease 0s;
  481. overflow: hidden;
  482. }
  483. .card-swiper swiper-item.cur .swiper-item-text {
  484. margin-top: -220rpx;
  485. width: 100%;
  486. transform: translate(0rpx, 0rpx) scale(0.9, 0.9);
  487. transition: all 0.6s ease 0s;
  488. }
  489. .image-banner {
  490. border: 1rpx solid #F8F7F8;
  491. display: flex;
  492. align-items: center;
  493. justify-content: center;
  494. }
  495. .image-banner image {
  496. width: 100%;
  497. height: 100%;
  498. }
  499. /* 轮播指示点 start*/
  500. .indication {
  501. z-index: 9999;
  502. width: 100%;
  503. height: 36rpx;
  504. position: absolute;
  505. display: flex;
  506. flex-direction: row;
  507. align-items: center;
  508. justify-content: center;
  509. }
  510. .spot {
  511. background-color: #FFFFFF;
  512. opacity: 0.6;
  513. width: 10rpx;
  514. height: 10rpx;
  515. border-radius: 20rpx;
  516. top: -70rpx;
  517. margin: 0 8rpx !important;
  518. position: relative;
  519. }
  520. .spot.active {
  521. opacity: 1;
  522. width: 30rpx;
  523. background-color: #FFFFFF;
  524. }
  525. /* 图标容器12 start */
  526. .tn-three {
  527. position: absolute;
  528. top: 50%;
  529. right: 50%;
  530. bottom: 50%;
  531. left: 50%;
  532. transform: translate(-38rpx, -20rpx) rotateX(20deg) rotateY(10deg) rotateZ(-20deg);
  533. text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
  534. }
  535. .icon12 {
  536. &__item {
  537. width: 30%;
  538. background-color: #FFFFFF;
  539. border-radius: 10rpx;
  540. padding: 30rpx;
  541. margin: 20rpx 10rpx;
  542. transform: scale(1);
  543. transition: transform 0.3s linear;
  544. transform-origin: center center;
  545. &--icon {
  546. width: 100rpx;
  547. height: 100rpx;
  548. font-size: 60rpx;
  549. border-radius: 50%;
  550. margin-bottom: 18rpx;
  551. position: relative;
  552. z-index: 1;
  553. &::after {
  554. content: " ";
  555. position: absolute;
  556. z-index: -1;
  557. width: 100%;
  558. height: 100%;
  559. left: 0;
  560. bottom: 0;
  561. border-radius: inherit;
  562. opacity: 1;
  563. transform: scale(1, 1);
  564. background-size: 100% 100%;
  565. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);
  566. }
  567. }
  568. }
  569. }
  570. /* 自定义导航栏内容 start */
  571. .custom-nav {
  572. height: 100%;
  573. &__back {
  574. margin: auto 5rpx;
  575. font-size: 40rpx;
  576. margin-right: 10rpx;
  577. margin-left: 30rpx;
  578. flex-basis: 5%;
  579. }
  580. &__search {
  581. flex-basis: 70%;
  582. width: 100%;
  583. height: 100%;
  584. &__box {
  585. width: 100%;
  586. height: 70%;
  587. padding: 10rpx 0;
  588. margin: 0 30rpx;
  589. border-radius: 60rpx 60rpx 0 60rpx;
  590. font-size: 24rpx;
  591. }
  592. &__icon {
  593. padding-right: 10rpx;
  594. margin-left: 20rpx;
  595. font-size: 30rpx;
  596. }
  597. &__text {
  598. // color: #AAAAAA;
  599. }
  600. }
  601. }
  602. .logo-image {
  603. width: 65rpx;
  604. height: 65rpx;
  605. position: relative;
  606. border: 1rpx solid #F8F7F8;
  607. border-radius: 50%;
  608. }
  609. .logo-pic {
  610. background-size: cover;
  611. background-repeat: no-repeat;
  612. // background-attachment:fixed;
  613. background-position: top;
  614. border-radius: 50%;
  615. }
  616. /* 自定义导航栏内容 end */
  617. /* 热门图片 start*/
  618. .image-tuniao1 {
  619. padding: 165rpx 0rpx;
  620. font-size: 40rpx;
  621. font-weight: 300;
  622. position: relative;
  623. }
  624. .image-tuniao2 {
  625. padding: 75rpx 0rpx;
  626. font-size: 40rpx;
  627. font-weight: 300;
  628. position: relative;
  629. }
  630. .image-tuniao3 {
  631. padding: 90rpx 0rpx;
  632. font-size: 40rpx;
  633. font-weight: 300;
  634. position: relative;
  635. }
  636. .image-pic {
  637. border: 1rpx solid #F8F7F8;
  638. background-size: cover;
  639. background-repeat: no-repeat;
  640. // background-attachment:fixed;
  641. background-position: top;
  642. border-radius: 10rpx;
  643. }
  644. /* 文章内容 start*/
  645. .tn-blogger-content {
  646. &__wrap {
  647. margin: 30rpx;
  648. }
  649. &__info {
  650. &__btn {
  651. margin-right: -12rpx;
  652. opacity: 0.5;
  653. }
  654. }
  655. &__label {
  656. &__item {
  657. color: #1D2541;
  658. background-color: #F3F2F7;
  659. border-radius: 10rpx;
  660. font-size: 22rpx;
  661. padding: 5rpx 15rpx;
  662. margin: 5rpx 0 0 18rpx;
  663. &--prefix {
  664. font-size: 24rpx;
  665. color: #1D2541;
  666. padding-right: 10rpx;
  667. }
  668. }
  669. &__desc {
  670. line-height: 55rpx;
  671. }
  672. }
  673. &__main-image {
  674. border: 1rpx solid #F8F7F8;
  675. border-radius: 16rpx;
  676. &--1 {
  677. max-width: 690rpx;
  678. min-width: 690rpx;
  679. max-height: 400rpx;
  680. min-height: 400rpx;
  681. }
  682. &--2 {
  683. max-width: 260rpx;
  684. max-height: 260rpx;
  685. }
  686. &--3 {
  687. height: 212rpx;
  688. width: 100%;
  689. }
  690. }
  691. &__count-icon {
  692. font-size: 40rpx;
  693. padding-right: 5rpx;
  694. }
  695. }
  696. .image-wallpaper {
  697. padding: 160rpx 0rpx;
  698. font-size: 40rpx;
  699. font-weight: 300;
  700. position: relative;
  701. }
  702. .image-pic {
  703. background-size: cover;
  704. background-repeat: no-repeat;
  705. // background-attachment:fixed;
  706. background-position: top;
  707. border-radius: 10rpx;
  708. }
  709. /* 文章内容 end*/
  710. .circle {
  711. max-height: 100vh;
  712. }
  713. /* 底部安全边距 start*/
  714. .tn-tabbar-height {
  715. min-height: 120rpx;
  716. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  717. height: calc(140rpx + constant(safe-area-inset-bottom));
  718. }
  719. /* 自定义导航栏内容 start */
  720. .custom-nav {
  721. height: 100%;
  722. &__back {
  723. margin: auto 5rpx;
  724. font-size: 40rpx;
  725. margin-right: 10rpx;
  726. margin-left: 30rpx;
  727. flex-basis: 5%;
  728. }
  729. &__search {
  730. flex-basis: 60%;
  731. width: 100%;
  732. height: 100%;
  733. &__box {
  734. width: 100%;
  735. height: 70%;
  736. padding: 10rpx 0;
  737. margin: 0 30rpx;
  738. border-radius: 60rpx 60rpx 0 60rpx;
  739. font-size: 24rpx;
  740. }
  741. &__icon {
  742. padding-right: 10rpx;
  743. margin-left: 20rpx;
  744. font-size: 30rpx;
  745. }
  746. &__text {
  747. color: #AAAAAA;
  748. }
  749. }
  750. }
  751. .logo-image {
  752. width: 60rpx;
  753. height: 60rpx;
  754. position: relative;
  755. margin-top: -15rpx;
  756. }
  757. .logo-pic {
  758. background-size: cover;
  759. background-repeat: no-repeat;
  760. // background-attachment:fixed;
  761. background-position: top;
  762. border-radius: 50%;
  763. }
  764. /* 自定义导航栏内容 end */
  765. /* 博主头像 start*/
  766. .image-circle {
  767. // padding: 95rpx;
  768. width: 190rpx;
  769. height: 190rpx;
  770. font-size: 40rpx;
  771. font-weight: 300;
  772. position: relative;
  773. }
  774. .image-pic {
  775. border: 1rpx solid #F8F7F8;
  776. background-size: cover;
  777. background-repeat: no-repeat;
  778. // background-attachment:fixed;
  779. background-position: top;
  780. border-radius: 10rpx;
  781. }
  782. .tn-color-cat {
  783. color: #1D2541;
  784. }
  785. .tn-bg-cat {
  786. background-color: #1D2541;
  787. }
  788. /* 文章内容 start*/
  789. .blogger {
  790. &__item {
  791. padding: 30rpx;
  792. }
  793. &__author {
  794. &__btn {
  795. margin-right: -12rpx;
  796. opacity: 0.5;
  797. }
  798. }
  799. &__desc {
  800. line-height: 30rpx;
  801. &__label {
  802. color: #1D2541;
  803. background-color: #F3F2F7;
  804. border-radius: 10rpx;
  805. font-size: 22rpx;
  806. padding: 5rpx 15rpx;
  807. margin: 5rpx 18rpx 0 0;
  808. &--prefix {
  809. font-size: 24rpx;
  810. color: #1D2541;
  811. padding-right: 10rpx;
  812. }
  813. }
  814. &__content {
  815. line-height: 50rpx;
  816. }
  817. }
  818. &__content {
  819. margin-top: 18rpx;
  820. padding-right: 18rpx;
  821. &__data {
  822. line-height: 46rpx;
  823. text-align: justify;
  824. overflow: hidden;
  825. transition: all 0.25s ease-in-out;
  826. }
  827. &__status {
  828. margin-top: 10rpx;
  829. font-size: 26rpx;
  830. color: #82B2FF;
  831. }
  832. }
  833. &__main-image {
  834. border: 1rpx solid #F8F7F8;
  835. border-radius: 16rpx;
  836. &--1 {
  837. max-width: 80%;
  838. max-height: 300rpx;
  839. }
  840. &--2 {
  841. max-width: 260rpx;
  842. max-height: 260rpx;
  843. }
  844. &--3 {
  845. height: 212rpx;
  846. width: 100%;
  847. }
  848. }
  849. &__count-icon {
  850. font-size: 40rpx;
  851. padding-right: 5rpx;
  852. }
  853. &__ad {
  854. width: 100%;
  855. height: 500rpx;
  856. transform: translate3d(0px, 0px, 0px) !important;
  857. ::v-deep .uni-swiper-slide-frame {
  858. transform: translate3d(0px, 0px, 0px) !important;
  859. }
  860. .uni-swiper-slide-frame {
  861. transform: translate3d(0px, 0px, 0px) !important;
  862. }
  863. &__item {
  864. position: absolute;
  865. width: 100%;
  866. height: 100%;
  867. transform-origin: left center;
  868. transform: translate3d(100%, 0px, 0px) scale(1) !important;
  869. transition: transform 0.25s ease-in-out;
  870. z-index: 1;
  871. &--0 {
  872. transform: translate3d(0%, 0px, 0px) scale(1) !important;
  873. z-index: 4;
  874. }
  875. &--1 {
  876. transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
  877. z-index: 3;
  878. }
  879. &--2 {
  880. transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
  881. z-index: 2;
  882. }
  883. }
  884. &__content {
  885. border-radius: 40rpx;
  886. width: 640rpx;
  887. height: 500rpx;
  888. overflow: hidden;
  889. }
  890. &__image {
  891. width: 100%;
  892. height: 100%;
  893. }
  894. }
  895. }
  896. /* 文章内容 end*/
  897. /* 间隔线 start*/
  898. .tn-strip-bottom {
  899. width: 100%;
  900. border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
  901. }
  902. /* 间隔线 end*/
  903. /* 广告内容 start */
  904. .ad-image {
  905. width: 80rpx;
  906. height: 80rpx;
  907. position: relative;
  908. }
  909. .ad-pic {
  910. background-size: cover;
  911. background-repeat: no-repeat;
  912. // background-attachment:fixed;
  913. background-position: top;
  914. border-radius: 20%;
  915. }
  916. /* 自定义导航栏内容 end */
  917. /* 全屏轮播 start*/
  918. .card-swiper {
  919. height: 100vh !important;
  920. }
  921. .card-swiper swiper-item {
  922. width: 750rpx !important;
  923. left: 0rpx;
  924. box-sizing: border-box;
  925. overflow: initial;
  926. }
  927. .card-swiper swiper-item .swiper-item {
  928. width: 100%;
  929. display: block;
  930. height: 100vh;
  931. border-radius: 0rpx;
  932. transform: scale(1);
  933. transition: all 0.2s ease-in 0s;
  934. overflow: hidden;
  935. }
  936. .card-swiper swiper-item.cur .swiper-item {
  937. transform: none;
  938. transition: all 0.2s ease-in 0s;
  939. }
  940. .card-swiper swiper-item .swiper-item-png {
  941. margin-top: -50vh;
  942. width: 100%;
  943. display: block;
  944. border-radius: 0rpx;
  945. transform: translate(1040rpx, 20rpx) scale(0.5, 0.5);
  946. transition: all 0.6s ease 0s;
  947. // overflow: hidden;
  948. }
  949. .card-swiper swiper-item.cur .swiper-item-png {
  950. margin-top: -100vh;
  951. width: 900rpx;
  952. transform: translate(-80rpx, 0rpx) scale(1, 1);
  953. transition: all 0.6s ease 0s;
  954. }
  955. .image-banner {
  956. display: flex;
  957. align-items: center;
  958. justify-content: center;
  959. }
  960. .image-banner image {
  961. width: 100%;
  962. }
  963. /* 轮播指示点 start*/
  964. .indication {
  965. z-index: 9999;
  966. width: 100%;
  967. height: 36rpx;
  968. position: fixed;
  969. // display:flex;
  970. display: block;
  971. flex-direction: row;
  972. align-items: center;
  973. justify-content: center;
  974. }
  975. .spot {
  976. background-color: #000;
  977. opacity: 0.3;
  978. width: 10rpx;
  979. height: 10rpx;
  980. border-radius: 20rpx;
  981. margin: 20rpx 0 !important;
  982. left: 95vw;
  983. top: -60vh;
  984. position: relative;
  985. }
  986. .spot.active {
  987. opacity: 0.6;
  988. height: 30rpx;
  989. background-color: #000;
  990. }
  991. /* 资讯主图 start*/
  992. .image-article {
  993. border-radius: 8rpx;
  994. border: 1rpx solid #F8F7F8;
  995. width: 200rpx;
  996. height: 200rpx;
  997. position: relative;
  998. }
  999. .image-pic {
  1000. background-size: cover;
  1001. background-repeat: no-repeat;
  1002. // background-attachment:fixed;
  1003. background-position: top;
  1004. border-radius: 10rpx;
  1005. }
  1006. .article-shadow {
  1007. border-radius: 15rpx;
  1008. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  1009. }
  1010. /* 文字截取*/
  1011. .clamp-text-1 {
  1012. -webkit-line-clamp: 1;
  1013. display: -webkit-box;
  1014. -webkit-box-orient: vertical;
  1015. text-overflow: ellipsis;
  1016. overflow: hidden;
  1017. }
  1018. .clamp-text-2 {
  1019. -webkit-line-clamp: 2;
  1020. display: -webkit-box;
  1021. -webkit-box-orient: vertical;
  1022. text-overflow: ellipsis;
  1023. overflow: hidden;
  1024. }
  1025. /* 标签内容 start*/
  1026. .tn-tag-content {
  1027. &__item {
  1028. display: inline-block;
  1029. line-height: 35rpx;
  1030. color: #1D2541;
  1031. background-color: #F3F2F7;
  1032. border-radius: 10rpx;
  1033. font-size: 22rpx;
  1034. padding: 5rpx 15rpx;
  1035. &--prefix {
  1036. padding-right: 10rpx;
  1037. }
  1038. }
  1039. }
  1040. /* 图标容器9 start */
  1041. .icon9 {
  1042. &__item {
  1043. width: 30%;
  1044. background-color: #FFFFFF;
  1045. border-radius: 10rpx;
  1046. padding: 30rpx;
  1047. margin: 20rpx 10rpx;
  1048. transform: scale(1);
  1049. transition: transform 0.3s linear;
  1050. transform-origin: center center;
  1051. &--icon {
  1052. width: 110rpx;
  1053. height: 110rpx;
  1054. font-size: 65rpx;
  1055. border-radius: 50%;
  1056. margin: 20rpx 40rpx;
  1057. position: relative;
  1058. z-index: 1;
  1059. &::after {
  1060. content: " ";
  1061. position: absolute;
  1062. z-index: -1;
  1063. width: 100%;
  1064. height: 100%;
  1065. left: 0;
  1066. bottom: 0;
  1067. border-radius: inherit;
  1068. opacity: 1;
  1069. transform: scale(1, 1);
  1070. background-size: 100% 100%;
  1071. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
  1072. }
  1073. }
  1074. }
  1075. }
  1076. /* 悬浮 */
  1077. .tnxuanfu {
  1078. animation: suspension 3s ease-in-out infinite;
  1079. }
  1080. @keyframes suspension {
  1081. 0%,
  1082. 100% {
  1083. transform: translateY(0);
  1084. }
  1085. 50% {
  1086. transform: translateY(-0.8rem);
  1087. }
  1088. }
  1089. /* 悬浮按钮 */
  1090. .button-shop {
  1091. width: 90rpx;
  1092. height: 90rpx;
  1093. display: flex;
  1094. flex-direction: row;
  1095. position: fixed;
  1096. /* bottom:200rpx;
  1097. right: 20rpx; */
  1098. left: 5rpx;
  1099. top: 5rpx;
  1100. z-index: 1001;
  1101. border-radius: 100px;
  1102. opacity: 0.9;
  1103. }
  1104. /* 按钮 */
  1105. .edit {
  1106. bottom: 300rpx;
  1107. right: 75rpx;
  1108. position: fixed;
  1109. z-index: 9999;
  1110. }
  1111. .pa,
  1112. .pa0 {
  1113. position: absolute
  1114. }
  1115. .pa0 {
  1116. left: 0;
  1117. top: 0
  1118. }
  1119. .bg0 {
  1120. width: 100rpx;
  1121. height: 100rpx;
  1122. top: 50%;
  1123. left: 50%;
  1124. transform: translate(-50%, -50%);
  1125. }
  1126. .bg1 {
  1127. width: 100%;
  1128. height: 100%;
  1129. }
  1130. .hx-box {
  1131. top: 50%;
  1132. left: 50%;
  1133. width: 100rpx;
  1134. height: 100rpx;
  1135. transform-style: preserve-3d;
  1136. transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
  1137. }
  1138. .hx-box .pr {
  1139. width: 100rpx;
  1140. height: 100rpx;
  1141. transform-style: preserve-3d;
  1142. animation: hxz 20s linear infinite;
  1143. }
  1144. @keyframes hxz {
  1145. 0% {
  1146. transform: rotateX(0deg);
  1147. }
  1148. 100% {
  1149. transform: rotateX(-360deg);
  1150. }
  1151. }
  1152. .hx-box .pr .pa0 {
  1153. width: 100rpx;
  1154. height: 100rpx;
  1155. /* border: 4px solid #5ec0ff; */
  1156. border-radius: 1000px;
  1157. }
  1158. .hx-box .pr .pa0 .span {
  1159. display: block;
  1160. width: 100%;
  1161. height: 100%;
  1162. background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc4.png) no-repeat center center;
  1163. background-size: 100% 100%;
  1164. animation: hx 4s linear infinite;
  1165. }
  1166. @keyframes hx {
  1167. to {
  1168. transform: rotate(360deg);
  1169. }
  1170. }
  1171. .hx-k1 {
  1172. transform: rotateX(-60deg) rotateZ(-60deg)
  1173. }
  1174. .hx-k2 {
  1175. transform: rotateX(-30deg) rotateZ(-30deg)
  1176. }
  1177. .hx-k3 {
  1178. transform: rotateX(0deg) rotateZ(0deg)
  1179. }
  1180. .hx-k4 {
  1181. transform: rotateX(30deg) rotateZ(30deg)
  1182. }
  1183. .hx-k5 {
  1184. transform: rotateX(60deg) rotateZ(60deg)
  1185. }
  1186. .hx-k6 {
  1187. transform: rotateX(90deg) rotateZ(90deg)
  1188. }
  1189. /deep/ .tn-toast {
  1190. background-color: #000c !important;
  1191. }
  1192. .bg-content{
  1193. color: #fff;
  1194. background-image: url(./../../static/bg.png);
  1195. background-size: cover;
  1196. }
  1197. </style>