优化
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
</view>
|
||||
<view class="Navigation">
|
||||
<view class="Return" @click="goBack">
|
||||
<image class="Return" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill" />
|
||||
<image
|
||||
class="Return"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Content">
|
||||
@@ -134,11 +138,18 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 邀请信息 -->
|
||||
<view class="button" v-if="PkIDInfodata.pkStatus === 0 && ReceiverData.senderId !== id">
|
||||
<view
|
||||
class="button"
|
||||
v-if="PkIDInfodata.pkStatus === 0 && ReceiverData.senderId !== id"
|
||||
>
|
||||
<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="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>
|
||||
@@ -188,16 +199,18 @@ export default {
|
||||
this.customData = JSON.parse(options.customData);
|
||||
setTimeout(() => {
|
||||
this.getPkIDInfo();
|
||||
this.getPkyourInfo();
|
||||
this.getPkmineInfo();
|
||||
}, 500);
|
||||
this.getPkyourInfo();
|
||||
this.getPkmineInfo();
|
||||
}, 1000);
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
if (res.from === 'menu') {
|
||||
if (res.from === "menu") {
|
||||
return {
|
||||
title: '分享',
|
||||
path: `${getCurrentPages()[getCurrentPages().length - 1].route}?customData=${JSON.stringify(this.customData)}`,
|
||||
}
|
||||
title: "分享",
|
||||
path: `${
|
||||
getCurrentPages()[getCurrentPages().length - 1].route
|
||||
}?customData=${JSON.stringify(this.customData)}`,
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -209,7 +222,7 @@ export default {
|
||||
data: {
|
||||
id: this.customData.id,
|
||||
},
|
||||
userInfo: true
|
||||
userInfo: true,
|
||||
}).then((res) => {
|
||||
console.log(res.data);
|
||||
this.PkIDInfodata = res.data;
|
||||
@@ -222,11 +235,22 @@ export default {
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.customData.pkIdA,
|
||||
userId: this.id,
|
||||
from: 2,
|
||||
},
|
||||
userInfo: false,
|
||||
}).then((res) => {
|
||||
console.log(res.data);
|
||||
this.SenderData = res.data;
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
console.log(res.data);
|
||||
this.SenderData = res.data;
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: "获取发布者信息失败",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//被邀请者
|
||||
@@ -236,11 +260,21 @@ export default {
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.customData.pkIdB,
|
||||
userId: this.id,
|
||||
from: 2,
|
||||
},
|
||||
userInfo: false,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
console.log(res.data);
|
||||
this.ReceiverData = res.data;
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: "获取被邀请者信息失败",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//返回上一页
|
||||
@@ -251,17 +285,17 @@ export default {
|
||||
},
|
||||
formatDate: formatDate,
|
||||
//接受邀请提示
|
||||
AcceptHint(){
|
||||
this.$refs.popups.open('center');
|
||||
AcceptHint() {
|
||||
this.$refs.popups.open("center");
|
||||
},
|
||||
closeHint(){
|
||||
closeHint() {
|
||||
this.$refs.popups.close();
|
||||
},
|
||||
//拒绝邀请提示
|
||||
RefuseHint(){
|
||||
this.$refs.Refusepopup.open('center');
|
||||
RefuseHint() {
|
||||
this.$refs.Refusepopup.open("center");
|
||||
},
|
||||
RefuseHintcloseHint(){
|
||||
RefuseHintcloseHint() {
|
||||
this.$refs.Refusepopup.close();
|
||||
},
|
||||
//操作
|
||||
@@ -277,23 +311,23 @@ export default {
|
||||
}).then((res) => {
|
||||
const Hinttext = status === 1 ? "接受邀请成功" : "拒绝邀请成功";
|
||||
if (res.code === 200) {
|
||||
this.getPkIDInfo()
|
||||
this.$refs.popups.close();
|
||||
this.$refs.Refusepopup.close();
|
||||
wx.showToast({
|
||||
title: Hinttext,
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}else {
|
||||
wx.showToast({
|
||||
title: "操作失败",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
this.getPkIDInfo();
|
||||
this.$refs.popups.close();
|
||||
this.$refs.Refusepopup.close();
|
||||
wx.showToast({
|
||||
title: Hinttext,
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: "操作失败",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -457,11 +491,10 @@ export default {
|
||||
align-items: center;
|
||||
margin-top: 150rpx;
|
||||
}
|
||||
.buttontext{
|
||||
.buttontext {
|
||||
font-size: 40rpx;
|
||||
color: #666666;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
.accept {
|
||||
width: 325.38rpx;
|
||||
@@ -484,7 +517,7 @@ export default {
|
||||
font-size: 28.63rpx;
|
||||
line-height: 77.29rpx;
|
||||
}
|
||||
.popup-Hintcontent{
|
||||
.popup-Hintcontent {
|
||||
width: 600rpx;
|
||||
height: 500rpx;
|
||||
background-repeat: no-repeat;
|
||||
@@ -502,7 +535,7 @@ export default {
|
||||
font-weight: bold;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.popup-texts{
|
||||
.popup-texts {
|
||||
margin-left: 50rpx;
|
||||
color: #7e7e7e;
|
||||
font-size: 26rpx;
|
||||
|
||||
Reference in New Issue
Block a user