index.vue 37 KB

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