优化页面
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; /* 显示省略号 */
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<view class="AnchorATime">{{ formatDate(item.pkTime) }}</view>
|
||||
<view class="AnchorAICon">
|
||||
<view class="AnchorAIContext">实际打金币:</view>
|
||||
<view class="AnchorAIConNum">{{ item.userAcoin }}K</view>
|
||||
<view class="AnchorAIConNum">{{ item.userACoins }}K</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -47,7 +47,7 @@
|
||||
<view class="AnchorATime"> {{ formatDate(item.pkTime) }} </view>
|
||||
<view class="AnchorAICon">
|
||||
<view class="AnchorAIContext">实际打金币:</view>
|
||||
<view class="AnchorAIConNum">{{ item.userBcoin }}K</view>
|
||||
<view class="AnchorAIConNum">{{ item.userBCoins }}K</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="AnchorAImg">
|
||||
@@ -65,6 +65,7 @@
|
||||
</view>
|
||||
<view class="pkrecords-content">
|
||||
<scroll-view
|
||||
show-scrollbar="false"
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
refresher-enabled="true"
|
||||
@@ -74,13 +75,13 @@
|
||||
>
|
||||
<uni-card v-for="(items,index) in coinNumlist" :key="index">
|
||||
<view class="contentcard">
|
||||
<view class="contentcard-titleA":style="{'background-color': items.anchorIdA == items.winnerAnchorId ? '#00fbff5d' : '#ff000049'}">
|
||||
<view>金币数量</view>
|
||||
<view>{{items.anchorCoinA}}K</view>
|
||||
<view class="contentcard-titleA":style="{'background-color': items.anchorIdA == items.winnerAnchorId ? '#00fbff21' : '#ff000011'}">
|
||||
<view class="ciontext">金币数量</view>
|
||||
<view class="cion">{{items.anchorCoinA}}K</view>
|
||||
</view>
|
||||
<view class="contentcard-titleB" :style="{'background-color': items.anchorIdB == items.winnerAnchorId ? '#00fbff5d' : '#ff000049'}">
|
||||
<view>金币数量</view>
|
||||
<view>{{items.anchorCoinB}}K</view>
|
||||
<view class="contentcard-titleB" :style="{'background-color': items.anchorIdB == items.winnerAnchorId ? '#00fbff21' : '#ff000011'}">
|
||||
<view class="ciontext">金币数量</view>
|
||||
<view class="cion">{{items.anchorCoinB}}K</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
@@ -197,7 +198,7 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 28.55rpx;
|
||||
margin-top: 12rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.AnchorA {
|
||||
display: flex;
|
||||
@@ -230,16 +231,20 @@ export default {
|
||||
font-weight: 500;
|
||||
font-size: 31rpx;
|
||||
color: #161616;
|
||||
text-align: center;
|
||||
}
|
||||
.AnchorATime {
|
||||
font-weight: 400;
|
||||
font-size: 23rpx;
|
||||
color: #a3a3a3;
|
||||
margin-top: 12rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.AnchorAICon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 12rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.AnchorAIContext {
|
||||
font-weight: 400;
|
||||
@@ -312,7 +317,8 @@ export default {
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
margin-left:28.55rpx;
|
||||
margin-top: 13rpx;
|
||||
margin-top: 25rpx;
|
||||
border: #5ed8db solid 1rpx;
|
||||
}
|
||||
.contentcard-titleA{
|
||||
width: 50%;
|
||||
@@ -321,7 +327,7 @@ export default {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-right: #100e0f solid 1rpx;
|
||||
border-right: #58d8db solid 3rpx;
|
||||
border-top-left-radius: 15rpx;
|
||||
border-bottom-left-radius: 15rpx;
|
||||
}
|
||||
@@ -335,4 +341,13 @@ export default {
|
||||
border-top-right-radius: 15rpx;
|
||||
border-bottom-right-radius: 15rpx;
|
||||
}
|
||||
.ciontext{
|
||||
font-size: 28rpx;
|
||||
color: #a2a2a2;
|
||||
}
|
||||
.cion{
|
||||
font-size: 36rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -404,10 +404,10 @@ export default {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
.Coins {
|
||||
width: 330rpx;
|
||||
width: 400rpx;
|
||||
height: 65rpx;
|
||||
/* display: flex; */
|
||||
margin-right: 50rpx;
|
||||
margin-right: 10rpx;
|
||||
/* flex-direction: column; */
|
||||
}
|
||||
.country {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<view class="title">主播库</view>
|
||||
<view class="content">
|
||||
<scroll-view
|
||||
show-scrollbar="false"
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
refresher-enabled="true"
|
||||
@@ -208,10 +209,10 @@ export default {
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 120rpx;
|
||||
left: 315rpx;
|
||||
left: 335rpx;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
@@ -227,7 +228,7 @@ export default {
|
||||
}
|
||||
.card {
|
||||
width: 695rpx;
|
||||
height: 161rpx;
|
||||
height: 180rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
display: flex;
|
||||
@@ -347,8 +348,8 @@ export default {
|
||||
position: absolute;
|
||||
bottom: 200rpx;
|
||||
right: 100rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
z-index: 998;
|
||||
border-radius: 50rpx;
|
||||
/* background-color: #ffffff; */
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 120rpx;
|
||||
left: 315rpx;
|
||||
left: 335rpx;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
|
||||
@@ -422,10 +422,10 @@ export default {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
.Coins {
|
||||
width: 330rpx;
|
||||
width: 400rpx;
|
||||
height: 65rpx;
|
||||
/* display: flex; */
|
||||
margin-right: 50rpx;
|
||||
margin-right: 10rpx;
|
||||
/* flex-direction: column; */
|
||||
}
|
||||
.country {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<view class="title">PK信息</view>
|
||||
<view class="content">
|
||||
<scroll-view
|
||||
show-scrollbar="false"
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
refresher-enabled="true"
|
||||
@@ -65,16 +66,30 @@
|
||||
</view>
|
||||
<!-- <view class="handle"> -->
|
||||
<view class="handle" v-if="item.inviteStatus === 0">
|
||||
<view class="recompose" @click="onRecompose(item)">
|
||||
<view class="recompose" @click="onTop(item)">
|
||||
<image
|
||||
style="width: 46rpx; height: 46rpx"
|
||||
style="width: 40rpx; height: 40rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/pin.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<!-- <view class="recompose" @click="onOutTop(item)">
|
||||
<image
|
||||
style="width: 40rpx; height: 40rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/cancelPin.png.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view> -->
|
||||
<view class="expurgate" @click="onRecompose(item)">
|
||||
<image
|
||||
style="width: 40rpx; height: 40rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/recompose.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="expurgate" @click="onExpurgate(item)">
|
||||
<image
|
||||
style="width: 46rpx; height: 46rpx"
|
||||
style="width: 40rpx; height: 40rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/expurgate.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
@@ -84,7 +99,8 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<Recompose ref="createModule" class="createModule" :message="parentMessage"></Recompose>
|
||||
<Recompose ref="createModule" class="createModule" :message="parentMessage" @Refresh="onRefresherRefresh"></Recompose>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -162,6 +178,10 @@ export default {
|
||||
onRecompose(item) {
|
||||
this.parentMessage = item;
|
||||
this.createModule.open();
|
||||
},
|
||||
// 置顶
|
||||
onTop(item) {
|
||||
|
||||
},
|
||||
// 删除pk
|
||||
onExpurgate(item) {
|
||||
@@ -215,10 +235,10 @@ export default {
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 120rpx;
|
||||
left: 315rpx;
|
||||
left: 335rpx;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
@@ -234,7 +254,7 @@ export default {
|
||||
}
|
||||
.card {
|
||||
width: 695rpx;
|
||||
height: 161rpx;
|
||||
height: 180rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
display: flex;
|
||||
@@ -334,12 +354,12 @@ export default {
|
||||
.recompose {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-left: 90rpx;
|
||||
margin-left: 80rpx;
|
||||
}
|
||||
.expurgate {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-left: 40rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.createModule {
|
||||
position: fixed;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<!-- 内容 -->
|
||||
<view class="content">
|
||||
<scroll-view
|
||||
show-scrollbar="false"
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
refresher-enabled="true"
|
||||
@@ -56,7 +57,7 @@
|
||||
<view class="AnchorATime">{{ formatDate(item.pkTime) }}</view>
|
||||
<view class="AnchorAICon">
|
||||
<view class="AnchorAIContext">实际金币:</view>
|
||||
<view class="AnchorAIConNum">{{ item.userAcoin }}K</view>
|
||||
<view class="AnchorAIConNum">{{ item.userACoins}}K</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -72,7 +73,7 @@
|
||||
<view class="AnchorATime"> {{ formatDate(item.pkTime) }} </view>
|
||||
<view class="AnchorAICon">
|
||||
<view class="AnchorAIContext">实际打金币:</view>
|
||||
<view class="AnchorAIConNum">{{ item.userBcoin }}K</view>
|
||||
<view class="AnchorAIConNum">{{ item.userBCoins }}K</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="AnchorAImg">
|
||||
@@ -176,15 +177,16 @@ export default {
|
||||
this.triggered = false;
|
||||
if (type === 1) {
|
||||
this.pkmyRecordlist.push(...res.data);
|
||||
console.log(this.pkRecordlist);
|
||||
if (this.current === 1) {
|
||||
this.pkRecordlist = this.pkmyRecordlist;
|
||||
console.log(this.pkmyRecordlist);
|
||||
}
|
||||
} else {
|
||||
this.pkInvitationRecordlist.push(...res.data);
|
||||
console.log(this.pkInvitationRecordlist);
|
||||
if (this.current === 2) {
|
||||
this.pkRecordlist = this.pkInvitationRecordlist;
|
||||
console.log(this.pkInvitationRecordlist);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -229,10 +231,10 @@ export default {
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 120rpx;
|
||||
left: 315rpx;
|
||||
left: 335rpx;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
@@ -293,7 +295,7 @@ export default {
|
||||
/* 卡片 */
|
||||
.card {
|
||||
width: 694.66rpx;
|
||||
height: 161.26rpx;
|
||||
height: 200rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
display: flex;
|
||||
@@ -301,6 +303,7 @@ export default {
|
||||
align-items: center;
|
||||
margin-left: 28.55rpx;
|
||||
margin-top: 20rpx;
|
||||
border: 1rpx solid #c9f6f6;
|
||||
}
|
||||
.AnchorA {
|
||||
display: flex;
|
||||
@@ -313,7 +316,9 @@ export default {
|
||||
.AnchorAImg {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
border-radius: 100rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
background-color: #b1b1b1;
|
||||
display: flex;
|
||||
}
|
||||
@@ -321,19 +326,19 @@ export default {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.AnchorBinfo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.AnchorAname {
|
||||
width: 161.26rpx;
|
||||
font-weight: 500;
|
||||
font-size: 31rpx;
|
||||
color: #161616;
|
||||
color: #58d8db;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
white-space: nowrap; /* 防止换行 */
|
||||
overflow: hidden; /* 隐藏溢出内容 */
|
||||
text-overflow: ellipsis; /* 显示省略号 */
|
||||
@@ -342,11 +347,14 @@ export default {
|
||||
font-weight: 400;
|
||||
font-size: 23rpx;
|
||||
color: #a3a3a3;
|
||||
margin-top: 12rpx;
|
||||
margin-top: 8rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.AnchorAICon {
|
||||
display: flex;
|
||||
margin-top: 12rpx;
|
||||
flex-direction: column;
|
||||
margin-top: 8rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.AnchorAIContext {
|
||||
font-weight: 400;
|
||||
@@ -361,7 +369,7 @@ export default {
|
||||
.AnchorAImgcss {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
border-radius: 100rpx;
|
||||
border-top: #f7da60 solid 2rpx;
|
||||
border-left: #ffeeab solid 2rpx;
|
||||
border-bottom: #ffeeab solid 2rpx;
|
||||
@@ -370,7 +378,7 @@ export default {
|
||||
.AnchorBImgcss {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
border-radius: 100rpx;
|
||||
border-top: #ffc6ba solid 2rpx;
|
||||
border-left: #ffc6ba solid 2rpx;
|
||||
border-bottom: #5ddadd solid 2rpx;
|
||||
|
||||
181
pages/Mine/minecomponents/points.vue
Normal file
181
pages/Mine/minecomponents/points.vue
Normal file
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<view class="points">
|
||||
<view class="bg">
|
||||
<image
|
||||
class="bgImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="Return" @click="onBack">
|
||||
<image
|
||||
class="ReturnImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="title">积分</view>
|
||||
<view class="content">
|
||||
<scroll-view
|
||||
show-scrollbar="false"
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
refresher-enabled="true"
|
||||
refresher-threshold="40"
|
||||
@refresherrefresh="onRefresherRefresh"
|
||||
lower-threshold="100"
|
||||
@scrolltolower="onScrollToLower"
|
||||
:refresher-triggered="triggered"
|
||||
enable-flex="true"
|
||||
>
|
||||
<uni-card class="card" v-for="(item, index) in pointslist" :key="index">
|
||||
<view
|
||||
class="card-content"
|
||||
:style="{ 'background-color': item.status == 0 ? '#11ff002b' : '#ff000011' }"
|
||||
>
|
||||
<view class="time">
|
||||
{{ formatDate(item.time) }}
|
||||
</view>
|
||||
<view class="info">{{ item.info }}</view>
|
||||
<view class="num">{{ item.num }}</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../../components/request.js";
|
||||
import formatDate from "../../../components/formatDate.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello",
|
||||
userinfo: {},
|
||||
page: 0,
|
||||
triggered: false,
|
||||
pointslist: [],
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.userinfo = res.data;
|
||||
this.getPointsDetail();
|
||||
},
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
formatDate: formatDate,
|
||||
//下拉刷新
|
||||
onRefresherRefresh() {
|
||||
this.page = 0;
|
||||
this.triggered = true;
|
||||
this.pointslist = [];
|
||||
this.getPointsDetail();
|
||||
},
|
||||
//上拉加载
|
||||
onScrollToLower() {
|
||||
this.page += 1;
|
||||
this.getPointsDetail();
|
||||
},
|
||||
//获取积分详情
|
||||
getPointsDetail() {
|
||||
const res = request({
|
||||
url: "user/pointsDetail",
|
||||
method: "POST",
|
||||
data: {
|
||||
userId: this.userinfo.id,
|
||||
page: this.page,
|
||||
size: 10,
|
||||
},
|
||||
userInfo: true,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.triggered = false;
|
||||
this.pointslist.push(...res.data);
|
||||
} else {
|
||||
console.log(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 返回上一页
|
||||
onBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bg {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.bgImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return {
|
||||
position: absolute;
|
||||
top: 110rpx;
|
||||
left: 35rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
}
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 120rpx;
|
||||
left: 335rpx;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.content {
|
||||
position: absolute;
|
||||
top: 250rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 50rpx;
|
||||
}
|
||||
.scroll {
|
||||
height: 100%;
|
||||
width: 750rpx;
|
||||
}
|
||||
.card-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
width: 600rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
color: #7b7b7b;
|
||||
}
|
||||
.info {
|
||||
font-size: 24rpx;
|
||||
color: #898989;
|
||||
}
|
||||
.num {
|
||||
font-size: 24rpx;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -51,6 +51,7 @@
|
||||
:filterable="filterable"
|
||||
placeholder="请选择国家"
|
||||
:value="countrys"
|
||||
@blur="blur"
|
||||
/>
|
||||
<view
|
||||
v-if="countrys === '' || (countrys === null && Hint === true)"
|
||||
@@ -70,24 +71,24 @@
|
||||
@change="gender"
|
||||
:options="Gender"
|
||||
placeholder="性别"
|
||||
:value="message.sex === '1' ? 1 : 2"
|
||||
:value="genders"
|
||||
/>
|
||||
</view>
|
||||
<view class="Gendericoncss">
|
||||
<image
|
||||
v-if="genders === 0 || message.sex === '0'"
|
||||
v-if="genders === 0 "
|
||||
class="Gendericon"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/ask.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-if="genders === 1 || message.sex === '1'"
|
||||
v-if="genders === 1"
|
||||
class="Gendericon"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/man.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-if="genders === 2 || message.sex === '2'"
|
||||
v-if="genders === 2"
|
||||
class="Gendericon"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/girl.png"
|
||||
mode="scaleToFill"
|
||||
@@ -158,37 +159,43 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹窗 -->
|
||||
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
|
||||
<!-- 弹窗 -->
|
||||
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
|
||||
<view class="popup-container">
|
||||
<view class="popup-title">选择我的主播</view>
|
||||
<scroll-view scroll-y="true" class="scroll" v-if="AnchorList.length !== 0">
|
||||
<!-- -->
|
||||
<view class="card" v-for="(item, index) in AnchorList" :key="index">
|
||||
<view
|
||||
class="card-content"
|
||||
@click="Select(item.id, item)"
|
||||
:style="{
|
||||
background: selectedId === item.id ? '#f6f6f6' : '#ffffff',
|
||||
}"
|
||||
>
|
||||
<view class="Avatarimg">
|
||||
<image class="avatar" :src="item.headerIcon" mode="scaleToFill" />
|
||||
<scroll-view
|
||||
show-scrollbar="false"
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
v-if="AnchorList.length !== 0"
|
||||
>
|
||||
<!-- -->
|
||||
<view class="card" v-for="(item, index) in AnchorList" :key="index">
|
||||
<view
|
||||
class="card-content"
|
||||
@click="Select(item.id, item)"
|
||||
:style="{
|
||||
background: selectedId === item.id ? '#f6f6f6' : '#ffffff',
|
||||
}"
|
||||
>
|
||||
<view class="Avatarimg">
|
||||
<image class="avatar" :src="item.headerIcon" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="NameMoney">
|
||||
<view class="TimeMoney">
|
||||
<view class="NameMoney_Name">{{ item.anchorId }}</view>
|
||||
</view>
|
||||
<view class="NameMoney">
|
||||
<view class="TimeMoney">
|
||||
<view class="NameMoney_Name">{{ item.anchorId }}</view>
|
||||
</view>
|
||||
<view class="TimeMoney">
|
||||
<view class="TimeMoney_country">{{ item.country }}</view>
|
||||
</view>
|
||||
<view class="TimeMoney">
|
||||
<view class="TimeMoney_country">{{ item.country }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
</scroll-view>
|
||||
<view v-if="AnchorList.length === 0" class="no-data"><view class="no-data-text">暂无数据</view></view>
|
||||
<view v-if="AnchorList.length === 0" class="no-data"
|
||||
><view class="no-data-text">暂无数据</view></view
|
||||
>
|
||||
<view class="popup-btn">
|
||||
<button class="invite" type="primary" @click="invite()">确认</button>
|
||||
<button class="cancel" type="default" @click="close()">取消</button>
|
||||
@@ -224,6 +231,8 @@ export default {
|
||||
AnchorList: [], //主播列表
|
||||
selectedId: null, //选择的主播
|
||||
selectedIddata: null, //选择的主播数据
|
||||
AnchorProfilePicture: "", //选择的主播头像
|
||||
senderId: "", //发送者id
|
||||
};
|
||||
},
|
||||
props: {
|
||||
@@ -237,27 +246,21 @@ export default {
|
||||
this.session = newQuestion.pkNumber;
|
||||
this.remarks = newQuestion.remark;
|
||||
this.datetimesingle = formatDate(newQuestion.pkTime);
|
||||
this.id = newQuestion.senderId;
|
||||
this.id = newQuestion.id;
|
||||
this.nameAnchor = newQuestion.anchorId;
|
||||
this.countrys = newQuestion.country;
|
||||
this.genders = newQuestion.sex === "1" ? 1 : 2;
|
||||
this.AnchorProfilePicture = newQuestion.anchorIcon.split("/").pop();
|
||||
this.senderId = newQuestion.senderId;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
},
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//关闭弹窗
|
||||
close() {
|
||||
//关闭弹窗
|
||||
close() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
//确认选择
|
||||
invite(){
|
||||
invite() {
|
||||
if (this.selectedId) {
|
||||
this.nameAnchor = this.selectedIddata.anchorId;
|
||||
this.AnchorProfilePicture = this.selectedIddata.headerIcon;
|
||||
@@ -273,8 +276,8 @@ export default {
|
||||
//选中的主播
|
||||
Select(id, item) {
|
||||
if (this.selectedId !== id) {
|
||||
this.selectedId = id;
|
||||
this.selectedIddata = item;
|
||||
this.selectedId = id;
|
||||
this.selectedIddata = item;
|
||||
} else {
|
||||
this.selectedId = null;
|
||||
this.selectedIddata = null;
|
||||
@@ -299,9 +302,9 @@ export default {
|
||||
});
|
||||
},
|
||||
//选择我的主播
|
||||
chooseMyStreamer(){
|
||||
chooseMyStreamer() {
|
||||
this.$refs.popup.open("center");
|
||||
this.getAnchorList()
|
||||
this.getAnchorList();
|
||||
},
|
||||
//性别
|
||||
gender(item) {
|
||||
@@ -324,22 +327,51 @@ export default {
|
||||
if (this.Display) {
|
||||
this.Display = false;
|
||||
this.Hint = false;
|
||||
this.nameAnchor = "";
|
||||
this.genders = 0;
|
||||
this.numberCoins = "";
|
||||
this.remarks = "";
|
||||
this.datetimesingle = "";
|
||||
this.countrys = "";
|
||||
this.session = "";
|
||||
} else {
|
||||
this.Display = true;
|
||||
}
|
||||
},
|
||||
//获取主播名称
|
||||
NameAnchor: function (event) {
|
||||
this.nameAnchor = event.target.value;
|
||||
//获取主播名称以及头像地址
|
||||
blur(event) {
|
||||
if (this.nameAnchor !== event.target.value) {
|
||||
this.nameAnchor = event.target.value;
|
||||
uni.showLoading({
|
||||
title: "正在验证主播",
|
||||
mask: true,
|
||||
});
|
||||
uni.request({
|
||||
url: "https://python.yolojt.com/api/" + this.nameAnchor,
|
||||
success: (res) => {
|
||||
if (res.data.code === 200) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "查询成功",
|
||||
icon: "none",
|
||||
duration: 3000,
|
||||
});
|
||||
this.AnchorProfilePicture = res.data.data;
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "未查询到该主播",
|
||||
icon: "none",
|
||||
duration: 3000,
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "网络请求失败",
|
||||
icon: "none",
|
||||
duration: 3000,
|
||||
});
|
||||
},
|
||||
});
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
async Publish() {
|
||||
//判断是否为空
|
||||
if (
|
||||
@@ -382,22 +414,24 @@ export default {
|
||||
}
|
||||
//发送请求
|
||||
uni.showLoading({
|
||||
title: "发布中...",
|
||||
title: "修改中...",
|
||||
mask: true,
|
||||
});
|
||||
console.log(this.senderId,this.sendingTime, this.nameAnchor, this.genders, this.numberCoins, this.remarks, this.id, this.AnchorProfilePicture, this.session);
|
||||
|
||||
const res = await request({
|
||||
url: "pk/addPkData",
|
||||
url: "pk/updatePkInfoById",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
anchorId: this.nameAnchor,
|
||||
pkTime: this.sendingTime,
|
||||
sex: this.genders,
|
||||
country: this.countrys,
|
||||
coin: this.numberCoins,
|
||||
remark: this.remarks,
|
||||
status: 0,
|
||||
senderId: this.id,
|
||||
anchorIcon: "",
|
||||
senderId: this.senderId,
|
||||
anchorIcon: this.AnchorProfilePicture,
|
||||
pkNumber: this.session,
|
||||
},
|
||||
userInfo: true,
|
||||
@@ -412,15 +446,16 @@ export default {
|
||||
this.datetimesingle = "";
|
||||
this.session = "";
|
||||
uni.hideLoading();
|
||||
this.$emit('Refresh');
|
||||
uni.showToast({
|
||||
title: "发布成功",
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "发布失败",
|
||||
title: "修改失败",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
@@ -604,10 +639,10 @@ export default {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
.Coins {
|
||||
width: 330rpx;
|
||||
width: 400rpx;
|
||||
height: 65rpx;
|
||||
/* display: flex; */
|
||||
margin-right: 50rpx;
|
||||
margin-right: 10rpx;
|
||||
/* flex-direction: column; */
|
||||
}
|
||||
.country {
|
||||
@@ -663,7 +698,7 @@ export default {
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.popup-container{
|
||||
.popup-container {
|
||||
width: 600rpx;
|
||||
height: 800rpx;
|
||||
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
|
||||
@@ -674,18 +709,18 @@ export default {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.popup-title{
|
||||
.popup-title {
|
||||
color: #161616;
|
||||
font-size: 36.26rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 30rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.scroll{
|
||||
.scroll {
|
||||
width: 90%;
|
||||
height: 500rpx;
|
||||
}
|
||||
.card{
|
||||
.card {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
.card-content {
|
||||
@@ -734,7 +769,7 @@ export default {
|
||||
overflow: hidden; /* 隐藏溢出内容 */
|
||||
text-overflow: ellipsis; /* 显示省略号 */
|
||||
}
|
||||
.TimeMoney_country{
|
||||
.TimeMoney_country {
|
||||
margin-top: 10rpx;
|
||||
width: 400rpx;
|
||||
text-align: left;
|
||||
@@ -771,14 +806,14 @@ export default {
|
||||
border-bottom-right-radius: 50rpx;
|
||||
border: 1rpx solid #03aba8;
|
||||
}
|
||||
.no-data{
|
||||
.no-data {
|
||||
width: 90%;
|
||||
height: 500rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.no-data-text{
|
||||
.no-data-text {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -54,10 +54,10 @@ export default {
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 120rpx;
|
||||
left: 315rpx;
|
||||
left: 335rpx;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user