friends.vue 42 KB

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