friends.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346
  1. <template>
  2. <view class="container">
  3. <TabBar :tabIndex="tabIndex" ></TabBar>
  4. <uni-popup ref="popup" type="center">
  5. <Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closePopup" @toLogin="toLogin" :btnEvent="'toLogin'"></Popup>
  6. </uni-popup>
  7. <view id="topnav" class="topnav flex-start"
  8. :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`}">
  9. <view class="nav-item" v-for="(item,index) in navs" :key="index" :style="{
  10. 'font-size':`${navIndex===index?'40rpx':'32rpx'}`,
  11. 'color':`${navIndex===index?'#ffffff':''}`,
  12. 'font-weight':`${navIndex===index?'#ffffff':''}`}"
  13. @click="navClick(index)">
  14. <view class="nav-item-text fw700">{{item}}</view>
  15. </view>
  16. <image :src="`${assetsUrl}friends-searchicon.png`" mode="aspectFit" class="nav-search" @click="toSearch"></image>
  17. <image :src="`${assetsUrl}friends-circle.png`" mode="aspectFit" class="nav-item-bg" :style="{'left':`${navIndex*158}rpx`}" ></image>
  18. </view>
  19. <swiper class="outer-swiper" :current="navIndex" :style="{'height':`${scrollHeight}px`}" @change="outerSwiperChange">
  20. <swiper-item class="outer-swiper-item">
  21. <scroll-view class="scroll-view"
  22. v-if="scrollHeight>0"
  23. scroll-y="true"
  24. lower-threshold="200"
  25. :style="{'height':`${scrollHeight}px`}"
  26. refresher-enabled="true"
  27. :refresher-triggered="recommendTriggered"
  28. :refresher-threshold="45"
  29. refresher-default-style="white"
  30. refresher-background="#151126"
  31. @refresherrefresh="recommendRefresh"
  32. @refresherpulling="recommendPulling"
  33. @refresherrestore="recommendRestore"
  34. @refresherabort="recommendAbort"
  35. @scrolltolower="recommendToBottom"
  36. show-scrollbar="false"
  37. >
  38. <view slot="refresher" class="refresh-container" style="display: block; width: 100%; height: 80px; background: blue; display: flex; align-items: center;">
  39. <view class="view1" style="position: absolute; text-align: center; width: 100%;">
  40. 下拉刷新
  41. </view>
  42. </view>
  43. <image :src="`${assetsUrl}friends-bg.png`" mode="widthFix" class="tops-bg" v-if="recommendTopsM.length>0"></image>
  44. <view class="tops-nav flex-center" v-if="recommendTopsM.length>0">
  45. <view class="tops-nav-item" :class="topsIndex===index?'font32 fw600 tops-nav-item-active':''" v-for="(item,index) in tops" :key="index" @click="topsNavClick(index)">
  46. {{item}}
  47. </view>
  48. <view class="tops-line" :style="{'left':`${topsIndex*160+250}rpx`}"></view>
  49. </view>
  50. <swiper :current="topsIndex" class="swiper" @change="swiperChange" v-if="recommendTopsM.length>0">
  51. <swiper-item class="swiper-item">
  52. <view class="tops flex-between">
  53. <view class="tops-third flex-center">
  54. <view class="tt-item flex-center" @click="toDetail(recommendTopsM[1].userId)">
  55. <view class="tt-item-bg"></view>
  56. <image :src="`${assetsUrl}friends-2.png`" mode="aspectFill" class="tt-item-img"></image>
  57. <image :src="recommendTopsM[1].icon" class="tt-item-head-box" style="border: 2rpx solid #E2E2E2;"></image>
  58. <view class="tt-item-name font28 fw600 el">
  59. {{recommendTopsM[1].nick}}
  60. </view>
  61. <view class="tt-item-num-box flex-center">
  62. <image :src="`${assetsUrl}friends-heart.png`" mode="aspectFill" class="tt-item-num-img"></image>
  63. <view class="tt-item-num-text font22 fw600">
  64. {{recommendTopsM[1].val}}
  65. </view>
  66. </view>
  67. </view>
  68. <view class="tt-item flex-center" style="margin: 0rpx 16rpx;" @click="toDetail(recommendTopsM[0].userId)">
  69. <view class="tt-item-bg-center" style="width: 228rpx;"></view>
  70. <image :src="`${assetsUrl}friends-1.png`" mode="aspectFill" class="tt-item-img" style="transform: translateY(0rpx);"></image>
  71. <image :src="`${assetsUrl}friends-1-bling.png`" mode="aspectFill" class="tt-item-img-border" style="transform: translateY(-60rpx);"></image>
  72. <image :src="recommendTopsM[0].icon" class="tt-item-head-box" style="border: 2rpx solid #FFEC36;transform: translateY(-18rpx);"></image>
  73. <view class="tt-item-name font28 fw600 el">
  74. {{recommendTopsM[0].nick}}
  75. </view>
  76. <view class="tt-item-num-box flex-center">
  77. <image :src="`${assetsUrl}friends-heart.png`" mode="aspectFill" class="tt-item-num-img"></image>
  78. <view class="tt-item-num-text font22 fw600">
  79. {{recommendTopsM[0].val}}
  80. </view>
  81. </view>
  82. </view>
  83. <view class="tt-item flex-center" @click="toDetail(recommendTopsM[2].userId)">
  84. <view class="tt-item-bg"></view>
  85. <image :src="`${assetsUrl}friends-3.png`" mode="aspectFill" class="tt-item-img"></image>
  86. <image :src="recommendTopsM[2].icon" class="tt-item-head-box" style="border: 2rpx solid #E19865;"></image>
  87. <view class="tt-item-name font28 fw600 el">
  88. {{recommendTopsM[2].nick}}
  89. </view>
  90. <view class="tt-item-num-box flex-center">
  91. <image :src="`${assetsUrl}friends-heart.png`" mode="aspectFill" class="tt-item-num-img"></image>
  92. <view class="tt-item-num-text font22 fw600">
  93. {{recommendTopsM[2].val}}
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </swiper-item>
  100. <swiper-item class="swiper-item">
  101. <view class="tops flex-between">
  102. <view class="tops-third flex-center">
  103. <view class="tt-item flex-center" @click="toDetail(recommendTopsH[1].userId)">
  104. <view class="tt-item-bg"></view>
  105. <image :src="`${assetsUrl}friends-2.png`" mode="aspectFill" class="tt-item-img"></image>
  106. <image :src="recommendTopsH[1].icon" class="tt-item-head-box" style="border: 2rpx solid #E2E2E2;"></image>
  107. <view class="tt-item-name font28 fw600 el">
  108. {{recommendTopsH[1].nick}}
  109. </view>
  110. <view class="tt-item-num-box flex-center">
  111. <image :src="`${assetsUrl}friends-sugar.png`" mode="aspectFill" class="tt-item-num-img"></image>
  112. <view class="tt-item-num-text font22 fw600">
  113. {{recommendTopsH[1].val}}
  114. </view>
  115. </view>
  116. </view>
  117. <view class="tt-item flex-center" style="margin: 0rpx 16rpx;" @click="toDetail(recommendTopsH[0].userId)">
  118. <view class="tt-item-bg-center" style="width: 228rpx;"></view>
  119. <image :src="`${assetsUrl}friends-1.png`" mode="aspectFill" class="tt-item-img" style="transform: translateY(-5rpx);"></image>
  120. <image :src="`${assetsUrl}friends-1-bling.png`" mode="aspectFill" class="tt-item-img-border" style="transform: translateY(-60rpx);"></image>
  121. <image :src="recommendTopsH[0].icon" class="tt-item-head-box" style="border: 2rpx solid #FFEC36;transform: translateY(-18rpx);"></image>
  122. <view class="tt-item-name font28 fw600 el">
  123. {{recommendTopsH[0].nick}}
  124. </view>
  125. <view class="tt-item-num-box flex-center">
  126. <image :src="`${assetsUrl}friends-sugar.png`" mode="aspectFill" class="tt-item-num-img"></image>
  127. <view class="tt-item-num-text font22 fw600">
  128. {{recommendTopsH[0].val}}
  129. </view>
  130. </view>
  131. </view>
  132. <view class="tt-item flex-center" @click="toDetail(recommendTopsH[2].userId)">
  133. <view class="tt-item-bg"></view>
  134. <image :src="`${assetsUrl}friends-3.png`" mode="aspectFill" class="tt-item-img"></image>
  135. <image :src="recommendTopsH[2].icon" class="tt-item-head-box" style="border: 2rpx solid #E19865;"></image>
  136. <view class="tt-item-name font28 fw600 el">
  137. {{recommendTopsH[2].nick}}
  138. </view>
  139. <view class="tt-item-num-box flex-center">
  140. <image :src="`${assetsUrl}friends-sugar.png`" mode="aspectFill" class="tt-item-num-img"></image>
  141. <view class="tt-item-num-text font22 fw600">
  142. {{recommendTopsH[2].val}}
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </swiper-item>
  149. </swiper>
  150. <view class="location flex-between" @click="computedLocation" v-if="showGetLocation">
  151. <image :src="`${assetsUrl}friends-pos.png`" mode="aspectFill" class="l-pos"></image>
  152. <text class="l-text font24 fw400">点此开启位置权限,获得更精准推荐!</text>
  153. <view class="l-open font24 fw400">开启</view>
  154. </view>
  155. <view class="list-item flex-start" v-for="(item,index) in recommendList" :key="index" @click="toDetail(item.id)">
  156. <view class="list-head-box">
  157. <image :src="item.iconThumbnail" mode="aspectFill" class="list-head-img"></image>
  158. <view class="list-head-dot" style="background-color: #38E825;" v-if="item.lastActiveTime<=30"></view>
  159. <view class="list-head-dot" style="background-color: #0ABDEF;" v-else-if="item.lastActiveTime>30&&item.lastActiveTime<=1440"></view>
  160. </view>
  161. <view class="list-info-box">
  162. <view class="name-box flex-between">
  163. <view class="name flex-start">
  164. <view class="name-text font28 fw600">
  165. {{item.nick}}
  166. </view>
  167. <image :src="`${assetsUrl}friends-vip.png`" mode="aspectFill" class="name-img" v-if="item.vip"></image>
  168. <image :src="`${assetsUrl}friends-godness.png`" mode="aspectFill" class="name-img-godness" v-if="item.goddess"></image>
  169. <image :src="`${assetsUrl}friends-real.png`" mode="aspectFill" class="name-img" v-else-if="item.realMan"></image>
  170. </view>
  171. <view class="distance font22 fw400" v-if="item.distance&&item.distance!=='NaNm'">
  172. {{item.distance}}
  173. </view>
  174. </view>
  175. <view class="sex-box flex-center" :style="{'background-color':`${item.sex==='Male'?'rgba(108,82,244,0.21)':''}`}">
  176. <image :src="`${assetsUrl}friends-female.png`" mode="aspectFill" class="sex-img" v-if="item.sex==='Famale'"></image>
  177. <image :src="`${assetsUrl}friends-male.png`" mode="aspectFill" class="sex-img" v-if="item.sex==='Male'"></image>
  178. <view class="el font20 fw500 sex-text1" v-if="item.sex==='Famale'">
  179. {{item.ageInfo.age}}
  180. </view>
  181. <view class="el font20 fw500 sex-text2" v-if="item.sex==='Male'">
  182. {{item.ageInfo.age}}
  183. </view>
  184. </view>
  185. <view class="tip-box font28 fw400 el" v-if="item.desc">
  186. 签名:{{item.desc}}
  187. </view>
  188. <view class="tip-box font28 fw400 el" v-else>
  189. 签名:暂无介绍
  190. </view>
  191. </view>
  192. <view class="img-box flex-between" v-if="item.lastNews">
  193. <image :src="item.lastNews.mediaUrls[0]" mode="aspectFill" class="ib1"></image>
  194. <image :src="item.lastNews.mediaUrls[1]" mode="aspectFill" class="ib2"></image>
  195. <image :src="item.lastNews.mediaUrls[2]" mode="aspectFill" class="ib3"></image>
  196. </view>
  197. </view>
  198. <view class="no-more font24 fw400" v-if="recommendList.length!==0&&recommendList.length>=recommendTotal">没有更多了</view>
  199. </scroll-view>
  200. </swiper-item>
  201. <swiper-item class="outer-swiper-item">
  202. <scroll-view class="scroll-view"
  203. v-if="scrollHeight>0"
  204. scroll-y="true"
  205. lower-threshold="200"
  206. :style="{'height':`${scrollHeight}px`}"
  207. refresher-enabled="true"
  208. :refresher-triggered="nearTriggered"
  209. :refresher-threshold="45"
  210. refresher-default-style="white"
  211. refresher-background="#151126"
  212. @refresherrefresh="nearRefresh"
  213. @refresherpulling="nearPulling"
  214. @refresherrestore="nearRestore"
  215. @refresherabort="nearAbort"
  216. @scrolltolower="nearToBottom"
  217. :show-scrollbar="false"
  218. >
  219. <image :src="`${assetsUrl}friends-bg.png`" mode="widthFix" class="tops-bg" v-if="!showGetLocation"></image>
  220. <view class="tops-nav flex-center" v-if="!showGetLocation">
  221. <view class="tops-nav-item" :class="topsIndex===index?'font32 fw600 tops-nav-item-active':''" v-for="(item,index) in tops" :key="index" @click="topsNavClick(index)">
  222. {{item}}
  223. </view>
  224. <view class="tops-line" :style="{'left':`${topsIndex*160+250}rpx`}"></view>
  225. </view>
  226. <swiper :current="topsIndex" class="swiper" @change="swiperChange" v-if="!showGetLocation">
  227. <swiper-item class="swiper-item">
  228. <view class="tops flex-between">
  229. <view class="tops-third flex-center">
  230. <view class="tt-item flex-center" @click="toDetail(nearTopsM[1].userId)">
  231. <view class="tt-item-bg"></view>
  232. <image :src="`${assetsUrl}friends-2.png`" mode="aspectFill" class="tt-item-img"></image>
  233. <image :src="nearTopsM[1].icon" class="tt-item-head-box" style="border: 2rpx solid #E2E2E2;"></image>
  234. <view class="tt-item-name font28 fw600 el">
  235. {{nearTopsM[1].nick}}
  236. </view>
  237. <view class="tt-item-num-box flex-center">
  238. <image :src="`${assetsUrl}friends-heart.png`" mode="aspectFill" class="tt-item-num-img"></image>
  239. <view class="tt-item-num-text font22 fw600">
  240. {{nearTopsM[1].val}}
  241. </view>
  242. </view>
  243. </view>
  244. <view class="tt-item flex-center" style="margin: 0rpx 16rpx;" @click="toDetail(nearTopsM[0].userId)">
  245. <view class="tt-item-bg-center" style="width: 228rpx;"></view>
  246. <image :src="`${assetsUrl}friends-1.png`" mode="aspectFill" class="tt-item-img" style="transform: translateY(-5rpx);"></image>
  247. <image :src="`${assetsUrl}friends-1-bling.png`" mode="aspectFill" class="tt-item-img-border" style="transform: translateY(-60rpx);"></image>
  248. <image :src="nearTopsM[0].icon" class="tt-item-head-box" style="border: 2rpx solid #FFEC36;transform: translateY(-18rpx);"></image>
  249. <view class="tt-item-name font28 fw600 el">
  250. {{nearTopsM[0].nick}}
  251. </view>
  252. <view class="tt-item-num-box flex-center">
  253. <image :src="`${assetsUrl}friends-heart.png`" mode="aspectFill" class="tt-item-num-img"></image>
  254. <view class="tt-item-num-text font22 fw600">
  255. {{nearTopsM[0].val}}
  256. </view>
  257. </view>
  258. </view>
  259. <view class="tt-item flex-center" @click="toDetail(nearTopsM[2].userId)">
  260. <view class="tt-item-bg"></view>
  261. <image :src="`${assetsUrl}friends-3.png`" mode="aspectFill" class="tt-item-img"></image>
  262. <image :src="nearTopsM[2].icon" class="tt-item-head-box" style="border: 2rpx solid #E19865;"></image>
  263. <view class="tt-item-name font28 fw600 el">
  264. {{nearTopsM[2].nick}}
  265. </view>
  266. <view class="tt-item-num-box flex-center">
  267. <image :src="`${assetsUrl}friends-heart.png`" mode="aspectFill" class="tt-item-num-img"></image>
  268. <view class="tt-item-num-text font22 fw600">
  269. {{nearTopsM[2].val}}
  270. </view>
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </swiper-item>
  276. <swiper-item class="swiper-item">
  277. <view class="tops flex-between">
  278. <view class="tops-third flex-center">
  279. <view class="tt-item flex-center" @click="toDetail(nearTopsH[1].userId)">
  280. <view class="tt-item-bg"></view>
  281. <image :src="`${assetsUrl}friends-2.png`" mode="aspectFill" class="tt-item-img"></image>
  282. <image :src="nearTopsH[1].icon" class="tt-item-head-box" style="border: 2rpx solid #E2E2E2;"></image>
  283. <view class="tt-item-name font28 fw600 el">
  284. {{nearTopsH[1].nick}}
  285. </view>
  286. <view class="tt-item-num-box flex-center">
  287. <image :src="`${assetsUrl}friends-sugar.png`" mode="aspectFill" class="tt-item-num-img"></image>
  288. <view class="tt-item-num-text font22 fw600">
  289. {{nearTopsH[1].val}}
  290. </view>
  291. </view>
  292. </view>
  293. <view class="tt-item flex-center" style="margin: 0rpx 16rpx;" @click="toDetail(nearTopsH[0].userId)">
  294. <view class="tt-item-bg-center" style="width: 228rpx;"></view>
  295. <image :src="`${assetsUrl}friends-1.png`" mode="aspectFill" class="tt-item-img" style="transform: translateY(-5rpx);"></image>
  296. <image :src="`${assetsUrl}friends-1-bling.png`" mode="aspectFill" class="tt-item-img-border" style="transform: translateY(-60rpx);"></image>
  297. <image :src="nearTopsH[0].icon" class="tt-item-head-box" style="border: 2rpx solid #FFEC36;transform: translateY(-18rpx);"></image>
  298. <view class="tt-item-name font28 fw600 el">
  299. {{nearTopsH[0].nick}}
  300. </view>
  301. <view class="tt-item-num-box flex-center">
  302. <image :src="`${assetsUrl}friends-sugar.png`" mode="aspectFill" class="tt-item-num-img"></image>
  303. <view class="tt-item-num-text font22 fw600">
  304. {{nearTopsH[0].val}}
  305. </view>
  306. </view>
  307. </view>
  308. <view class="tt-item flex-center" @click="toDetail(nearTopsH[2].userId)">
  309. <view class="tt-item-bg"></view>
  310. <image :src="`${assetsUrl}friends-3.png`" mode="aspectFill" class="tt-item-img"></image>
  311. <image :src="nearTopsH[2].icon" class="tt-item-head-box" style="border: 2rpx solid #E19865;"></image>
  312. <view class="tt-item-name font28 fw600 el">
  313. {{nearTopsH[2].nick}}
  314. </view>
  315. <view class="tt-item-num-box flex-center">
  316. <image :src="`${assetsUrl}friends-sugar.png`" mode="aspectFill" class="tt-item-num-img"></image>
  317. <view class="tt-item-num-text font22 fw600">
  318. {{nearTopsH[2].val}}
  319. </view>
  320. </view>
  321. </view>
  322. </view>
  323. </view>
  324. </swiper-item>
  325. </swiper>
  326. <view class="list-item flex-start" v-for="(item,index) in nearList" :key="index" @click="toDetail(item.id)">
  327. <view class="list-head-box">
  328. <image :src="item.iconThumbnail" mode="aspectFill" class="list-head-img"></image>
  329. <view class="list-head-dot" style="background-color: #38E825;" v-if="item.lastActiveTime<=30"></view>
  330. <view class="list-head-dot" style="background-color: #0ABDEF;" v-else-if="item.lastActiveTime>30&&item.lastActiveTime<=1440"></view>
  331. </view>
  332. <view class="list-info-box">
  333. <view class="name-box flex-between">
  334. <view class="name flex-start">
  335. <view class="name-text font28 fw600">
  336. {{item.nick}}
  337. </view>
  338. <image :src="`${assetsUrl}friends-vip.png`" mode="aspectFill" class="name-img" v-if="item.vip"></image>
  339. <image :src="`${assetsUrl}friends-godness.png`" mode="aspectFill" class="name-img-godness" v-if="item.goddess"></image>
  340. <image :src="`${assetsUrl}friends-real.png`" mode="aspectFill" class="name-img" v-else-if="item.realMan"></image>
  341. </view>
  342. <view class="distance font22 fw400" v-if="item.distance&&item.distance!=='NaNm'">
  343. {{item.distance}}
  344. </view>
  345. </view>
  346. <view class="sex-box flex-center" :style="{'background-color':`${item.sex==='Male'?'rgba(108,82,244,0.21)':''}`}">
  347. <image :src="`${assetsUrl}friends-female.png`" mode="aspectFill" class="sex-img" v-if="item.sex==='Famale'"></image>
  348. <image :src="`${assetsUrl}friends-male.png`" mode="aspectFill" class="sex-img" v-if="item.sex==='Male'"></image>
  349. <view class="el font20 fw500 sex-text1" v-if="item.sex==='Famale'">
  350. {{item.ageInfo.age}}
  351. </view>
  352. <view class="el font20 fw500 sex-text2" v-if="item.sex==='Male'">
  353. {{item.ageInfo.age}}
  354. </view>
  355. </view>
  356. <view class="tip-box font28 fw400 el" v-if="item.desc">
  357. 签名:{{item.desc}}
  358. </view>
  359. <view class="tip-box font28 fw400 el" v-else>
  360. 签名:暂无介绍
  361. </view>
  362. </view>
  363. <view class="img-box flex-between" v-if="item.lastNews">
  364. <image :src="item.lastNews.mediaUrls[0]" mode="aspectFill" class="ib1"></image>
  365. <image :src="item.lastNews.mediaUrls[1]" mode="aspectFill" class="ib2"></image>
  366. <image :src="item.lastNews.mediaUrls[2]" mode="aspectFill" class="ib3"></image>
  367. </view>
  368. </view>
  369. <view class="no-more font24 fw400" v-if="nearList.length!==0&&nearList.length>=nearTotal">没有更多了</view>
  370. <Status :type="statusType" :btnText="statusBtnText" :text="statusText" @btnEvent="computedLocation" v-if="showGetLocation"></Status>
  371. <Status type="noData" text="暂无数据" v-if="showNoData"></Status>
  372. </scroll-view>
  373. </swiper-item>
  374. </swiper>
  375. </view>
  376. </template>
  377. <script>
  378. import TabBar from '@/components/TabBar/TabBar.vue';
  379. import Status from '@/components/Status/Status.vue';
  380. import wxMap from '@/static/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.min.js';
  381. import TIM from 'tim-wx-sdk';
  382. import Popup from '@/components/Popup/Popup.vue';
  383. // import COS from 'cos-wx-sdk-v5';
  384. import TIMUploadPlugin from 'tim-upload-plugin';
  385. // 腾讯位置服务,手机账号:18996226740
  386. const wxMapSdk=new wxMap({key:'E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII'});
  387. import {get} from '@/util/index.js'
  388. export default {
  389. components: {
  390. TabBar,Status,Popup
  391. },
  392. data() {
  393. return {
  394. statusType:'noPos',
  395. statusBtnText:'开启定位',
  396. statusText:'开启定位后才能帮你找到身边的TA哦',
  397. assetsUrl: this.$util.assetsUrl,
  398. tabIndex: 0,
  399. navs: ['推荐', '附近'],
  400. navIndex:0,
  401. tops:['魅力榜','壕气榜'],
  402. topsIndex:0,
  403. scrollHeight:0,
  404. rankingOptions:{
  405. city:'',
  406. cityCode:'',
  407. number:3,
  408. type:'M'
  409. },
  410. popup:{
  411. content1:'',
  412. content2:'',
  413. tip1:'',
  414. tip2:'',
  415. btntext:''
  416. },
  417. recommendListOptions:{
  418. filterIds:[],
  419. page:{
  420. index:1,
  421. size:20,
  422. sortValues:[]
  423. },
  424. queryPre:{
  425. city:'',
  426. cityCode:'',
  427. femaleGoddess:false,
  428. femaleNew:false,
  429. geo:{
  430. lat:0,
  431. lon:0
  432. },
  433. maleNew:false,
  434. maleVip:false
  435. },
  436. showList: true,
  437. type: {}
  438. },
  439. nearListOptions:{
  440. filterIds:[],
  441. page:{
  442. index:1,
  443. size:20,
  444. sortValues:[]
  445. },
  446. queryPre:{
  447. city:'',
  448. cityCode:'',
  449. femaleGoddess:false,
  450. femaleNew:false,
  451. geo:{
  452. lat:0,
  453. lon:0
  454. },
  455. maleNew:false,
  456. maleVip:false
  457. },
  458. showList: true,
  459. type: {}
  460. },
  461. showGetLocation:false,
  462. showNoData:false,
  463. latitude:0,
  464. longitude:0,
  465. locationCity:'',
  466. locationCityCode:'',
  467. recommendTopsM:[],
  468. recommendTopsH:[],
  469. recommendList:[],
  470. recommendTotal:0,
  471. recommendRefreshing:false,
  472. recommendTriggered:true,
  473. nearTopsM:[],
  474. nearTopsH:[],
  475. nearList:[],
  476. nearTotal:0,
  477. nearRefreshing:false,
  478. nearTriggered:true,
  479. otherInfo:null
  480. };
  481. },
  482. computed: {
  483. statusBarHeight() {
  484. return this.$store.state.statusBarHeight||20;
  485. },
  486. topbarOffsetHeight() {
  487. return this.$store.state.topbarOffsetHeight||40;
  488. },
  489. userInfo(){
  490. return this.$store.state.userInfo||{};
  491. }
  492. },
  493. mounted() {
  494. uni.showLoading({
  495. mask:true,
  496. title:'加载中'
  497. })
  498. this.computedScollviewHeight();
  499. if(!uni.getStorageSync('token')){
  500. this.computedLocation();
  501. }
  502. else{
  503. this.computedLocation();
  504. this.getRecommendTopsMData();
  505. this.getRecommendTopsHData();
  506. setTimeout(()=>{
  507. this.imInit();
  508. },3000)
  509. }
  510. },
  511. // #ifdef MP
  512. onShareAppMessage(){
  513. return {
  514. title: '糖果公园',
  515. path: `/pages/login/login?share=${this.userInfo.inviteCode}`,
  516. }
  517. },
  518. // #endif
  519. methods: {
  520. imInit(){
  521. /**
  522. * IM初始化
  523. */
  524. if(uni.$TUIKit){
  525. uni.$TUIKit.logout();
  526. }
  527. const SDKAppID = this.$util.IMSDKCode,that=this;
  528. uni.$TUIKit = TIM.create({
  529. SDKAppID: SDKAppID
  530. });
  531. uni.$TUIKitTIM = TIM;
  532. uni.$TUIKitEvent = TIM.EVENT;
  533. uni.$TUIKitVersion = TIM.VERSION;
  534. uni.$TUIKitTypes = TIM.TYPES; // 监听系统级事件
  535. uni.$TUIKit.on(uni.$TUIKitEvent.SDK_READY, this.onSDKReady);
  536. uni.$TUIKit.on(uni.$TUIKitEvent.SDK_NOT_READY, this.onSdkNotReady);
  537. uni.$TUIKit.on(uni.$TUIKitEvent.KICKED_OUT, this.onKickedOut);
  538. uni.$TUIKit.on(uni.$TUIKitEvent.ERROR, this.onTIMError);
  539. uni.$TUIKit.on(uni.$TUIKitEvent.NET_STATE_CHANGE, this.onNetStateChange);
  540. uni.$TUIKit.on(uni.$TUIKitEvent.SDK_RELOAD, this.onSDKReload);
  541. uni.$resetLoginData = this.resetLoginData();
  542. uni.$TUIKit.registerPlugin({ 'tim-upload-plugin':TIMUploadPlugin });
  543. },
  544. resetLoginData() {
  545. let user=JSON.parse(uni.getStorageSync('userInfo'));
  546. this.$api.IM.loadSig({}).then(res=>{
  547. this.$store.commit('setImLoadSig',res.data.sig);
  548. uni.$TUIKit.login({
  549. userID:String(user.id),
  550. userSig:this.$store.state.IMloadSig
  551. })
  552. })
  553. uni.hideLoading();
  554. },
  555. onTIMError() {},
  556. onSDKReady({name}) {
  557. const isSDKReady = name === uni.$TUIKitEvent.SDK_READY ? true : false;
  558. if(isSDKReady){
  559. uni.$emit('isSDKReady', {
  560. isSDKReady: true
  561. });
  562. }
  563. },
  564. onNetStateChange() {},
  565. onSDKReload() {},
  566. onSdkNotReady() {},
  567. onKickedOut() {
  568. uni.showToast({
  569. title: '您被踢下线',
  570. icon: 'error'
  571. });
  572. uni.reLaunch({
  573. url: '/pages/login/login'
  574. })
  575. },
  576. /**
  577. * 推荐下拉刷新、加载更多
  578. */
  579. recommendRefresh(){
  580. if(!uni.getStorageSync('token')){
  581. setTimeout(() => {
  582. this.recommendTriggered = false;
  583. this.recommendRefreshing = false;
  584. }, 1000)
  585. return;
  586. }
  587. if (this.recommendRefreshing)
  588. {
  589. return;
  590. }
  591. this.recommendRefreshing = true;
  592. setTimeout(() => {
  593. this.recommendTriggered = false;
  594. this.recommendRefreshing = false;
  595. }, 1000)
  596. this.recommendListOptions.page={
  597. index:1,
  598. size:20,
  599. sortValues:[]
  600. }
  601. this.getRecommendTopsMData();
  602. this.getRecommendTopsHData();
  603. this.getRecommendList();
  604. },
  605. recommendPulling(e) {},
  606. recommendRestore() {this.recommendTriggered = true;},
  607. recommendAbort() {},
  608. recommendToBottom(){
  609. if(this.recommendList.length>=this.recommendTotal){return;}
  610. this.recommendListOptions.page.index++;
  611. this.getRecommendList();
  612. },
  613. /**
  614. * 附近下拉刷新、加载更多
  615. */
  616. nearRefresh(){
  617. if (this.nearRefreshing)
  618. {
  619. return;
  620. }
  621. this.nearRefreshing = true;
  622. setTimeout(() => {
  623. this.nearTriggered = false;
  624. this.nearRefreshing = false;
  625. }, 1000)
  626. this.nearListOptions.page={
  627. index:1,
  628. size:20,
  629. sortValues:[]
  630. }
  631. this.getNearTopsMData();
  632. this.getNearTopsHData();
  633. this.getNearList();
  634. },
  635. nearPulling(e) {},
  636. nearRestore() {this.nearTriggered = true;},
  637. nearAbort() {},
  638. nearToBottom(){
  639. if(this.nearList.length>=this.nearTotal){return;}
  640. this.nearListOptions.page.index++;
  641. this.getNearList();
  642. },
  643. /**
  644. * 计算scroll高度
  645. */
  646. computedScollviewHeight() {
  647. let query = uni.createSelectorQuery().in(this);
  648. let heightLeaf = this.$store.state.tabbarHeight/2;
  649. query.select('#topnav').boundingClientRect(data => {
  650. heightLeaf += data.height;
  651. }).exec(() => {
  652. let sysInfo = uni.getSystemInfoSync();
  653. this.scrollHeight = sysInfo.windowHeight - heightLeaf;
  654. });
  655. },
  656. /**
  657. * 计算列表定位距离
  658. */
  659. computedLocation(){
  660. // #ifdef MP
  661. uni.getFuzzyLocation({
  662. type:'gcj02',
  663. success:res=>{
  664. this.latitude=res.latitude;
  665. this.longitude=res.longitude;
  666. this.$store.commit('setLatitude',this.latitude);
  667. this.$store.commit('setLongitude',this.longitude);
  668. wxMapSdk.reverseGeocoder({
  669. location:{
  670. latitude:res.latitude,
  671. longitude:res.longitude
  672. },
  673. success:result=>{
  674. this.locationCity=result.result.ad_info.city;
  675. this.locationCityCode=result.result.ad_info.city_code.split(result.result.ad_info.nation_code)[1];
  676. this.getTempRecommendList();
  677. if(!uni.getStorageSync('token')){
  678. this.getTempRecommendList();
  679. }
  680. else{
  681. this.$api.public.heartBeat({
  682. city:this.locationCity,
  683. cityCode:this.locationCityCode,
  684. geo:{
  685. lat:this.latitude,
  686. lon:this.longitude,
  687. }
  688. }).then(()=>{
  689. this.getNearTopsMData();
  690. this.getNearTopsHData();
  691. this.getNearList();
  692. this.getRecommendList();
  693. this.showGetLocation=false;
  694. }).catch(err=>{
  695. this.getTempRecommendList();
  696. })
  697. }
  698. }
  699. })
  700. },
  701. fail:err=>{
  702. this.showGetLocation=true;
  703. uni.showModal({
  704. content: '检测到您没打开地址信息权限,是否去设置打开?',
  705. confirmText: "确认",
  706. cancelText: '取消',
  707. success:res=>{
  708. if(res.confirm){
  709. uni.openSetting({
  710. success:ress=>{
  711. if(ress.authSetting){
  712. this.computedLocation();
  713. }
  714. }
  715. })
  716. }
  717. }
  718. })
  719. }
  720. })
  721. // #endif
  722. // #ifdef H5
  723. console.log('h5')
  724. uni.getLocation({
  725. type: 'wgs84',
  726. success: (res) => {
  727. console.log(res)
  728. this.latitude=res.latitude;
  729. this.longitude=res.longitude;
  730. this.$store.commit('setLatitude',this.latitude);
  731. this.$store.commit('setLongitude',this.longitude);
  732. this.$jsonp('https://apis.map.qq.com/ws/geocoder/v1',{
  733. key:'E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII',
  734. output:'jsonp',
  735. callbackName: 'QQmap',
  736. location:`${this.latitude},${this.longitude}`
  737. }).then(result=>{
  738. console.log(result)
  739. this.locationCity=result.result.ad_info.city;
  740. this.locationCityCode=result.result.ad_info.city_code.split(result.result.ad_info.nation_code)[1];
  741. this.getTempRecommendList();
  742. if(!uni.getStorageSync('token')){
  743. this.getTempRecommendList();
  744. }
  745. else{
  746. this.$api.public.heartBeat({
  747. city:this.locationCity,
  748. cityCode:this.locationCityCode,
  749. geo:{
  750. lat:this.latitude,
  751. lon:this.longitude,
  752. }
  753. }).then(()=>{
  754. this.getNearTopsMData();
  755. this.getNearTopsHData();
  756. this.getNearList();
  757. this.getRecommendList();
  758. this.showGetLocation=false;
  759. }).catch(err=>{
  760. this.getTempRecommendList();
  761. })
  762. }
  763. }).catch(err=>{
  764. console.log(err)
  765. })
  766. },
  767. fail:err=>{
  768. console.log(err);
  769. }
  770. })
  771. // #endif
  772. },
  773. toLogin(){
  774. uni.reLaunch({
  775. url:'/pages/login/login'
  776. })
  777. },
  778. navClick(index){
  779. if(!uni.getStorageSync('token')){
  780. this.popup={
  781. content1:'您还未登录',
  782. content2:'该功能登录后才能使用',
  783. tip1:'',
  784. tip2:'',
  785. btntext:'去登录'
  786. }
  787. this.$refs.popup.open();
  788. return;
  789. }
  790. this.rankingOptions.city=(index===0?'':this.locationCity);
  791. this.rankingOptions.cityCode=(index===0?'':this.locationCityCode);
  792. this.navIndex=index;
  793. },
  794. toSearch(){
  795. if(!uni.getStorageSync('token')){
  796. this.popup={
  797. content1:'您还未登录',
  798. content2:'该功能登录后才能使用',
  799. tip1:'',
  800. tip2:'',
  801. btntext:'去登录'
  802. }
  803. this.$refs.popup.open();
  804. return;
  805. }
  806. uni.navigateTo({
  807. url:'/pages/search/search'
  808. })
  809. },
  810. topsNavClick(index){
  811. this.topsIndex=index;
  812. },
  813. outerSwiperChange(e){
  814. this.navIndex=e.detail.current;
  815. },
  816. swiperChange(e){
  817. this.topsIndex=e.detail.current;
  818. },
  819. getRecommendTopsMData(){
  820. this.rankingOptions.type='M';
  821. this.$api.public.ranking(this.rankingOptions).then(res=>{
  822. this.recommendTopsM=res.data.list;
  823. })
  824. },
  825. getRecommendTopsHData(){
  826. this.rankingOptions.type='H';
  827. this.$api.public.ranking(this.rankingOptions).then(res=>{
  828. this.recommendTopsH=res.data.list;
  829. })
  830. },
  831. getNearTopsMData(){
  832. this.rankingOptions.type='M';
  833. this.rankingOptions.city=this.locationCity;
  834. this.rankingOptions.cityCode=this.locationCityCode;
  835. this.$api.public.ranking(this.rankingOptions).then(res=>{
  836. this.nearTopsM=res.data.list;
  837. })
  838. },
  839. getNearTopsHData(){
  840. this.rankingOptions.type='H';
  841. this.rankingOptions.city=this.locationCity;
  842. this.rankingOptions.cityCode=this.locationCityCode;
  843. this.$api.public.ranking(this.rankingOptions).then(res=>{
  844. this.nearTopsH=res.data.list;
  845. })
  846. },
  847. getTempRecommendList(){//获取免登录体验数据
  848. this.recommendListOptions.type='FamaleReco';
  849. this.$api.public.friendsNoAuth(this.recommendListOptions).then(res=>{
  850. if(res.status==='Succ'){
  851. this.recommendTotal=res.data.page.recordCount;
  852. this.recommendListOptions.page.sortValues=res.data.sortValues;
  853. let arr=[],obj={latitude:0,longitude:0};
  854. for(let i=0;i<res.data.users.length;i++){
  855. res.data.users[i].lastActiveTime=this.$moment(new Date()).diff(res.data.users[i].lastActive,'minutes');
  856. obj={latitude:0,longitude:0};
  857. obj.latitude=res.data.users[i].geo.lat;
  858. obj.longitude=res.data.users[i].geo.lon;
  859. arr.push(obj)
  860. }
  861. wxMapSdk.calculateDistance({
  862. mode:'straight',
  863. from:{
  864. latitude: this.latitude,
  865. longitude: this.longitude
  866. },
  867. to:arr,
  868. success:dists=>{
  869. if(dists.message==="query ok"){
  870. for(let j=0;j<dists.result.elements.length;j++){
  871. res.data.users[j].distance=(dists.result.elements[j].distance>1000?`${Math.floor(dists.result.elements[j].distance/100)/10}km`:`${dists.result.elements[j].distance}m`)
  872. }
  873. if(this.recommendListOptions.page.index>1){
  874. this.recommendList=[...this.recommendList,...res.data.users];
  875. }
  876. else{
  877. this.recommendList=res.data.users;
  878. }
  879. uni.hideLoading();
  880. this.$forceUpdate();
  881. }
  882. }
  883. })
  884. this.recommendList=res.data.users;
  885. }
  886. })
  887. },
  888. getRecommendList(){
  889. let user=JSON.parse(uni.getStorageSync('user'));
  890. this.recommendListOptions.type=user.sex==='male'?'MaleReco':'FamaleReco';
  891. this.recommendListOptions.queryPre.city=this.locationCity;
  892. this.recommendListOptions.queryPre.cityCode=this.locationCityCode;
  893. this.recommendListOptions.queryPre.geo.lat=this.latitude;
  894. this.recommendListOptions.queryPre.geo.lon=this.longitude;
  895. this.$api.public.friends(this.recommendListOptions).then(res=>{
  896. if(res.status==='Succ'){
  897. this.recommendTotal=res.data.page.recordCount;
  898. this.recommendListOptions.page.sortValues=res.data.sortValues;
  899. let arr=[],obj={latitude:0,longitude:0};
  900. for(let i=0;i<res.data.users.length;i++){
  901. res.data.users[i].lastActiveTime=this.$moment(new Date()).diff(res.data.users[i].lastActive,'minutes');
  902. obj={latitude:0,longitude:0};
  903. obj.latitude=res.data.users[i].geo.lat;
  904. obj.longitude=res.data.users[i].geo.lon;
  905. arr.push(obj)
  906. }
  907. wxMapSdk.calculateDistance({
  908. mode:'straight',
  909. from:{
  910. latitude: this.latitude,
  911. longitude: this.longitude
  912. },
  913. to:arr,
  914. success:dists=>{
  915. if(dists.message==="query ok"){
  916. for(let j=0;j<dists.result.elements.length;j++){
  917. res.data.users[j].distance=(dists.result.elements[j].distance>1000?`${Math.floor(dists.result.elements[j].distance/100)/10}km`:`${dists.result.elements[j].distance}m`)
  918. }
  919. if(this.recommendListOptions.page.index>1){
  920. this.recommendList=[...this.recommendList,...res.data.users];
  921. }
  922. else{
  923. this.recommendList=res.data.users;
  924. }
  925. this.$forceUpdate();
  926. }
  927. }
  928. })
  929. }
  930. })
  931. },
  932. getNearList(){
  933. let user=JSON.parse(uni.getStorageSync('user'));
  934. this.nearListOptions.type=user.sex==='male'?'MaleNearby':'FamaleNearby';
  935. this.nearListOptions.queryPre.city=this.locationCity;
  936. this.nearListOptions.queryPre.cityCode=this.locationCityCode;
  937. this.nearListOptions.queryPre.geo.lat=this.latitude;
  938. this.nearListOptions.queryPre.geo.lon=this.longitude;
  939. this.$api.public.friends(this.nearListOptions).then(res=>{
  940. if(res.status==='Succ'&&res.data.users.length>0){
  941. this.nearTotal=res.data.page.recordCount;
  942. this.nearListOptions.page.sortValues=res.data.sortValues;
  943. this.showNoData=res.data.users.length===0?true:false;
  944. let arr=[],obj={latitude:0,longitude:0};
  945. for(let i=0;i<res.data.users.length;i++){
  946. res.data.users[i].lastActiveTime=this.$moment(new Date()).diff(res.data.users[i].lastActive,'minutes');
  947. obj={latitude:0,longitude:0};
  948. obj.latitude=res.data.users[i].geo.lat;
  949. obj.longitude=res.data.users[i].geo.lon;
  950. arr.push(obj)
  951. }
  952. wxMapSdk.calculateDistance({
  953. mode:'straight',
  954. from:{
  955. latitude: this.latitude,
  956. longitude: this.longitude
  957. },
  958. to:arr,
  959. success:dists=>{
  960. if(dists.message==="query ok"){
  961. for(let j=0;j<dists.result.elements.length;j++){
  962. res.data.users[j].distance=(dists.result.elements[j].distance>1000?`${Math.floor(dists.result.elements[j].distance/100)/10}km`:`${dists.result.elements[j].distance}m`)
  963. }
  964. if(this.nearListOptions.page.index>1){
  965. this.nearList=[...this.nearList,...res.data.users];
  966. }
  967. else{
  968. this.nearList=res.data.users;
  969. }
  970. this.$forceUpdate();
  971. }
  972. }
  973. })
  974. }
  975. else{
  976. this.showNoData=this.nearList.length===0?true:false;
  977. }
  978. })
  979. },
  980. toDetail(id){
  981. if(!uni.getStorageSync('token')){
  982. this.popup={
  983. content1:'您还未登录',
  984. content2:'该功能登录后才能使用',
  985. tip1:'',
  986. tip2:'',
  987. btntext:'去登录'
  988. }
  989. this.$refs.popup.open();
  990. return;
  991. }
  992. uni.showLoading({})
  993. let user=JSON.parse(uni.getStorageSync('user'));
  994. this.$api.public.userDetail({getAlbum:true,completeUser:user,uponUserId:id}).then(res=>{
  995. if(res.data.frozen){
  996. uni.showToast({
  997. title:'该用户已被冻结',
  998. icon:'none'
  999. });
  1000. return;
  1001. }
  1002. if(res.data.sex===user.sex){
  1003. uni.showToast({
  1004. title:'同性用户不能查看主页',
  1005. icon:'none'
  1006. })
  1007. }
  1008. else{
  1009. this.otherInfo=res.data;
  1010. uni.hideLoading();
  1011. uni.navigateTo({
  1012. url:`/pages/friends/user?id=${id}`
  1013. })
  1014. }
  1015. })
  1016. },
  1017. }
  1018. }
  1019. </script>
  1020. <style lang="scss" scoped>
  1021. .container {
  1022. width: 100vw;
  1023. min-height: 100vh;
  1024. background-color: $bgcolor1;
  1025. overflow: hidden;
  1026. .topnav {
  1027. margin: 0 60rpx;
  1028. align-items: center;
  1029. position: relative;
  1030. .nav-item {
  1031. color: $fontcolor3;
  1032. margin-right: 72rpx;
  1033. transition: all 0.3s;
  1034. padding: 0 10rpx;
  1035. .nav-item-text{
  1036. position: relative;
  1037. z-index: 1;
  1038. }
  1039. }
  1040. .nav-search{
  1041. width:56rpx;
  1042. height: 56rpx;
  1043. margin-left: 110rpx;
  1044. }
  1045. .nav-item-bg{
  1046. position: absolute;
  1047. left: 0;
  1048. bottom: 10rpx;
  1049. width: 92rpx;
  1050. height: 68rpx;
  1051. z-index: 0;
  1052. transition: all .3s;
  1053. }
  1054. }
  1055. .location{
  1056. margin-top: 40rpx;
  1057. padding: 12rpx;
  1058. background-color: $bgcolor3;
  1059. border-radius: 36rpx;
  1060. .l-pos{
  1061. width: 32rpx;
  1062. height: 32rpx;
  1063. }
  1064. .l-text{
  1065. color: $fontcolor2;
  1066. flex: 1;
  1067. text-align: left;
  1068. margin-left: 8rpx;
  1069. }
  1070. .l-open{
  1071. width: 88rpx;
  1072. height: 48rpx;
  1073. border-radius: 24rpx;
  1074. line-height: 48rpx;
  1075. text-align: center;
  1076. background-color: $primary;
  1077. color: $fontcolor5;
  1078. }
  1079. }
  1080. .scroll-view{
  1081. padding: 24rpx 32rpx 0rpx 32rpx;
  1082. box-sizing: border-box;
  1083. .tops-bg{
  1084. width: 100%;
  1085. height: 100%;
  1086. position: absolute;
  1087. left: 0;
  1088. top: 0;
  1089. z-index: 0;
  1090. }
  1091. .tops-nav{
  1092. position: relative;
  1093. height: 86rpx;
  1094. z-index: 1;
  1095. .tops-nav-item{
  1096. width: 160rpx;
  1097. text-align: center;
  1098. color: $fontcolor3;
  1099. }
  1100. .tops-nav-item-active{
  1101. color: $fontcolor5 !important;
  1102. }
  1103. .tops-line{
  1104. width: 24rpx;
  1105. height: 4rpx;
  1106. background: $fontcolor5;
  1107. border-radius: 2rpx;
  1108. position: absolute;
  1109. bottom: 0;
  1110. transition: all 0.3s;
  1111. }
  1112. }
  1113. .swiper{
  1114. height: 396rpx;
  1115. .swiper-item{
  1116. height: 100%;
  1117. .tops{
  1118. position: relative;
  1119. height: 100%;
  1120. flex-direction: column;
  1121. .tops-third{
  1122. height: 100%;
  1123. .tt-item{
  1124. position: relative;
  1125. flex-direction: column;
  1126. height: 100%;
  1127. width: 208rpx;
  1128. .tt-item-bg{
  1129. width: 196rpx;
  1130. height: 208rpx;
  1131. background: linear-gradient(180deg, rgba(226,226,226,0.1000) 0%, rgba(226,226,226,0) 100%);
  1132. border-radius: 16rpx 16rpx 0rpx 0rpx;
  1133. position: absolute;
  1134. bottom: 0;
  1135. }
  1136. .tt-item-bg-center{
  1137. width: 196rpx;
  1138. height: 248rpx;
  1139. background: linear-gradient(180deg, rgba(255,236,54,0.1000) 0%, rgba(255,236,54,0) 100%);
  1140. border-radius: 16rpx 16rpx 0rpx 0rpx;
  1141. position: absolute;
  1142. bottom: 0;
  1143. }
  1144. .tt-item-img{
  1145. width: 92rpx;
  1146. height: 40rpx;
  1147. transform: translateY(20rpx);
  1148. position: relative;
  1149. z-index:20;
  1150. }
  1151. .tt-item-img-border{
  1152. width: 196rpx;
  1153. height: 192rpx;
  1154. position: absolute;
  1155. left: 0;
  1156. right: 0;
  1157. margin: auto;
  1158. transform: translateY(-30rpx);
  1159. }
  1160. .tt-item-head-box{
  1161. width: 136rpx;
  1162. height: 136rpx;
  1163. border-radius: 68rpx;
  1164. position: relative;
  1165. z-index: 10;
  1166. }
  1167. .tt-item-name{
  1168. width: 136rpx;
  1169. height: 40rpx;
  1170. text-align: center;
  1171. line-height: 40rpx;
  1172. color: $fontcolor5;
  1173. margin-bottom: 16rpx;
  1174. margin-top: 14rpx;
  1175. }
  1176. .tt-item-num-box{
  1177. .tt-item-num-img{
  1178. width: 32rpx;
  1179. height: 32rpx;
  1180. }
  1181. .tt-item-num-text{
  1182. color: $fontcolor5;
  1183. margin-left: 8rpx;
  1184. }
  1185. }
  1186. }
  1187. }
  1188. }
  1189. }
  1190. }
  1191. .list-item{
  1192. flex-wrap: wrap;
  1193. padding: 40rpx 0rpx;
  1194. .list-head-box{
  1195. width: 136rpx;
  1196. height: 136rpx;
  1197. position: relative;
  1198. .list-head-img{
  1199. width: 136rpx;
  1200. height: 136rpx;
  1201. background-color: #ffffff;
  1202. border-radius: 136rpx;
  1203. }
  1204. .list-head-dot{
  1205. width: 24rpx;
  1206. height: 24rpx;
  1207. border-radius: 24rpx;
  1208. position: absolute;
  1209. background-color: aqua;
  1210. bottom: 2rpx;
  1211. right: 2rpx;
  1212. border: 2rpx solid $bgcolor2;
  1213. }
  1214. }
  1215. .list-info-box{
  1216. box-sizing: border-box;
  1217. width: 544rpx;
  1218. padding-left: 32rpx;
  1219. height: 136rpx;
  1220. flex-direction: column;
  1221. display: flex;
  1222. justify-content: flex-start;
  1223. align-items: flex-start;
  1224. .name-box{
  1225. width: 100%;
  1226. .name{
  1227. .name-text{
  1228. color: $fontcolor5;
  1229. }
  1230. .name-img{
  1231. width: 68rpx;
  1232. height: 32rpx;
  1233. margin-left: 8rpx;
  1234. }
  1235. .name-img-godness{
  1236. width: 76rpx;
  1237. height: 40rpx;
  1238. margin-left: 8rpx;
  1239. transform: translateY(-5rpx);
  1240. }
  1241. }
  1242. .distance{
  1243. color: $fontcolor3;
  1244. }
  1245. }
  1246. .sex-box{
  1247. padding: 0 15rpx;
  1248. height: 32rpx;
  1249. background: rgba(226, 53, 104, 0.2);
  1250. border-radius: 25rpx;
  1251. margin-top: 12rpx;
  1252. .sex-img{
  1253. width: 24rpx;
  1254. height: 24rpx;
  1255. }
  1256. .sex-text1{
  1257. color:#E23568;
  1258. margin-left: 4rpx;
  1259. }
  1260. .sex-text2{
  1261. color:#6C52F4;
  1262. margin-left: 4rpx;
  1263. }
  1264. }
  1265. .tip-box{
  1266. color: $fontcolor3;
  1267. width: 100%;
  1268. margin-top: 10rpx;
  1269. }
  1270. }
  1271. .img-box{
  1272. width: 544rpx;
  1273. height: 168rpx;
  1274. margin-left: 168rpx;
  1275. margin-top: 24rpx;
  1276. .ib1{
  1277. width: 168rpx;
  1278. height: 168rpx;
  1279. border-radius: 16rpx 0rpx 0rpx 16rpx;
  1280. background: $fontcolor5;
  1281. }
  1282. .ib2{
  1283. width: 168rpx;
  1284. height: 168rpx;
  1285. background: $fontcolor5;
  1286. }
  1287. .ib3{
  1288. width: 168rpx;
  1289. height: 168rpx;
  1290. border-radius: 0rpx 16rpx 16rpx 0rpx;
  1291. background: $fontcolor5;
  1292. }
  1293. }
  1294. }
  1295. }
  1296. }
  1297. </style>