index.vue 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660
  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" @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" v-if="tabActive === 1">
  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 class="footerBottoms"></view>
  118. </view>
  119. </scroll-view>
  120. </swiper-item>
  121. </block>
  122. </swiper>
  123. </view>
  124. <!-- 关注 登录后 -->
  125. <view id="goods" v-if="isLogin&&tabActive == 0" class="discover-detail h-full">
  126. <scroll-view scroll-y="true" :show-scrollbar="false" class="scroll-view recommendList h-full" id="recommendList"
  127. @scrolltolower="onTouchmoveRecommend" :refresher-threshold="100" @scroll="followScroll" refresher-enabled="true"
  128. :refresher-triggered="triggered" @refresherrefresh="onRefresh" @refresherpulling="onPulling" @refresherrestore="onRestore"
  129. @refresherabort="onAbort">
  130. <view class="goods padbottom">
  131. <view class="goods-wrap flex-1" id="goods" v-if="noteRecommendList.length">
  132. <view>
  133. <WaterfallsFlow v-if="noteRecommendList.length" :wfList="noteRecommendList" :fromType="1">
  134. </WaterfallsFlow>
  135. </view>
  136. </view>
  137. <view :hidden='loadingfollow==false' class='loadingicon acea-row row-center-wrapper'>
  138. <text class='loading iconfont icon-jiazai'></text>{{noteRecommendList.length>0?loadTitleFollow:''}}
  139. </view>
  140. <view v-if="isLogin&&tabActive == 0 && noteRecommendList.length===0 &&!loadingfollow" class="empty-boxs noContent">
  141. <emptyPage title="暂无更多内容~" mTop="0%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'"></emptyPage>
  142. </view>
  143. </view>
  144. <!-- <discover-details v-if="noteRecommendList.length>0" type="follow"
  145. :noteRecommendList="noteRecommendList" @getComment="getComment"
  146. @getPro="getPro"></discover-details> -->
  147. <!-- 为你推荐 -->
  148. <view v-if="authorList.length>0 && !loadingfollow" class="author-list mt-24">
  149. <title-box title="为你推荐"></title-box>
  150. <view v-for="(item, index) in authorList" :key="item.authorId" class="author-item" @click="goAuthor(item)">
  151. <view class="acea-row row-between row-middle mb30">
  152. <view class="acea-row row-middle">
  153. <view class="author-head">
  154. <image :src="item.authorAvatar"></image>
  155. </view>
  156. <view class="author-info">
  157. <view class="author-name">{{item.authorName}}</view>
  158. <view v-show="item.authorSignature" class="author-sign line1">
  159. {{item.authorSignature}}
  160. </view>
  161. <view class="author-fans">
  162. 粉丝<text class="text-333 ml-8">{{ item.fansNum < 10000 ? item.fansNum : (item.fansNum / 10000).toFixed(2) }}</text>
  163. </view>
  164. </view>
  165. </view>
  166. <view @click.stop="followAuthor(item, index)" class="author-follow acea-row" :class="item.isConcerned ? 'focusBtn' : ''">
  167. <text v-if="!item.isConcerned" class="iconfont icon-shangpinshuliang-jia"></text>
  168. {{!item.isConcerned ? '关注' : '已关注'}}
  169. </view>
  170. </view>
  171. <scroll-view scroll-x="true" class="white-nowrap vertical-middle w-full" show-scrollbar="false">
  172. <view class="inline-block mr-20" v-for="items in item.noteList" :key="items.id">
  173. <view class="relative">
  174. <easy-loadimage :image-src="items.cover" width="184rpx" height="254rpx" :radius="8"></easy-loadimage>
  175. <view class="discover_video_icon" v-show="items.type == 2">
  176. <text class="iconfont icon-24gf-play"></text>
  177. </view>
  178. </view>
  179. </view>
  180. </scroll-view>
  181. </view>
  182. <view class='loadingicon acea-row row-center-wrapper'>
  183. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{authorList.length>0?loadTitle:''}}
  184. </view>
  185. </view>
  186. <view class="footerBottoms"></view>
  187. </scroll-view>
  188. </view>
  189. <!-- 关注未登录 -->
  190. <view class="empty-boxs" v-if="!isLogin&&tabActive == 0">
  191. <emptyPage title="登录后可查看关注用户的内容哦~" mTop="30%" :imgSrc="urlDomain+'crmebimage/presets/nodenglu.png'"></emptyPage>
  192. <view class="btn" @click="openAuto">立即登录</view>
  193. </view>
  194. </view>
  195. </scroll-view>
  196. </view>
  197. <view class="publish" @click="publish" :class="bottomNavigationIsCustom?'bottom':''">
  198. <image class="w-116 h-116" src="/static/img/ic-fatie.png" mode=""></image>
  199. </view>
  200. </view>
  201. <!-- <pageFooter v-if="isShowFooter"></pageFooter> -->
  202. <!-- 评论 -->
  203. <uni-popup type="bottom" ref="comment">
  204. <view :style="'width: '+ windowWidth +'px; background-color: #fff; border-top-left-radius: 10px; border-top-right-radius: 10px;'">
  205. <discoverComment v-if="showComment" @getReplyNum="getReplyNum" :noteId="noteDetails.id" :noteDetails="noteDetails"
  206. @close="close">
  207. </discoverComment>
  208. </view>
  209. </uni-popup>
  210. <!-- 商品列表 -->
  211. <uni-popup type="bottom" ref="goods">
  212. <mentioned v-if="popupShow" :list="proList" @close="popup" class=""></mentioned>
  213. </uni-popup>
  214. </view>
  215. </template>
  216. <script>
  217. import {
  218. mapGetters
  219. } from "vuex";
  220. import {
  221. toLogin
  222. } from '@/libs/login.js';
  223. import {
  224. BACK_URL
  225. } from '@/config/cache';
  226. import {
  227. communityCategoryListApi,
  228. recommendAuthorListApi,
  229. discoverListApi,
  230. followListApi,
  231. getReplyInfo
  232. } from '@/api/discover.js';
  233. import {
  234. discoverFollowAuthor,
  235. } from '@/libs/follow.js';
  236. import {
  237. tokenIsExistApi
  238. } from '@/api/api.js';
  239. import {
  240. silenceBindingSpread,
  241. getUserSpread
  242. } from '@/utils/index.js';
  243. import onShare from "@/mixins/onShare";
  244. import discoverComment from '@/components/discoverComment/index.vue';
  245. import animationType from '@/utils/animationType.js'
  246. import pageFooter from "@/components/pageFooter/index.vue";
  247. import navBar from '@/components/navBar';
  248. import emptyPage from '@/components/emptyPage.vue';
  249. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  250. import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
  251. import WaterfallsFlowItem from '@/components/discoverFlowItem/discoverFlowItem.vue'
  252. import discoverDetails from '@/components/discoverDetails/index.vue'
  253. import mentioned from '@/components/mentioned.vue';
  254. import TitleBox from '@/components/titleBox/index.vue';
  255. let app = getApp();
  256. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  257. export default {
  258. mixins: [onShare],
  259. components: {
  260. pageFooter,
  261. navBar,
  262. emptyPage,
  263. easyLoadimage,
  264. WaterfallsFlowItem,
  265. WaterfallsFlow,
  266. discoverDetails,
  267. discoverComment,
  268. mentioned,
  269. TitleBox
  270. },
  271. computed: {
  272. ...mapGetters(['globalData', 'isLogin', 'userInfo', 'bottomNavigationIsCustom']),
  273. headerBoxStyle() {
  274. return {
  275. // #ifndef MP
  276. paddingTop: '4rpx',
  277. // #endif
  278. // #ifdef MP
  279. paddingTop: this.marTop + "px",
  280. marginRight: this.statusWidth + this.searchRight + 'px',
  281. // #endif
  282. }
  283. },
  284. textBoxStyle() {
  285. return {
  286. // #ifdef MP
  287. width: '100%',
  288. height: this.searchHeight + 'rpx',
  289. // lineHeight: this.searchHeight + 'rpx',
  290. // #endif
  291. }
  292. }
  293. },
  294. onLoad(options) {
  295. //分销码
  296. getUserSpread(options);
  297. this.windowWidth = uni.getSystemInfoSync().screenWidth; //获取屏幕宽度
  298. tokenIsExistApi().then(res => {
  299. this.tokenIsExist = res.data;
  300. if (this.tokenIsExist && this.isLogin) {
  301. this.getFollowList();
  302. setTimeout(() => {
  303. if (this.noteRecommendList.length === 0 || this.loadendfollow) this
  304. .getRecommendAuthorList();
  305. }, 500)
  306. }
  307. if (!this.tokenIsExist) {
  308. this.$store.commit('UPDATE_LOGIN', '');
  309. this.$store.commit('UPDATE_USERINFO', {});
  310. }
  311. })
  312. getReplyInfo().then(res => {
  313. this.bannerList = res.data.banner
  314. this.wallHeadline = res.data.headline
  315. console.log(res.data, 111111111111111)
  316. }).catch(err => {
  317. console.log(err)
  318. })
  319. this.getDiscoverList();
  320. this.getCommunityCategoryList();
  321. this._freshing = false;
  322. },
  323. data() {
  324. return {
  325. returnShow: false,
  326. urlDomain: this.$Cache.get("imgHost"),
  327. sysHeight: sysHeight,
  328. navH: '',
  329. windowWidth: 0, //获取屏幕宽度🌟💗
  330. interval: 3000,
  331. swiperHeight: 0,
  332. listMarTop: 0,
  333. tabClick: 0, //设置导航点击了哪一个
  334. tabLeft: 0, //设置下划线位置
  335. isLeft: 0, //导航栏下划线位置
  336. isWidth: 0, //每个导航栏占位
  337. tabActive: 1, // 顶部关注、发现切换
  338. windowHeight: 0,
  339. theme: app.globalData.theme,
  340. marTop: 0,
  341. categoryList: [], //分类列表
  342. categoryId: '-1', //分类id
  343. swiperCurrent: 0, //分类索引
  344. isScroll: false, //是否是滑动
  345. params: { //推荐作者
  346. page: 1,
  347. limit: 10
  348. },
  349. followParams: { //关注内容
  350. page: 1,
  351. limit: 10
  352. },
  353. noteRecommendList: [], //关注内容
  354. loadendfollow: false, //关注内容
  355. loadingfollow: false, //关注内容
  356. where: {
  357. categoryId: 0,
  358. page: 1,
  359. limit: 10
  360. },
  361. loadend: false,
  362. loading: false,
  363. loadTitle: '加载更多',
  364. loadTitleFollow: '加载更多',
  365. onnnn: {
  366. good: [{
  367. authorId: 1
  368. }]
  369. },
  370. discoverList: {}, //内容信息
  371. authorList: [], //推荐作者列表
  372. isOpenRefresh: true, // 是否开启下拉
  373. triggered: false,
  374. triggeredDiscover: false,
  375. isShow: false, //加载完成
  376. tokenIsExist: false, //校验token是否有效,true为有效,false为无效
  377. isRefresher: false, //下拉刷新状态
  378. noteDetails: {}, //内容详情
  379. popupShow: false, //商品弹窗
  380. showComment: false, //评论弹窗
  381. proList: [], //提到的商品
  382. isShowFooter: true,
  383. loadingAuthor: false, //推荐作者
  384. showCateDrawer: false, //分类下拉展示
  385. searchRight: 0,
  386. statusWidth: 0,
  387. searchHeight: 0,
  388. bannerList: [],
  389. wallHeadline: [],
  390. navList: [{
  391. id: 0,
  392. name: '默认'
  393. }, {
  394. id: 1,
  395. name: '评论'
  396. }, {
  397. id: 2,
  398. name: '点赞'
  399. }, {
  400. id: 3,
  401. name: '有图'
  402. }],
  403. active: 0,
  404. }
  405. },
  406. // 滚动监听
  407. onPageScroll(e) {
  408. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  409. uni.$emit('scroll');
  410. },
  411. onShow() {
  412. this.showCateDrawer = false;
  413. this.getTokenIsExist();
  414. //分销绑定
  415. silenceBindingSpread(this.isLogin, this.globalData.spread);
  416. },
  417. mounted() {
  418. this.$nextTick(function() {
  419. const query = uni.createSelectorQuery().in(this);
  420. query.select('.discover-header').boundingClientRect(data => {
  421. // #ifndef H5
  422. this.listMarTop = data.height
  423. // #endif
  424. // #ifdef H5
  425. this.listMarTop = data.height
  426. // #endif
  427. }).exec();
  428. });
  429. },
  430. created() {
  431. var pages = getCurrentPages();
  432. this.returnShow = pages.length === 1 ? false : true;
  433. var that = this;
  434. // 获取设备宽度
  435. uni.getSystemInfo({
  436. success(e) {
  437. that.isWidth = e.windowWidth / 6;
  438. that.windowHeight = e.windowHeight;
  439. that.swiperHeight = that.windowHeight - 205
  440. that.$set(that, 'swiperHeight', that.windowHeight - 55);
  441. }
  442. });
  443. // #ifdef MP || APP-PLUS
  444. // 获取导航高度;
  445. this.navH = this.globalData.navHeight;
  446. // #endif
  447. // #ifdef H5
  448. this.navH = 80;
  449. // #endif
  450. that.getNavH()
  451. // #ifdef MP
  452. const res = uni.getMenuButtonBoundingClientRect()
  453. const jnHeight = res.height //胶囊高度
  454. const statusHeight = res.top //胶囊距离顶部
  455. const statusRight = res.right //胶囊右边界坐标
  456. this.statusWidth = res.width
  457. this.searchHeight = 96
  458. console.log('999', statusHeight, this.sysHeight);
  459. this.marTop = statusHeight - this.sysHeight
  460. //搜索框宽度计算
  461. uni.getSystemInfo({
  462. success: res => {
  463. this.searchRight = res.windowWidth - statusRight
  464. }
  465. })
  466. // #endif
  467. },
  468. //uniapp小程序用deep重写组件样式不生效
  469. options: {
  470. styleIsolation: 'shared'
  471. },
  472. methods: {
  473. returns: function() {
  474. if (this.returnShow) {
  475. uni.navigateBack(-1);
  476. } else {
  477. uni.switchTab({
  478. url: '/pages/index/index'
  479. })
  480. }
  481. },
  482. getNavH(marTop) {
  483. // #ifdef H5
  484. this.marTop = 30;
  485. // #endif
  486. // #ifdef APP
  487. this.marTop = marTop - 60;
  488. // #endif
  489. },
  490. getPro(item) {
  491. this.noteDetails = item;
  492. this.proList = item.productList;
  493. this.$refs.goods.open('bottom');
  494. this.popupShow = true;
  495. setTimeout(() => {
  496. if (!this.bottomNavigationIsCustom) {
  497. uni.hideTabBar();
  498. } else {
  499. this.isShowFooter = false;
  500. }
  501. }, 50)
  502. },
  503. popup() {
  504. if (!this.bottomNavigationIsCustom) {
  505. uni.showTabBar();
  506. } else {
  507. this.isShowFooter = true;
  508. }
  509. setTimeout(() => {
  510. this.$refs.goods.close();
  511. this.popupShow = false;
  512. }, 100)
  513. },
  514. close() {
  515. if (!this.bottomNavigationIsCustom) {
  516. uni.showTabBar();
  517. } else {
  518. this.isShowFooter = true;
  519. }
  520. setTimeout(() => {
  521. this.$refs.comment.close();
  522. this.showComment = false;
  523. }, 100);
  524. },
  525. getReplyNum(n) {
  526. this.noteDetails.replyNum = n;
  527. },
  528. getComment(item) {
  529. this.noteDetails = item;
  530. this.$refs.comment.open('bottom');
  531. this.showComment = true;
  532. setTimeout(() => {
  533. if (!this.bottomNavigationIsCustom) {
  534. uni.hideTabBar();
  535. } else {
  536. this.isShowFooter = false;
  537. }
  538. }, 50)
  539. },
  540. //校验token是否有效,true为有效,false为无效
  541. getTokenIsExist() {
  542. tokenIsExistApi().then(res => {
  543. this.tokenIsExist = res.data;
  544. if (!this.tokenIsExist) {
  545. this.$store.commit('UPDATE_LOGIN', '');
  546. this.$store.commit('UPDATE_USERINFO', {});
  547. }
  548. })
  549. },
  550. // 去推荐作者个人主人
  551. goAuthor(item) {
  552. // #ifdef MP || H5
  553. uni.navigateTo({
  554. url: `/pages/discover/discover_user/index?id=${item.authorId}`
  555. })
  556. // #endif
  557. // #ifdef APP-PLUS
  558. uni.navigateTo({
  559. animationType: animationType.type,
  560. animationDuration: animationType.duration,
  561. url: `/pages/discover/discover_user/index?id=${item.authorId}`
  562. })
  563. // #endif
  564. },
  565. // 自定义下拉刷新被中止
  566. onAbort() {
  567. console.error("onAbort");
  568. },
  569. onPulling(e) {
  570. if (e.detail.deltaY < 0) return // 防止上滑页面也触发下拉
  571. if (this.tabActive == 1) {
  572. this.triggeredDiscover = true;
  573. } else {
  574. this.triggered = true;
  575. }
  576. },
  577. // 下拉刷新触发
  578. refresherpullingFun() {
  579. this.isRefresher = true
  580. },
  581. onRefreshDiscover() {
  582. if (this._freshing) return;
  583. this._freshing = true;
  584. setTimeout(() => {
  585. this._freshing = false;
  586. this.discoverList = {}
  587. this.getDiscoverList();
  588. this.triggeredDiscover = false;
  589. uni.stopPullDownRefresh();
  590. this._freshing = false;
  591. }, 1000)
  592. },
  593. onRefresh() {
  594. if (this._freshing) return;
  595. this._freshing = true;
  596. setTimeout(() => {
  597. this.loadendfollow = false;
  598. this.loadend = false;
  599. this.noteRecommendList = [];
  600. this.followParams.page = 1;
  601. this.authorList = [];
  602. this.params.page = 1;
  603. this.getFollowList();
  604. setTimeout(() => {
  605. if (this.noteRecommendList.length === 0 || this.loadendfollow) this
  606. .getRecommendAuthorList();
  607. }, 400)
  608. this.triggered = false
  609. uni.stopPullDownRefresh();
  610. this._freshing = false;
  611. }, 1000)
  612. },
  613. onRestore() {
  614. this.triggeredDiscover = false;
  615. },
  616. //关注内容
  617. getFollowList() {
  618. if (this.loadendfollow) {
  619. this.triggered = false;
  620. return;
  621. }
  622. this.loadingfollow = true;
  623. followListApi(this.followParams).then(res => {
  624. this.$set(this.followParams, 'page', this.followParams.page + 1);
  625. this.loadendfollow = this.followParams.page > res.data.totalPage;
  626. this.loadTitleFollow = this.loadendfollow ? '' : '加载更多';
  627. this.noteRecommendList = this.noteRecommendList.concat(res.data.list || []);
  628. this.loadingfollow = false
  629. this.triggered = false;
  630. }).catch(err => {
  631. this.loadingfollow = false;
  632. this.triggered = false;
  633. uni.showToast({
  634. title: err,
  635. icon: 'none'
  636. })
  637. });
  638. },
  639. // 关注作者
  640. followAuthor(item) {
  641. if (this.isLogin) {
  642. discoverFollowAuthor(item.authorId).then(() => {
  643. this.$set(item, 'isConcerned', !item.isConcerned);
  644. });
  645. } else {
  646. toLogin();
  647. }
  648. },
  649. //回退页面之后重新加载页面
  650. reFresh() {
  651. this.loading = true
  652. this.discoverList = {};
  653. this.getDiscoverList();
  654. },
  655. //发布内容
  656. publish() {
  657. if (this.isLogin) {
  658. // #ifdef MP || H5
  659. uni.navigateTo({
  660. url: `/pages/discover/discover_release/index`
  661. })
  662. // #endif
  663. // #ifdef APP-PLUS
  664. uni.navigateTo({
  665. animationType: animationType.type,
  666. animationDuration: animationType.duration,
  667. url: `/pages/discover/discover_release/index`
  668. })
  669. // #endif
  670. } else {
  671. toLogin();
  672. }
  673. },
  674. /**
  675. * 发现列表滑动中用到的方法
  676. */
  677. followScroll() {
  678. uni.$emit('scroll');
  679. },
  680. onTouchmoveRecommend(e) {
  681. if (!this.loadendfollow) this.getFollowList();
  682. if (this.loadendfollow && !this.loadend) this.getRecommendAuthorList();
  683. },
  684. onTouchmove(e) {
  685. this.getDiscoverList();
  686. },
  687. scrollLeft: function(e) {
  688. uni.$emit('scroll');
  689. if (e.detail.scrollTop > e.detail.scrollHeight - 1500) {
  690. this.getDiscoverList();
  691. }
  692. this.swiperHeight = this.windowHeight - 55
  693. },
  694. swiperChange(e) {
  695. let {
  696. current,
  697. source,
  698. currentItemId
  699. } = e.detail;
  700. if (source === 'autoplay' || source === 'touch') {
  701. this.categoryId = currentItemId;
  702. this.swiperCur = current
  703. this.selectMenu(this.categoryList[this.swiperCur], this.swiperCur, false)
  704. if (this.categoryList.length > 3) {
  705. var tempIndex = this.swiperCur - 2;
  706. tempIndex = tempIndex <= 0 ? 0 : tempIndex;
  707. let tabLeft = (this.swiperCur - 2) * this.isWidth; //设置下划线位置
  708. this.$nextTick(function() {
  709. this.$set(this, 'tabLeft', tabLeft);
  710. });
  711. }
  712. }
  713. },
  714. /*******************发现列表滑动中用到的方法结束*********************/
  715. // 去个人主人
  716. goUser() {
  717. if (!this.isLogin) {
  718. this.openAuto();
  719. } else {
  720. // #ifdef MP || H5
  721. uni.navigateTo({
  722. url: '/pages/discover/discover_user/index'
  723. })
  724. // #endif
  725. // #ifdef APP-PLUS
  726. uni.navigateTo({
  727. animationType: animationType.type,
  728. animationDuration: animationType.duration,
  729. url: '/pages/discover/discover_user/index'
  730. })
  731. // #endif
  732. }
  733. },
  734. // 打开授权
  735. openAuto() {
  736. this.$Cache.set(BACK_URL, '')
  737. toLogin();
  738. },
  739. //发现列表
  740. getDiscoverList() {
  741. let that = this;
  742. this.isShow = false;
  743. if (!this.discoverList[this.categoryId]) {
  744. this.$set(this.discoverList, this.categoryId, {
  745. where: {
  746. ...this.where,
  747. categoryId: this.categoryId,
  748. secondType: this.active
  749. },
  750. goods: []
  751. })
  752. }
  753. const data = this.discoverList[this.categoryId];
  754. const cateId = this.categoryId;
  755. if (data.loading || data.loadend) {
  756. this.triggeredDiscover = false;
  757. return
  758. };
  759. data.loading = true
  760. this.loading = true
  761. this.loadTitle = '';
  762. if (data.where.categoryId === 0) data.where.categoryId = ''
  763. discoverListApi(data.where).then(res => {
  764. data.loadend = res.data.list.length < that.where.limit;
  765. if (data.where.page == 1) {
  766. data.goods = [];
  767. }
  768. this.loadTitle = data.loadend ? '没有了' : '加载更多';
  769. data.goods.push.apply(data.goods, res.data.list);
  770. data.where.page = data.where.page + 1;
  771. that.$nextTick(() => {
  772. that.$set(that.discoverList, cateId, {
  773. ...data
  774. });
  775. });
  776. data.loading = false;
  777. this.loading = false;
  778. this.triggeredDiscover = false;
  779. this.$forceUpdate()
  780. console.log(that.discoverList)
  781. }).catch(err => {
  782. data.loading = false;
  783. this.loading = false;
  784. uni.showToast({
  785. title: err,
  786. icon: 'none'
  787. })
  788. this.$set(this.discoverList, cateId, data);
  789. });
  790. },
  791. //推荐作者列表
  792. getRecommendAuthorList() {
  793. if (this.loadend) return;
  794. this.loading = true
  795. recommendAuthorListApi(this.params).then(res => {
  796. this.$set(this.params, 'page', this.params.page + 1);
  797. this.loadend = this.params.page > res.data.totalPage;
  798. this.authorList = this.authorList.concat(res.data.list || []);
  799. this.loadTitle = this.loadend ? '没有了' : '加载更多';
  800. this.loading = false
  801. })
  802. },
  803. //分类列表
  804. getCommunityCategoryList() {
  805. let data = [{
  806. name: "全部",
  807. id: '-1',
  808. icon: '/static/img/ic-wall-type--1.png'
  809. }];
  810. communityCategoryListApi().then(res => {
  811. this.categoryList = Array.from(new Set([...data, ...res.data]));
  812. })
  813. },
  814. // 点击列表头部
  815. selectMenu(item, index, isScroll) {
  816. if (this.tabClick == index) return
  817. this.active = 0
  818. this.triggeredDiscover = false;
  819. this.categoryId = item.id;
  820. this.swiperCurrent = index;
  821. this.isScroll = isScroll;
  822. this.tabClick = index; //设置导航点击了哪一个
  823. this.isLeft = index * this.isWidth; //设置下划线位置
  824. this.where.categoryId = item.id;
  825. this.showCateDrawer = false
  826. this.getDiscoverList();
  827. },
  828. tabSelect(active, e) {
  829. if (this.active == active) return
  830. this.active = active;
  831. this.triggeredDiscover = false;
  832. this.discoverList[this.categoryId].loading = false
  833. this.discoverList[this.categoryId].loadend = false
  834. this.discoverList[this.categoryId].where.page = 1
  835. this.discoverList[this.categoryId].where.secondType = active
  836. this.getDiscoverList();
  837. },
  838. }
  839. }
  840. </script>
  841. <style lang="scss" scoped>
  842. /deep/.wf-page {
  843. background-color: #fff !important;
  844. }
  845. .discover_video_icon {
  846. top: 50% !important;
  847. left: 50% !important;
  848. right: 0 !important;
  849. -webkit-transform: translate(-50%, -50%);
  850. transform: translate(-50%, -50%);
  851. }
  852. .mp-header {
  853. background-color: $bg-color-primary;
  854. }
  855. .select_nav {
  856. width: 170rpx !important;
  857. height: 60rpx !important;
  858. border-radius: 33rpx;
  859. // background: rgba(255, 255, 255, 0.6);
  860. // border: 1rpx solid rgba(0, 0, 0, 0.1);
  861. color: #000;
  862. position: fixed;
  863. font-size: 18px;
  864. line-height: 58rpx;
  865. z-index: 1000;
  866. left: 14rpx;
  867. }
  868. .nav_title {
  869. // width: 200rpx;
  870. color: #fff;
  871. font-size: 36rpx;
  872. position: fixed;
  873. text-align: center;
  874. left: 0;
  875. right: 0;
  876. margin: auto;
  877. }
  878. .banner-img {
  879. width: 100%;
  880. height: 100%;
  881. }
  882. .newsTitle {
  883. font-weight: 400;
  884. font-size: 21rpx;
  885. color: #646464;
  886. }
  887. .active-topic {
  888. @include main_color(theme);
  889. @include coupons_light_color(theme);
  890. @include coupons_border_color(theme);
  891. }
  892. .padbottom {
  893. /* #ifndef H5 */
  894. padding-bottom: calc(100rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  895. padding-bottom: calc(100rpx + env(safe-area-inset-bottom)) !important;
  896. /* #endif */
  897. }
  898. .bottom {
  899. bottom: 218rpx !important;
  900. }
  901. .footerBottoms {
  902. width: 100%;
  903. /* #ifndef H5 */
  904. height: calc(200rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  905. height: calc(200rpx + env(safe-area-inset-bottom)) !important;
  906. /* #endif */
  907. /* #ifdef H5 */
  908. height: calc(100rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  909. height: calc(100rpx + env(safe-area-inset-bottom)) !important;
  910. /* #endif */
  911. }
  912. .discover_index {
  913. /deep/.no-border {
  914. bottom: 40rpx;
  915. }
  916. /deep/.author-list {
  917. padding-left: 24rpx;
  918. padding-right: 24rpx;
  919. }
  920. }
  921. .menu {
  922. // padding: 20rpx 34rpx 0 34rpx;
  923. // box-sizing: border-box;
  924. width: 100%;
  925. }
  926. .page_con {
  927. // position: fixed;
  928. top: 0;
  929. right: 0;
  930. bottom: 0;
  931. left: 0;
  932. display: flex;
  933. flex-direction: column;
  934. }
  935. .empty-boxs {
  936. margin: auto;
  937. }
  938. .goods {
  939. display: flex;
  940. flex-direction: column;
  941. justify-content: space-between;
  942. padding: 24rpx 24rpx 0 24rpx;
  943. background: #ffffff;
  944. }
  945. .publish {
  946. position: fixed;
  947. z-index: 9999;
  948. width: 100rpx;
  949. height: 100rpx;
  950. opacity: 1;
  951. border-radius: 50%;
  952. bottom: 142rpx;
  953. right: 24rpx;
  954. color: #fff;
  955. line-height: 100rpx;
  956. text-align: center;
  957. @include linear-gradient(theme);
  958. .iconfont {
  959. font-size: 50rpx;
  960. }
  961. }
  962. .main {
  963. width: 100%;
  964. }
  965. .author {
  966. &-item {
  967. padding-bottom: 40rpx;
  968. }
  969. &-title {
  970. height: 120rpx;
  971. line-height: 120rpx;
  972. font-size: 32rpx;
  973. color: #333333;
  974. .iconfont {
  975. font-size: 170rpx;
  976. color: #454545;
  977. }
  978. .lefticon {
  979. transform: rotate(180deg);
  980. }
  981. }
  982. .name {
  983. margin: 0 28rpx;
  984. }
  985. &-head {
  986. width: 80rpx;
  987. height: 80rpx;
  988. border-radius: 50%;
  989. overflow: hidden;
  990. image {
  991. width: 100%;
  992. height: 100%;
  993. }
  994. margin-right: 20rpx;
  995. }
  996. &-name {
  997. font-size: 28rpx;
  998. font-family: PingFang SC-Medium, PingFang SC;
  999. font-weight: 600;
  1000. color: #282828;
  1001. }
  1002. &-sign,
  1003. &-fans {
  1004. font-size: 22rpx;
  1005. font-family: PingFang SC-Regular, PingFang SC;
  1006. font-weight: 400;
  1007. color: #999999;
  1008. }
  1009. &-sign {
  1010. width: 370rpx;
  1011. }
  1012. &-pictrue {
  1013. width: 222rpx;
  1014. height: 222rpx;
  1015. border-radius: 10px 10px 10px 10px;
  1016. opacity: 1;
  1017. margin-right: 18rpx;
  1018. /deep/image,
  1019. /deep/.easy-loadimage,
  1020. uni-image {
  1021. width: 100%;
  1022. height: 100%;
  1023. border-radius: 10px 10px 10px 10px;
  1024. overflow: hidden;
  1025. }
  1026. }
  1027. &-pictrue:nth-of-type(3n) {
  1028. margin-right: 0;
  1029. }
  1030. }
  1031. .noContent {
  1032. /deep/.empty-box {
  1033. padding-top: 80rpx !important;
  1034. }
  1035. }
  1036. .btn {
  1037. width: 440rpx;
  1038. height: 86rpx;
  1039. line-height: 86rpx;
  1040. text-align: center;
  1041. border-radius: 43rpx 43rpx 43rpx 43rpx;
  1042. opacity: 1;
  1043. border: 1px solid #E93323;
  1044. font-size: 32rpx;
  1045. margin: auto;
  1046. font-family: PingFang SC-Medium, PingFang SC;
  1047. @include main_color(theme);
  1048. @include coupons_border_color(theme);
  1049. font-weight: 600;
  1050. }
  1051. .cart_nav {
  1052. /deep/.nav_title {
  1053. font-size: 36rpx;
  1054. color: #333333;
  1055. }
  1056. }
  1057. .discover {
  1058. &-header {
  1059. background-size: cover;
  1060. top: 0;
  1061. left: 0;
  1062. .title {
  1063. font-size: 36rpx;
  1064. color: #333333;
  1065. }
  1066. }
  1067. &-navTab {
  1068. padding: 0 34rpx 0 34rpx;
  1069. justify-content: space-between;
  1070. .icon-xiazai5 {
  1071. color: #333;
  1072. }
  1073. .nav-item {
  1074. display: inline-block;
  1075. font-weight: 500;
  1076. font-size: 31rpx;
  1077. color: #B2B2B2;
  1078. &.on {
  1079. font-weight: 600;
  1080. font-size: 35rpx;
  1081. color: #141414;
  1082. border-bottom: 5rpx solid;
  1083. border-image: linear-gradient(90deg, #FFCA5F 0%, #FF1B95 100%);
  1084. border-image-slice: 1;
  1085. }
  1086. }
  1087. .release_btn {
  1088. width: 58rpx;
  1089. height: 58rpx;
  1090. border-radius: 100%;
  1091. background-image: linear-gradient(126deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  1092. color: #fff;
  1093. position: absolute;
  1094. top: 20rpx;
  1095. left: 0;
  1096. .iconfont {
  1097. font-size: 28rpx;
  1098. }
  1099. }
  1100. }
  1101. &-box {
  1102. flex: 1;
  1103. min-height: 83vh;
  1104. height: auto;
  1105. width: 100%;
  1106. background-color: #fff;
  1107. left: 0;
  1108. }
  1109. }
  1110. .avatar {
  1111. width: 64rpx;
  1112. height: 64rpx;
  1113. border-radius: 50%;
  1114. }
  1115. .h96 {
  1116. height: 96rpx;
  1117. }
  1118. .h36 {
  1119. /* #ifdef H5 */
  1120. height: 28rpx;
  1121. /* #endif */
  1122. /* #ifndef H5 */
  1123. height: 18rpx;
  1124. /* #endif */
  1125. }
  1126. .longTab {
  1127. width: 100%;
  1128. background: #fff;
  1129. border-radius: 16rpx 16rpx 0 0;
  1130. .longTab-item {
  1131. /*解决ios上滑动不流畅*/
  1132. -webkit-overflow-scrolling: touch;
  1133. position: relative;
  1134. }
  1135. .longItem {
  1136. height: 50upx;
  1137. display: inline-block;
  1138. text-align: center;
  1139. font-size: 30rpx;
  1140. color: #999999;
  1141. // margin-right: 56rpx;
  1142. text {
  1143. display: block;
  1144. max-width: 326rpx;
  1145. white-space: nowrap;
  1146. overflow: hidden;
  1147. text-overflow: ellipsis;
  1148. }
  1149. &:last-child {
  1150. margin-right: 0;
  1151. }
  1152. /*解决ios上滑动不流畅*/
  1153. -webkit-overflow-scrolling: touch;
  1154. position: relative;
  1155. &.click {
  1156. background: #EEF4FF;
  1157. // font-weight: bold;
  1158. // font-size: 34rpx;
  1159. // @include main_color(theme);
  1160. // &::after {
  1161. // content: "";
  1162. // display: block;
  1163. // width: 40rpx;
  1164. // height: 5rpx;
  1165. // @include main_bg_color(theme);
  1166. // display: flex;
  1167. // position: absolute;
  1168. // left: 50%;
  1169. // margin-left: -22rpx;
  1170. // bottom: -8rpx;
  1171. // }
  1172. // .underline {
  1173. // opacity: 1;
  1174. // }
  1175. }
  1176. }
  1177. .underlineBox {
  1178. height: 3px;
  1179. width: 20%;
  1180. display: flex;
  1181. align-content: center;
  1182. justify-content: center;
  1183. .underline {
  1184. opacity: 0;
  1185. width: 60rpx;
  1186. height: 4rpx;
  1187. background-color: #e93323;
  1188. }
  1189. }
  1190. }
  1191. .author-fans {
  1192. font-size: 24rpx !important;
  1193. }
  1194. .container {
  1195. overflow: hidden;
  1196. /* 隐藏超出部分 */
  1197. }
  1198. .swiper {
  1199. display: flex;
  1200. /* 使用flex布局 */
  1201. animation: scrollRight 10s linear infinite;
  1202. /* 应用动画 */
  1203. }
  1204. .swiper-item {
  1205. flex-shrink: 0;
  1206. /* 不允许缩小 */
  1207. width: 100%;
  1208. /* 每个item占满一行 */
  1209. height: 100%;
  1210. }
  1211. @keyframes scrollRight {
  1212. from {
  1213. transform: translateX(100%);
  1214. }
  1215. /* 从右向左移动 */
  1216. to {
  1217. transform: translateX(-100%);
  1218. }
  1219. /* 移出视图 */
  1220. }
  1221. .wall-nav {
  1222. font-weight: 500;
  1223. font-size: 23rpx;
  1224. color: #999999;
  1225. }
  1226. .wall-nav~.wall-nav {
  1227. margin-left: 38rpx;
  1228. }
  1229. .wall-nav-on {
  1230. font-weight: 600;
  1231. font-size: 27rpx;
  1232. color: #141414;
  1233. }
  1234. .discover-boxsss {
  1235. background-color: #fff;
  1236. width: 100%;
  1237. flex: 1;
  1238. }
  1239. </style>
  1240. <template>
  1241. <view :data-theme="theme" class="discover_index">
  1242. <view class="page_con" :style="{height: windowHeight + 'px'}">
  1243. <view class="discover-header relative z-999">
  1244. <!-- #ifdef APP || MP -->
  1245. <view class="mp-header" :style="{ height: navH + 'rpx'}">
  1246. <view class="sys-head" :style="{ height: sysHeight+'px' }"></view>
  1247. <view class="select_nav flex justify-center align-center" id="home" :style="{top: sysHeight+6+'px'}">
  1248. <text class="iconfont icon-fanhui2 px-20" @tap="returns"></text>
  1249. <image @click="goUser" class="avatar" :src="userInfo.avatar ? userInfo.avatar : urlDomain+'crmebimage/presets/morenT.png'">
  1250. </image>
  1251. <!-- <text class="iconfont icon-gengduo5 px-20" @tap.stop="showNav"></text> -->
  1252. <text class="nav_line"></text>
  1253. </view>
  1254. <view class="nav_title" :style="{ height: '80rpx',lineHeight: '80rpx', color: '#fff'}">
  1255. 表白墙
  1256. </view>
  1257. </view>
  1258. <!-- #endif -->
  1259. <view class="discover-navTab acea-row row-middle bg--w111-fff" style="margin: 4rpx 0;">
  1260. <view class="acea-row row-center-wrapper" :style="[textBoxStyle]">
  1261. <view style="margin-right: 52rpx;" :class="tabActive == 0 ? 'on' : ''" class="nav-item" @click="tabActive=0;showCateDrawer = false">本校</view>
  1262. <view :class="tabActive == 1 ? 'on' : ''" class="nav-item pb-10" @click="tabActive=1;">同城</view>
  1263. </view>
  1264. <!-- #ifndef MP -->
  1265. <view style="width: 32rpx;"></view>
  1266. <!-- #endif -->
  1267. </view>
  1268. <!-- 话题分类 -->
  1269. <view class="longTab mb-10" scroll-y enhanced>
  1270. <view class="flex h-116">
  1271. <view class="flex-1 h-full flex-center longTab-item" :style="{background: index === tabClick ? '#EEF4FF' : ''}"
  1272. v-for="(item, index) in categoryList" :key="index" :id="'id' + index" @click.stop="selectMenu(item, index, true)">
  1273. <view class="flex-col flex-center">
  1274. <image class="w-44 h-44 mb-10" :src="item.icon" mode=""></image>
  1275. <view class="wall-font f-s-24 f-w-500">{{item.name}}</view>
  1276. </view>
  1277. </view>
  1278. <view class="flex-1 h-full flex-center longTab-item">
  1279. <navigator hover-class='none' url='/pages/merchant/user_sgin/index' class="item">
  1280. <view class="flex-col flex-center">
  1281. <image class="w-44 h-44 mb-10" :src="'/static/img/ic-wall-type-4.png'" mode=""></image>
  1282. <view class="wall-font f-s-24 f-w-500">签到</view>
  1283. </view>
  1284. </navigator>
  1285. </view>
  1286. </view>
  1287. </view>
  1288. <!-- banner轮播图 -->
  1289. <view class="mb-10" v-if="bannerList.length">
  1290. <swiper :indicator-dots="true" :autoplay="true" :interval="2500" :duration="500" circular="true">
  1291. <block v-for="(item,index) in bannerList" :key='item.id'>
  1292. <swiper-item>
  1293. <view class="swiper-item">
  1294. <image class="banner-img" :src="item.imageUrl" mode="scaleToFill" />
  1295. </view>
  1296. </swiper-item>
  1297. </block>
  1298. </swiper>
  1299. </view>
  1300. <!-- 提示 -->
  1301. <view v-if="wallHeadline.length" class="flex-y-center bg--w111-fff mb-10 pl-32">
  1302. <!-- 左侧固定图片 -->
  1303. <text class='iconfont icon-laba ' style="font-size: 24rpx;margin-right: 20rpx;"></text>
  1304. <!-- 右侧文字轮播区域 -->
  1305. <view class="flex-1 h-40 mt-10" style="overflow: hidden;">
  1306. <swiper class="swiper" :indicator-dots="false" circular :autoplay="true" :interval="3000" vertical>
  1307. <block v-for="(item,index) in wallHeadline" :key='index'>
  1308. <swiper-item catchtouchmove='catchTouchMove'>
  1309. <view class='newsTitle swiper-item'>
  1310. {{item.synopsis}}
  1311. </view>
  1312. </swiper-item>
  1313. </block>
  1314. </swiper>
  1315. </view>
  1316. </view>
  1317. <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;"
  1318. show-scrollbar="false">
  1319. <view class='flex-y-center'>
  1320. <text v-for="(item,index) in navList" :key="index" class='wall-nav'
  1321. :class='active==item.id ? "wall-nav-on": ""' @click.stop="tabSelect(item.id, index)">
  1322. <text>{{item.name}}</text>
  1323. </text>
  1324. </view>
  1325. </scroll-view>
  1326. </view>
  1327. <view class="discover-boxsss">
  1328. <!-- 发现 -->
  1329. <scroll-view scroll-y="true" @scroll="followScroll" class="main h-full">
  1330. <view class="tab-cont h-full" id="main">
  1331. <!-- 发现 -->
  1332. <view class="h-full" v-if="tabActive === 1">
  1333. <swiper class="h-full" :interval="interval" indicator-color="rgba(255,255,255,0.6)" :current="swiperCurrent" @change="swiperChange">
  1334. <block v-for="(item,index) in categoryList" :key="index">
  1335. <swiper-item class="h-full" :item-id="`${item.id}`">
  1336. <scroll-view @scroll="scrollLeft" scroll-y="true" :show-scrollbar="false" class="scroll-view h-full"
  1337. id="goods" refresher-enabled="true" :refresher-threshold="100" :refresher-triggered="triggeredDiscover"
  1338. @refresherrefresh="onRefreshDiscover" @refresherpulling="onPulling" @refresherrestore="onRestore"
  1339. @refresherabort="onAbort">
  1340. <view class="goods padbottom">
  1341. <view class="goods-wrap flex-1" id="goods" v-if="discoverList[item.id] && discoverList[item.id].goods.length">
  1342. <view>
  1343. <WaterfallsFlow :column="true" v-if="discoverList[item.id].goods.length" :wfList="discoverList[item.id].goods" :fromType="1">
  1344. </WaterfallsFlow>
  1345. </view>
  1346. </view>
  1347. <view class='loadingicon acea-row row-center-wrapper'>
  1348. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{discoverList[item.id] &&discoverList[item.id].goods.length>0?loadTitle:''}}
  1349. </view>
  1350. <view class="empty-boxs noContent" v-if="discoverList[item.id] && discoverList[item.id].goods.length == 0 && !loading">
  1351. <emptyPage title="暂无内容~" mTop="13%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'">
  1352. </emptyPage>
  1353. </view>
  1354. <view class="footerBottoms"></view>
  1355. </view>
  1356. </scroll-view>
  1357. </swiper-item>
  1358. </block>
  1359. </swiper>
  1360. </view>
  1361. <!-- 关注 登录后 -->
  1362. <view id="goods" v-if="isLogin&&tabActive == 0" class="discover-detail h-full">
  1363. <scroll-view scroll-y="true" :show-scrollbar="false" class="scroll-view recommendList h-full"
  1364. id="recommendList" @scrolltolower="onTouchmoveRecommend" :refresher-threshold="100" @scroll="followScroll"
  1365. refresher-enabled="true" :refresher-triggered="triggered" @refresherrefresh="onRefresh" @refresherpulling="onPulling"
  1366. @refresherrestore="onRestore" @refresherabort="onAbort">
  1367. <view class="goods padbottom">
  1368. <view class="goods-wrap flex-1" id="goods" v-if="noteRecommendList.length">
  1369. <view>
  1370. <WaterfallsFlow v-if="noteRecommendList.length" :wfList="noteRecommendList" :fromType="1">
  1371. </WaterfallsFlow>
  1372. </view>
  1373. </view>
  1374. <view :hidden='loadingfollow==false' class='loadingicon acea-row row-center-wrapper'>
  1375. <text class='loading iconfont icon-jiazai'></text>{{noteRecommendList.length>0?loadTitleFollow:''}}
  1376. </view>
  1377. <view v-if="isLogin&&tabActive == 0 && noteRecommendList.length===0 &&!loadingfollow" class="empty-boxs noContent">
  1378. <emptyPage title="暂无更多内容~" mTop="0%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'"></emptyPage>
  1379. </view>
  1380. </view>
  1381. <!-- <discover-details v-if="noteRecommendList.length>0" type="follow"
  1382. :noteRecommendList="noteRecommendList" @getComment="getComment"
  1383. @getPro="getPro"></discover-details> -->
  1384. <!-- 为你推荐 -->
  1385. <view v-if="authorList.length>0 && !loadingfollow" class="author-list mt-24">
  1386. <title-box title="为你推荐"></title-box>
  1387. <view v-for="(item, index) in authorList" :key="item.authorId" class="author-item" @click="goAuthor(item)">
  1388. <view class="acea-row row-between row-middle mb30">
  1389. <view class="acea-row row-middle">
  1390. <view class="author-head">
  1391. <image :src="item.authorAvatar"></image>
  1392. </view>
  1393. <view class="author-info">
  1394. <view class="author-name">{{item.authorName}}</view>
  1395. <view v-show="item.authorSignature" class="author-sign line1">
  1396. {{item.authorSignature}}
  1397. </view>
  1398. <view class="author-fans">
  1399. 粉丝<text class="text-333 ml-8">{{ item.fansNum < 10000 ? item.fansNum : (item.fansNum / 10000).toFixed(2) }}</text>
  1400. </view>
  1401. </view>
  1402. </view>
  1403. <view @click.stop="followAuthor(item, index)" class="author-follow acea-row" :class="item.isConcerned ? 'focusBtn' : ''">
  1404. <text v-if="!item.isConcerned" class="iconfont icon-shangpinshuliang-jia"></text>
  1405. {{!item.isConcerned ? '关注' : '已关注'}}
  1406. </view>
  1407. </view>
  1408. <scroll-view scroll-x="true" class="white-nowrap vertical-middle w-full" show-scrollbar="false">
  1409. <view class="inline-block mr-20" v-for="items in item.noteList" :key="items.id">
  1410. <view class="relative">
  1411. <easy-loadimage :image-src="items.cover" width="184rpx" height="254rpx" :radius="8"></easy-loadimage>
  1412. <view class="discover_video_icon" v-show="items.type == 2">
  1413. <text class="iconfont icon-24gf-play"></text>
  1414. </view>
  1415. </view>
  1416. </view>
  1417. </scroll-view>
  1418. </view>
  1419. <view class='loadingicon acea-row row-center-wrapper'>
  1420. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{authorList.length>0?loadTitle:''}}
  1421. </view>
  1422. </view>
  1423. <view class="footerBottoms"></view>
  1424. </scroll-view>
  1425. </view>
  1426. <!-- 关注未登录 -->
  1427. <view class="empty-boxs" v-if="!isLogin&&tabActive == 0">
  1428. <emptyPage title="登录后可查看关注用户的内容哦~" mTop="30%" :imgSrc="urlDomain+'crmebimage/presets/nodenglu.png'"></emptyPage>
  1429. <view class="btn" @click="openAuto">立即登录</view>
  1430. </view>
  1431. </view>
  1432. </scroll-view>
  1433. </view>
  1434. <view class="publish" @click="publish" :class="bottomNavigationIsCustom?'bottom':''">
  1435. <image class="w-116 h-116" src="/static/img/ic-fatie.png" mode=""></image>
  1436. </view>
  1437. </view>
  1438. <!-- <pageFooter v-if="isShowFooter"></pageFooter> -->
  1439. <!-- 评论 -->
  1440. <uni-popup type="bottom" ref="comment">
  1441. <view :style="'width: '+ windowWidth +'px; background-color: #fff; border-top-left-radius: 10px; border-top-right-radius: 10px;'">
  1442. <discoverComment v-if="showComment" @getReplyNum="getReplyNum" :noteId="noteDetails.id" :noteDetails="noteDetails"
  1443. @close="close">
  1444. </discoverComment>
  1445. </view>
  1446. </uni-popup>
  1447. <!-- 商品列表 -->
  1448. <uni-popup type="bottom" ref="goods">
  1449. <mentioned v-if="popupShow" :list="proList" @close="popup" class=""></mentioned>
  1450. </uni-popup>
  1451. </view>
  1452. </template>
  1453. <script>
  1454. import {
  1455. mapGetters
  1456. } from "vuex";
  1457. import {
  1458. toLogin
  1459. } from '@/libs/login.js';
  1460. import {
  1461. BACK_URL
  1462. } from '@/config/cache';
  1463. import {
  1464. communityCategoryListApi,
  1465. recommendAuthorListApi,
  1466. discoverListApi,
  1467. followListApi,
  1468. getReplyInfo
  1469. } from '@/api/discover.js';
  1470. import {
  1471. discoverFollowAuthor,
  1472. } from '@/libs/follow.js';
  1473. import {
  1474. tokenIsExistApi
  1475. } from '@/api/api.js';
  1476. import {
  1477. silenceBindingSpread,
  1478. getUserSpread
  1479. } from '@/utils/index.js';
  1480. import onShare from "@/mixins/onShare";
  1481. import discoverComment from '@/components/discoverComment/index.vue';
  1482. import animationType from '@/utils/animationType.js'
  1483. import pageFooter from "@/components/pageFooter/index.vue";
  1484. import navBar from '@/components/navBar';
  1485. import emptyPage from '@/components/emptyPage.vue';
  1486. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  1487. import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
  1488. import WaterfallsFlowItem from '@/components/discoverFlowItem/discoverFlowItem.vue'
  1489. import discoverDetails from '@/components/discoverDetails/index.vue'
  1490. import mentioned from '@/components/mentioned.vue';
  1491. import TitleBox from '@/components/titleBox/index.vue';
  1492. let app = getApp();
  1493. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  1494. export default {
  1495. mixins: [onShare],
  1496. components: {
  1497. pageFooter,
  1498. navBar,
  1499. emptyPage,
  1500. easyLoadimage,
  1501. WaterfallsFlowItem,
  1502. WaterfallsFlow,
  1503. discoverDetails,
  1504. discoverComment,
  1505. mentioned,
  1506. TitleBox
  1507. },
  1508. computed: {
  1509. ...mapGetters(['globalData', 'isLogin', 'userInfo', 'bottomNavigationIsCustom']),
  1510. headerBoxStyle() {
  1511. return {
  1512. // #ifndef MP
  1513. paddingTop: '4rpx',
  1514. // #endif
  1515. // #ifdef MP
  1516. paddingTop: this.marTop + "px",
  1517. marginRight: this.statusWidth + this.searchRight + 'px',
  1518. // #endif
  1519. }
  1520. },
  1521. textBoxStyle() {
  1522. return {
  1523. // #ifdef MP
  1524. width: '100%',
  1525. height: this.searchHeight + 'rpx',
  1526. // lineHeight: this.searchHeight + 'rpx',
  1527. // #endif
  1528. }
  1529. }
  1530. },
  1531. onLoad(options) {
  1532. //分销码
  1533. getUserSpread(options);
  1534. this.windowWidth = uni.getSystemInfoSync().screenWidth; //获取屏幕宽度
  1535. tokenIsExistApi().then(res => {
  1536. this.tokenIsExist = res.data;
  1537. if (this.tokenIsExist && this.isLogin) {
  1538. this.getFollowList();
  1539. setTimeout(() => {
  1540. if (this.noteRecommendList.length === 0 || this.loadendfollow) this
  1541. .getRecommendAuthorList();
  1542. }, 500)
  1543. }
  1544. if (!this.tokenIsExist) {
  1545. this.$store.commit('UPDATE_LOGIN', '');
  1546. this.$store.commit('UPDATE_USERINFO', {});
  1547. }
  1548. })
  1549. getReplyInfo().then(res => {
  1550. this.bannerList = res.data.banner
  1551. this.wallHeadline = res.data.headline
  1552. console.log(res.data, 111111111111111)
  1553. }).catch(err => {
  1554. console.log(err)
  1555. })
  1556. this.getDiscoverList();
  1557. this.getCommunityCategoryList();
  1558. this._freshing = false;
  1559. },
  1560. data() {
  1561. return {
  1562. returnShow: false,
  1563. urlDomain: this.$Cache.get("imgHost"),
  1564. sysHeight: sysHeight,
  1565. navH: '',
  1566. windowWidth: 0, //获取屏幕宽度🌟💗
  1567. interval: 3000,
  1568. swiperHeight: 0,
  1569. listMarTop: 0,
  1570. tabClick: 0, //设置导航点击了哪一个
  1571. tabLeft: 0, //设置下划线位置
  1572. isLeft: 0, //导航栏下划线位置
  1573. isWidth: 0, //每个导航栏占位
  1574. tabActive: 1, // 顶部关注、发现切换
  1575. windowHeight: 0,
  1576. theme: app.globalData.theme,
  1577. marTop: 0,
  1578. categoryList: [], //分类列表
  1579. categoryId: '-1', //分类id
  1580. swiperCurrent: 0, //分类索引
  1581. isScroll: false, //是否是滑动
  1582. params: { //推荐作者
  1583. page: 1,
  1584. limit: 10
  1585. },
  1586. followParams: { //关注内容
  1587. page: 1,
  1588. limit: 10
  1589. },
  1590. noteRecommendList: [], //关注内容
  1591. loadendfollow: false, //关注内容
  1592. loadingfollow: false, //关注内容
  1593. where: {
  1594. categoryId: 0,
  1595. page: 1,
  1596. limit: 10
  1597. },
  1598. loadend: false,
  1599. loading: false,
  1600. loadTitle: '加载更多',
  1601. loadTitleFollow: '加载更多',
  1602. onnnn: {
  1603. good: [{
  1604. authorId: 1
  1605. }]
  1606. },
  1607. discoverList: {}, //内容信息
  1608. authorList: [], //推荐作者列表
  1609. isOpenRefresh: true, // 是否开启下拉
  1610. triggered: false,
  1611. triggeredDiscover: false,
  1612. isShow: false, //加载完成
  1613. tokenIsExist: false, //校验token是否有效,true为有效,false为无效
  1614. isRefresher: false, //下拉刷新状态
  1615. noteDetails: {}, //内容详情
  1616. popupShow: false, //商品弹窗
  1617. showComment: false, //评论弹窗
  1618. proList: [], //提到的商品
  1619. isShowFooter: true,
  1620. loadingAuthor: false, //推荐作者
  1621. showCateDrawer: false, //分类下拉展示
  1622. searchRight: 0,
  1623. statusWidth: 0,
  1624. searchHeight: 0,
  1625. bannerList: [],
  1626. wallHeadline: [],
  1627. navList: [{
  1628. id: 0,
  1629. name: '默认'
  1630. }, {
  1631. id: 1,
  1632. name: '评论'
  1633. }, {
  1634. id: 2,
  1635. name: '点赞'
  1636. }, {
  1637. id: 3,
  1638. name: '有图'
  1639. }],
  1640. active: 0,
  1641. }
  1642. },
  1643. // 滚动监听
  1644. onPageScroll(e) {
  1645. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  1646. uni.$emit('scroll');
  1647. },
  1648. onShow() {
  1649. this.showCateDrawer = false;
  1650. this.getTokenIsExist();
  1651. //分销绑定
  1652. silenceBindingSpread(this.isLogin, this.globalData.spread);
  1653. },
  1654. mounted() {
  1655. this.$nextTick(function() {
  1656. const query = uni.createSelectorQuery().in(this);
  1657. query.select('.discover-header').boundingClientRect(data => {
  1658. // #ifndef H5
  1659. this.listMarTop = data.height
  1660. // #endif
  1661. // #ifdef H5
  1662. this.listMarTop = data.height
  1663. // #endif
  1664. }).exec();
  1665. });
  1666. },
  1667. created() {
  1668. var pages = getCurrentPages();
  1669. this.returnShow = pages.length === 1 ? false : true;
  1670. var that = this;
  1671. // 获取设备宽度
  1672. uni.getSystemInfo({
  1673. success(e) {
  1674. that.isWidth = e.windowWidth / 6;
  1675. that.windowHeight = e.windowHeight;
  1676. that.swiperHeight = that.windowHeight - 205
  1677. that.$set(that, 'swiperHeight', that.windowHeight - 55);
  1678. }
  1679. });
  1680. // #ifdef MP || APP-PLUS
  1681. // 获取导航高度;
  1682. this.navH = this.globalData.navHeight;
  1683. // #endif
  1684. // #ifdef H5
  1685. this.navH = 80;
  1686. // #endif
  1687. that.getNavH()
  1688. // #ifdef MP
  1689. const res = uni.getMenuButtonBoundingClientRect()
  1690. const jnHeight = res.height //胶囊高度
  1691. const statusHeight = res.top //胶囊距离顶部
  1692. const statusRight = res.right //胶囊右边界坐标
  1693. this.statusWidth = res.width
  1694. this.searchHeight = 96
  1695. console.log('999', statusHeight, this.sysHeight);
  1696. this.marTop = statusHeight - this.sysHeight
  1697. //搜索框宽度计算
  1698. uni.getSystemInfo({
  1699. success: res => {
  1700. this.searchRight = res.windowWidth - statusRight
  1701. }
  1702. })
  1703. // #endif
  1704. },
  1705. //uniapp小程序用deep重写组件样式不生效
  1706. options: {
  1707. styleIsolation: 'shared'
  1708. },
  1709. methods: {
  1710. returns: function() {
  1711. if (this.returnShow) {
  1712. uni.navigateBack(-1);
  1713. } else {
  1714. uni.switchTab({
  1715. url: '/pages/index/index'
  1716. })
  1717. }
  1718. },
  1719. getNavH(marTop) {
  1720. // #ifdef H5
  1721. this.marTop = 30;
  1722. // #endif
  1723. // #ifdef APP
  1724. this.marTop = marTop - 60;
  1725. // #endif
  1726. },
  1727. getPro(item) {
  1728. this.noteDetails = item;
  1729. this.proList = item.productList;
  1730. this.$refs.goods.open('bottom');
  1731. this.popupShow = true;
  1732. setTimeout(() => {
  1733. if (!this.bottomNavigationIsCustom) {
  1734. uni.hideTabBar();
  1735. } else {
  1736. this.isShowFooter = false;
  1737. }
  1738. }, 50)
  1739. },
  1740. popup() {
  1741. if (!this.bottomNavigationIsCustom) {
  1742. uni.showTabBar();
  1743. } else {
  1744. this.isShowFooter = true;
  1745. }
  1746. setTimeout(() => {
  1747. this.$refs.goods.close();
  1748. this.popupShow = false;
  1749. }, 100)
  1750. },
  1751. close() {
  1752. if (!this.bottomNavigationIsCustom) {
  1753. uni.showTabBar();
  1754. } else {
  1755. this.isShowFooter = true;
  1756. }
  1757. setTimeout(() => {
  1758. this.$refs.comment.close();
  1759. this.showComment = false;
  1760. }, 100);
  1761. },
  1762. getReplyNum(n) {
  1763. this.noteDetails.replyNum = n;
  1764. },
  1765. getComment(item) {
  1766. this.noteDetails = item;
  1767. this.$refs.comment.open('bottom');
  1768. this.showComment = true;
  1769. setTimeout(() => {
  1770. if (!this.bottomNavigationIsCustom) {
  1771. uni.hideTabBar();
  1772. } else {
  1773. this.isShowFooter = false;
  1774. }
  1775. }, 50)
  1776. },
  1777. //校验token是否有效,true为有效,false为无效
  1778. getTokenIsExist() {
  1779. tokenIsExistApi().then(res => {
  1780. this.tokenIsExist = res.data;
  1781. if (!this.tokenIsExist) {
  1782. this.$store.commit('UPDATE_LOGIN', '');
  1783. this.$store.commit('UPDATE_USERINFO', {});
  1784. }
  1785. })
  1786. },
  1787. // 去推荐作者个人主人
  1788. goAuthor(item) {
  1789. // #ifdef MP || H5
  1790. uni.navigateTo({
  1791. url: `/pages/discover/discover_user/index?id=${item.authorId}`
  1792. })
  1793. // #endif
  1794. // #ifdef APP-PLUS
  1795. uni.navigateTo({
  1796. animationType: animationType.type,
  1797. animationDuration: animationType.duration,
  1798. url: `/pages/discover/discover_user/index?id=${item.authorId}`
  1799. })
  1800. // #endif
  1801. },
  1802. // 自定义下拉刷新被中止
  1803. onAbort() {
  1804. console.error("onAbort");
  1805. },
  1806. onPulling(e) {
  1807. if (e.detail.deltaY < 0) return // 防止上滑页面也触发下拉
  1808. if (this.tabActive == 1) {
  1809. this.triggeredDiscover = true;
  1810. } else {
  1811. this.triggered = true;
  1812. }
  1813. },
  1814. // 下拉刷新触发
  1815. refresherpullingFun() {
  1816. this.isRefresher = true
  1817. },
  1818. onRefreshDiscover() {
  1819. if (this._freshing) return;
  1820. this._freshing = true;
  1821. setTimeout(() => {
  1822. this._freshing = false;
  1823. this.discoverList = {}
  1824. this.getDiscoverList();
  1825. this.triggeredDiscover = false;
  1826. uni.stopPullDownRefresh();
  1827. this._freshing = false;
  1828. }, 1000)
  1829. },
  1830. onRefresh() {
  1831. if (this._freshing) return;
  1832. this._freshing = true;
  1833. setTimeout(() => {
  1834. this.loadendfollow = false;
  1835. this.loadend = false;
  1836. this.noteRecommendList = [];
  1837. this.followParams.page = 1;
  1838. this.authorList = [];
  1839. this.params.page = 1;
  1840. this.getFollowList();
  1841. setTimeout(() => {
  1842. if (this.noteRecommendList.length === 0 || this.loadendfollow) this
  1843. .getRecommendAuthorList();
  1844. }, 400)
  1845. this.triggered = false
  1846. uni.stopPullDownRefresh();
  1847. this._freshing = false;
  1848. }, 1000)
  1849. },
  1850. onRestore() {
  1851. this.triggeredDiscover = false;
  1852. },
  1853. //关注内容
  1854. getFollowList() {
  1855. if (this.loadendfollow) {
  1856. this.triggered = false;
  1857. return;
  1858. }
  1859. this.loadingfollow = true;
  1860. followListApi(this.followParams).then(res => {
  1861. this.$set(this.followParams, 'page', this.followParams.page + 1);
  1862. this.loadendfollow = this.followParams.page > res.data.totalPage;
  1863. this.loadTitleFollow = this.loadendfollow ? '' : '加载更多';
  1864. this.noteRecommendList = this.noteRecommendList.concat(res.data.list || []);
  1865. this.loadingfollow = false
  1866. this.triggered = false;
  1867. }).catch(err => {
  1868. this.loadingfollow = false;
  1869. this.triggered = false;
  1870. uni.showToast({
  1871. title: err,
  1872. icon: 'none'
  1873. })
  1874. });
  1875. },
  1876. // 关注作者
  1877. followAuthor(item) {
  1878. if (this.isLogin) {
  1879. discoverFollowAuthor(item.authorId).then(() => {
  1880. this.$set(item, 'isConcerned', !item.isConcerned);
  1881. });
  1882. } else {
  1883. toLogin();
  1884. }
  1885. },
  1886. //回退页面之后重新加载页面
  1887. reFresh() {
  1888. this.loading = true
  1889. this.discoverList = {};
  1890. this.getDiscoverList();
  1891. },
  1892. //发布内容
  1893. publish() {
  1894. if (this.isLogin) {
  1895. // #ifdef MP || H5
  1896. uni.navigateTo({
  1897. url: `/pages/discover/discover_release/index`
  1898. })
  1899. // #endif
  1900. // #ifdef APP-PLUS
  1901. uni.navigateTo({
  1902. animationType: animationType.type,
  1903. animationDuration: animationType.duration,
  1904. url: `/pages/discover/discover_release/index`
  1905. })
  1906. // #endif
  1907. } else {
  1908. toLogin();
  1909. }
  1910. },
  1911. /**
  1912. * 发现列表滑动中用到的方法
  1913. */
  1914. followScroll() {
  1915. uni.$emit('scroll');
  1916. },
  1917. onTouchmoveRecommend(e) {
  1918. if (!this.loadendfollow) this.getFollowList();
  1919. if (this.loadendfollow && !this.loadend) this.getRecommendAuthorList();
  1920. },
  1921. onTouchmove(e) {
  1922. this.getDiscoverList();
  1923. },
  1924. scrollLeft: function(e) {
  1925. uni.$emit('scroll');
  1926. if (e.detail.scrollTop > e.detail.scrollHeight - 1500) {
  1927. this.getDiscoverList();
  1928. }
  1929. this.swiperHeight = this.windowHeight - 55
  1930. },
  1931. swiperChange(e) {
  1932. let {
  1933. current,
  1934. source,
  1935. currentItemId
  1936. } = e.detail;
  1937. if (source === 'autoplay' || source === 'touch') {
  1938. this.categoryId = currentItemId;
  1939. this.swiperCur = current
  1940. this.selectMenu(this.categoryList[this.swiperCur], this.swiperCur, false)
  1941. if (this.categoryList.length > 3) {
  1942. var tempIndex = this.swiperCur - 2;
  1943. tempIndex = tempIndex <= 0 ? 0 : tempIndex;
  1944. let tabLeft = (this.swiperCur - 2) * this.isWidth; //设置下划线位置
  1945. this.$nextTick(function() {
  1946. this.$set(this, 'tabLeft', tabLeft);
  1947. });
  1948. }
  1949. }
  1950. },
  1951. /*******************发现列表滑动中用到的方法结束*********************/
  1952. // 去个人主人
  1953. goUser() {
  1954. if (!this.isLogin) {
  1955. this.openAuto();
  1956. } else {
  1957. // #ifdef MP || H5
  1958. uni.navigateTo({
  1959. url: '/pages/discover/discover_user/index'
  1960. })
  1961. // #endif
  1962. // #ifdef APP-PLUS
  1963. uni.navigateTo({
  1964. animationType: animationType.type,
  1965. animationDuration: animationType.duration,
  1966. url: '/pages/discover/discover_user/index'
  1967. })
  1968. // #endif
  1969. }
  1970. },
  1971. // 打开授权
  1972. openAuto() {
  1973. this.$Cache.set(BACK_URL, '')
  1974. toLogin();
  1975. },
  1976. //发现列表
  1977. getDiscoverList() {
  1978. let that = this;
  1979. this.isShow = false;
  1980. if (!this.discoverList[this.categoryId]) {
  1981. this.$set(this.discoverList, this.categoryId, {
  1982. where: {
  1983. ...this.where,
  1984. categoryId: this.categoryId,
  1985. secondType: this.active
  1986. },
  1987. goods: []
  1988. })
  1989. }
  1990. const data = this.discoverList[this.categoryId];
  1991. const cateId = this.categoryId;
  1992. if (data.loading || data.loadend) {
  1993. this.triggeredDiscover = false;
  1994. return
  1995. };
  1996. data.loading = true
  1997. this.loading = true
  1998. this.loadTitle = '';
  1999. if (data.where.categoryId === 0) data.where.categoryId = ''
  2000. discoverListApi(data.where).then(res => {
  2001. data.loadend = res.data.list.length < that.where.limit;
  2002. if (data.where.page == 1) {
  2003. data.goods = [];
  2004. }
  2005. this.loadTitle = data.loadend ? '没有了' : '加载更多';
  2006. data.goods.push.apply(data.goods, res.data.list);
  2007. data.where.page = data.where.page + 1;
  2008. that.$nextTick(() => {
  2009. that.$set(that.discoverList, cateId, {
  2010. ...data
  2011. });
  2012. });
  2013. data.loading = false;
  2014. this.loading = false;
  2015. this.triggeredDiscover = false;
  2016. this.$forceUpdate()
  2017. console.log(that.discoverList)
  2018. }).catch(err => {
  2019. data.loading = false;
  2020. this.loading = false;
  2021. uni.showToast({
  2022. title: err,
  2023. icon: 'none'
  2024. })
  2025. this.$set(this.discoverList, cateId, data);
  2026. });
  2027. },
  2028. //推荐作者列表
  2029. getRecommendAuthorList() {
  2030. if (this.loadend) return;
  2031. this.loading = true
  2032. recommendAuthorListApi(this.params).then(res => {
  2033. this.$set(this.params, 'page', this.params.page + 1);
  2034. this.loadend = this.params.page > res.data.totalPage;
  2035. this.authorList = this.authorList.concat(res.data.list || []);
  2036. this.loadTitle = this.loadend ? '没有了' : '加载更多';
  2037. this.loading = false
  2038. })
  2039. },
  2040. //分类列表
  2041. getCommunityCategoryList() {
  2042. let data = [{
  2043. name: "全部",
  2044. id: '-1',
  2045. icon: '/static/img/ic-wall-type--1.png'
  2046. }];
  2047. communityCategoryListApi().then(res => {
  2048. this.categoryList = Array.from(new Set([...data, ...res.data]));
  2049. })
  2050. },
  2051. // 点击列表头部
  2052. selectMenu(item, index, isScroll) {
  2053. if (this.tabClick == index) return
  2054. this.active = 0
  2055. this.triggeredDiscover = false;
  2056. this.categoryId = item.id;
  2057. this.swiperCurrent = index;
  2058. this.isScroll = isScroll;
  2059. this.tabClick = index; //设置导航点击了哪一个
  2060. this.isLeft = index * this.isWidth; //设置下划线位置
  2061. this.where.categoryId = item.id;
  2062. this.showCateDrawer = false
  2063. this.getDiscoverList();
  2064. },
  2065. tabSelect(active, e) {
  2066. if (this.active == active) return
  2067. this.active = active;
  2068. this.triggeredDiscover = false;
  2069. this.discoverList[this.categoryId].loading = false
  2070. this.discoverList[this.categoryId].loadend = false
  2071. this.discoverList[this.categoryId].where.page = 1
  2072. this.discoverList[this.categoryId].where.secondType = active
  2073. this.getDiscoverList();
  2074. },
  2075. }
  2076. }
  2077. </script>
  2078. <style lang="scss" scoped>
  2079. /deep/.wf-page {
  2080. background-color: #fff !important;
  2081. }
  2082. .discover_video_icon {
  2083. top: 50% !important;
  2084. left: 50% !important;
  2085. right: 0 !important;
  2086. -webkit-transform: translate(-50%, -50%);
  2087. transform: translate(-50%, -50%);
  2088. }
  2089. .mp-header {
  2090. background-color: $bg-color-primary;
  2091. }
  2092. .select_nav {
  2093. width: 170rpx !important;
  2094. height: 60rpx !important;
  2095. border-radius: 33rpx;
  2096. // background: rgba(255, 255, 255, 0.6);
  2097. // border: 1rpx solid rgba(0, 0, 0, 0.1);
  2098. color: #000;
  2099. position: fixed;
  2100. font-size: 18px;
  2101. line-height: 58rpx;
  2102. z-index: 1000;
  2103. left: 14rpx;
  2104. }
  2105. .nav_title {
  2106. // width: 200rpx;
  2107. color: #fff;
  2108. font-size: 36rpx;
  2109. position: fixed;
  2110. text-align: center;
  2111. left: 0;
  2112. right: 0;
  2113. margin: auto;
  2114. }
  2115. .banner-img {
  2116. width: 100%;
  2117. height: 100%;
  2118. }
  2119. .newsTitle {
  2120. font-weight: 400;
  2121. font-size: 21rpx;
  2122. color: #646464;
  2123. }
  2124. .active-topic {
  2125. @include main_color(theme);
  2126. @include coupons_light_color(theme);
  2127. @include coupons_border_color(theme);
  2128. }
  2129. .padbottom {
  2130. /* #ifndef H5 */
  2131. padding-bottom: calc(100rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  2132. padding-bottom: calc(100rpx + env(safe-area-inset-bottom)) !important;
  2133. /* #endif */
  2134. }
  2135. .bottom {
  2136. bottom: 218rpx !important;
  2137. }
  2138. .footerBottoms {
  2139. width: 100%;
  2140. /* #ifndef H5 */
  2141. height: calc(200rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  2142. height: calc(200rpx + env(safe-area-inset-bottom)) !important;
  2143. /* #endif */
  2144. /* #ifdef H5 */
  2145. height: calc(100rpx+ constant(safe-area-inset-bottom)) !important; ///兼容 IOS<11.2/
  2146. height: calc(100rpx + env(safe-area-inset-bottom)) !important;
  2147. /* #endif */
  2148. }
  2149. .discover_index {
  2150. /deep/.no-border {
  2151. bottom: 40rpx;
  2152. }
  2153. /deep/.author-list {
  2154. padding-left: 24rpx;
  2155. padding-right: 24rpx;
  2156. }
  2157. }
  2158. .menu {
  2159. // padding: 20rpx 34rpx 0 34rpx;
  2160. // box-sizing: border-box;
  2161. width: 100%;
  2162. }
  2163. .page_con {
  2164. // position: fixed;
  2165. top: 0;
  2166. right: 0;
  2167. bottom: 0;
  2168. left: 0;
  2169. display: flex;
  2170. flex-direction: column;
  2171. }
  2172. .empty-boxs {
  2173. margin: auto;
  2174. }
  2175. .goods {
  2176. display: flex;
  2177. flex-direction: column;
  2178. justify-content: space-between;
  2179. padding: 24rpx 24rpx 0 24rpx;
  2180. background: #ffffff;
  2181. }
  2182. .publish {
  2183. position: fixed;
  2184. z-index: 9999;
  2185. width: 100rpx;
  2186. height: 100rpx;
  2187. opacity: 1;
  2188. border-radius: 50%;
  2189. bottom: 142rpx;
  2190. right: 24rpx;
  2191. color: #fff;
  2192. line-height: 100rpx;
  2193. text-align: center;
  2194. @include linear-gradient(theme);
  2195. .iconfont {
  2196. font-size: 50rpx;
  2197. }
  2198. }
  2199. .main {
  2200. width: 100%;
  2201. }
  2202. .author {
  2203. &-item {
  2204. padding-bottom: 40rpx;
  2205. }
  2206. &-title {
  2207. height: 120rpx;
  2208. line-height: 120rpx;
  2209. font-size: 32rpx;
  2210. color: #333333;
  2211. .iconfont {
  2212. font-size: 170rpx;
  2213. color: #454545;
  2214. }
  2215. .lefticon {
  2216. transform: rotate(180deg);
  2217. }
  2218. }
  2219. .name {
  2220. margin: 0 28rpx;
  2221. }
  2222. &-head {
  2223. width: 80rpx;
  2224. height: 80rpx;
  2225. border-radius: 50%;
  2226. overflow: hidden;
  2227. image {
  2228. width: 100%;
  2229. height: 100%;
  2230. }
  2231. margin-right: 20rpx;
  2232. }
  2233. &-name {
  2234. font-size: 28rpx;
  2235. font-family: PingFang SC-Medium, PingFang SC;
  2236. font-weight: 600;
  2237. color: #282828;
  2238. }
  2239. &-sign,
  2240. &-fans {
  2241. font-size: 22rpx;
  2242. font-family: PingFang SC-Regular, PingFang SC;
  2243. font-weight: 400;
  2244. color: #999999;
  2245. }
  2246. &-sign {
  2247. width: 370rpx;
  2248. }
  2249. &-pictrue {
  2250. width: 222rpx;
  2251. height: 222rpx;
  2252. border-radius: 10px 10px 10px 10px;
  2253. opacity: 1;
  2254. margin-right: 18rpx;
  2255. /deep/image,
  2256. /deep/.easy-loadimage,
  2257. uni-image {
  2258. width: 100%;
  2259. height: 100%;
  2260. border-radius: 10px 10px 10px 10px;
  2261. overflow: hidden;
  2262. }
  2263. }
  2264. &-pictrue:nth-of-type(3n) {
  2265. margin-right: 0;
  2266. }
  2267. }
  2268. .noContent {
  2269. /deep/.empty-box {
  2270. padding-top: 80rpx !important;
  2271. }
  2272. }
  2273. .btn {
  2274. width: 440rpx;
  2275. height: 86rpx;
  2276. line-height: 86rpx;
  2277. text-align: center;
  2278. border-radius: 43rpx 43rpx 43rpx 43rpx;
  2279. opacity: 1;
  2280. border: 1px solid #E93323;
  2281. font-size: 32rpx;
  2282. margin: auto;
  2283. font-family: PingFang SC-Medium, PingFang SC;
  2284. @include main_color(theme);
  2285. @include coupons_border_color(theme);
  2286. font-weight: 600;
  2287. }
  2288. .cart_nav {
  2289. /deep/.nav_title {
  2290. font-size: 36rpx;
  2291. color: #333333;
  2292. }
  2293. }
  2294. .discover {
  2295. &-header {
  2296. background-size: cover;
  2297. top: 0;
  2298. left: 0;
  2299. .title {
  2300. font-size: 36rpx;
  2301. color: #333333;
  2302. }
  2303. }
  2304. &-navTab {
  2305. padding: 0 34rpx 0 34rpx;
  2306. justify-content: space-between;
  2307. .icon-xiazai5 {
  2308. color: #333;
  2309. }
  2310. .nav-item {
  2311. display: inline-block;
  2312. font-weight: 500;
  2313. font-size: 31rpx;
  2314. color: #B2B2B2;
  2315. &.on {
  2316. font-weight: 600;
  2317. font-size: 35rpx;
  2318. color: #141414;
  2319. border-bottom: 5rpx solid;
  2320. border-image: linear-gradient(90deg, #FFCA5F 0%, #FF1B95 100%);
  2321. border-image-slice: 1;
  2322. }
  2323. }
  2324. .release_btn {
  2325. width: 58rpx;
  2326. height: 58rpx;
  2327. border-radius: 100%;
  2328. background-image: linear-gradient(126deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  2329. color: #fff;
  2330. position: absolute;
  2331. top: 20rpx;
  2332. left: 0;
  2333. .iconfont {
  2334. font-size: 28rpx;
  2335. }
  2336. }
  2337. }
  2338. &-box {
  2339. flex: 1;
  2340. min-height: 83vh;
  2341. height: auto;
  2342. width: 100%;
  2343. background-color: #fff;
  2344. left: 0;
  2345. }
  2346. }
  2347. .avatar {
  2348. width: 64rpx;
  2349. height: 64rpx;
  2350. border-radius: 50%;
  2351. }
  2352. .h96 {
  2353. height: 96rpx;
  2354. }
  2355. .h36 {
  2356. /* #ifdef H5 */
  2357. height: 28rpx;
  2358. /* #endif */
  2359. /* #ifndef H5 */
  2360. height: 18rpx;
  2361. /* #endif */
  2362. }
  2363. .longTab {
  2364. width: 100%;
  2365. background: #fff;
  2366. border-radius: 16rpx 16rpx 0 0;
  2367. .longTab-item {
  2368. /*解决ios上滑动不流畅*/
  2369. -webkit-overflow-scrolling: touch;
  2370. position: relative;
  2371. }
  2372. .longItem {
  2373. height: 50upx;
  2374. display: inline-block;
  2375. text-align: center;
  2376. font-size: 30rpx;
  2377. color: #999999;
  2378. // margin-right: 56rpx;
  2379. text {
  2380. display: block;
  2381. max-width: 326rpx;
  2382. white-space: nowrap;
  2383. overflow: hidden;
  2384. text-overflow: ellipsis;
  2385. }
  2386. &:last-child {
  2387. margin-right: 0;
  2388. }
  2389. /*解决ios上滑动不流畅*/
  2390. -webkit-overflow-scrolling: touch;
  2391. position: relative;
  2392. &.click {
  2393. background: #EEF4FF;
  2394. // font-weight: bold;
  2395. // font-size: 34rpx;
  2396. // @include main_color(theme);
  2397. // &::after {
  2398. // content: "";
  2399. // display: block;
  2400. // width: 40rpx;
  2401. // height: 5rpx;
  2402. // @include main_bg_color(theme);
  2403. // display: flex;
  2404. // position: absolute;
  2405. // left: 50%;
  2406. // margin-left: -22rpx;
  2407. // bottom: -8rpx;
  2408. // }
  2409. // .underline {
  2410. // opacity: 1;
  2411. // }
  2412. }
  2413. }
  2414. .underlineBox {
  2415. height: 3px;
  2416. width: 20%;
  2417. display: flex;
  2418. align-content: center;
  2419. justify-content: center;
  2420. .underline {
  2421. opacity: 0;
  2422. width: 60rpx;
  2423. height: 4rpx;
  2424. background-color: #e93323;
  2425. }
  2426. }
  2427. }
  2428. .author-fans {
  2429. font-size: 24rpx !important;
  2430. }
  2431. .container {
  2432. overflow: hidden;
  2433. /* 隐藏超出部分 */
  2434. }
  2435. .swiper {
  2436. display: flex;
  2437. /* 使用flex布局 */
  2438. animation: scrollRight 10s linear infinite;
  2439. /* 应用动画 */
  2440. }
  2441. .swiper-item {
  2442. flex-shrink: 0;
  2443. /* 不允许缩小 */
  2444. width: 100%;
  2445. /* 每个item占满一行 */
  2446. height: 100%;
  2447. }
  2448. @keyframes scrollRight {
  2449. from {
  2450. transform: translateX(100%);
  2451. }
  2452. /* 从右向左移动 */
  2453. to {
  2454. transform: translateX(-100%);
  2455. }
  2456. /* 移出视图 */
  2457. }
  2458. .wall-nav {
  2459. font-weight: 500;
  2460. font-size: 23rpx;
  2461. color: #999999;
  2462. }
  2463. .wall-nav~.wall-nav {
  2464. margin-left: 38rpx;
  2465. }
  2466. .wall-nav-on {
  2467. font-weight: 600;
  2468. font-size: 27rpx;
  2469. color: #141414;
  2470. }
  2471. .discover-boxsss {
  2472. background-color: #fff;
  2473. width: 100%;
  2474. flex: 1;
  2475. }
  2476. </style>