mine.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  1. <template>
  2. <view class="container">
  3. <TabBar :tabIndex="tabIndex" v-if="!cover.isFullScreen&&showTabbar"></TabBar>
  4. <uni-popup ref="popup" type="center" @maskClick="closePopup">
  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" @maskClick="closePayPopup" type="bottom" :safe-area="false">
  8. <PayPopup :swiperIndex="payPopupIndex" @closePopup="closePayPopup"></PayPopup>
  9. </uni-popup>
  10. <uni-popup ref="loginpopup" @maskClick="closeLoginPopup" 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" @maskClick="closeVipPopup" 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" @click="toLogin">
  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-star1.png',class:"card2",path:'/pages/auth/auth'},
  202. {title:'我的钱包',tip:'充糖果、看收益',bgImg:'mine-money1.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. showTabbar:true
  223. };
  224. },
  225. computed: {
  226. statusBarHeight() {
  227. return this.$store.state.statusBarHeight;
  228. },
  229. topbarOffsetHeight() {
  230. return this.$store.state.topbarOffsetHeight;
  231. },
  232. platform(){
  233. return this.$store.state.platform;
  234. },
  235. userInfo(){
  236. return this.$store.state.userInfo||{}
  237. }
  238. },
  239. onLoad() {
  240. console.log(this.platform)
  241. this.cards[1].path=`/pages/wallet/wallet`
  242. },
  243. onShow() {
  244. this.computedScollviewHeight();
  245. if(!uni.getStorageSync('token')){
  246. return;
  247. }
  248. if(!this.onshowIsNot){
  249. this.getMineData();
  250. this.getMineDetail();
  251. this.getPkgVideo();
  252. }
  253. },
  254. onShareAppMessage(){
  255. return {
  256. title: '糖果公园',
  257. path: `/pages/login/login?share=${this.userInfo.inviteCode}`,
  258. }
  259. },
  260. methods:{
  261. /**
  262. * 计算scroll高度
  263. */
  264. computedScollviewHeight() {
  265. let heightLeaf = this.$store.state.tabbarHeight/2;
  266. let sysInfo = uni.getSystemInfoSync();
  267. this.scrollHeight = sysInfo.windowHeight - heightLeaf;
  268. },
  269. closePayPopup(){
  270. this.payPopupIndex=-1;
  271. this.$refs.paypopup.close();
  272. this.showTabbar=true;
  273. },
  274. toCardsPath(path){
  275. if(!uni.getStorageSync('token')){
  276. this.popup={
  277. content1:'您还未登录',
  278. content2:'该功能登录后才能使用',
  279. tip1:'',
  280. tip2:'',
  281. btntext:'去登录'
  282. }
  283. this.$refs.loginpopup.open();
  284. return;
  285. }
  286. switch(path){
  287. case '/pages/auth/auth':
  288. this.popup={
  289. content1:'进行认证流程需给客服回复关键词',
  290. content2:'「真人认证」',
  291. tip1:'',
  292. tip2:'',
  293. btntext:'联系客服去认证'
  294. }
  295. this.$refs.popup.open();
  296. return;
  297. break;
  298. case '/pages/wallet/wallet':
  299. this.popup={
  300. content1:'查看钱包和提现需给客服回复关键词',
  301. content2:'「钱包」',
  302. tip1:'',
  303. tip2:'',
  304. btntext:'联系客服查看'
  305. }
  306. this.$refs.popup.open();
  307. return;
  308. // uni.navigateTo({
  309. // url:path
  310. // })
  311. break;
  312. }
  313. },
  314. closePopup(){
  315. this.$refs.popup.close();
  316. },
  317. closeLoginPopup(){
  318. this.$refs.loginpopup.close();
  319. },
  320. closeVipPopup(){
  321. this.vipPopupIndex=-1;
  322. this.$refs.vippopup.close();
  323. },
  324. toEditVideo(){
  325. if(!uni.getStorageSync('token')){
  326. this.popup={
  327. content1:'您还未登录',
  328. content2:'该功能登录后才能使用',
  329. tip1:'',
  330. tip2:'',
  331. btntext:'去登录'
  332. }
  333. this.$refs.loginpopup.open();
  334. return;
  335. }
  336. uni.navigateTo({
  337. url:'/pagesSub/faceVideo/faceVideo'
  338. })
  339. },
  340. toLogin(){
  341. if(!uni.getStorageSync('token')){
  342. uni.reLaunch({
  343. url:'/pages/login/login'
  344. })
  345. return;
  346. }
  347. },
  348. toService(){
  349. if(!uni.getStorageSync('token')){
  350. this.popup={
  351. content1:'您还未登录',
  352. content2:'该功能登录后才能使用',
  353. tip1:'',
  354. tip2:'',
  355. btntext:'去登录'
  356. }
  357. this.$refs.loginpopup.open();
  358. return;
  359. }
  360. this.$refs.popup.close();
  361. uni.openCustomerServiceChat({
  362. extInfo:{
  363. url:'https://work.weixin.qq.com/kfid/kfca1b21d2f7e8a18e9',//客服链接
  364. },
  365. corpId:'wwa8f2a0d8a6dc0950',//企业ID
  366. fail(res){
  367. console.log(res)
  368. wx.showToast({
  369. title: '客服联系失败',
  370. icon:'none'
  371. })
  372. }
  373. })
  374. },
  375. toSetting(){
  376. if(!uni.getStorageSync('token')){
  377. this.popup={
  378. content1:'您还未登录',
  379. content2:'该功能登录后才能使用',
  380. tip1:'',
  381. tip2:'',
  382. btntext:'去登录'
  383. }
  384. this.$refs.loginpopup.open();
  385. return;
  386. }
  387. uni.navigateTo({
  388. url:'/pagesSub/setting/setting'
  389. })
  390. },
  391. handleScroll(e){
  392. this.topNavAlpha=e.detail.scrollTop/250;
  393. },
  394. toAlbum(){
  395. if(!uni.getStorageSync('token')){
  396. this.popup={
  397. content1:'您还未登录',
  398. content2:'该功能登录后才能使用',
  399. tip1:'',
  400. tip2:'',
  401. btntext:'去登录'
  402. }
  403. this.$refs.loginpopup.open();
  404. return;
  405. }
  406. uni.navigateTo({
  407. url:'/pages/mine/album'
  408. })
  409. },
  410. preview(){
  411. let arr=[],obj={};
  412. console.log(this.pics)
  413. this.onshowIsNot=true;
  414. for(let i=0;i<this.pics.length;i++){
  415. obj={url:'',type:''};
  416. if(this.pics[i].cate==='Img'){
  417. obj.type='image';
  418. }
  419. if(this.pics[i].cate==='Vdo'){
  420. obj.type='video';
  421. }
  422. obj.url=this.pics[i].url;
  423. arr.push(obj)
  424. }
  425. uni.previewMedia({
  426. sources:arr,
  427. current:this.currentIndex,
  428. showmenu:true,
  429. success: (res) => {
  430. console.log(res);
  431. this.onshowIsNot=true;
  432. },
  433. fail: (err) => {
  434. console.log(err);
  435. }
  436. })
  437. },
  438. toPath(path,name){
  439. if(!uni.getStorageSync('token')){
  440. this.popup={
  441. content1:'您还未登录',
  442. content2:'该功能登录后才能使用',
  443. tip1:'',
  444. tip2:'',
  445. btntext:'去登录'
  446. }
  447. this.$refs.loginpopup.open();
  448. return;
  449. }
  450. switch(name)
  451. {
  452. case '异性访客':
  453. if(this.userInfo.sex==='Famale'){
  454. if(!this.userInfo.realMan){
  455. this.popup={
  456. content1:'进行认证流程需给客服回复关键词',
  457. content2:'「真人认证」',
  458. tip1:'',
  459. tip2:'',
  460. btntext:'联系客服去认证'
  461. }
  462. this.$refs.popup.open();
  463. return;
  464. }
  465. }
  466. else if(this.userInfo.sex==='Male'){
  467. if(this.platform==='ios'){
  468. if(!this.userInfo.vip){
  469. this.vipPopupIndex=3;
  470. this.$refs.vippopup.open();
  471. return;
  472. }
  473. else{
  474. this.$refs.paypopup.open();
  475. this.showTabbar=false;
  476. return;
  477. }
  478. }
  479. else{
  480. if(!this.userInfo.vip){
  481. uni.navigateTo({
  482. url:'../vip/vip'
  483. })
  484. return;
  485. }
  486. }
  487. }
  488. this.tabs[0].dotnum=0;
  489. break;
  490. case '喜欢我的':
  491. // if(this.userInfo.sex==='Famale'){
  492. // if(!this.userInfo.realMan){
  493. // this.popup={
  494. // content1:'进行认证流程需给客服回复关键词',
  495. // content2:'「真人认证」',
  496. // tip1:'',
  497. // tip2:'',
  498. // btntext:'联系客服去认证'
  499. // }
  500. // this.$refs.popup.open();
  501. // return;
  502. // }
  503. // }
  504. // else if(this.userInfo.sex==='Male'){
  505. // if(!this.userInfo.vip){
  506. // this.vipPopupIndex=3;
  507. // this.$refs.vippopup.open();
  508. // return;
  509. // }
  510. // }
  511. this.tabs[1].dotnum=0;
  512. break;
  513. case '我喜欢的':
  514. this.tabs[2].dotnum=0;
  515. break;
  516. case '我看过的':
  517. this.tabs[3].dotnum=0;
  518. break;
  519. }
  520. uni.navigateTo({
  521. url:path
  522. })
  523. },
  524. toEdit(){
  525. if(!uni.getStorageSync('token')){
  526. this.popup={
  527. content1:'您还未登录',
  528. content2:'该功能登录后才能使用',
  529. tip1:'',
  530. tip2:'',
  531. btntext:'去登录'
  532. }
  533. this.$refs.loginpopup.open();
  534. return;
  535. }
  536. uni.navigateTo({
  537. url:'/pages/info/editCenter'
  538. })
  539. },
  540. toVip(){
  541. if(!uni.getStorageSync('token')){
  542. this.popup={
  543. content1:'您还未登录',
  544. content2:'该功能登录后才能使用',
  545. tip1:'',
  546. tip2:'',
  547. btntext:'去登录'
  548. }
  549. this.$refs.loginpopup.open();
  550. return;
  551. }
  552. if(this.platform==='ios'){
  553. this.vipPopupIndex=0;
  554. this.$refs.vippopup.open();
  555. return;
  556. }
  557. uni.navigateTo({
  558. url:'/pages/vip/vip'
  559. })
  560. },
  561. touchStart(e){
  562. this.startTime = Date.now()
  563. this.startPosition = e.changedTouches[0].clientY
  564. },
  565. touchEnd(e){
  566. const endTime = Date.now()
  567. if (endTime - this.startTime <100){
  568. return;
  569. }
  570. if (Math.abs(this.endPosition - this.startPosition) > 10){
  571. this.endPosition = e.changedTouches[0].clientY;
  572. let elePosition = this.endPosition - this.startPosition > 0 ? "toBottom": "toTop"
  573. if(elePosition==='toBottom'){
  574. this.cover.isFullScreen=true;
  575. }
  576. else{
  577. this.cover.isFullScreen=false;
  578. }
  579. } else {
  580. return;
  581. }
  582. },
  583. videoAction(){
  584. if(this.cover.isFullScreen){
  585. this.cover.isFullScreen=false;
  586. }
  587. },
  588. getMineData(){
  589. this.$api.public.mine({}).then(res=>{
  590. this.tabs[0].dotnum=res.data.vmb;
  591. this.tabs[0].num=res.data.vme;
  592. this.tabs[1].dotnum=res.data.fmb;
  593. this.tabs[1].num=res.data.fm;
  594. this.tabs[2].num=res.data.fv;
  595. this.tabs[3].num=res.data.vbm;
  596. })
  597. },
  598. getMineDetail(){
  599. let user=JSON.parse(uni.getStorageSync('user'));
  600. this.$api.public.mineDetail({
  601. getAlbum:true,
  602. completeUser:user
  603. }).then(res=>{
  604. this.$store.commit('setUserInfo',res.data);
  605. uni.setStorageSync('userInfo',JSON.stringify(res.data));//正式环境删除
  606. this.pics=this.userInfo.medias;
  607. this.currentPic=this.userInfo.medias[0];
  608. })
  609. },
  610. getPkgVideo(){
  611. let user=JSON.parse(uni.getStorageSync('user'));
  612. this.$api.public.videoProcess({
  613. completeUser:user,
  614. pageHomeUserId:user.id,
  615. personalPageHomeVideoOperateEnum:'NONE'
  616. }).then(res=>{
  617. if(res.status==='Succ'&&res.data.personalPageHomeVideoUrl){
  618. this.cover.url=res.data.personalPageHomeVideoUrl;
  619. this.cover.cate='video';
  620. return;
  621. }
  622. if(this.userInfo.bkg&&this.userInfo.bkg.indexOf('.mp4')!==-1){
  623. this.cover.cate='video';
  624. this.cover.url=this.userInfo.bkg;
  625. }
  626. else{
  627. this.cover.cate='img';
  628. this.cover.url=this.userInfo.bkg;
  629. }
  630. this.$forceUpdate();
  631. })
  632. },
  633. picItemClick(index){
  634. this.currentIndex=index;
  635. this.currentPic=this.pics[index];
  636. this.currentPic.height=this.currentPic.h/(this.currentPic.w/343);
  637. },
  638. }
  639. }
  640. </script>
  641. <style lang="scss" scoped>
  642. .container{
  643. width: 100vw;
  644. height: 100vh;
  645. background-color: $bgcolor1;
  646. position: relative;
  647. .popup{
  648. width: 590rpx;
  649. height: 668rpx;
  650. background-color: #171325;
  651. position: relative;
  652. flex-direction: column;
  653. border-radius: 40rpx;
  654. .close{
  655. position: absolute;
  656. right: 20rpx;
  657. top: 20rpx;
  658. width: 32rpx;
  659. height: 32rpx;
  660. }
  661. .popop-img{
  662. width: 436rpx;
  663. height: 312rpx;
  664. }
  665. .content{
  666. margin-bottom: 16rpx;
  667. color: #ffffff;
  668. }
  669. .btn{
  670. width: 470rpx;
  671. height: 84rpx;
  672. background: #6C52F4;
  673. border-radius: 42rpx;
  674. line-height: 84rpx;
  675. text-align: center;
  676. color: #ffffff;
  677. margin-top: 68rpx;
  678. }
  679. }
  680. .topnav {
  681. padding: 0 10rpx;
  682. position: fixed;
  683. top: 0;
  684. left: 0;
  685. width: 100%;
  686. z-index: 100;
  687. backdrop-filter: blur(10px);
  688. .nav-item {
  689. width: 56rpx;
  690. height: 56rpx;
  691. margin-left: 16rpx;
  692. .nav-img{
  693. width: 56rpx;
  694. height: 56rpx;
  695. }
  696. }
  697. .nav-edit{
  698. width:120rpx;
  699. height: 56rpx;
  700. border-radius: 56rpx;
  701. color: $fontcolor5;
  702. line-height: 56rpx;
  703. text-align: center;
  704. background-color: rgba(0, 0, 0, 0.5);
  705. }
  706. }
  707. .video-box{
  708. width: 100vw;
  709. transition: all 0.3s;
  710. .m-video{
  711. width: 100vw;
  712. height: 680rpx;
  713. position: relative;
  714. .video-inner{
  715. flex-direction: column;
  716. height: 100%;
  717. transform: translateY(30rpx);
  718. position: relative;
  719. z-index: 6;
  720. .head-img{
  721. width: 168rpx;
  722. height: 168rpx;
  723. border-radius: 72rpx;
  724. border: 4rpx solid #FFFFFF;
  725. }
  726. .name-box{
  727. height: 60rpx;
  728. margin-top: 24rpx;
  729. .name{
  730. color: $fontcolor5;
  731. height: 60rpx;
  732. line-height: 60rpx;
  733. }
  734. .name-img{
  735. width: 76rpx;
  736. height: 42rpx;
  737. margin-left: 8rpx;
  738. }
  739. }
  740. .video-edit{
  741. position: absolute;
  742. bottom: 80rpx;
  743. right: 32rpx;
  744. height: 48rpx;
  745. background-color:rgba(0, 0, 0, 0.5);
  746. padding: 0 20rpx;
  747. border-radius: 48rpx;
  748. z-index: 6;
  749. .video-edit-img{
  750. width: 24rpx;
  751. height: 24rpx;
  752. margin-right: 4rpx;
  753. }
  754. .video-edit-text{
  755. line-height: 48rpx;
  756. color: $fontcolor5;
  757. }
  758. }
  759. }
  760. .cover-inner{
  761. width: 100vw;
  762. height: 680rpx;
  763. position: absolute;
  764. top: 0;
  765. z-index: 4;
  766. }
  767. .cover-modal{
  768. position: absolute;
  769. top: 0;
  770. width: 100vw;
  771. height: 680rpx;
  772. z-index: 5;
  773. background: rgba(0,0,0,0.4);
  774. backdrop-filter: blur(20rpx);
  775. }
  776. }
  777. }
  778. .info-box{
  779. position: absolute;
  780. z-index: 20;
  781. left: 0;
  782. width: 100vw;
  783. transition: top .3s;
  784. .tabs{
  785. padding: 24rpx 32rpx 0rpx 32rpx;
  786. border-radius: 40rpx 40rpx 0rpx 0rpx;
  787. background-color: $bgcolor2;
  788. .tab-item{
  789. width: 172rpx;
  790. height: 144rpx;
  791. flex-direction: column;
  792. .tab-num{
  793. color: $fontcolor5;
  794. position: relative;
  795. .tab-dot{
  796. position: absolute;
  797. top: -25rpx;
  798. left: 40rpx;
  799. height: 32rpx;
  800. padding: 0rpx 12rpx;
  801. line-height: 32rpx;
  802. text-align: center;
  803. border-radius: 32rpx;
  804. color: $fontcolor5;
  805. background-color: $assist2;
  806. }
  807. }
  808. .tab-text{
  809. color: $fontcolor2;
  810. margin-top: 8rpx;
  811. }
  812. }
  813. }
  814. .vip-box{
  815. box-sizing: border-box;
  816. margin: 0rpx 32rpx;
  817. background: linear-gradient(133deg, #1B1A1D 0%, #000000 100%);
  818. border-radius: 16rpx;
  819. .vip-left{
  820. .vip-img{
  821. width: 164rpx;
  822. height: 140rpx;
  823. margin-left: 16rpx;
  824. }
  825. .vl-box{
  826. flex-direction: column;
  827. margin-left: 16rpx;
  828. align-items: flex-start !important;
  829. .vl-text{
  830. margin-top: 8rpx;
  831. color: $fontcolor5;
  832. text-align: left;
  833. width: 100%;
  834. }
  835. .vl-img{
  836. width: 124rpx;
  837. height: 36rpx;
  838. }
  839. }
  840. }
  841. .vip-right{
  842. width: 136rpx;
  843. height: 48rpx;
  844. border-radius: 32rpx;
  845. border: 1rpx solid #F2CEB9;
  846. margin-right: 32rpx;
  847. text-align: center;
  848. line-height: 48rpx;
  849. color: #F2CEB9;
  850. }
  851. }
  852. .cards{
  853. margin: 0rpx 32rpx;
  854. margin-top: 14rpx;
  855. .card-item{
  856. flex: 1;
  857. height: 136rpx;
  858. padding: 0 16rpx;
  859. border-radius: 16rpx;
  860. flex-direction: column;
  861. position: relative;
  862. margin-left: 12rpx;
  863. &:nth-of-type(1){
  864. margin-left: 0rpx;
  865. }
  866. .ci-title{
  867. color: $fontcolor5;
  868. width: 100%;
  869. text-align: left;
  870. position: relative;
  871. z-index: 10;
  872. }
  873. .ci-tip{
  874. color: $fontcolor5;
  875. margin-top: 10rpx;
  876. width: 100%;
  877. text-align: left;
  878. position: relative;
  879. z-index: 10;
  880. }
  881. .ci-bg{
  882. position: absolute;
  883. right: 0;
  884. bottom: 0;
  885. width: 156rpx;
  886. height: 139rpx;
  887. z-index: 1;
  888. }
  889. }
  890. .card1{
  891. background:linear-gradient(133deg, #FA5C74 0%, #F51D44 100%);
  892. }
  893. .card2{
  894. background:linear-gradient(133deg, #8C67FE 0%, #4A5BFE 100%);
  895. }
  896. .card3{
  897. background:linear-gradient(133deg, #FAA85C 0%, #FE884A 100%);
  898. }
  899. }
  900. .photo-album{
  901. margin: 56rpx 32rpx 0rpx 32rpx;
  902. .pa-box{
  903. .pa-title{
  904. color: $fontcolor5;
  905. }
  906. .pa-tip{
  907. color: $fontcolor3;
  908. }
  909. }
  910. .pics-box{
  911. width: 100%;
  912. margin-top: 26rpx;
  913. position: relative;
  914. margin-bottom: 30rpx;
  915. height: 500rpx;
  916. border-radius: 40rpx;
  917. overflow: hidden;
  918. .self{
  919. position: absolute;
  920. width: 72rpx;
  921. height: 40rpx;
  922. right: 24rpx;
  923. top: 24rpx;
  924. z-index: 100;
  925. }
  926. .big-pic{
  927. width: 100%;
  928. height: 500rpx;
  929. border-radius: 40rpx;
  930. }
  931. .pics-list{
  932. width: 100%;
  933. height: 186rpx;
  934. position: absolute;
  935. bottom: -35rpx;
  936. white-space:nowrap;
  937. transform: translateY(-20rpx);
  938. .pic-item{
  939. display: inline-block;
  940. width: 96rpx;
  941. height: 128rpx;
  942. border-radius: 16rpx;
  943. margin-left: 16rpx;
  944. box-shadow:0rpx 0rpx 10rpx 1rpx #151126;
  945. transform: translateY(6rpx);
  946. &:nth-last-of-type(1){
  947. margin-right: 16rpx;
  948. }
  949. .pic-img{
  950. width: 96rpx;
  951. height: 128rpx;
  952. border-radius: 16rpx;
  953. box-sizing: border-box;
  954. border: 4rpx solid transparent;
  955. transition: all 0.3s;
  956. }
  957. }
  958. .active-item{
  959. border: 4rpx solid #ffffff !important;
  960. }
  961. }
  962. }
  963. .no-pics-box{
  964. margin: 16rpx 0rpx;
  965. background-color: $bgcolor3;
  966. border-radius: 20rpx;
  967. position: relative;
  968. padding: 0rpx 48rpx;
  969. padding-top: 64rpx;
  970. padding-bottom: 48rpx;
  971. .np-title{
  972. color: $fontcolor4;
  973. }
  974. .np-tip{
  975. color: $fontcolor4;
  976. margin-top: 24rpx;
  977. }
  978. .np-btn{
  979. margin-top: 86rpx;
  980. width: 240rpx;
  981. height: 72rpx;
  982. background: #6C52F4;
  983. border-radius: 36rpx;
  984. line-height: 72rpx;
  985. text-align: center;
  986. color: $fontcolor5;
  987. }
  988. .np-bg{
  989. position: absolute;
  990. width: 344rpx;
  991. height: 400rpx;
  992. right: 0;
  993. top: 0;
  994. }
  995. }
  996. }
  997. .wechat-oa{
  998. margin: 32rpx;
  999. border-radius: 16rpx;
  1000. overflow: hidden;
  1001. margin-top: 60rpx;
  1002. }
  1003. }
  1004. }
  1005. </style>