优化页面

This commit is contained in:
pengxiaolong
2025-06-18 16:01:55 +08:00
parent e464d99af5
commit ec9dcb486f
122 changed files with 349 additions and 251 deletions

View File

@@ -114,7 +114,6 @@ export default {
// 监听itemDetail事件
eventChannel.on("itemDetail", (data) => {
this.item = data.item; // 将接收到的数据赋值给item
console.log("接收到的数据:", this.item);
this.getCoinNum(this.item)
});
},

View File

@@ -130,12 +130,10 @@ export default {
//性别
gender(item) {
this.genders = item.value;
console.log(item);
},
//国家
country(item) {
this.countrys = item.value;
console.log(item);
},
handleOverlayClick(event) {

View File

@@ -107,7 +107,6 @@ export default {
key: "userinfo",
success: (res) => {
this.userinfo = res.data;
console.log(this.userinfo);
this.getAnchorList();
},
});

View File

@@ -128,7 +128,6 @@ export default {
},
watch: {
message(newQuestion, oldQuestion) {
console.log(newQuestion);
this.id = newQuestion.id;
this.nameAnchor = newQuestion.anchorId;
this.genders = newQuestion.gender;
@@ -148,12 +147,10 @@ export default {
//性别
gender(item) {
this.genders = item.value;
console.log(item);
},
//国家
country(item) {
this.countrys = item.value;
console.log(item);
},
handleOverlayClick(event) {

View File

@@ -100,6 +100,7 @@
</view>
</view>
<Recompose ref="createModule" class="createModule" :message="parentMessage" @Refresh="onRefresherRefresh"></Recompose>
<!-- 置顶弹窗 -->
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
<view class="popup-container">
<view class="popup-title">选择置顶时长</view>
@@ -114,6 +115,28 @@
</view>
</view>
</uni-popup>
<!-- 取消置顶弹窗 -->
<uni-popup ref="popupOut" type="center" border-radius="10px 10px 0 0">
<view class="popup-container-out">
<view class="popup-title">您确定要取消置顶吗</view>
<view class="popup-text"> 取消置顶后该用户将不再享有置顶特权但仍可继续参与 PK 挑战若置顶时长不足 1 小时系统将按 1 小时计算积分扣除并于取消后按实际使用时长比例返还剩余积分是否确认执行此操作</view>
<view class="popup-btn">
<view class="uni-primary" @click="onOutTopConfirm">确定</view>
<view class="uni-default" @click="closePopupOut">取消</view>
</view>
</view>
</uni-popup>
<!-- 删除弹窗 -->
<uni-popup ref="popupExpurgate" type="center" border-radius="10px 10px 0 0">
<view class="popup-container-expurgate">
<view class="popup-title">您确定要删除该PK吗</view>
<view class="popup-text"> 删除后该用户将无法再参与该 PK 挑战是否确认执行此操作</view>
<view class="popup-btn">
<view class="uni-primary" @click="onExpurgateConfirm">确定</view>
<view class="uni-default" @click="closePopupExpurgate">取消</view>
</view>
</view>
</uni-popup>
</template>
<script>
@@ -134,7 +157,9 @@ export default {
pickerArray: [],
index:0,
topPinnedPersondata:{},
Topdate:0
Topdate:0,
popupOutdata:{},
popupExpurgatedata:{},
};
},
onLoad() {
@@ -142,7 +167,6 @@ export default {
key: "userinfo",
success: (res) => {
this.userinfo = res.data;
console.log(this.userinfo);
this.getpkList();
},
});
@@ -185,7 +209,6 @@ export default {
}).then((res) => {
if (res.code == 200) {
this.pkList.push(...res.data);
console.log(this.pkList);
this.triggered = false;
} else {
console.log(res.msg);
@@ -218,7 +241,6 @@ export default {
}else{
this.Topdate = this.topPinnedPersondata.pkTime
}
console.log(this.Topdate,this.topPinnedPersondata.id);
request({
url: "user/pinToTop",
@@ -232,7 +254,7 @@ export default {
if (res.code == 200) {
this.onRefresherRefresh();
uni.showToast({
title:res.msg,
title:res.data,
icon: "none",
duration: 3000,
});
@@ -248,16 +270,22 @@ export default {
},
//取消置顶
onOutTop(item) {
this.$refs.popupOut.open("center");
this.popupOutdata = item
},
// 确认取消置顶
onOutTopConfirm() {
request({
url: "user/cancelPin",
method: "POST",
data: {
articleId: item.id,
articleId: this.popupOutdata.id,
},
userInfo: true,
}).then((res) => {
if (res.code == 200) {
this.onRefresherRefresh();
this.closePopupOut();
this.onRefresherRefresh()
uni.showToast({
title: res.data,
icon: "none",
@@ -268,28 +296,49 @@ export default {
}
});
},
// 取消取消置顶
closePopupOut() {
this.$refs.popupOut.close();
this.popupOutdata = {}
},
// 删除pk
onExpurgate(item) {
this.$refs.popupExpurgate.open("center");
this.popupExpurgatedata = item
},
// 确认删除pk
onExpurgateConfirm() {
const res = request({
url: "pk/deletePkDataWithId",
method: "POST",
data: {
id: item.id,
id: this.popupExpurgatedata.id,
},
userInfo: true,
}).then((res) => {
if (res.code == 200) {
this.onRefresherRefresh();
this.closePopupExpurgate();
uni.showToast({
title: "删除成功",
title: res.msg,
icon: "none",
duration: 2000,
});
} else {
console.log(res.msg);
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000,
});
}
});
},
// 关闭删除弹窗
closePopupExpurgate() {
this.$refs.popupExpurgate.close();
this.popupExpurgatedata = {}
},
//
},
components: {
Recompose,
@@ -462,12 +511,37 @@ export default {
flex-direction: column;
align-items: center;
}
.popup-container-out{
width: 500rpx;
height: 400rpx;
background-color: #ffffff;
border-radius: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 30rpx;
}
.popup-container-expurgate{
width: 500rpx;
height: 300rpx;
background-color: #ffffff;
border-radius: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 30rpx;
}
.popup-title{
font-size: 30rpx;
color: #161616;
font-weight: bold;
margin-top: 30rpx;
}
.popup-text{
font-size: 25rpx;
color: #959595;
margin-top: 30rpx;
}
.popup-picker{
margin-top: 30rpx;
width: 400rpx;

View File

@@ -179,14 +179,11 @@ export default {
this.pkmyRecordlist.push(...res.data);
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 {

View File

@@ -30,13 +30,13 @@
<uni-card class="card" v-for="(item, index) in pointslist" :key="index" >
<view
class="card-content"
:style="{ 'background-color': item.status == 0 ? '#11ff002b' : '#ff000011' }"
:style="{ 'background-color': item.status == 0 ? '#ff000011' : '#11ff002b' }"
>
<view class="info"><view>{{ item.info }}</view>&nbsp;&nbsp;<view class="num">{{item.status == 0? '-'+ item.number : '+' +item.number }}</view></view>
<view class="time">
{{ formatDate(item.time) }}
</view>
<view class="info">{{ item.info }}</view>
<view class="num">{{ item.number }}</view>
</view>
</uni-card>
</scroll-view>
@@ -93,9 +93,7 @@ export default {
userInfo: true,
}).then((res) => {
if (res.code === 200) {
console.log(res.data);
this.pointslist.push(...res.data);
console.log("```````````````````", this.pointslist);
this.triggered = false;
} else {
console.log(res.msg);
@@ -173,6 +171,7 @@ export default {
.info {
font-size: 24rpx;
color: #898989;
display: flex;
}
.num {
font-size: 24rpx;

View File

@@ -311,12 +311,10 @@ export default {
//性别
gender(item) {
this.genders = item.value;
console.log(item);
},
//日期
country(item) {
this.countrys = item.value;
console.log(item);
},
// //主播名称
// handleOverlayClick(event) {
@@ -419,7 +417,6 @@ export default {
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/updatePkInfoById",