index.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384
  1. <template>
  2. <view :data-theme="theme" class="discover_index">
  3. <view class="page_con" :style="{height: windowHeight + 'px'}">
  4. <view class="discover-header relative z-999">
  5. <!-- #ifdef APP || MP -->
  6. <view class="mp-header" :style="{ height: navH + 'rpx'}">
  7. <view class="sys-head" :style="{ height: sysHeight+'px' }"></view>
  8. <view class="select_nav flex justify-center align-center" id="home" :style="{top: sysHeight+6+'px'}">
  9. <text class="iconfont icon-fanhui2 px-20" @tap="returns"></text>
  10. <image @click="goUser" class="avatar" :src="userInfo.avatar ? userInfo.avatar : urlDomain+'crmebimage/presets/morenT.png'">
  11. </image>
  12. <!-- <text class="iconfont icon-gengduo5 px-20" @tap.stop="showNav"></text> -->
  13. <text class="nav_line"></text>
  14. </view>
  15. <view class="nav_title" :style="{ height: '80rpx',lineHeight: '80rpx', color: '#fff'}">
  16. 表白墙
  17. </view>
  18. </view>
  19. <!-- #endif -->
  20. <view class="discover-navTab acea-row row-middle bg--w111-fff" style="margin: 4rpx 0;">
  21. <view class="acea-row row-center-wrapper" :style="[textBoxStyle]">
  22. <view style="margin-right: 52rpx;" :class="tabActive == 0 ? 'on' : ''" class="nav-item pb-10" @click="tabActive=0;showCateDrawer = false">本校</view>
  23. <view :class="tabActive == 1 ? 'on' : ''" class="nav-item pb-10" @click="tabActive=1;">同城</view>
  24. </view>
  25. <!-- #ifndef MP -->
  26. <view style="width: 32rpx;"></view>
  27. <!-- #endif -->
  28. </view>
  29. <!-- 话题分类 -->
  30. <view class="longTab mb-10" scroll-y enhanced>
  31. <view class="flex h-116">
  32. <view class="flex-1 h-full flex-center longTab-item" :style="{background: index === tabClick ? '#EEF4FF' : ''}"
  33. v-for="(item, index) in categoryList" :key="index" :id="'id' + index" @click.stop="selectMenu(item, index, true)">
  34. <view class="flex-col flex-center">
  35. <image class="w-44 h-44 mb-10" :src="item.icon" mode=""></image>
  36. <view class="wall-font f-s-24 f-w-500">{{item.name}}</view>
  37. </view>
  38. </view>
  39. <view class="flex-1 h-full flex-center longTab-item">
  40. <navigator hover-class='none' url='/pages/merchant/user_sgin/index' class="item">
  41. <view class="flex-col flex-center">
  42. <image class="w-44 h-44 mb-10" :src="'/static/img/ic-wall-type-4.png'" mode=""></image>
  43. <view class="wall-font f-s-24 f-w-500">签到</view>
  44. </view>
  45. </navigator>
  46. </view>
  47. </view>
  48. </view>
  49. <!-- banner轮播图 -->
  50. <view class="mb-10" v-if="bannerList.length">
  51. <swiper :indicator-dots="true" :autoplay="true" :interval="2500" :duration="500" circular="true">
  52. <block v-for="(item,index) in bannerList" :key='item.id'>
  53. <swiper-item>
  54. <view class="swiper-item">
  55. <image class="banner-img" :src="item.imageUrl" mode="scaleToFill" />
  56. </view>
  57. </swiper-item>
  58. </block>
  59. </swiper>
  60. </view>
  61. <!-- 提示 -->
  62. <view v-if="wallHeadline.length" class="flex-y-center bg--w111-fff mb-10 pl-32">
  63. <!-- 左侧固定图片 -->
  64. <text class='iconfont icon-laba ' style="font-size: 24rpx;margin-right: 20rpx;"></text>
  65. <!-- 右侧文字轮播区域 -->
  66. <view class="flex-1 h-40 mt-10" style="overflow: hidden;">
  67. <swiper class="swiper" :indicator-dots="false" circular :autoplay="true" :interval="3000" vertical>
  68. <block v-for="(item,index) in wallHeadline" :key='index'>
  69. <swiper-item catchtouchmove='catchTouchMove'>
  70. <view class='newsTitle swiper-item'>
  71. {{item.synopsis}}
  72. </view>
  73. </swiper-item>
  74. </block>
  75. </swiper>
  76. </view>
  77. </view>
  78. <scroll-view class="bg--w111-fff pt-10 pb-10 pl-32" scroll-x style="white-space: nowrap; vertical-align: middle;border-top-right-radius: 23rpx;"
  79. show-scrollbar="false">
  80. <view class='flex-y-center'>
  81. <text v-for="(item,index) in navList" :key="index" class='wall-nav' :class='active==item.id ? "wall-nav-on": ""'
  82. @click.stop="tabSelect(item.id, index)">
  83. <text>{{item.name}}</text>
  84. </text>
  85. </view>
  86. </scroll-view>
  87. </view>
  88. <view class="discover-boxsss">
  89. <!-- 发现 -->
  90. <scroll-view scroll-y="true" @scroll="followScroll" class="main h-full">
  91. <view class="tab-cont h-full" id="main">
  92. <!-- 发现 -->
  93. <view class="h-full">
  94. <swiper class="h-full" :interval="interval" indicator-color="rgba(255,255,255,0.6)" :current="swiperCurrent"
  95. @change="swiperChange">
  96. <block v-for="(item,index) in categoryList" :key="index">
  97. <swiper-item class="h-full" :item-id="`${item.id}`">
  98. <scroll-view @scroll="scrollLeft" scroll-y="true" :show-scrollbar="false" class="scroll-view h-full" id="goods"
  99. refresher-enabled="true" :refresher-threshold="100" :refresher-triggered="triggeredDiscover"
  100. @refresherrefresh="onRefreshDiscover" @refresherpulling="onPulling" @refresherrestore="onRestore"
  101. @refresherabort="onAbort">
  102. <view class="goods padbottom">
  103. <view class="goods-wrap flex-1" id="goods" v-if="discoverList[item.id] && discoverList[item.id].goods.length">
  104. <view>
  105. <WaterfallsFlow :column="true" v-if="discoverList[item.id].goods.length" :wfList="discoverList[item.id].goods"
  106. :fromType="1">
  107. </WaterfallsFlow>
  108. </view>
  109. </view>
  110. <view class='loadingicon acea-row row-center-wrapper'>
  111. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{discoverList[item.id] &&discoverList[item.id].goods.length>0?loadTitle:''}}
  112. </view>
  113. <view class="empty-boxs noContent" v-if="discoverList[item.id] && discoverList[item.id].goods.length == 0 && !loading">
  114. <emptyPage title="暂无内容~" mTop="13%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'">
  115. </emptyPage>
  116. </view>
  117. <view v-if="authorList.length>0 && !loadingfollow" class="author-list mt-24">
  118. <title-box title="为你推荐"></title-box>
  119. <view v-for="(val, authorIndex) in authorList" :key="authorIndex" class="author-item" @click="goAuthor(val)">
  120. <view class="acea-row row-between row-middle mb30">
  121. <view class="acea-row row-middle">
  122. <view class="author-head">
  123. <image :src="val.authorAvatar"></image>
  124. </view>
  125. <view class="author-info">
  126. <view class="author-name">{{val.authorName}}</view>
  127. <view v-show="val.authorSignature" class="author-sign line1">
  128. {{val.authorSignature}}
  129. </view>
  130. <view class="author-fans">
  131. 粉丝<text class="text-333 ml-8">{{ val.fansNum < 10000 ? val.fansNum : (val.fansNum / 10000).toFixed(2) }}</text>
  132. </view>
  133. </view>
  134. </view>
  135. <view @click.stop="followAuthor(val, authorIndex)" class="author-follow acea-row" :class="val.isConcerned ? 'focusBtn' : ''">
  136. <text v-if="!val.isConcerned" class="iconfont icon-shangpinshuliang-jia"></text>
  137. {{!val.isConcerned ? '关注' : '已关注'}}
  138. </view>
  139. </view>
  140. <scroll-view scroll-x="true" class="white-nowrap vertical-middle w-full" show-scrollbar="false">
  141. <view class="inline-block mr-20" v-for="(items, noteIndex) in val.noteList" :key="noteIndex">
  142. <view class="relative">
  143. <easy-loadimage :image-src="items.cover" width="184rpx" height="254rpx" :radius="8"></easy-loadimage>
  144. <view class="discover_video_icon" v-show="items.type == 2">
  145. <text class="iconfont icon-24gf-play"></text>
  146. </view>
  147. </view>
  148. </view>
  149. </scroll-view>
  150. </view>
  151. <view class='loadingicon acea-row row-center-wrapper'>
  152. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{authorList.length>0?loadTitle:''}}
  153. </view>
  154. </view>
  155. <view class="footerBottoms"></view>
  156. </view>
  157. </scroll-view>
  158. </swiper-item>
  159. </block>
  160. </swiper>
  161. </view>
  162. <!-- 关注 登录后 -->
  163. <!-- <view id="goods" v-if="isLogin&&tabActive == 0" class="discover-detail h-full">
  164. <scroll-view scroll-y="true" :show-scrollbar="false" class="scroll-view recommendList h-full" id="recommendList"
  165. @scrolltolower="onTouchmoveRecommend" :refresher-threshold="100" @scroll="followScroll" refresher-enabled="true"
  166. :refresher-triggered="triggered" @refresherrefresh="onRefresh" @refresherpulling="onPulling" @refresherrestore="onRestore"
  167. @refresherabort="onAbort">
  168. <view class="goods padbottom">
  169. <view class="goods-wrap flex-1" id="goods" v-if="noteRecommendList.length">
  170. <view>
  171. <WaterfallsFlow v-if="noteRecommendList.length" :wfList="noteRecommendList" :fromType="1">
  172. </WaterfallsFlow>
  173. </view>
  174. </view>
  175. <view :hidden='loadingfollow==false' class='loadingicon acea-row row-center-wrapper'>
  176. <text class='loading iconfont icon-jiazai'></text>{{noteRecommendList.length>0?loadTitleFollow:''}}
  177. </view>
  178. <view v-if="isLogin&&tabActive == 0 && noteRecommendList.length===0 &&!loadingfollow" class="empty-boxs noContent">
  179. <emptyPage title="暂无更多内容~" mTop="0%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'"></emptyPage>
  180. </view>
  181. </view>
  182. <view v-if="authorList.length>0 && !loadingfollow" class="author-list mt-24">
  183. <title-box title="为你推荐"></title-box>
  184. <view v-for="(item, index) in authorList" :key="item.authorId" class="author-item" @click="goAuthor(item)">
  185. <view class="acea-row row-between row-middle mb30">
  186. <view class="acea-row row-middle">
  187. <view class="author-head">
  188. <image :src="item.authorAvatar"></image>
  189. </view>
  190. <view class="author-info">
  191. <view class="author-name">{{item.authorName}}</view>
  192. <view v-show="item.authorSignature" class="author-sign line1">
  193. {{item.authorSignature}}
  194. </view>
  195. <view class="author-fans">
  196. 粉丝<text class="text-333 ml-8">{{ item.fansNum < 10000 ? item.fansNum : (item.fansNum / 10000).toFixed(2) }}</text>
  197. </view>
  198. </view>
  199. </view>
  200. <view @click.stop="followAuthor(item, index)" class="author-follow acea-row" :class="item.isConcerned ? 'focusBtn' : ''">
  201. <text v-if="!item.isConcerned" class="iconfont icon-shangpinshuliang-jia"></text>
  202. {{!item.isConcerned ? '关注' : '已关注'}}
  203. </view>
  204. </view>
  205. <scroll-view scroll-x="true" class="white-nowrap vertical-middle w-full" show-scrollbar="false">
  206. <view class="inline-block mr-20" v-for="items in item.noteList" :key="items.id">
  207. <view class="relative">
  208. <easy-loadimage :image-src="items.cover" width="184rpx" height="254rpx" :radius="8"></easy-loadimage>
  209. <view class="discover_video_icon" v-show="items.type == 2">
  210. <text class="iconfont icon-24gf-play"></text>
  211. </view>
  212. </view>
  213. </view>
  214. </scroll-view>
  215. </view>
  216. <view class='loadingicon acea-row row-center-wrapper'>
  217. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{authorList.length>0?loadTitle:''}}
  218. </view>
  219. </view>
  220. <view class="footerBottoms"></view>
  221. </scroll-view>
  222. </view> -->
  223. <!-- 关注未登录 -->
  224. <view class="empty-boxs" v-if="!isLogin&&tabActive == 0">
  225. <emptyPage title="登录后可查看关注用户的内容哦~" mTop="30%" :imgSrc="urlDomain+'crmebimage/presets/nodenglu.png'"></emptyPage>
  226. <view class="btn" @click="openAuto">立即登录</view>
  227. </view>
  228. </view>
  229. </scroll-view>
  230. </view>
  231. <view class="publish" @click="publish" :class="bottomNavigationIsCustom?'bottom':''">
  232. <image class="w-116 h-116" src="/static/img/ic-fatie.png" mode=""></image>
  233. </view>
  234. </view>
  235. <!-- <pageFooter v-if="isShowFooter"></pageFooter> -->
  236. <!-- 评论 -->
  237. <uni-popup type="bottom" ref="comment">
  238. <view :style="'width: '+ windowWidth +'px; background-color: #fff; border-top-left-radius: 10px; border-top-right-radius: 10px;'">
  239. <discoverComment v-if="showComment" @getReplyNum="getReplyNum" :noteId="noteDetails.id" :noteDetails="noteDetails"
  240. @close="close">
  241. </discoverComment>
  242. </view>
  243. </uni-popup>
  244. <!-- 商品列表 -->
  245. <uni-popup type="bottom" ref="goods">
  246. <mentioned v-if="popupShow" :list="proList" @close="popup" class=""></mentioned>
  247. </uni-popup>
  248. <!-- 学校 -->
  249. <uni-popup ref="schoolRef" :is-mask-click="false">
  250. <view class="w-full flex-center" :style="{height: windowHeight + 'px'}">
  251. <navigator hover-class='none' url='/pages/discover/discover_user/index'>
  252. <image :src="`${urlDomain}crmebimage/public/store/2025/05/20/ac4f4703de5d4a8c9490e7e27c9f25b8pzzy4l1ywq.png`" mode="heightFix" style="height: 694rpx;width: 616rpx;"></image>
  253. </navigator>
  254. </view>
  255. </uni-popup>
  256. </view>
  257. </template>
  258. <script>
  259. import {
  260. mapGetters
  261. } from "vuex";
  262. import {
  263. toLogin
  264. } from '@/libs/login.js';
  265. import {
  266. BACK_URL
  267. } from '@/config/cache';
  268. import {
  269. communityCategoryListApi,
  270. recommendAuthorListApi,
  271. discoverListApi,
  272. followListApi,
  273. getCommunityInfo
  274. } from '@/api/discover.js';
  275. import {
  276. discoverFollowAuthor,
  277. } from '@/libs/follow.js';
  278. import {
  279. tokenIsExistApi
  280. } from '@/api/api.js';
  281. import {
  282. silenceBindingSpread,
  283. getUserSpread
  284. } from '@/utils/index.js';
  285. import onShare from "@/mixins/onShare";
  286. import discoverComment from '@/components/discoverComment/index.vue';
  287. import animationType from '@/utils/animationType.js'
  288. import pageFooter from "@/components/pageFooter/index.vue";
  289. import navBar from '@/components/navBar';
  290. import emptyPage from '@/components/emptyPage.vue';
  291. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  292. import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
  293. import WaterfallsFlowItem from '@/components/discoverFlowItem/discoverFlowItem.vue'
  294. import discoverDetails from '@/components/discoverDetails/index.vue'
  295. import mentioned from '@/components/mentioned.vue';
  296. import TitleBox from '@/components/titleBox/index.vue';
  297. let app = getApp();
  298. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  299. export default {
  300. mixins: [onShare],
  301. components: {
  302. pageFooter,
  303. navBar,
  304. emptyPage,
  305. easyLoadimage,
  306. WaterfallsFlowItem,
  307. WaterfallsFlow,
  308. discoverDetails,
  309. discoverComment,
  310. mentioned,
  311. TitleBox
  312. },
  313. computed: {
  314. ...mapGetters(['globalData', 'isLogin', 'userInfo', 'bottomNavigationIsCustom']),
  315. headerBoxStyle() {
  316. return {
  317. // #ifndef MP
  318. paddingTop: '4rpx',
  319. // #endif
  320. // #ifdef MP
  321. paddingTop: this.marTop + "px",
  322. marginRight: this.statusWidth + this.searchRight + 'px',
  323. // #endif
  324. }
  325. },
  326. textBoxStyle() {
  327. return {
  328. // #ifdef MP
  329. width: '100%',
  330. height: this.searchHeight + 'rpx',
  331. // lineHeight: this.searchHeight + 'rpx',
  332. // #endif
  333. }
  334. }
  335. },
  336. onLoad(options) {
  337. //分销码
  338. getUserSpread(options);
  339. this.windowWidth = uni.getSystemInfoSync().screenWidth; //获取屏幕宽度
  340. tokenIsExistApi().then(res => {
  341. this.tokenIsExist = res.data;
  342. if (this.tokenIsExist && this.isLogin) {
  343. this.getFollowList();
  344. setTimeout(() => {
  345. if (this.noteRecommendList.length === 0 || this.loadendfollow) this
  346. .getRecommendAuthorList();
  347. }, 500)
  348. }
  349. if (!this.tokenIsExist) {
  350. this.$store.commit('UPDATE_LOGIN', '');
  351. this.$store.commit('UPDATE_USERINFO', {});
  352. }
  353. })
  354. this.getDiscoverList();
  355. this.getCommunityCategoryList();
  356. this._freshing = false;
  357. },
  358. data() {
  359. return {
  360. returnShow: false,
  361. urlDomain: this.$Cache.get("imgHost"),
  362. sysHeight: sysHeight,
  363. navH: '',
  364. windowWidth: 0, //获取屏幕宽度
  365. interval: 3000,
  366. swiperHeight: 0,
  367. listMarTop: 0,
  368. tabClick: 0, //设置导航点击了哪一个
  369. tabLeft: 0, //设置下划线位置
  370. isLeft: 0, //导航栏下划线位置
  371. isWidth: 0, //每个导航栏占位
  372. tabActive: 1, // 顶部关注、发现切换
  373. windowHeight: 0,
  374. theme: app.globalData.theme,
  375. marTop: 0,
  376. categoryList: [], //分类列表
  377. categoryId: '-1', //分类id
  378. swiperCurrent: 0, //分类索引
  379. isScroll: false, //是否是滑动
  380. params: { //推荐作者
  381. page: 1,
  382. limit: 10
  383. },
  384. followParams: { //关注内容
  385. page: 1,
  386. limit: 10
  387. },
  388. noteRecommendList: [], //关注内容
  389. loadendfollow: false, //关注内容
  390. loadingfollow: false, //关注内容
  391. where: {
  392. categoryId: 0,
  393. page: 1,
  394. limit: 10
  395. },
  396. loadend: false,
  397. loading: false,
  398. loadTitle: '加载更多',
  399. loadTitleFollow: '加载更多',
  400. onnnn: {
  401. good: [{
  402. authorId: 1
  403. }]
  404. },
  405. discoverList: {}, //内容信息
  406. authorList: [], //推荐作者列表
  407. isOpenRefresh: true, // 是否开启下拉
  408. triggered: false,
  409. triggeredDiscover: false,
  410. isShow: false, //加载完成
  411. tokenIsExist: false, //校验token是否有效,true为有效,false为无效
  412. isRefresher: false, //下拉刷新状态
  413. noteDetails: {}, //内容详情
  414. popupShow: false, //商品弹窗
  415. showComment: false, //评论弹窗
  416. proList: [], //提到的商品
  417. isShowFooter: true,
  418. loadingAuthor: false, //推荐作者
  419. showCateDrawer: false, //分类下拉展示
  420. searchRight: 0,
  421. statusWidth: 0,
  422. searchHeight: 0,
  423. bannerList: [],
  424. wallHeadline: [],
  425. navList: [{
  426. id: 0,
  427. name: '默认'
  428. }, {
  429. id: 1,
  430. name: '评论'
  431. }, {
  432. id: 2,
  433. name: '点赞'
  434. }, {
  435. id: 3,
  436. name: '有图'
  437. }],
  438. active: 0,
  439. }
  440. },
  441. // 滚动监听
  442. onPageScroll(e) {
  443. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  444. uni.$emit('scroll');
  445. },
  446. onShow() {
  447. this.getHandInfo();
  448. // this.reFresh()
  449. this.showCateDrawer = false;
  450. this.getTokenIsExist();
  451. //分销绑定
  452. silenceBindingSpread(this.isLogin, this.globalData.spread);
  453. },
  454. mounted() {
  455. this.$nextTick(function() {
  456. const query = uni.createSelectorQuery().in(this);
  457. query.select('.discover-header').boundingClientRect(data => {
  458. // #ifndef H5
  459. this.listMarTop = data.height
  460. // #endif
  461. // #ifdef H5
  462. this.listMarTop = data.height
  463. // #endif
  464. }).exec();
  465. });
  466. },
  467. created() {
  468. console.log(this.urlDomain);
  469. var pages = getCurrentPages();
  470. this.returnShow = pages.length === 1 ? false : true;
  471. var that = this;
  472. // 获取设备宽度
  473. uni.getSystemInfo({
  474. success(e) {
  475. that.isWidth = e.windowWidth / 6;
  476. that.windowHeight = e.windowHeight;
  477. that.swiperHeight = that.windowHeight - 205
  478. that.$set(that, 'swiperHeight', that.windowHeight - 55);
  479. }
  480. });
  481. // #ifdef MP || APP-PLUS
  482. // 获取导航高度;
  483. this.navH = this.globalData.navHeight;
  484. // #endif
  485. // #ifdef H5
  486. this.navH = 80;
  487. // #endif
  488. that.getNavH()
  489. // #ifdef MP
  490. const res = uni.getMenuButtonBoundingClientRect()
  491. const jnHeight = res.height //胶囊高度
  492. const statusHeight = res.top //胶囊距离顶部
  493. const statusRight = res.right //胶囊右边界坐标
  494. this.statusWidth = res.width
  495. this.searchHeight = 96
  496. console.log('999', statusHeight, this.sysHeight);
  497. this.marTop = statusHeight - this.sysHeight
  498. //搜索框宽度计算
  499. uni.getSystemInfo({
  500. success: res => {
  501. this.searchRight = res.windowWidth - statusRight
  502. }
  503. })
  504. // #endif
  505. },
  506. //uniapp小程序用deep重写组件样式不生效
  507. options: {
  508. styleIsolation: 'shared'
  509. },
  510. methods: {
  511. returns: function() {
  512. if (this.returnShow) {
  513. uni.navigateBack(-1);
  514. } else {
  515. uni.switchTab({
  516. url: '/pages/index/index'
  517. })
  518. }
  519. },
  520. getHandInfo() {
  521. getCommunityInfo().then(res => {
  522. this.bannerList = res.data.banner
  523. this.wallHeadline = res.data.headline
  524. console.log(res.data, 111111111111111)
  525. if (!res.data.school) {
  526. this.$refs.schoolRef.open('top')
  527. } else {
  528. this.$refs.schoolRef.close()
  529. }
  530. }).catch(err => {
  531. console.log(err)
  532. })
  533. },
  534. getNavH(marTop) {
  535. // #ifdef H5
  536. this.marTop = 30;
  537. // #endif
  538. // #ifdef APP
  539. this.marTop = marTop - 60;
  540. // #endif
  541. },
  542. getPro(item) {
  543. this.noteDetails = item;
  544. this.proList = item.productList;
  545. this.$refs.goods.open('bottom');
  546. this.popupShow = true;
  547. setTimeout(() => {
  548. if (!this.bottomNavigationIsCustom) {
  549. uni.hideTabBar();
  550. } else {
  551. this.isShowFooter = false;
  552. }
  553. }, 50)
  554. },
  555. popup() {
  556. if (!this.bottomNavigationIsCustom) {
  557. uni.showTabBar();
  558. } else {
  559. this.isShowFooter = true;
  560. }
  561. setTimeout(() => {
  562. this.$refs.goods.close();
  563. this.popupShow = false;
  564. }, 100)
  565. },
  566. close() {
  567. if (!this.bottomNavigationIsCustom) {
  568. uni.showTabBar();
  569. } else {
  570. this.isShowFooter = true;
  571. }
  572. setTimeout(() => {
  573. this.$refs.comment.close();
  574. this.showComment = false;
  575. }, 100);
  576. },
  577. getReplyNum(n) {
  578. this.noteDetails.replyNum = n;
  579. },
  580. getComment(item) {
  581. this.noteDetails = item;
  582. this.$refs.comment.open('bottom');
  583. this.showComment = true;
  584. setTimeout(() => {
  585. if (!this.bottomNavigationIsCustom) {
  586. uni.hideTabBar();
  587. } else {
  588. this.isShowFooter = false;
  589. }
  590. }, 50)
  591. },
  592. //校验token是否有效,true为有效,false为无效
  593. getTokenIsExist() {
  594. tokenIsExistApi().then(res => {
  595. this.tokenIsExist = res.data;
  596. if (!this.tokenIsExist) {
  597. this.$store.commit('UPDATE_LOGIN', '');
  598. this.$store.commit('UPDATE_USERINFO', {});
  599. }
  600. })
  601. },
  602. // 去推荐作者个人主人
  603. goAuthor(item) {
  604. // #ifdef MP || H5
  605. uni.navigateTo({
  606. url: `/pages/discover/discover_user/index?id=${item.authorId}`
  607. })
  608. // #endif
  609. // #ifdef APP-PLUS
  610. uni.navigateTo({
  611. animationType: animationType.type,
  612. animationDuration: animationType.duration,
  613. url: `/pages/discover/discover_user/index?id=${item.authorId}`
  614. })
  615. // #endif
  616. },
  617. // 自定义下拉刷新被中止
  618. onAbort() {
  619. console.error("onAbort");
  620. },
  621. onPulling(e) {
  622. if (e.detail.deltaY < 0) return // 防止上滑页面也触发下拉
  623. if (this.tabActive == 1) {
  624. this.triggeredDiscover = true;
  625. } else {
  626. this.triggered = true;
  627. }
  628. },
  629. // 下拉刷新触发
  630. refresherpullingFun() {
  631. this.isRefresher = true
  632. },
  633. onRefreshDiscover() {
  634. if (this._freshing) return;
  635. this._freshing = true;
  636. setTimeout(() => {
  637. this._freshing = false;
  638. this.discoverList = {}
  639. this.getDiscoverList();
  640. this.triggeredDiscover = false;
  641. uni.stopPullDownRefresh();
  642. this._freshing = false;
  643. }, 1000)
  644. },
  645. onRefresh() {
  646. if (this._freshing) return;
  647. this._freshing = true;
  648. setTimeout(() => {
  649. this.loadendfollow = false;
  650. this.loadend = false;
  651. this.noteRecommendList = [];
  652. this.followParams.page = 1;
  653. this.authorList = [];
  654. this.params.page = 1;
  655. this.getFollowList();
  656. setTimeout(() => {
  657. if (this.noteRecommendList.length === 0 || this.loadendfollow) this
  658. .getRecommendAuthorList();
  659. }, 400)
  660. this.triggered = false
  661. uni.stopPullDownRefresh();
  662. this._freshing = false;
  663. }, 1000)
  664. },
  665. onRestore() {
  666. this.triggeredDiscover = false;
  667. },
  668. //关注内容
  669. getFollowList() {
  670. if (this.loadendfollow) {
  671. this.triggered = false;
  672. return;
  673. }
  674. this.loadingfollow = true;
  675. followListApi(this.followParams).then(res => {
  676. this.$set(this.followParams, 'page', this.followParams.page + 1);
  677. this.loadendfollow = this.followParams.page > res.data.totalPage;
  678. this.loadTitleFollow = this.loadendfollow ? '' : '加载更多';
  679. this.noteRecommendList = this.noteRecommendList.concat(res.data.list || []);
  680. this.loadingfollow = false
  681. this.triggered = false;
  682. }).catch(err => {
  683. this.loadingfollow = false;
  684. this.triggered = false;
  685. uni.showToast({
  686. title: err,
  687. icon: 'none'
  688. })
  689. });
  690. },
  691. // 关注作者
  692. followAuthor(item) {
  693. if (this.isLogin) {
  694. discoverFollowAuthor(item.authorId).then(() => {
  695. this.$set(item, 'isConcerned', !item.isConcerned);
  696. });
  697. } else {
  698. toLogin();
  699. }
  700. },
  701. //回退页面之后重新加载页面
  702. reFresh() {
  703. this.loading = true
  704. this.discoverList = {};
  705. this.getDiscoverList();
  706. },
  707. //发布内容
  708. publish() {
  709. if (this.isLogin) {
  710. // #ifdef MP || H5
  711. uni.navigateTo({
  712. url: `/pages/discover/discover_release/index`
  713. })
  714. // #endif
  715. // #ifdef APP-PLUS
  716. uni.navigateTo({
  717. animationType: animationType.type,
  718. animationDuration: animationType.duration,
  719. url: `/pages/discover/discover_release/index`
  720. })
  721. // #endif
  722. } else {
  723. toLogin();
  724. }
  725. },
  726. /**
  727. * 发现列表滑动中用到的方法
  728. */
  729. followScroll() {
  730. uni.$emit('scroll');
  731. },
  732. onTouchmoveRecommend(e) {
  733. if (!this.loadendfollow) this.getFollowList();
  734. if (this.loadendfollow && !this.loadend) this.getRecommendAuthorList();
  735. },
  736. onTouchmove(e) {
  737. this.getDiscoverList();
  738. },
  739. scrollLeft: function(e) {
  740. uni.$emit('scroll');
  741. if (e.detail.scrollTop > e.detail.scrollHeight - 1500) {
  742. this.getDiscoverList();
  743. }
  744. this.swiperHeight = this.windowHeight - 55
  745. },
  746. swiperChange(e) {
  747. let {
  748. current,
  749. source,
  750. currentItemId
  751. } = e.detail;
  752. if (source === 'autoplay' || source === 'touch') {
  753. this.categoryId = currentItemId;
  754. this.swiperCur = current
  755. this.selectMenu(this.categoryList[this.swiperCur], this.swiperCur, false)
  756. if (this.categoryList.length > 3) {
  757. var tempIndex = this.swiperCur - 2;
  758. tempIndex = tempIndex <= 0 ? 0 : tempIndex;
  759. let tabLeft = (this.swiperCur - 2) * this.isWidth; //设置下划线位置
  760. this.$nextTick(function() {
  761. this.$set(this, 'tabLeft', tabLeft);
  762. });
  763. }
  764. }
  765. },
  766. /*******************发现列表滑动中用到的方法结束*********************/
  767. // 去个人主人
  768. goUser() {
  769. if (!this.isLogin) {
  770. this.openAuto();
  771. } else {
  772. // #ifdef MP || H5
  773. uni.navigateTo({
  774. url: '/pages/discover/discover_user/index'
  775. })
  776. // #endif
  777. // #ifdef APP-PLUS
  778. uni.navigateTo({
  779. animationType: animationType.type,
  780. animationDuration: animationType.duration,
  781. url: '/pages/discover/discover_user/index'
  782. })
  783. // #endif
  784. }
  785. },
  786. // 打开授权
  787. openAuto() {
  788. this.$Cache.set(BACK_URL, '')
  789. toLogin();
  790. },
  791. //发现列表
  792. getDiscoverList() {
  793. let that = this;
  794. this.isShow = false;
  795. if (!this.discoverList[this.categoryId]) {
  796. this.$set(this.discoverList, this.categoryId, {
  797. where: {
  798. ...this.where,
  799. categoryId: this.categoryId,
  800. secondType: this.active
  801. },
  802. goods: []
  803. })
  804. }
  805. const data = this.discoverList[this.categoryId];
  806. const cateId = this.categoryId;
  807. if (data.loading || data.loadend) {
  808. this.triggeredDiscover = false;
  809. return
  810. };
  811. data.loading = true
  812. this.loading = true
  813. this.loadTitle = '';
  814. if (data.where.categoryId === 0) data.where.categoryId = ''
  815. discoverListApi(data.where).then(res => {
  816. data.loadend = res.data.list.length < that.where.limit;
  817. if (data.where.page == 1) {
  818. data.goods = [];
  819. }
  820. this.loadTitle = data.loadend ? '没有了' : '加载更多';
  821. data.goods.push.apply(data.goods, res.data.list);
  822. data.where.page = data.where.page + 1;
  823. that.$nextTick(() => {
  824. that.$set(that.discoverList, cateId, {
  825. ...data
  826. });
  827. });
  828. data.loading = false;
  829. this.loading = false;
  830. this.triggeredDiscover = false;
  831. this.$forceUpdate()
  832. console.log(that.discoverList)
  833. }).catch(err => {
  834. data.loading = false;
  835. this.loading = false;
  836. uni.showToast({
  837. title: err,
  838. icon: 'none'
  839. })
  840. this.$set(this.discoverList, cateId, data);
  841. });
  842. },
  843. //推荐作者列表
  844. getRecommendAuthorList() {
  845. if (this.loadend) return;
  846. this.loading = true
  847. recommendAuthorListApi(this.params).then(res => {
  848. this.$set(this.params, 'page', this.params.page + 1);
  849. this.loadend = this.params.page > res.data.totalPage;
  850. this.authorList = this.authorList.concat(res.data.list || []);
  851. this.loadTitle = this.loadend ? '没有了' : '加载更多';
  852. this.loading = false
  853. })
  854. },
  855. //分类列表
  856. getCommunityCategoryList() {
  857. let data = [{
  858. name: "全部",
  859. id: '-1',
  860. icon: '/static/img/ic-wall-type--1.png'
  861. }];
  862. communityCategoryListApi().then(res => {
  863. this.categoryList = Array.from(new Set([...data, ...res.data]));
  864. })
  865. },
  866. // 点击列表头部
  867. selectMenu(item, index, isScroll) {
  868. if (this.tabClick == index) return
  869. this.active = 0
  870. this.triggeredDiscover = false;
  871. this.categoryId = item.id;
  872. this.swiperCurrent = index;
  873. this.isScroll = isScroll;
  874. this.tabClick = index; //设置导航点击了哪一个
  875. this.isLeft = index * this.isWidth; //设置下划线位置
  876. this.where.categoryId = item.id;
  877. this.showCateDrawer = false
  878. this.getDiscoverList();
  879. },
  880. tabSelect(active, e) {
  881. if (this.active == active) return
  882. this.active = active;
  883. this.triggeredDiscover = false;
  884. this.discoverList[this.categoryId].loading = false
  885. this.discoverList[this.categoryId].loadend = false
  886. this.discoverList[this.categoryId].where.page = 1
  887. this.discoverList[this.categoryId].where.secondType = active
  888. this.getDiscoverList();
  889. },
  890. }
  891. }
  892. </script>
  893. <style lang="scss" scoped>
  894. /deep/.wf-page {
  895. background-color: #fff !important;
  896. }
  897. .discover_video_icon {
  898. top: 50% !important;
  899. left: 50% !important;
  900. right: 0 !important;
  901. -webkit-transform: translate(-50%, -50%);
  902. transform: translate(-50%, -50%);
  903. }
  904. .mp-header {
  905. background-color: $bg-color-primary;
  906. }
  907. .select_nav {
  908. width: 170rpx !important;
  909. height: 60rpx !important;
  910. border-radius: 33rpx;
  911. // background: rgba(255, 255, 255, 0.6);
  912. // border: 1rpx solid rgba(0, 0, 0, 0.1);
  913. color: #000;
  914. position: fixed;
  915. font-size: 18px;
  916. line-height: 58rpx;
  917. z-index: 1000;
  918. left: 14rpx;
  919. }
  920. .nav_title {
  921. // width: 200rpx;
  922. color: #fff;
  923. font-size: 36rpx;
  924. position: fixed;
  925. text-align: center;
  926. left: 0;
  927. right: 0;
  928. margin: auto;
  929. }
  930. .banner-img {
  931. width: 100%;
  932. height: 100%;
  933. }
  934. .newsTitle {
  935. font-weight: 400;
  936. font-size: 21rpx;
  937. color: #646464;
  938. }
  939. .active-topic {
  940. @include main_color(theme);
  941. @include coupons_light_color(theme);
  942. @include coupons_border_color(theme);
  943. }
  944. .padbottom {
  945. /* #ifndef H5 */
  946. padding-bottom: calc(100rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  947. padding-bottom: calc(100rpx + env(safe-area-inset-bottom)) !important;
  948. /* #endif */
  949. }
  950. .bottom {
  951. bottom: 218rpx !important;
  952. }
  953. .footerBottoms {
  954. width: 100%;
  955. /* #ifndef H5 */
  956. height: calc(200rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  957. height: calc(200rpx + env(safe-area-inset-bottom)) !important;
  958. /* #endif */
  959. /* #ifdef H5 */
  960. height: calc(100rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  961. height: calc(100rpx + env(safe-area-inset-bottom)) !important;
  962. /* #endif */
  963. }
  964. .discover_index {
  965. /deep/.no-border {
  966. bottom: 40rpx;
  967. }
  968. /deep/.author-list {
  969. padding-left: 24rpx;
  970. padding-right: 24rpx;
  971. }
  972. }
  973. .menu {
  974. // padding: 20rpx 34rpx 0 34rpx;
  975. // box-sizing: border-box;
  976. width: 100%;
  977. }
  978. .page_con {
  979. // position: fixed;
  980. top: 0;
  981. right: 0;
  982. bottom: 0;
  983. left: 0;
  984. display: flex;
  985. flex-direction: column;
  986. }
  987. .empty-boxs {
  988. margin: auto;
  989. }
  990. .goods {
  991. display: flex;
  992. flex-direction: column;
  993. justify-content: space-between;
  994. padding: 24rpx 24rpx 0 24rpx;
  995. background: #ffffff;
  996. }
  997. .publish {
  998. position: fixed;
  999. z-index: 999;
  1000. width: 100rpx;
  1001. height: 100rpx;
  1002. opacity: 1;
  1003. border-radius: 50%;
  1004. bottom: 142rpx;
  1005. right: 24rpx;
  1006. color: #fff;
  1007. line-height: 100rpx;
  1008. text-align: center;
  1009. @include linear-gradient(theme);
  1010. .iconfont {
  1011. font-size: 50rpx;
  1012. }
  1013. }
  1014. .main {
  1015. width: 100%;
  1016. }
  1017. .author {
  1018. &-item {
  1019. padding-bottom: 40rpx;
  1020. }
  1021. &-title {
  1022. height: 120rpx;
  1023. line-height: 120rpx;
  1024. font-size: 32rpx;
  1025. color: #333333;
  1026. .iconfont {
  1027. font-size: 170rpx;
  1028. color: #454545;
  1029. }
  1030. .lefticon {
  1031. transform: rotate(180deg);
  1032. }
  1033. }
  1034. .name {
  1035. margin: 0 28rpx;
  1036. }
  1037. &-head {
  1038. width: 80rpx;
  1039. height: 80rpx;
  1040. border-radius: 50%;
  1041. overflow: hidden;
  1042. image {
  1043. width: 100%;
  1044. height: 100%;
  1045. }
  1046. margin-right: 20rpx;
  1047. }
  1048. &-name {
  1049. font-size: 28rpx;
  1050. font-family: PingFang SC-Medium, PingFang SC;
  1051. font-weight: 600;
  1052. color: #282828;
  1053. }
  1054. &-sign,
  1055. &-fans {
  1056. font-size: 22rpx;
  1057. font-family: PingFang SC-Regular, PingFang SC;
  1058. font-weight: 400;
  1059. color: #999999;
  1060. }
  1061. &-sign {
  1062. width: 370rpx;
  1063. }
  1064. &-pictrue {
  1065. width: 222rpx;
  1066. height: 222rpx;
  1067. border-radius: 10px 10px 10px 10px;
  1068. opacity: 1;
  1069. margin-right: 18rpx;
  1070. /deep/image,
  1071. /deep/.easy-loadimage,
  1072. uni-image {
  1073. width: 100%;
  1074. height: 100%;
  1075. border-radius: 10px 10px 10px 10px;
  1076. overflow: hidden;
  1077. }
  1078. }
  1079. &-pictrue:nth-of-type(3n) {
  1080. margin-right: 0;
  1081. }
  1082. }
  1083. .noContent {
  1084. /deep/.empty-box {
  1085. padding-top: 80rpx !important;
  1086. }
  1087. }
  1088. .btn {
  1089. width: 440rpx;
  1090. height: 86rpx;
  1091. line-height: 86rpx;
  1092. text-align: center;
  1093. border-radius: 43rpx 43rpx 43rpx 43rpx;
  1094. opacity: 1;
  1095. border: 1px solid #E93323;
  1096. font-size: 32rpx;
  1097. margin: auto;
  1098. font-family: PingFang SC-Medium, PingFang SC;
  1099. @include main_color(theme);
  1100. @include coupons_border_color(theme);
  1101. font-weight: 600;
  1102. }
  1103. .cart_nav {
  1104. /deep/.nav_title {
  1105. font-size: 36rpx;
  1106. color: #333333;
  1107. }
  1108. }
  1109. .discover {
  1110. &-header {
  1111. background-size: cover;
  1112. top: 0;
  1113. left: 0;
  1114. .title {
  1115. font-size: 36rpx;
  1116. color: #333333;
  1117. }
  1118. }
  1119. &-navTab {
  1120. padding: 0 34rpx 0 34rpx;
  1121. justify-content: space-between;
  1122. .icon-xiazai5 {
  1123. color: #333;
  1124. }
  1125. .nav-item {
  1126. display: inline-block;
  1127. font-weight: 500;
  1128. font-size: 31rpx;
  1129. color: #B2B2B2;
  1130. &.on {
  1131. font-weight: 600;
  1132. font-size: 35rpx;
  1133. color: #141414;
  1134. border-bottom: 5rpx solid;
  1135. border-image: linear-gradient(90deg, #FFCA5F 0%, #FF1B95 100%);
  1136. border-image-slice: 1;
  1137. }
  1138. }
  1139. .release_btn {
  1140. width: 58rpx;
  1141. height: 58rpx;
  1142. border-radius: 100%;
  1143. background-image: linear-gradient(126deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  1144. color: #fff;
  1145. position: absolute;
  1146. top: 20rpx;
  1147. left: 0;
  1148. .iconfont {
  1149. font-size: 28rpx;
  1150. }
  1151. }
  1152. }
  1153. &-box {
  1154. flex: 1;
  1155. min-height: 83vh;
  1156. height: auto;
  1157. width: 100%;
  1158. background-color: #fff;
  1159. left: 0;
  1160. }
  1161. }
  1162. .avatar {
  1163. width: 64rpx;
  1164. height: 64rpx;
  1165. border-radius: 50%;
  1166. }
  1167. .h96 {
  1168. height: 96rpx;
  1169. }
  1170. .h36 {
  1171. /* #ifdef H5 */
  1172. height: 28rpx;
  1173. /* #endif */
  1174. /* #ifndef H5 */
  1175. height: 18rpx;
  1176. /* #endif */
  1177. }
  1178. .longTab {
  1179. width: 100%;
  1180. background: #fff;
  1181. border-radius: 16rpx 16rpx 0 0;
  1182. .longTab-item {
  1183. /*解决ios上滑动不流畅*/
  1184. -webkit-overflow-scrolling: touch;
  1185. position: relative;
  1186. }
  1187. .longItem {
  1188. height: 50upx;
  1189. display: inline-block;
  1190. text-align: center;
  1191. font-size: 30rpx;
  1192. color: #999999;
  1193. // margin-right: 56rpx;
  1194. text {
  1195. display: block;
  1196. max-width: 326rpx;
  1197. white-space: nowrap;
  1198. overflow: hidden;
  1199. text-overflow: ellipsis;
  1200. }
  1201. &:last-child {
  1202. margin-right: 0;
  1203. }
  1204. /*解决ios上滑动不流畅*/
  1205. -webkit-overflow-scrolling: touch;
  1206. position: relative;
  1207. &.click {
  1208. background: #EEF4FF;
  1209. // font-weight: bold;
  1210. // font-size: 34rpx;
  1211. // @include main_color(theme);
  1212. // &::after {
  1213. // content: "";
  1214. // display: block;
  1215. // width: 40rpx;
  1216. // height: 5rpx;
  1217. // @include main_bg_color(theme);
  1218. // display: flex;
  1219. // position: absolute;
  1220. // left: 50%;
  1221. // margin-left: -22rpx;
  1222. // bottom: -8rpx;
  1223. // }
  1224. // .underline {
  1225. // opacity: 1;
  1226. // }
  1227. }
  1228. }
  1229. .underlineBox {
  1230. height: 3px;
  1231. width: 20%;
  1232. display: flex;
  1233. align-content: center;
  1234. justify-content: center;
  1235. .underline {
  1236. opacity: 0;
  1237. width: 60rpx;
  1238. height: 4rpx;
  1239. background-color: #e93323;
  1240. }
  1241. }
  1242. }
  1243. .author-fans {
  1244. font-size: 24rpx !important;
  1245. }
  1246. .container {
  1247. overflow: hidden;
  1248. /* 隐藏超出部分 */
  1249. }
  1250. .swiper {
  1251. display: flex;
  1252. /* 使用flex布局 */
  1253. animation: scrollRight 10s linear infinite;
  1254. /* 应用动画 */
  1255. }
  1256. .swiper-item {
  1257. flex-shrink: 0;
  1258. /* 不允许缩小 */
  1259. width: 100%;
  1260. /* 每个item占满一行 */
  1261. height: 100%;
  1262. }
  1263. @keyframes scrollRight {
  1264. from {
  1265. transform: translateX(100%);
  1266. }
  1267. /* 从右向左移动 */
  1268. to {
  1269. transform: translateX(-100%);
  1270. }
  1271. /* 移出视图 */
  1272. }
  1273. .wall-nav {
  1274. font-weight: 500;
  1275. font-size: 23rpx;
  1276. color: #999999;
  1277. }
  1278. .wall-nav~.wall-nav {
  1279. margin-left: 38rpx;
  1280. }
  1281. .wall-nav-on {
  1282. font-weight: 600;
  1283. font-size: 27rpx;
  1284. color: #141414;
  1285. }
  1286. .discover-boxsss {
  1287. background-color: #fff;
  1288. width: 100%;
  1289. flex: 1;
  1290. }
  1291. </style>