66cdc65a by simon

默认提交

1 parent ce01a4ce
......@@ -42,6 +42,7 @@ Page({
// 加入房间
joinRoomDialogVisible: false,
isJoin: false, // 是否能加入状态
joined: false, // 是否已加入
isPlayingBgm: false,
isMore: false,
......@@ -198,6 +199,9 @@ Page({
console.log("非房主:", ownerMember.mySelf == 0);
console.log("shareType为join:", options);
console.log("是否加入过:", joined);
this.setData({
joined
})
if (detailData.customMade == 1 && detailData.type == 1 && ownerMember.mySelf == 0 && options.t == "join" && !joined) {
this.setData({
joinRoomDialogVisible: true,
......
......@@ -165,15 +165,28 @@
</view>
<!-- 已经定制 -->
<view wx:if="{{detailData.customMade == 1}}" class="btn-wrap">
<!-- 能加入状态 -->
<block wx:if="{{isJoin}}">
<button bindtap="onBlessJoinHandler" class="btn btn1">加入组队祝福</button>
<!-- 已加入状态 -->
<block wx:if="{{joined}}">
<button bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</block>
<!-- 不能加入状态 -->
<block wx:else>
<button data-data="join" open-type="share" class="btn btn1">邀亲友组团拜年</button>
<!-- 能加入状态 -->
<block wx:if="{{isJoin}}">
<button bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button>
<button bindtap="onBlessJoinHandler" class="btn btn2">加入组队祝福</button>
</block>
<!-- 不能加入状态 -->
<block wx:else>
<!-- 自己房间 -->
<button wx:if="{{ownerMember.mySelf == 1}}" data-data="join" open-type="share" class="btn btn1">
邀亲友组团拜年
</button>
<!-- 非自己房间 -->
<button wx:else bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</block>
</block>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</view>
</block>
</view>
......