home.vue 29 KB

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