|
@@ -610,20 +610,29 @@ export default {
|
|
|
},
|
|
|
onJoin() {
|
|
|
let that = this;
|
|
|
- // this.$refs.joinDialog.open();
|
|
|
- myGameJoinIdApi(that.noteDetails.id)
|
|
|
- .then((res) => {
|
|
|
- that.$util.Tips({
|
|
|
- title: "加入成功",
|
|
|
- });
|
|
|
- that.noteDetails.userIsJoin = !that.noteDetails.userIsJoin;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- uni.showToast({
|
|
|
- title: err,
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
+ uni.showModal({
|
|
|
+ content: "确定要加入么?",
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ myGameJoinIdApi(that.noteDetails.id)
|
|
|
+ .then((res) => {
|
|
|
+ that.$util.Tips({
|
|
|
+ title: "加入成功",
|
|
|
+ });
|
|
|
+ that.noteDetails.userIsJoin = !that.noteDetails.userIsJoin;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ uni.showToast({
|
|
|
+ title: err,
|
|
|
+ icon: "none",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log("用户点击取消");
|
|
|
+ }
|
|
|
+ },
|
|
|
});
|
|
|
+ // this.$refs.joinDialog.open();
|
|
|
},
|
|
|
onJoinColse() {
|
|
|
let that = this;
|
|
@@ -632,18 +641,18 @@ export default {
|
|
|
success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
myGameJoinIdApi(that.noteDetails.id)
|
|
|
- .then((res) => {
|
|
|
- that.$util.Tips({
|
|
|
- title: "取消成功",
|
|
|
- });
|
|
|
- that.noteDetails.userIsJoin = !that.noteDetails.userIsJoin;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- uni.showToast({
|
|
|
- title: err,
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
+ .then((res) => {
|
|
|
+ that.$util.Tips({
|
|
|
+ title: "取消成功",
|
|
|
+ });
|
|
|
+ that.noteDetails.userIsJoin = !that.noteDetails.userIsJoin;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ uni.showToast({
|
|
|
+ title: err,
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
+ });
|
|
|
} else if (res.cancel) {
|
|
|
console.log("用户点击取消");
|
|
|
}
|