home.vue 30 KB

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