mine.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. <template>
  2. <view class="container">
  3. <TabBar :tabIndex="tabIndex" v-if="!cover.isFullScreen"></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" @toService="toService" :btnEvent="'toService'"></Popup>
  6. </uni-popup>
  7. <uni-popup ref="paypopup" type="bottom" :safe-area="false">
  8. <PayPopup :swiperIndex="payPopupIndex" @closePopup="closePayPopup"></PayPopup>
  9. </uni-popup>
  10. <uni-popup ref="loginpopup" type="center">
  11. <Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closeLoginPopup" @toLogin="toLogin" :btnEvent="'toLogin'"></Popup>
  12. </uni-popup>
  13. <uni-popup ref="vippopup" type="center">
  14. <VipPopup :swiperIndex="vipPopupIndex" @closePopup="closeVipPopup"></VipPopup>
  15. </uni-popup>
  16. <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">
  17. <!-- <view class="nav-item">
  18. <image :src="`${assetsUrl}mine-home.png`" mode="widthFix" class="nav-img"></image>
  19. </view> -->
  20. <view class="nav-item" @click="toService">
  21. <image :src="`${assetsUrl}mine-service.png`" mode="widthFix" class="nav-img"></image>
  22. </view>
  23. <view class="nav-item" @click="toSetting">
  24. <image :src="`${assetsUrl}mine-setting.png`" mode="widthFix" class="nav-img"></image>
  25. </view>
  26. <view class="nav-item nav-edit font20 fw400" @click="toEdit">
  27. 编辑资料
  28. </view>
  29. </view>
  30. <scroll-view scroll-y="true" v-if="scrollHeight>0" :style="{'height':`${scrollHeight}px`}" @scroll="handleScroll">
  31. <!-- 'z-index':`${cover.isFullScreen?1011:10}` -->
  32. <view class="video-box" :style="{'height':`${cover.isFullScreen?'100vh':'680rpx'}`,'position':`${cover.isFullScreen?'fixed':'relative'}`}" @click.prevent="videoAction">
  33. <video
  34. :src="cover.url"
  35. class="m-video" autoplay loop :controls="false"
  36. muted
  37. object-fit="cover"
  38. v-if="cover.cate==='video'"
  39. @touchstart="touchStart" @touchend="touchEnd"
  40. :enable-progress-gesture="false"
  41. :style="{'height':`${cover.isFullScreen?'100vh':'680rpx'}`,'position':`${cover.isFullScreen?'fixed':'relative'}`}">
  42. <view class="video-inner flex-center" v-if="!cover.isFullScreen">
  43. <image :src="userInfo.iconThumbnail||defaulHead" mode="aspectFill" class="head-img" ></image>
  44. <view class="name-box flex-center">
  45. <view class="name fw600 font44">
  46. {{userInfo.nick||'未登录'}}
  47. </view>
  48. <image :src="`${assetsUrl}friends-vip.png`" mode="aspectFit" class="name-img" v-if="userInfo.vip"></image>
  49. <image :src="`${assetsUrl}friends-godness.png`" mode="aspectFit" class="name-img" v-else-if="userInfo.goddess"></image>
  50. <image :src="`${assetsUrl}friends-realMan.png`" mode="aspectFit" class="name-img" v-else-if="userInfo.real"></image>
  51. </view>
  52. <view class="video-edit flex-start" @click="toEditVideo">
  53. <image :src="`${assetsUrl}mine-edit.png`" mode="aspectFill" class="video-edit-img"></image>
  54. <view class="video-edit-text font22 fw400">
  55. 修改封面视频
  56. </view>
  57. </view>
  58. </view>
  59. </video>
  60. <view class="m-video" v-else>
  61. <view class="video-inner flex-center" v-if="!cover.isFullScreen">
  62. <image :src="userInfo.iconThumbnail||defaulHead" mode="aspectFill" class="head-img" @click="toLogin"></image>
  63. <view class="name-box flex-center">
  64. <view class="name fw600 font44">
  65. {{userInfo.nick||'未登录'}}
  66. </view>
  67. <image :src="`${assetsUrl}friends-vip.png`" mode="aspectFit" class="name-img" v-if="userInfo.vip"></image>
  68. <image :src="`${assetsUrl}friends-godness.png`" mode="aspectFit" class="name-img" v-else-if="userInfo.goddess"></image>
  69. <image :src="`${assetsUrl}friends-realMan.png`" mode="aspectFit" class="name-img" v-else-if="userInfo.real"></image>
  70. </view>
  71. <view class="video-edit flex-start" @click="toEditVideo">
  72. <image :src="`${assetsUrl}mine-edit.png`" mode="aspectFill" class="video-edit-img"></image>
  73. <view class="video-edit-text font22 fw400">
  74. 修改封面视频
  75. </view>
  76. </view>
  77. </view>
  78. <image :src="cover.url||defaulHead" mode="widthFix" class="cover-inner"></image>
  79. <view class="cover-modal"></view>
  80. </view>
  81. </view>
  82. <view class="info-box" :style="{'top':`${cover.isFullScreen?'100vh':'648rpx'}`}" v-if="!cover.isFullScreen">
  83. <view class="tabs flex-between">
  84. <view class="tab-item flex-center" v-for="(item,index) in tabs" :key="index" @click="toPath(item.path,item.name)">
  85. <view class="tab-num font36 fw700">
  86. {{item.num}}
  87. <span class="tab-dot fw400 font22" v-if="item.dotnum>0">
  88. {{item.dotnum}}
  89. </span>
  90. </view>
  91. <view class="tab-text font20 fw400">
  92. {{item.name}}
  93. </view>
  94. </view>
  95. </view>
  96. <view class="vip-box flex-between" @click="toVip" v-if="userInfo.sex==='Male'">
  97. <view class="vip-left flex-start">
  98. <image :src="`${assetsUrl}mine-vip.png`" mode="aspectFill" class="vip-img"></image>
  99. <view class="vl-box flex-center">
  100. <image :src="`${assetsUrl}mine-vip-text.png`" mode="aspectFill" class="vl-img"></image>
  101. <view class="vl-text font24 fw400" v-if="userInfo.vip">
  102. 有效期至{{userInfo.memExpire.split(' ')[0]}}
  103. </view>
  104. <view class="vl-text font24 fw400" v-else-if="userInfo.hisVip">
  105. 您的VIP已经过期啦
  106. </view>
  107. <view class="vl-text font24 fw400" v-else>
  108. 会员中心
  109. </view>
  110. </view>
  111. </view>
  112. <view class="vip-right font22 fw600">
  113. 立即{{userInfo.vip?'续费':'开通'}}
  114. </view>
  115. </view>
  116. <view class="cards flex-center">
  117. <view class="card-item flex-center" :class="item.class" v-for="(item,index) in cards" :key="index" @click="toCardsPath(item.path)">
  118. <view class="ci-title font32 fw600">
  119. {{item.title}}
  120. </view>
  121. <view class="ci-tip font22 fw400">
  122. {{item.tip}}
  123. </view>
  124. <image :src="`${assetsUrl}${item.bgImg}`" mode="aspectFit" class="ci-bg"></image>
  125. </view>
  126. </view>
  127. <view class="photo-album">
  128. <view class="pa-box flex-between">
  129. <view class="pa-title font32 fw600">
  130. 我的相册
  131. </view>
  132. <view class="pa-tip font22 fw600" @click="toAlbum">
  133. 编辑相册
  134. </view>
  135. </view>
  136. <view class="pics-box flex-center" v-if="pics.length>0">
  137. <image :src="currentPic.url" mode="widthFix" class="big-pic" v-if="currentPic.cate==='Img'" @click="preview"></image>
  138. <video :src="currentPic.url" class="big-pic"
  139. autoplay
  140. loop
  141. :controls="false"
  142. muted
  143. object-fit="fill"
  144. v-if="currentPic.cate==='Vdo'"
  145. :style="{'height':`${currentPic.height}px`}"
  146. @click="preview">
  147. </video>
  148. <scroll-view scroll-x="true" class="pics-list flex-start" v-if="pics.length>1">
  149. <view class="pic-item flex-center" v-for="(item,index) in pics" :key="index" @click="picItemClick(index)">
  150. <image :src="item.urlThumbnail" mode="aspectFill" class="pic-img" :class="currentIndex===index?'active-item':''"></image>
  151. </view>
  152. </scroll-view>
  153. <image :src="`${assetsUrl}user-self.png`" mode="aspectFill" class="self" v-if="currentPic.authStatus==='Succ'"></image>
  154. </view>
  155. <view class="no-pics-box" v-else>
  156. <view class="np-title font36 fw600">
  157. 添加你的第一张照片吧!
  158. </view>
  159. <view class="np-tip font28 fw400">
  160. 分享给懂你的人
  161. </view>
  162. <view class="np-btn" @click="toAlbum">
  163. 添加照片
  164. </view>
  165. <image :src="`${assetsUrl}mine-no-images.png`" mode="aspectFill" class="np-bg"></image>
  166. </view>
  167. </view>
  168. <!-- <view class="wechat-oa">
  169. <official-account></official-account>
  170. </view> -->
  171. <!-- <view class="null-box"></view> -->
  172. </view>
  173. </scroll-view>
  174. </view>
  175. </template>
  176. <script>
  177. import TabBar from '@/components/TabBar/TabBar.vue';
  178. import Popup from '@/components/Popup/Popup.vue';
  179. import VipPopup from '@/components/Popup/VipPopup.vue';
  180. import PayPopup from '@/components/Popup/PayPopup.vue';
  181. export default {
  182. components:{TabBar,Popup,VipPopup,PayPopup},
  183. data() {
  184. return {
  185. scrollHeight:0,
  186. topNavAlpha:0,
  187. assetsUrl:this.$util.assetsUrl,
  188. defaulHead:`${this.$util.assetsUrl}default-head.png`,
  189. startTime:0,
  190. startPosition:0,
  191. endPosition:0,
  192. tabIndex:2,
  193. tabs:[
  194. {name:'异性访客',num:0,dotnum:0,path:'/pages/mine/guest?pagetype=VisitForMe&name=异性访客'},
  195. {name:'喜欢我的',num:0,dotnum:0,path:'/pages/mine/guest?pagetype=FavsForMe&name=喜欢我的'},
  196. {name:'我喜欢的',num:0,dotnum:0,path:'/pages/mine/guest?pagetype=MyFavs&name=我喜欢的'},
  197. {name:'我看过的',num:0,dotnum:0,path:'/pages/mine/guest?pagetype=MyVisit&name=我看过的'},
  198. ],
  199. cards:[
  200. // {title:'邀请好友',tip:'领取vip时长',bgImg:'mine-gift.png',class:"card1",path:"/pages/webView/webView?url=https://promote.sugarpark.cn"},
  201. {title:'认证中心',tip:'提升人气秘密',bgImg:'mine-star.png',class:"card2",path:'/pages/auth/auth'},
  202. {title:'我的钱包',tip:'充糖果、看收益',bgImg:'mine-money.png',class:"card3",path:'/pages/wallet/wallet'}
  203. ],
  204. currentPic:null,
  205. currentIndex:0,
  206. pics:[],
  207. cover:{
  208. url:'',
  209. cate:'image',
  210. isFullScreen:false
  211. },
  212. popup:{
  213. content1:'',
  214. content2:'',
  215. tip1:'',
  216. tip2:'',
  217. btntext:''
  218. },
  219. vipPopupIndex:-1,
  220. payPopupIndex:-1,
  221. onshowIsNot:false
  222. };
  223. },
  224. computed: {
  225. statusBarHeight() {
  226. return this.$store.state.statusBarHeight;
  227. },
  228. topbarOffsetHeight() {
  229. return this.$store.state.topbarOffsetHeight;
  230. },
  231. platform(){
  232. return this.$store.state.platform;
  233. },
  234. userInfo(){
  235. return this.$store.state.userInfo||{}
  236. }
  237. },
  238. onLoad() {
  239. console.log(this.platform)
  240. this.cards[1].path=`/pages/wallet/wallet`
  241. },
  242. onShow() {
  243. this.computedScollviewHeight();
  244. if(!uni.getStorageSync('token')){
  245. return;
  246. }
  247. if(!this.onshowIsNot){
  248. this.getMineData();
  249. this.getMineDetail();
  250. this.getPkgVideo();
  251. }
  252. },
  253. onShareAppMessage(){
  254. return {
  255. title: '糖果公园',
  256. path: `/pages/login/login?share=${this.userInfo.inviteCode}`,
  257. }
  258. },
  259. methods:{
  260. /**
  261. * 计算scroll高度
  262. */
  263. computedScollviewHeight() {
  264. let heightLeaf = this.$store.state.tabbarHeight/2;
  265. let sysInfo = uni.getSystemInfoSync();
  266. this.scrollHeight = sysInfo.windowHeight - heightLeaf;
  267. },
  268. closePayPopup(){
  269. this.payPopupIndex=-1;
  270. this.$refs.paypopup.close();
  271. },
  272. toCardsPath(path){
  273. if(!uni.getStorageSync('token')){
  274. this.popup={
  275. content1:'您还未登录',
  276. content2:'该功能登录后才能使用',
  277. tip1:'',
  278. tip2:'',
  279. btntext:'去登录'
  280. }
  281. this.$refs.loginpopup.open();
  282. return;
  283. }
  284. switch(path){
  285. case '/pages/auth/auth':
  286. this.popup={
  287. content1:'进行认证流程需给客服回复关键词',
  288. content2:'「真人认证」',
  289. tip1:'',
  290. tip2:'',
  291. btntext:'联系客服去认证'
  292. }
  293. this.$refs.popup.open();
  294. return;
  295. break;
  296. case '/pages/wallet/wallet':
  297. this.popup={
  298. content1:'查看钱包和提现需给客服回复关键词',
  299. content2:'「钱包」',
  300. tip1:'',
  301. tip2:'',
  302. btntext:'联系客服查看'
  303. }
  304. this.$refs.popup.open();
  305. return;
  306. // uni.navigateTo({
  307. // url:path
  308. // })
  309. break;
  310. }
  311. },
  312. closePopup(){
  313. this.$refs.popup.close();
  314. },
  315. closeLoginPopup(){
  316. this.$refs.loginpopup.close();
  317. },
  318. closeVipPopup(){
  319. this.vipPopupIndex=-1;
  320. this.$refs.vippopup.close();
  321. },
  322. toEditVideo(){
  323. if(!uni.getStorageSync('token')){
  324. this.popup={
  325. content1:'您还未登录',
  326. content2:'该功能登录后才能使用',
  327. tip1:'',
  328. tip2:'',
  329. btntext:'去登录'
  330. }
  331. this.$refs.loginpopup.open();
  332. return;
  333. }
  334. uni.navigateTo({
  335. url:'/pagesSub/faceVideo/faceVideo'
  336. })
  337. },
  338. toLogin(){
  339. if(!uni.getStorageSync('token')){
  340. uni.reLaunch({
  341. url:'/pages/login/login'
  342. })
  343. return;
  344. }
  345. },
  346. toService(){
  347. if(!uni.getStorageSync('token')){
  348. this.popup={
  349. content1:'您还未登录',
  350. content2:'该功能登录后才能使用',
  351. tip1:'',
  352. tip2:'',
  353. btntext:'去登录'
  354. }
  355. this.$refs.loginpopup.open();
  356. return;
  357. }
  358. this.$refs.popup.close();
  359. uni.openCustomerServiceChat({
  360. extInfo:{
  361. url:'https://work.weixin.qq.com/kfid/kfca1b21d2f7e8a18e9',//客服链接
  362. },
  363. corpId:'wwa8f2a0d8a6dc0950',//企业ID
  364. fail(res){
  365. console.log(res)
  366. wx.showToast({
  367. title: '客服联系失败',
  368. icon:'none'
  369. })
  370. }
  371. })
  372. },
  373. toSetting(){
  374. if(!uni.getStorageSync('token')){
  375. this.popup={
  376. content1:'您还未登录',
  377. content2:'该功能登录后才能使用',
  378. tip1:'',
  379. tip2:'',
  380. btntext:'去登录'
  381. }
  382. this.$refs.loginpopup.open();
  383. return;
  384. }
  385. uni.navigateTo({
  386. url:'/pagesSub/setting/setting'
  387. })
  388. },
  389. handleScroll(e){
  390. this.topNavAlpha=e.detail.scrollTop/250;
  391. },
  392. toAlbum(){
  393. if(!uni.getStorageSync('token')){
  394. this.popup={
  395. content1:'您还未登录',
  396. content2:'该功能登录后才能使用',
  397. tip1:'',
  398. tip2:'',
  399. btntext:'去登录'
  400. }
  401. this.$refs.loginpopup.open();
  402. return;
  403. }
  404. uni.navigateTo({
  405. url:'/pages/mine/album'
  406. })
  407. },
  408. preview(){
  409. let arr=[],obj={};
  410. console.log(this.pics)
  411. this.onshowIsNot=true;
  412. for(let i=0;i<this.pics.length;i++){
  413. obj={url:'',type:''};
  414. if(this.pics[i].cate==='Img'){
  415. obj.type='image';
  416. }
  417. if(this.pics[i].cate==='Vdo'){
  418. obj.type='video';
  419. }
  420. obj.url=this.pics[i].url;
  421. arr.push(obj)
  422. }
  423. uni.previewMedia({
  424. sources:arr,
  425. current:this.currentIndex,
  426. showmenu:true,
  427. success: (res) => {
  428. console.log(res);
  429. this.onshowIsNot=true;
  430. },
  431. fail: (err) => {
  432. console.log(err);
  433. }
  434. })
  435. },
  436. toPath(path,name){
  437. if(!uni.getStorageSync('token')){
  438. this.popup={
  439. content1:'您还未登录',
  440. content2:'该功能登录后才能使用',
  441. tip1:'',
  442. tip2:'',
  443. btntext:'去登录'
  444. }
  445. this.$refs.loginpopup.open();
  446. return;
  447. }
  448. switch(name)
  449. {
  450. case '异性访客':
  451. if(this.userInfo.sex==='Famale'){
  452. if(!this.userInfo.realMan){
  453. this.popup={
  454. content1:'进行认证流程需给客服回复关键词',
  455. content2:'「真人认证」',
  456. tip1:'',
  457. tip2:'',
  458. btntext:'联系客服去认证'
  459. }
  460. this.$refs.popup.open();
  461. return;
  462. }
  463. }
  464. else if(this.userInfo.sex==='Male'){
  465. if(!this.userInfo.vip&&this.platform==='ios'){
  466. this.vipPopupIndex=3;
  467. this.$refs.vippopup.open();
  468. return;
  469. }
  470. else{
  471. this.$refs.paypopup.open();
  472. // uni.navigateTo({
  473. // url:'/pages/vip/vip'
  474. // })
  475. return;
  476. }
  477. }
  478. this.tabs[0].dotnum=0;
  479. break;
  480. case '喜欢我的':
  481. // if(this.userInfo.sex==='Famale'){
  482. // if(!this.userInfo.realMan){
  483. // this.popup={
  484. // content1:'进行认证流程需给客服回复关键词',
  485. // content2:'「真人认证」',
  486. // tip1:'',
  487. // tip2:'',
  488. // btntext:'联系客服去认证'
  489. // }
  490. // this.$refs.popup.open();
  491. // return;
  492. // }
  493. // }
  494. // else if(this.userInfo.sex==='Male'){
  495. // if(!this.userInfo.vip){
  496. // this.vipPopupIndex=3;
  497. // this.$refs.vippopup.open();
  498. // return;
  499. // }
  500. // }
  501. this.tabs[1].dotnum=0;
  502. break;
  503. case '我喜欢的':
  504. this.tabs[2].dotnum=0;
  505. break;
  506. case '我看过的':
  507. this.tabs[3].dotnum=0;
  508. break;
  509. }
  510. uni.navigateTo({
  511. url:path
  512. })
  513. },
  514. toEdit(){
  515. if(!uni.getStorageSync('token')){
  516. this.popup={
  517. content1:'您还未登录',
  518. content2:'该功能登录后才能使用',
  519. tip1:'',
  520. tip2:'',
  521. btntext:'去登录'
  522. }
  523. this.$refs.loginpopup.open();
  524. return;
  525. }
  526. uni.navigateTo({
  527. url:'/pages/info/editCenter'
  528. })
  529. },
  530. toVip(){
  531. if(!uni.getStorageSync('token')){
  532. this.popup={
  533. content1:'您还未登录',
  534. content2:'该功能登录后才能使用',
  535. tip1:'',
  536. tip2:'',
  537. btntext:'去登录'
  538. }
  539. this.$refs.loginpopup.open();
  540. return;
  541. }
  542. if(this.platform==='ios'){
  543. this.vipPopupIndex=0;
  544. this.$refs.vippopup.open();
  545. return;
  546. }
  547. uni.navigateTo({
  548. url:'/pages/vip/vip'
  549. })
  550. },
  551. touchStart(e){
  552. this.startTime = Date.now()
  553. this.startPosition = e.changedTouches[0].clientY
  554. },
  555. touchEnd(e){
  556. const endTime = Date.now()
  557. if (endTime - this.startTime <100){
  558. return;
  559. }
  560. if (Math.abs(this.endPosition - this.startPosition) > 10){
  561. this.endPosition = e.changedTouches[0].clientY;
  562. let elePosition = this.endPosition - this.startPosition > 0 ? "toBottom": "toTop"
  563. if(elePosition==='toBottom'){
  564. this.cover.isFullScreen=true;
  565. }
  566. else{
  567. this.cover.isFullScreen=false;
  568. }
  569. } else {
  570. return;
  571. }
  572. },
  573. videoAction(){
  574. if(this.cover.isFullScreen){
  575. this.cover.isFullScreen=false;
  576. }
  577. },
  578. getMineData(){
  579. this.$api.public.mine({}).then(res=>{
  580. this.tabs[0].dotnum=res.data.vmb;
  581. this.tabs[0].num=res.data.vme;
  582. this.tabs[1].dotnum=res.data.fmb;
  583. this.tabs[1].num=res.data.fm;
  584. this.tabs[2].num=res.data.fv;
  585. this.tabs[3].num=res.data.vbm;
  586. })
  587. },
  588. getMineDetail(){
  589. let user=JSON.parse(uni.getStorageSync('user'));
  590. this.$api.public.mineDetail({
  591. getAlbum:true,
  592. completeUser:user
  593. }).then(res=>{
  594. this.$store.commit('setUserInfo',res.data);
  595. uni.setStorageSync('userInfo',JSON.stringify(res.data));//正式环境删除
  596. this.pics=this.userInfo.medias;
  597. this.currentPic=this.userInfo.medias[0];
  598. })
  599. },
  600. getPkgVideo(){
  601. let user=JSON.parse(uni.getStorageSync('user'));
  602. this.$api.public.videoProcess({
  603. completeUser:user,
  604. pageHomeUserId:user.id,
  605. personalPageHomeVideoOperateEnum:'NONE'
  606. }).then(res=>{
  607. if(res.status==='Succ'&&res.data.personalPageHomeVideoUrl){
  608. this.cover.url=res.data.personalPageHomeVideoUrl;
  609. this.cover.cate='video';
  610. return;
  611. }
  612. if(this.userInfo.bkg&&this.userInfo.bkg.indexOf('.mp4')!==-1){
  613. this.cover.cate='video';
  614. this.cover.url=this.userInfo.bkg;
  615. }
  616. else{
  617. this.cover.cate='img';
  618. this.cover.url=this.userInfo.bkg;
  619. }
  620. })
  621. },
  622. picItemClick(index){
  623. this.currentIndex=index;
  624. this.currentPic=this.pics[index];
  625. this.currentPic.height=this.currentPic.h/(this.currentPic.w/343);
  626. },
  627. }
  628. }
  629. </script>
  630. <style lang="scss" scoped>
  631. .container{
  632. width: 100vw;
  633. height: 100vh;
  634. background-color: $bgcolor1;
  635. position: relative;
  636. .popup{
  637. width: 590rpx;
  638. height: 668rpx;
  639. background-color: #171325;
  640. position: relative;
  641. flex-direction: column;
  642. border-radius: 40rpx;
  643. .close{
  644. position: absolute;
  645. right: 20rpx;
  646. top: 20rpx;
  647. width: 32rpx;
  648. height: 32rpx;
  649. }
  650. .popop-img{
  651. width: 436rpx;
  652. height: 312rpx;
  653. }
  654. .content{
  655. margin-bottom: 16rpx;
  656. color: #ffffff;
  657. }
  658. .btn{
  659. width: 470rpx;
  660. height: 84rpx;
  661. background: #6C52F4;
  662. border-radius: 42rpx;
  663. line-height: 84rpx;
  664. text-align: center;
  665. color: #ffffff;
  666. margin-top: 68rpx;
  667. }
  668. }
  669. .topnav {
  670. padding: 0 10rpx;
  671. position: fixed;
  672. top: 0;
  673. left: 0;
  674. width: 100%;
  675. z-index: 100;
  676. backdrop-filter: blur(10px);
  677. .nav-item {
  678. width: 56rpx;
  679. height: 56rpx;
  680. margin-left: 16rpx;
  681. .nav-img{
  682. width: 56rpx;
  683. height: 56rpx;
  684. }
  685. }
  686. .nav-edit{
  687. width:120rpx;
  688. height: 56rpx;
  689. border-radius: 56rpx;
  690. color: $fontcolor5;
  691. line-height: 56rpx;
  692. text-align: center;
  693. background-color: rgba(0, 0, 0, 0.5);
  694. }
  695. }
  696. .video-box{
  697. width: 100vw;
  698. transition: all 0.3s;
  699. .m-video{
  700. width: 100vw;
  701. height: 680rpx;
  702. position: relative;
  703. .video-inner{
  704. flex-direction: column;
  705. height: 100%;
  706. transform: translateY(30rpx);
  707. position: relative;
  708. z-index: 6;
  709. .head-img{
  710. width: 168rpx;
  711. height: 168rpx;
  712. border-radius: 72rpx;
  713. border: 4rpx solid #FFFFFF;
  714. }
  715. .name-box{
  716. height: 60rpx;
  717. margin-top: 24rpx;
  718. .name{
  719. color: $fontcolor5;
  720. height: 60rpx;
  721. line-height: 60rpx;
  722. }
  723. .name-img{
  724. width: 76rpx;
  725. height: 42rpx;
  726. margin-left: 8rpx;
  727. }
  728. }
  729. .video-edit{
  730. position: absolute;
  731. bottom: 80rpx;
  732. right: 32rpx;
  733. height: 48rpx;
  734. background-color:rgba(0, 0, 0, 0.5);
  735. padding: 0 20rpx;
  736. border-radius: 48rpx;
  737. z-index: 6;
  738. .video-edit-img{
  739. width: 24rpx;
  740. height: 24rpx;
  741. margin-right: 4rpx;
  742. }
  743. .video-edit-text{
  744. line-height: 48rpx;
  745. color: $fontcolor5;
  746. }
  747. }
  748. }
  749. .cover-inner{
  750. width: 100vw;
  751. height: 680rpx;
  752. position: absolute;
  753. top: 0;
  754. z-index: 4;
  755. }
  756. .cover-modal{
  757. position: absolute;
  758. top: 0;
  759. width: 100vw;
  760. height: 680rpx;
  761. z-index: 5;
  762. background: rgba(0,0,0,0.4);
  763. backdrop-filter: blur(20rpx);
  764. }
  765. }
  766. }
  767. .info-box{
  768. position: absolute;
  769. z-index: 20;
  770. left: 0;
  771. width: 100vw;
  772. transition: top .3s;
  773. .tabs{
  774. padding: 24rpx 32rpx 0rpx 32rpx;
  775. border-radius: 40rpx 40rpx 0rpx 0rpx;
  776. background-color: $bgcolor2;
  777. .tab-item{
  778. width: 172rpx;
  779. height: 144rpx;
  780. flex-direction: column;
  781. .tab-num{
  782. color: $fontcolor5;
  783. position: relative;
  784. .tab-dot{
  785. position: absolute;
  786. top: -25rpx;
  787. left: 40rpx;
  788. height: 32rpx;
  789. padding: 0rpx 12rpx;
  790. line-height: 32rpx;
  791. text-align: center;
  792. border-radius: 32rpx;
  793. color: $fontcolor5;
  794. background-color: $assist2;
  795. }
  796. }
  797. .tab-text{
  798. color: $fontcolor2;
  799. margin-top: 8rpx;
  800. }
  801. }
  802. }
  803. .vip-box{
  804. box-sizing: border-box;
  805. margin: 0rpx 32rpx;
  806. background: linear-gradient(133deg, #1B1A1D 0%, #000000 100%);
  807. border-radius: 16rpx;
  808. .vip-left{
  809. .vip-img{
  810. width: 164rpx;
  811. height: 140rpx;
  812. margin-left: 16rpx;
  813. }
  814. .vl-box{
  815. flex-direction: column;
  816. margin-left: 16rpx;
  817. align-items: flex-start !important;
  818. .vl-text{
  819. margin-top: 8rpx;
  820. color: $fontcolor5;
  821. text-align: left;
  822. width: 100%;
  823. }
  824. .vl-img{
  825. width: 124rpx;
  826. height: 36rpx;
  827. }
  828. }
  829. }
  830. .vip-right{
  831. width: 136rpx;
  832. height: 48rpx;
  833. border-radius: 32rpx;
  834. border: 1rpx solid #F2CEB9;
  835. margin-right: 32rpx;
  836. text-align: center;
  837. line-height: 48rpx;
  838. color: #F2CEB9;
  839. }
  840. }
  841. .cards{
  842. margin: 0rpx 32rpx;
  843. margin-top: 14rpx;
  844. .card-item{
  845. flex: 1;
  846. height: 136rpx;
  847. padding: 0 16rpx;
  848. border-radius: 16rpx;
  849. flex-direction: column;
  850. position: relative;
  851. margin-left: 12rpx;
  852. &:nth-of-type(1){
  853. margin-left: 0rpx;
  854. }
  855. .ci-title{
  856. color: $fontcolor5;
  857. width: 100%;
  858. text-align: left;
  859. position: relative;
  860. z-index: 10;
  861. }
  862. .ci-tip{
  863. color: $fontcolor5;
  864. margin-top: 10rpx;
  865. width: 100%;
  866. text-align: left;
  867. position: relative;
  868. z-index: 10;
  869. }
  870. .ci-bg{
  871. position: absolute;
  872. right: 0;
  873. bottom: 0;
  874. width: 88rpx;
  875. height: 118rpx;
  876. z-index: 1;
  877. }
  878. }
  879. .card1{
  880. background:linear-gradient(133deg, #FA5C74 0%, #F51D44 100%);
  881. }
  882. .card2{
  883. background:linear-gradient(133deg, #8C67FE 0%, #4A5BFE 100%);
  884. }
  885. .card3{
  886. background:linear-gradient(133deg, #FAA85C 0%, #FE884A 100%);
  887. }
  888. }
  889. .photo-album{
  890. margin: 56rpx 32rpx 0rpx 32rpx;
  891. .pa-box{
  892. .pa-title{
  893. color: $fontcolor5;
  894. }
  895. .pa-tip{
  896. color: $fontcolor3;
  897. }
  898. }
  899. .pics-box{
  900. width: 100%;
  901. margin-top: 26rpx;
  902. position: relative;
  903. margin-bottom: 30rpx;
  904. .self{
  905. position: absolute;
  906. width: 72rpx;
  907. height: 40rpx;
  908. right: 24rpx;
  909. top: 24rpx;
  910. z-index: 100;
  911. }
  912. .big-pic{
  913. width: 100%;
  914. height: 500rpx;
  915. border-radius: 40rpx;
  916. }
  917. .pics-list{
  918. width: 100%;
  919. height: 186rpx;
  920. position: absolute;
  921. bottom: -35rpx;
  922. white-space:nowrap;
  923. transform: translateY(-20rpx);
  924. .pic-item{
  925. display: inline-block;
  926. width: 96rpx;
  927. height: 128rpx;
  928. border-radius: 16rpx;
  929. margin-left: 16rpx;
  930. box-shadow:0rpx 0rpx 10rpx 1rpx #151126;
  931. transform: translateY(6rpx);
  932. &:nth-last-of-type(1){
  933. margin-right: 16rpx;
  934. }
  935. .pic-img{
  936. width: 96rpx;
  937. height: 128rpx;
  938. border-radius: 16rpx;
  939. box-sizing: border-box;
  940. border: 4rpx solid transparent;
  941. transition: all 0.3s;
  942. }
  943. }
  944. .active-item{
  945. border: 4rpx solid #ffffff !important;
  946. }
  947. }
  948. }
  949. .no-pics-box{
  950. margin: 16rpx 0rpx;
  951. background-color: $bgcolor3;
  952. border-radius: 20rpx;
  953. position: relative;
  954. padding: 0rpx 48rpx;
  955. padding-top: 64rpx;
  956. padding-bottom: 48rpx;
  957. .np-title{
  958. color: $fontcolor4;
  959. }
  960. .np-tip{
  961. color: $fontcolor4;
  962. margin-top: 24rpx;
  963. }
  964. .np-btn{
  965. margin-top: 86rpx;
  966. width: 240rpx;
  967. height: 72rpx;
  968. background: #6C52F4;
  969. border-radius: 36rpx;
  970. line-height: 72rpx;
  971. text-align: center;
  972. color: $fontcolor5;
  973. }
  974. .np-bg{
  975. position: absolute;
  976. width: 344rpx;
  977. height: 400rpx;
  978. right: 0;
  979. top: 0;
  980. }
  981. }
  982. }
  983. .wechat-oa{
  984. margin: 32rpx;
  985. border-radius: 16rpx;
  986. overflow: hidden;
  987. margin-top: 60rpx;
  988. }
  989. }
  990. }
  991. </style>