mine.vue 25 KB

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