优化页面

This commit is contained in:
pengxiaolong
2025-06-20 21:55:09 +08:00
parent 2afc95d531
commit acc81963e9
405 changed files with 1362 additions and 1284 deletions

View File

@@ -135,14 +135,34 @@
</view>
<!-- 邀请信息 -->
<view class="button" v-if="PkIDInfodata.pkStatus === 0 && ReceiverData.senderId !== id">
<button class="accept" @click="operation(1)">接受邀请</button>
<button class="reject" @click="operation(2)">拒绝邀请</button>
<button class="accept" @click="AcceptHint()">接受邀请</button>
<button class="reject" @click="RefuseHint()">拒绝邀请</button>
</view>
<view v-if="ReceiverData.senderId === id && PkIDInfodata.pkStatus === 0" class="button buttontext">等待对方接受邀请</view>
<view v-if="PkIDInfodata.pkStatus === 1" class="button buttontext">已接受邀请</view>
<view v-if="PkIDInfodata.pkStatus === 2" class="button buttontext">已拒绝邀请</view>
</view>
</view>
<uni-popup ref="popups" type="center" border-radius="10px 10px 0 0">
<view class="popup-Hintcontent">
<view class="popup-text">提示</view>
<view class="popup-texts">邀请成功后的pk不可修改不可删除请谨慎操作</view>
<view class="popup-btn">
<button class="invite" type="primary" @click="operation(1)">确认</button>
<button class="cancel" type="default" @click="closeHint()">取消</button>
</view>
</view>
</uni-popup>
<uni-popup ref="Refusepopup" type="center" border-radius="10px 10px 0 0">
<view class="popup-Hintcontent">
<view class="popup-text">提示</view>
<view class="popup-texts">您确定要拒绝该邀请吗</view>
<view class="popup-btn">
<button class="invite" type="primary" @click="operation(2)">确认</button>
<button class="cancel" type="default" @click="RefuseHintcloseHint()">取消</button>
</view>
</view>
</uni-popup>
</template>
<script>
@@ -166,6 +186,7 @@ export default {
},
});
this.customData = JSON.parse(options.customData);
console.log("customData", this.customData);
this.getPkyourInfo();
this.getPkmineInfo();
this.getPkIDInfo();
@@ -194,6 +215,7 @@ export default {
},
userInfo: true,
}).then((res) => {
console.log(res.data);
this.SenderData = res.data;
});
},
@@ -207,8 +229,8 @@ export default {
},
userInfo: true,
}).then((res) => {
console.log(res.data);
this.ReceiverData = res.data;
});
},
//返回上一页
@@ -218,6 +240,21 @@ export default {
});
},
formatDate: formatDate,
//接受邀请提示
AcceptHint(){
this.$refs.popups.open('center');
},
closeHint(){
this.$refs.popups.close();
},
//拒绝邀请提示
RefuseHint(){
this.$refs.Refusepopup.open('center');
},
RefuseHintcloseHint(){
this.$refs.Refusepopup.close();
},
//操作
async operation(status) {
const res = await request({
url: "pk/updatePkStatus",
@@ -231,6 +268,8 @@ export default {
const Hinttext = status === 1 ? "接受邀请成功" : "拒绝邀请成功";
if (res.code === 200) {
this.getPkIDInfo()
this.$refs.popups.close();
this.$refs.Refusepopup.close();
wx.showToast({
title: Hinttext,
icon: "success",
@@ -435,4 +474,57 @@ export default {
font-size: 28.63rpx;
line-height: 77.29rpx;
}
.popup-Hintcontent{
width: 600rpx;
height: 500rpx;
background-repeat: no-repeat;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
background-position: center;
}
.popup-text {
color: #161616;
font-size: 36.26rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.popup-texts{
margin-left: 50rpx;
color: #7e7e7e;
font-size: 26rpx;
margin-right: 50rpx;
margin-top: 70rpx;
margin-bottom: 70rpx;
}
.popup-btn {
display: flex;
justify-content: space-around;
margin-top: 50rpx;
}
.invite {
width: 225.19rpx;
height: 78.24rpx;
font-size: 28.63rpx;
line-height: 80rpx;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
background-image: linear-gradient(135deg, #4fcacd, #5fdbde);
}
.cancel {
width: 225.19rpx;
height: 78.24rpx;
font-size: 28.63rpx;
line-height: 80rpx;
margin-left: 30rpx;
color: #03aba8;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
border: 1rpx solid #03aba8;
}
</style>