优化页面
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<scroll-view scroll-y="true" class="scroll">
|
||||
<scroll-view show-scrollbar="false" scroll-y="true" class="scroll">
|
||||
<view class="container">
|
||||
<view class="bg">
|
||||
<image
|
||||
@@ -18,21 +18,46 @@
|
||||
class="headerIcon"
|
||||
/>
|
||||
</view>
|
||||
<view>
|
||||
<view class="name">{{ userinfo.nickName }}</view>
|
||||
</view>
|
||||
<!-- 签到 -->
|
||||
<view class="Sign" @click="sign" v-if="SignStatus === true">签到</view>
|
||||
<view class="Sign" v-if="SignStatus === false">已签到</view>
|
||||
<!-- -->
|
||||
<view class="Settings" @click="goSetting">
|
||||
<image
|
||||
class="SettingsIcon"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Settings.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<view class="PersonalInformationContent">
|
||||
<view class="nameandSign">
|
||||
<view>
|
||||
<view class="name">{{ userinfo.nickName }}</view>
|
||||
</view>
|
||||
<!-- 签到 -->
|
||||
<view class="Sign" @click="sign" v-if="SignStatus === true">签到</view>
|
||||
<view class="Sign" v-if="SignStatus === false">已签到</view>
|
||||
<!-- -->
|
||||
<view class="Settings" @click="goSetting">
|
||||
<image
|
||||
class="SettingsIcon"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Settings.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="level">
|
||||
<view class="points" @click="goPoints"
|
||||
>积分: {{ userinfo.points }}
|
||||
<image
|
||||
style="width: 15.5rpx; height: 15.04rpx; margin-left: 10rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/coin_records.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
style="width: 15.5rpx; height: 15.04rpx; margin-left: 0rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/coin_records.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
style="width: 15.5rpx; height: 15.04rpx; margin-left: 0rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/coin_records.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<!-- 主播库 -->
|
||||
<view class="PKInformation">
|
||||
@@ -47,7 +72,7 @@
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card" @click="anchorLibrary">
|
||||
<view
|
||||
class="cardContent"
|
||||
v-for="(item, index) in AnchorList"
|
||||
@@ -80,7 +105,7 @@
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card" @click="pkInformation">
|
||||
<view
|
||||
class="cardContent"
|
||||
v-for="(item, index) in pkInformationdata"
|
||||
@@ -119,6 +144,7 @@
|
||||
v-for="(item, index) in myPkRecorddata"
|
||||
:key="index"
|
||||
v-if="myPkRecorddata.length !== 0"
|
||||
@click="onItemClick(item)"
|
||||
>
|
||||
<view class="cardImg">
|
||||
<image
|
||||
@@ -127,7 +153,12 @@
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="Failure" v-if="item.winnerAnchorId !== item.anchorIdA && item.winnerAnchorId !== ''">
|
||||
<view
|
||||
class="Failure"
|
||||
v-if="
|
||||
item.winnerAnchorId !== item.anchorIdA && item.winnerAnchorId !== ''
|
||||
"
|
||||
>
|
||||
失败
|
||||
</view>
|
||||
<view class="Result" v-else-if="item.winnerAnchorId === item.anchorIdA">
|
||||
@@ -204,12 +235,26 @@ export default {
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.userinfo = res.data;
|
||||
console.log(this.userinfo);
|
||||
this.getpkInformation();
|
||||
this.getmyPkRecord();
|
||||
this.getSignStatus();
|
||||
this.getAnchorList();
|
||||
console.log(res.data);
|
||||
request({
|
||||
url: "user/getUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: res.data.id,
|
||||
},
|
||||
userInfo: true,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.userinfo = res.data;
|
||||
uni.setStorageSync("userinfo", res.data);
|
||||
this.getpkInformation();
|
||||
this.getmyPkRecord();
|
||||
this.getSignStatus();
|
||||
this.getAnchorList();
|
||||
} else {
|
||||
console.log(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
@@ -233,11 +278,13 @@ export default {
|
||||
},
|
||||
// 获取签到状态
|
||||
getSignStatus() {
|
||||
console.log("getSignStatus", this.userinfo.id);
|
||||
|
||||
const res = request({
|
||||
url: "user/checkSignStatus",
|
||||
method: "GET",
|
||||
data: {
|
||||
userId: this.userinfo.id,
|
||||
userId: Number(this.userinfo.id),
|
||||
},
|
||||
userInfo: true,
|
||||
}).then((res) => {
|
||||
@@ -312,6 +359,23 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转到PK记录详情页面
|
||||
onItemClick(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/DetailsPKRecords/DetailsPKRecords",
|
||||
success: (res) => {
|
||||
res.eventChannel.emit("itemDetail", {
|
||||
item: item,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// 跳转到积分页面
|
||||
goPoints() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/points",
|
||||
});
|
||||
},
|
||||
// 跳转到主播库页面
|
||||
anchorLibrary() {
|
||||
uni.navigateTo({
|
||||
@@ -385,6 +449,14 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.PersonalInformationContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.nameandSign {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.header {
|
||||
width: 144.5rpx;
|
||||
height: 144.5rpx;
|
||||
@@ -402,11 +474,24 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.level {
|
||||
display: flex;
|
||||
height: 46rpx;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
}
|
||||
.points {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #a4a4a4;
|
||||
}
|
||||
.name {
|
||||
width: 280rpx;
|
||||
font-size: 36.26rpx;
|
||||
font-weight: 500;
|
||||
color: #161616;
|
||||
font-weight: bold;
|
||||
white-space: nowrap; /* 防止换行 */
|
||||
overflow: hidden; /* 隐藏溢出内容 */
|
||||
text-overflow: ellipsis; /* 显示省略号 */
|
||||
|
||||
Reference in New Issue
Block a user