user.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  1. <template>
  2. <view class="container" ref="container">
  3. <!-- @touchmove.stop.prevent="moveStop" -->
  4. <view id="topnav" class="topnav flex-start" :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`,'background-color':`rgba(21, 17, 38,${topNavAlpha})`}" v-if="!cover.isFullScreen">
  5. <view class="nav-item" @click="back">
  6. <image :src="`${assetsUrl}back.png`" mode="widthFix" class="nav-img"></image>
  7. </view>
  8. </view>
  9. <uni-popup ref="popup" type="center">
  10. <Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closePopup" @toService="toService" :btnEvent="'toService'"></Popup>
  11. </uni-popup>
  12. <uni-popup ref="vippopup" type="center">
  13. <VipPopup :swiperIndex="vipPopupIndex" @closePopup="closeVipPopup"></VipPopup>
  14. </uni-popup>
  15. <uni-popup ref="paypopup" type="bottom" :safe-area="false">
  16. <PayPopup :swiperIndex="payPopupIndex" @closePopup="closePayPopup"></PayPopup>
  17. </uni-popup>
  18. <view class="video-box" :style="{'height':`${cover.isFullScreen?'100vh':'680rpx'}`,'position':`${cover.isFullScreen?'fixed':'relative'}`}" @click.prevent="videoAction">
  19. <video
  20. :src="cover.url"
  21. class="m-video" autoplay loop :controls="false"
  22. muted
  23. object-fit="cover"
  24. v-if="cover.cate==='video'"
  25. :enable-progress-gesture="false"
  26. @touchstart="touchStart" @touchend="touchEnd"
  27. :style="{'height':`${cover.isFullScreen?'100vh':'680rpx'}`,'position':`${cover.isFullScreen?'fixed':'relative'}`}">
  28. <view class="video-inner flex-center" v-if="!cover.isFullScreen">
  29. <view class="head-box">
  30. <image :src="userInfo.iconThumbnail" mode="aspectFill" class="head-img"></image>
  31. <view class="head-active" style="background-color: #38E825;" v-if="userInfo.lastActiveTime<=30"></view>
  32. <view class="head-active" style="background-color: #0ABDEF;" v-else-if="userInfo.lastActiveTime>30&&userInfo.lastActiveTime<=1440"></view>
  33. </view>
  34. <view class="name-box flex-center">
  35. <view class="name fw600 font44">
  36. {{userInfo.nick}}
  37. </view>
  38. </view>
  39. <view class="age-box fw600 font28">
  40. {{userInfo.ageInfo.age}}岁&nbsp;丨&nbsp;{{userInfo.career}}
  41. </view>
  42. <view class="city-box flex-center" >
  43. <image :src="`${assetsUrl}user-pos.png`" mode="aspectFit" class="city-pos"></image>
  44. <view class="city font24 fw500">
  45. {{userInfo.currCity}}<text v-if="userInfo.distance&&userInfo.distance!=='NaNm'">&nbsp;·&nbsp;{{userInfo.distance}}</text>
  46. </view>
  47. </view>
  48. <view class="video-edit flex-start" v-if="likeNum>0" @click="likeAction">
  49. <image :src="`${assetsUrl}user-heart${isLiked?'3':'2'}.png`" mode="aspectFill" class="video-edit-img"></image>
  50. <view class="video-edit-text font22 fw400">
  51. {{likeNum}}
  52. </view>
  53. </view>
  54. </view>
  55. </video>
  56. <view class="m-video" v-else>
  57. <view class="video-inner flex-center" v-if="!cover.isFullScreen">
  58. <view class="head-box">
  59. <image :src="userInfo.iconThumbnail" mode="aspectFill" class="head-img"></image>
  60. <view class="head-active" style="background-color: #38E825;" v-if="userInfo.lastActiveTime<=30"></view>
  61. <view class="head-active" style="background-color: #0ABDEF;" v-else-if="userInfo.lastActiveTime>30&&userInfo.lastActiveTime<=1440"></view>
  62. </view>
  63. <view class="name-box flex-center">
  64. <view class="name fw600 font44" >
  65. {{userInfo.nick}}
  66. </view>
  67. </view>
  68. <view class="age-box fw600 font28">
  69. {{userInfo.ageInfo.age}}岁&nbsp;丨&nbsp;{{userInfo.career}}
  70. </view>
  71. <view class="city-box flex-center">
  72. <image :src="`${assetsUrl}user-pos.png`" mode="aspectFit" class="city-pos"></image>
  73. <view class="city font24 fw500">
  74. {{userInfo.currCity}}<text v-if="userInfo.distance&&userInfo.distance!=='NaNm'">&nbsp;·&nbsp;{{userInfo.distance}}</text>
  75. </view>
  76. </view>
  77. <view class="video-edit flex-start" v-if="likeNum>0" @click="likeAction">
  78. <image :src="`${assetsUrl}user-heart${isLiked?'3':'2'}.png`" mode="aspectFill" class="video-edit-img"></image>
  79. <view class="video-edit-text font22 fw400">
  80. {{likeNum}}
  81. </view>
  82. </view>
  83. </view>
  84. <image :src="cover.url" mode="widthFix" class="cover-inner"></image>
  85. <view class="cover-modal"></view>
  86. </view>
  87. </view>
  88. <view class="info-box" :style="{'top':`${cover.isFullScreen?'100vh':'648rpx'}`}" v-if="!cover.isFullScreen">
  89. <view class="tag-box flex-start">
  90. <view class="tag flex-center">
  91. <image :src="`${assetsUrl}user-height.png`" mode="aspectFill" class="tag-img"></image>
  92. <view class="tag-text font28 fw400">
  93. {{userInfo.height}}cm
  94. </view>
  95. </view>
  96. <view class="tag flex-center">
  97. <image :src="`${assetsUrl}user-weight.png`" mode="aspectFill" class="tag-img"></image>
  98. <view class="tag-text font28 fw400">
  99. {{userInfo.weight}}kg
  100. </view>
  101. </view>
  102. <view class="tag flex-center">
  103. <image :src="`${assetsUrl}user-constellation.png`" mode="aspectFill" class="tag-img"></image>
  104. <view class="tag-text font28 fw400">
  105. {{userInfo.ageInfo.astro}}
  106. </view>
  107. </view>
  108. <!-- <view class="tag flex-center">
  109. <image :src="`${assetsUrl}user-education.png`" mode="aspectFill" class="tag-img"></image>
  110. <view class="tag-text font28 fw400">
  111. 本科
  112. </view>
  113. </view> -->
  114. </view>
  115. <view class="live-box flex-start">
  116. <view class="live-inner flex-start">
  117. <image :src="`${assetsUrl}user-city.png`" mode="aspectFill" class="live-img"></image>
  118. <span class="live font28 fw400">常驻:</span><span class="live font28 fw400" v-for="(item,index) in userInfo.cities" :key="index">{{item}}</span>
  119. </view>
  120. </view>
  121. <view class="desc-box font28 fw400" v-if="userInfo.desc">
  122. <image :src="`${assetsUrl}user-desc.png`" mode="aspectFill" class="desc-img"></image>
  123. {{userInfo.desc}}
  124. </view>
  125. <view class="tab-box flex-start">
  126. <view class="tab-item" @click="tabClick(0)" >
  127. <view class="tab-item-text fw700" :style="{
  128. 'font-size':`${tabIndex===0?'44rpx':'36rpx'}`,
  129. 'color':`${tabIndex===0?'#ffffff':''}`,
  130. 'font-weight':`${tabIndex===0?'#ffffff':''}`}">关于{{userInfo.sex==='Famale'?'她':'他'}}</view>
  131. </view>
  132. <!-- <view class="tab-item" @click="tabClick(1)"
  133. style="margin-left: 72rpx;">
  134. <view class="tab-item-text fw700" :style="{
  135. 'font-size':`${tabIndex===1?'44rpx':'36rpx'}`,
  136. 'color':`${tabIndex===1?'#ffffff':''}`,
  137. 'font-weight':`${tabIndex===1?'#ffffff':''}`}">动态</view>
  138. </view> -->
  139. <image :src="`${assetsUrl}friends-circle.png`" mode="aspectFill" class="tab-item-bg" :style="{'left':`${tabIndex*195+15}rpx`}" ></image>
  140. </view>
  141. <view class="cup-box flex-start">
  142. <view class="cup-item flex-center" v-if="userInfo.realMan">
  143. <image :src="`${assetsUrl}friends-real.png`" mode="aspectFit" class="cup-img" style="width: 76rpx;height: 40rpx;"></image>
  144. <view class="cup-text font24" >
  145. {{userInfo.sex==='Famale'?'她':'他'}}已完成真人认证
  146. </view>
  147. </view>
  148. <view class="cup-item flex-center" v-if="userInfo.vip">
  149. <image :src="`${assetsUrl}friends-vip.png`" mode="aspectFit" class="cup-img" style="width: 76rpx;height: 40rpx;"></image>
  150. <view class="cup-text font24" >
  151. {{userInfo.sex==='Famale'?'她':'他'}}是尊贵的vip用户
  152. </view>
  153. </view>
  154. <!-- <view class="cup-item flex-center">
  155. <image :src="`${assetsUrl}user-cup.png`" mode="aspectFit" class="cup-img" style="width: 40rpx;height: 40rpx;"></image>
  156. <view class="cup-text font24">
  157. 重庆市魅力榜第3名
  158. </view>
  159. </view> -->
  160. <view class="cup-item flex-center" v-if="userInfo.goddess&&userInfo.realMan">
  161. <image :src="`${assetsUrl}user-charm.png`" mode="aspectFit" class="cup-img" style="width: 76rpx;height: 42rpx;"></image>
  162. <view class="cup-text font24">
  163. {{userInfo.sex==='Famale'?'她':'他'}}已完成真人认证且颜值较高
  164. </view>
  165. </view>
  166. <view class="cup-item flex-center" v-if="!userInfo.realMan">
  167. <image :src="`${assetsUrl}user-no-real.png`" mode="aspectFit" class="cup-img" style="width: 76rpx;height: 42rpx;"></image>
  168. <view class="cup-text font24">
  169. {{userInfo.sex==='Famale'?'她':'他'}}未完成真人认证、交友谨慎
  170. </view>
  171. </view>
  172. </view>
  173. <view class="photo-album">
  174. <view class="pics-box flex-center">
  175. <image :src="currentPic.url" mode="widthFix" class="big-pic" v-if="currentPic.cate==='Img'" @click="preview"></image>
  176. <video :src="currentPic.url"
  177. class="big-pic"
  178. autoplay
  179. loop
  180. :controls="false"
  181. muted
  182. object-fit="fill"
  183. v-if="currentPic.cate==='Vdo'"
  184. :style="{'height':`${currentPic.height}px`}"
  185. @click="preview">
  186. </video>
  187. <scroll-view scroll-x="true" class="pics-list flex-start" v-if="pics.length>1">
  188. <view class="pic-item flex-center" v-for="(item,index) in pics" :key="index" @click="picItemClick(index)">
  189. <image :src="item.urlThumbnail" mode="aspectFill" class="pic-img" :class="currentIndex===index?'active-item':''"></image>
  190. </view>
  191. </scroll-view>
  192. <image :src="`${assetsUrl}user-self.png`" mode="aspectFill" class="self" v-if="currentPic.authStatus==='Succ'"></image>
  193. </view>
  194. </view>
  195. <view class="hopes-box" v-if="userInfo.hobbysStr.length>0">
  196. <view class="title">
  197. {{userInfo.sex==='Famale'?'她':'他'}}的标签
  198. </view>
  199. <view class="hopes flex-start">
  200. <view class="hopes-item font28" v-for="(item,index) in userInfo.hobbysStr" :key="index">
  201. {{item}}
  202. </view>
  203. </view>
  204. </view>
  205. <view class="hopes-box" v-if="userInfo.hopesStr.length>0">
  206. <view class="title">
  207. {{userInfo.sex==='Famale'?'她':'他'}}喜欢的
  208. </view>
  209. <view class="hopes flex-start">
  210. <view class="hopes-item font28" v-for="(item,index) in userInfo.hopesStr" :key="index">
  211. {{item}}
  212. </view>
  213. </view>
  214. </view>
  215. </view>
  216. <view class="btn-box flex-between">
  217. <view class="talk-btn flex-center" :style="{'width':`${isLiked?'100%':'320rpx'}`}" @click="toTalk">
  218. <image :src="`${assetsUrl}user-talk.png`" mode="aspectFit" class="btn-icon"></image>
  219. <text class="btn-text font32 fw600">聊一聊</text>
  220. </view>
  221. <view class="like-btn flex-center" style="width: 320rpx;" @click="likeAction" v-if="!isLiked">
  222. <image :src="`${assetsUrl}user-heart1.png`" mode="aspectFit" class="btn-icon"></image>
  223. <text class="btn-text font32 fw600">喜欢TA</text>
  224. </view>
  225. </view>
  226. </view>
  227. </template>
  228. <script>
  229. import TabBar from '@/components/TabBar/TabBar.vue';
  230. import wxMap from '@/static/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.min.js';
  231. import Popup from '@/components/Popup/Popup.vue';
  232. import PayPopup from '@/components/Popup/PayPopup.vue';
  233. import VipPopup from '@/components/Popup/VipPopup.vue';
  234. /**
  235. * 腾讯位置服务,手机账号:18996226740
  236. */
  237. const wxMapSdk=new wxMap({key:'E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII'})
  238. export default {
  239. components:{TabBar,Popup,PayPopup,VipPopup},
  240. data() {
  241. return {
  242. scrollHeight:0,
  243. topNavAlpha:0,
  244. assetsUrl:this.$util.assetsUrl,
  245. startTime:0,
  246. startPosition:0,
  247. endPosition:0,
  248. currentPic:null,
  249. currentIndex:0,
  250. pics:[],
  251. userInfo:null,//用户信息
  252. cover:{
  253. url:'',
  254. cate:'video',
  255. isFullScreen:false
  256. },
  257. labels:[],
  258. hopes:[],
  259. liveCitys:['1','2'],
  260. tabIndex:0,
  261. id:null,
  262. latitude: 0,
  263. longitude: 0,
  264. hobbysEnums:[],
  265. hopesEnums:[],
  266. likeNum:0,
  267. isLiked:false,
  268. popup:{
  269. content1:'',
  270. content2:'',
  271. tip1:'',
  272. tip2:'',
  273. btntext:''
  274. },
  275. payPopupIndex:-1,
  276. vipPopupIndex:-1,
  277. scrollTop:0
  278. };
  279. },
  280. computed: {
  281. statusBarHeight() {
  282. return this.$store.state.statusBarHeight;
  283. },
  284. topbarOffsetHeight() {
  285. return this.$store.state.topbarOffsetHeight;
  286. },
  287. platForm(){
  288. return this.$store.state.platform
  289. },
  290. mineInfo(){
  291. return this.$store.state.userInfo||JSON.parse(uni.getStorageSync('userInfo'))
  292. }
  293. },
  294. onLoad(options) {
  295. this.getConfig();
  296. this.id=options.id;
  297. this.getUserDetail();
  298. this.likeInit();
  299. this.getLikeData();
  300. this.getMineDetail()
  301. },
  302. mounted() {
  303. },
  304. onPageScroll(e) {
  305. this.topNavAlpha=e.scrollTop/250;
  306. this.scrollTop=e.scrollTop;
  307. },
  308. onShareAppMessage(){
  309. return {
  310. title: '糖果公园',
  311. path: `/pages/login/login?share=${this.userInfo.inviteCode}`,
  312. }
  313. },
  314. methods:{
  315. back(){
  316. uni.navigateBack({
  317. delta:1
  318. })
  319. },
  320. moveStop(){
  321. return false
  322. },
  323. closePopup(){
  324. this.$refs.popup.close();
  325. },
  326. closePayPopup(){
  327. this.payPopupIndex=-1;
  328. this.$refs.paypopup.close();
  329. },
  330. closeVipPopup(){
  331. this.vipPopupIndex=-1;
  332. this.$refs.vippopup.close();
  333. },
  334. likeInit(){
  335. let user=JSON.parse(uni.getStorageSync('user'));
  336. this.$api.public.isLike({
  337. completeUser:user,
  338. opte:'Fav',
  339. rdtn:'Do',
  340. uurd:this.id
  341. }).then(res=>{
  342. if(res.data.msg==='该用户已被收藏'){
  343. this.isLiked=true;
  344. }else{
  345. this.$api.public.isLike({
  346. completeUser:user,
  347. opte:'Fav',
  348. rdtn:'Cancel',
  349. uurd:this.id
  350. }).then(result=>{})
  351. }
  352. })
  353. },
  354. toService(){
  355. this.$refs.popup.close();
  356. uni.openCustomerServiceChat({
  357. extInfo:{
  358. url:'https://work.weixin.qq.com/kfid/kfca1b21d2f7e8a18e9',//客服链接
  359. },
  360. corpId:'wwa8f2a0d8a6dc0950',//企业ID
  361. fail(res){
  362. console.log(res)
  363. wx.showToast({
  364. title: '客服联系失败',
  365. icon:'none'
  366. })
  367. }
  368. })
  369. },
  370. likeAction(){
  371. let user=JSON.parse(uni.getStorageSync('user'));
  372. this.$api.public.isLike({
  373. completeUser:user,
  374. opte:'Fav',
  375. rdtn:this.isLiked?'Cancel':'Do',
  376. uurd:this.id
  377. }).then(res=>{
  378. if(res.data.succ){
  379. this.isLiked=!this.isLiked;
  380. if(this.isLiked){
  381. this.likeNum++;
  382. }else{
  383. this.likeNum--;
  384. }
  385. }
  386. })
  387. },
  388. preview(){
  389. let arr=[],obj={};
  390. for(let i=0;i<this.pics.length;i++){
  391. console.log(this.pics[i])
  392. obj={url:'',type:'',width:'',height:''};
  393. if(this.pics[i].cate==='Img'){
  394. obj.type='image';
  395. }
  396. if(this.pics[i].cate==='Vdo'){
  397. obj.type='video';
  398. obj.width=686;
  399. obj.height=this.pics[i].h/(this.pics[i].w/343)*2
  400. }
  401. obj.url=this.pics[i].url;
  402. arr.push(obj)
  403. }
  404. console.log(arr)
  405. uni.previewMedia({
  406. sources:arr,
  407. current:this.currentIndex,
  408. showmenu:true
  409. })
  410. },
  411. tabClick(index){
  412. this.tabIndex=index;
  413. },
  414. touchStart(e){
  415. this.startTime = Date.now()
  416. this.startPosition = e.changedTouches[0].clientY
  417. },
  418. touchEnd(e){
  419. const endTime = Date.now()
  420. if (endTime - this.startTime <100){
  421. return;
  422. }
  423. if (Math.abs(this.endPosition - this.startPosition) > 10){
  424. this.endPosition = e.changedTouches[0].clientY;
  425. let elePosition = this.endPosition - this.startPosition > 0 ? "toBottom": "toTop"
  426. if(elePosition==='toBottom'){
  427. this.cover.isFullScreen=true;
  428. }
  429. else{
  430. this.cover.isFullScreen=false;
  431. }
  432. } else {
  433. return;
  434. }
  435. },
  436. videoAction(){
  437. if(this.cover.isFullScreen){
  438. this.cover.isFullScreen=false;
  439. }
  440. },
  441. getUserDetail(){
  442. let pages = getCurrentPages();
  443. let prevPage = pages[pages.length - 2];
  444. let user=JSON.parse(uni.getStorageSync('user'));
  445. this.userInfo=prevPage.$vm.otherInfo;
  446. this.pics=this.userInfo.medias;
  447. if(user.sex==='Male'){
  448. this.$api.public.seeMaleDetail({completeUser:user,jsjf:this.id}).then(()=>{})
  449. }else if(user.sex==='Famale'){
  450. this.$api.public.seeFamaleDetail({completeUser:user,pusd:this.id}).then(()=>{})
  451. }
  452. this.userInfo.lastActiveTime=this.$moment(new Date()).diff(this.userInfo.lastActive,'minutes');
  453. this.currentPic=this.userInfo.medias[0];
  454. if(this.userInfo.bkg.indexOf('.mp4')!==-1){
  455. this.cover.cate='video';
  456. this.cover.url=this.userInfo.bkg;
  457. }
  458. else{
  459. this.cover.cate='img';
  460. this.cover.url=this.userInfo.bkg;
  461. }
  462. wxMapSdk.calculateDistance({
  463. mode:'straight',
  464. from:{
  465. latitude: this.$store.state.latitude,
  466. longitude: this.$store.state.longitude
  467. },
  468. to:[{
  469. latitude: this.userInfo.geo.lat,
  470. longitude: this.userInfo.geo.lon
  471. }],
  472. success:dists=>{
  473. this.userInfo.distance=(dists.result.elements[0].distance>1000?`${Math.floor(dists.result.elements[0].distance/100)/10}km`:`${dists.result.elements[0].distance}m`)
  474. }
  475. });
  476. if(this.userInfo.hobbies){
  477. let arr=[];
  478. this.userInfo.hobbies.forEach((item,index)=>{
  479. this.hobbysEnums.forEach((sitem,sindex)=>{
  480. if(item===sitem.key&&!arr.includes(sitem.desc)){
  481. arr.push(sitem.desc)
  482. }
  483. })
  484. })
  485. this.userInfo.hobbysStr=arr;
  486. }
  487. if(this.userInfo.wanteds){
  488. let arr=[];
  489. this.userInfo.wanteds.forEach((item,index)=>{
  490. this.hopesEnums.forEach((sitem,sindex)=>{
  491. if(item===sitem.key&&!arr.includes(sitem.desc)){
  492. arr.push(sitem.desc)
  493. }
  494. })
  495. })
  496. this.userInfo.hopesStr=arr;
  497. }
  498. // this.$api.public.userDetail({getAlbum:true,completeUser:user,uponUserId:this.id}).then(res=>{
  499. // if(res.status==='Succ'){
  500. // }
  501. // })
  502. },
  503. picItemClick(index){
  504. this.currentIndex=index;
  505. this.currentPic=this.pics[index];
  506. this.currentPic.height=this.currentPic.h/(this.currentPic.w/343);
  507. this.$nextTick(()=>{
  508. setTimeout(() => { uni.pageScrollTo({scrollTop: this.scrollTop, duration: 0});}, 50);
  509. });
  510. },
  511. getConfig(){
  512. this.$api.public.config({tscsj:['Hobbys','Hopes']}).then(res=>{
  513. this.hobbysEnums=res.data.hobbys;
  514. this.hopesEnums=res.data.hopes;
  515. }).catch(err=>{
  516. console.log(err)
  517. })
  518. },
  519. getLikeData(){
  520. let user=JSON.parse(uni.getStorageSync('user'));
  521. this.$api.public.userData({
  522. completeUser:user,
  523. listType:'FavsForMe',
  524. page:{
  525. index:1,
  526. size:20,
  527. sortValues:[]
  528. },
  529. uponUserId:this.id
  530. }).then(res=>{
  531. this.likeNum=res.data;
  532. })
  533. },
  534. toTalk(){
  535. console.log(this.userInfo,this.mineInfo);
  536. if(this.mineInfo.sex==='Male'&&!this.mineInfo.vip){
  537. if(this.platForm==='ios'){
  538. this.vipPopupIndex=0;
  539. this.$refs.vippopup.open();
  540. }else{
  541. this.payPopupIndex=0;
  542. this.$refs.paypopup.open();
  543. }
  544. return;
  545. }
  546. if(this.mineInfo.sex==='Famale'&&!this.mineInfo.realMan){
  547. this.popup={
  548. content1:'认证后才能开启私聊哦',
  549. content2:'给客服回复关键词「真人认证」',
  550. tip1:'',
  551. tip2:'',
  552. btntext:'联系客服去认证'
  553. }
  554. this.$refs.popup.open();
  555. return;
  556. }
  557. uni.navigateTo({
  558. url:`/pagesSub/chatting/chatting?conversationid=C2C${this.userInfo.id}`
  559. })
  560. },
  561. getMineDetail(){
  562. let user=JSON.parse(uni.getStorageSync('user'));
  563. this.$api.public.mineDetail({
  564. getAlbum:true,
  565. completeUser:user
  566. }).then(res=>{
  567. this.$store.commit('setUserInfo',res.data);
  568. uni.setStorageSync('userInfo',JSON.stringify(res.data));//正式环境删除
  569. })
  570. },
  571. }
  572. }
  573. </script>
  574. <style lang="scss" scoped>
  575. .container{
  576. width: 100vw;
  577. height: 100vh;
  578. background-color: $bgcolor1;
  579. position: relative;
  580. .topnav {
  581. padding: 0 10rpx;
  582. position: fixed;
  583. top: 0;
  584. left: 0;
  585. width: 100vw;
  586. z-index: 100;
  587. backdrop-filter: blur(10px);
  588. .nav-item {
  589. width: 40rpx;
  590. height: 40rpx;
  591. margin-left: 16rpx;
  592. .nav-img{
  593. width: 40rpx;
  594. height: 40rpx;
  595. }
  596. }
  597. .nav-edit{
  598. width:120rpx;
  599. height: 56rpx;
  600. border-radius: 56rpx;
  601. color: $fontcolor5;
  602. line-height: 56rpx;
  603. text-align: center;
  604. background-color: rgba(0, 0, 0, 0.5);
  605. }
  606. }
  607. .video-box{
  608. width: 100vw;
  609. transition: all 0.3s;
  610. .m-video{
  611. width: 100vw;
  612. position: relative;
  613. .video-inner{
  614. flex-direction: column;
  615. height: 680rpx;
  616. transform: translateY(30rpx);
  617. position: relative;
  618. z-index: 10;
  619. .head-box{
  620. position: relative;
  621. width: 168rpx;
  622. height: 168rpx;
  623. border-radius: 72rpx;
  624. .head-img{
  625. width: 168rpx;
  626. height: 168rpx;
  627. border-radius: 72rpx;
  628. border: 4rpx solid #FFFFFF;
  629. }
  630. .head-active{
  631. width: 24rpx;
  632. height: 24rpx;
  633. border-radius: 24rpx;
  634. position: absolute;
  635. bottom: 0;
  636. right: 0;
  637. }
  638. }
  639. .name-box{
  640. height: 60rpx;
  641. margin-top: 24rpx;
  642. .name{
  643. color: $fontcolor5;
  644. height: 60rpx;
  645. line-height: 60rpx;
  646. }
  647. }
  648. .age-box{
  649. color: $fontcolor5;
  650. height: 40rpx;
  651. line-height: 40rpx;
  652. }
  653. .city-box{
  654. height: 34rpx;
  655. .city-pos{
  656. width: 24rpx;
  657. height: 24rpx;
  658. margin-right: 4rpx;
  659. }
  660. .city{
  661. height: 34rpx;
  662. line-height: 34rpx;
  663. color: $fontcolor5;
  664. }
  665. }
  666. .video-edit{
  667. position: absolute;
  668. bottom: 80rpx;
  669. right: 32rpx;
  670. height: 48rpx;
  671. background-color:rgba(0, 0, 0, 0.5);
  672. padding: 0 20rpx;
  673. border-radius: 48rpx;
  674. z-index: 6;
  675. .video-edit-img{
  676. width: 24rpx;
  677. height: 24rpx;
  678. margin-right: 4rpx;
  679. }
  680. .video-edit-text{
  681. margin-left: 16rpx;
  682. line-height: 48rpx;
  683. color: $fontcolor5;
  684. }
  685. }
  686. }
  687. .cover-inner{
  688. width: 100vw;
  689. height: 680rpx;
  690. position: absolute;
  691. top: 0;
  692. z-index: 4;
  693. }
  694. .cover-modal{
  695. position: absolute;
  696. top: 0;
  697. width: 100vw;
  698. height: 680rpx;
  699. z-index: 5;
  700. background: rgba(0,0,0,0.4);
  701. backdrop-filter: blur(20rpx);
  702. }
  703. }
  704. }
  705. .info-box{
  706. position: absolute;
  707. z-index: 20;
  708. left: 0;
  709. width: 100vw;
  710. padding-bottom: 300rpx;
  711. background-color: $bgcolor1;
  712. transition: top .3s;
  713. border-radius: 40rpx 40rpx 0rpx 0rpx;
  714. .tag-box{
  715. margin: 48rpx 32rpx;
  716. .tag{
  717. width: 164rpx;
  718. height: 96rpx;
  719. background-color: $bgcolor3;
  720. border-radius: 24rpx;
  721. margin-right: 10rpx;
  722. .tag-img{
  723. width: 32rpx;
  724. height: 32rpx;
  725. }
  726. .tag-text{
  727. color: $fontcolor5;
  728. margin-left: 4rpx;
  729. }
  730. }
  731. }
  732. .live-box{
  733. margin: 24rpx 32rpx 0rpx 32rpx;
  734. .live-inner{
  735. padding: 28rpx;
  736. background-color: $bgcolor3;
  737. max-width: 100%;
  738. border-radius: 24rpx;
  739. flex-wrap: wrap;
  740. .live-img{
  741. width: 32rpx;
  742. height: 32rpx;
  743. display: inline;
  744. }
  745. .live{
  746. padding: 2rpx 16rpx;
  747. color: $fontcolor5;
  748. }
  749. }
  750. }
  751. .desc-box{
  752. padding: 56rpx 48rpx 56rpx 72rpx;
  753. margin: 56rpx 32rpx 0rpx 32rpx;
  754. position: relative;
  755. background: linear-gradient(180deg, #1F1A30 0%, #151126 100%);
  756. color: $fontcolor5;
  757. .desc-img{
  758. position: absolute;
  759. left: 0;
  760. top: -40rpx;
  761. width: 88rpx;
  762. height: 88rpx;
  763. }
  764. }
  765. .tab-box{
  766. margin: 66rpx 32rpx 0rpx 32rpx;
  767. position: relative;
  768. align-items: baseline;
  769. min-height: 76rpx;
  770. .tab-item{
  771. width: 144rpx;
  772. .tab-item-text{
  773. height: 100%;
  774. line-height: 70rpx;
  775. position: relative;
  776. z-index: 1;
  777. color: $fontcolor3;
  778. transition: all 0.3s;
  779. }
  780. }
  781. .tab-item-bg{
  782. position: absolute;
  783. left: 0;
  784. bottom: 10rpx;
  785. width: 96rpx;
  786. height: 68rpx;
  787. padding: 0rpx 5rpx;
  788. z-index: 0;
  789. transition: all .3s;
  790. }
  791. }
  792. .cup-box{
  793. flex-wrap: wrap;
  794. margin: 24rpx 32rpx 0rpx 32rpx;
  795. .cup-item{
  796. height: 56rpx;
  797. background-color: $bgcolor4;
  798. border-radius: 28rpx;
  799. margin-right: 20rpx;
  800. margin-top: 20rpx;
  801. padding: 0rpx 20rpx;
  802. .cup-img{
  803. }
  804. .cup-text{
  805. display: inline;
  806. color: $fontcolor5;
  807. margin-left: 8rpx;
  808. }
  809. }
  810. }
  811. .photo-album{
  812. margin: 56rpx 32rpx 0rpx 32rpx;
  813. .pa-box{
  814. .pa-title{
  815. color: $fontcolor5;
  816. }
  817. .pa-tip{
  818. color: $fontcolor3;
  819. }
  820. }
  821. .pics-box{
  822. width: 100%;
  823. border-radius: 16rpx;
  824. margin-top: 26rpx;
  825. position: relative;
  826. margin-bottom: 30rpx;
  827. overflow: hidden;
  828. .self{
  829. position: absolute;
  830. width: 72rpx;
  831. height: 40rpx;
  832. right: 24rpx;
  833. top: 24rpx;
  834. z-index: 100;
  835. }
  836. .big-pic{
  837. width: 100%;
  838. border-radius: 40rpx;
  839. }
  840. .pics-list{
  841. width: 100%;
  842. height: 186rpx;
  843. position: absolute;
  844. bottom: -35rpx;
  845. white-space:nowrap;
  846. transform: translateY(-20rpx);
  847. .pic-item{
  848. display: inline-block;
  849. width: 96rpx;
  850. height: 128rpx;
  851. border-radius: 16rpx;
  852. margin-left: 16rpx;
  853. box-shadow:0rpx 0rpx 10rpx 1rpx #151126;
  854. transform: translateY(10rpx);
  855. &:nth-last-of-type(1){
  856. margin-right: 16rpx;
  857. }
  858. .pic-img{
  859. width: 96rpx;
  860. height: 128rpx;
  861. border-radius: 16rpx;
  862. box-sizing: border-box;
  863. border: 4rpx solid transparent;
  864. transition: all 0.3s;
  865. }
  866. }
  867. .active-item{
  868. border: 4rpx solid #ffffff !important;
  869. }
  870. }
  871. }
  872. }
  873. .hopes-box{
  874. margin: 56rpx 32rpx;
  875. .title{
  876. color: $fontcolor5;
  877. margin-bottom: 12rpx;
  878. }
  879. .hopes{
  880. flex-wrap: wrap;
  881. .hopes-item{
  882. padding: 12rpx 20rpx;
  883. border-radius: 16rpx;
  884. color: $fontcolor3;
  885. background-color: $bgcolor3;
  886. margin-left: 20rpx;
  887. margin-top: 20rpx;
  888. &:nth-of-type(1){
  889. margin-left: 0rpx;
  890. }
  891. }
  892. }
  893. }
  894. }
  895. .btn-box{
  896. padding: 0rpx 32rpx;
  897. width: 100vw;
  898. box-sizing: border-box;
  899. position: fixed;
  900. z-index:20;
  901. bottom: 100rpx;
  902. .talk-btn{
  903. margin-right: 12rpx;
  904. height: 104rpx;
  905. background: $primary;
  906. border-radius: 52rpx;
  907. }
  908. .like-btn{
  909. margin-left: 12rpx;
  910. height: 104rpx;
  911. background: linear-gradient(133deg, #FA5C74 0%, #BC55BF 53%, #8A4FFF 100%);
  912. border-radius: 52rpx;
  913. }
  914. .btn-icon{
  915. width: 40rpx;
  916. height: 40rpx;
  917. }
  918. .btn-text{
  919. color: $fontcolor5;
  920. margin-left: 8rpx;
  921. }
  922. }
  923. }
  924. </style>