提交 717de455 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

修复排行榜底列表部被吸低遮挡问题

上级 31038458
......@@ -6,7 +6,10 @@
isGoHistory="1"
:isOpacity="false"
:shareObj="shareObj"/>
<div class="rank-list" :class="{'padBott60': isWeb}" :style="{ marginTop: isWeb?0:`${44+statusBarHeight}Px`}">
<div
class="rank-list"
:class="{'padBott60': isWeb}"
:style="{ marginTop: isWeb?0:`${44+statusBarHeight}Px`,marginBottom: isWeb?0:`${50+homeIndicatorHeight}` + 'Px'}">
<div class="rank-item" v-for="(item, index) in rankList" :key="index">
<img v-if="index<=2" :src="rankIcon[index]" alt="" class="rank-icon">
<p v-else class="rank-num">{{index+1}}</p>
......@@ -21,7 +24,7 @@
<p class="name">勤奋分</p>
</div>
</div>
<div class="no-more" v-if="rankList.length>=10" :style="{marginBottom: `${50+homeIndicatorHeight}` + 'Px'}">
<div class="no-more" v-if="rankList.length>=10" >
<span class="line"></span>
<span class="text">到底啦</span>
<span class="line"></span>
......
......@@ -6,7 +6,10 @@
isGoHistory="1"
:isOpacity="false"
:shareObj="shareObj"/>
<div class="rank-list" :class="{'padBott60': isWeb}" :style="{ marginTop: isWeb?0:`${44+statusBarHeight}Px`}">
<div
class="rank-list"
:class="{'padBott60': isWeb}"
:style="{ marginTop: isWeb?0:`${44+statusBarHeight}Px`,marginBottom: isWeb?0:`${50+homeIndicatorHeight}` + 'Px'}">
<div class="rank-item" v-for="(item, index) in personList" :key="index">
<img v-if="index<=2" :src="rankIcon[index]" alt="" class="rank-icon">
<p v-else class="rank-num">{{index+1}}</p>
......@@ -22,7 +25,7 @@
<p class="name">勤奋分</p>
</div>
</div>
<div class="no-more" v-if="personList.length>=10" :style="{marginBottom: isWeb?0:`${50+homeIndicatorHeight}` + 'Px'}">
<div class="no-more" v-if="personList.length>=10">
<span class="line"></span>
<span class="text">到底啦</span>
<span class="line"></span>
......@@ -32,7 +35,8 @@
<div class="content">
<div class="left">
<p class="score">我的勤奋分<span>{{personalData.diligence}}</span></p>
<p class="rank" v-if="personalData.personRank<=100&&personalData.personRank">恭喜您上榜排名<span>{{personalData.personRank}}</span></p>
<p class="rank" v-if="personalData.personRank<=100&&personalData.personRank">恭喜您上榜排名<span>{{personalData.personRank}}</span>
</p>
<p class="rank" v-else>很遗憾,您未上榜</p>
</div>
<div class="right" @click="share">分享排名</div>
......@@ -49,10 +53,11 @@
</template>
<script>
import { getPersonScore, getPersonList, isGameOver } from '@/service/stage3Api';
import {getPersonScore, getPersonList, isGameOver} from '@/service/stage3Api';
import h5header from '@/components/h5header';
import finishToast from '@/components/finish-toast';
import { setCookie, getCookie, delCookie } from '@/utils/cookieFun';
import {setCookie, getCookie, delCookie} from '@/utils/cookieFun';
export default {
name: "personal-rank",
components: {
......@@ -73,9 +78,9 @@
isLogin: true
}
},
async asyncData( {query} ) {
async asyncData({query}) {
const res = await isGameOver();
const { data } = await getPersonList();
const {data} = await getPersonList();
return {
isGameOver: res.data,
personList: data,
......@@ -98,32 +103,33 @@
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
}, (wx) => {
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
title, desc, link, imgUrl
});
// 分享到朋友圈
wx.onMenuShareTimeline({
title,desc,link,imgUrl
title, desc, link, imgUrl
});
});
//微信分享初始化--end
if(!this.isWeb) {
if (!this.isWeb) {
this.getUserInfo();
};
window.__refresh = function(params) {
}
;
window.__refresh = function (params) {
_this.getUserInfo(); // 判断是否登录
}
},
methods: {
getUserInfo() { // 判断是否登录
this.$rocNative.getUserInfo().then(res => {
if(res.userMobile){
if (res.userMobile) {
setCookie('token', res.userToken)
this.getPersonScore();
this.isLogin = true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册