66cdc65a by simon

默认提交

1 parent ce01a4ce
...@@ -42,6 +42,7 @@ Page({ ...@@ -42,6 +42,7 @@ Page({
42 // 加入房间 42 // 加入房间
43 joinRoomDialogVisible: false, 43 joinRoomDialogVisible: false,
44 isJoin: false, // 是否能加入状态 44 isJoin: false, // 是否能加入状态
45 joined: false, // 是否已加入
45 46
46 isPlayingBgm: false, 47 isPlayingBgm: false,
47 isMore: false, 48 isMore: false,
...@@ -198,6 +199,9 @@ Page({ ...@@ -198,6 +199,9 @@ Page({
198 console.log("非房主:", ownerMember.mySelf == 0); 199 console.log("非房主:", ownerMember.mySelf == 0);
199 console.log("shareType为join:", options); 200 console.log("shareType为join:", options);
200 console.log("是否加入过:", joined); 201 console.log("是否加入过:", joined);
202 this.setData({
203 joined
204 })
201 if (detailData.customMade == 1 && detailData.type == 1 && ownerMember.mySelf == 0 && options.t == "join" && !joined) { 205 if (detailData.customMade == 1 && detailData.type == 1 && ownerMember.mySelf == 0 && options.t == "join" && !joined) {
202 this.setData({ 206 this.setData({
203 joinRoomDialogVisible: true, 207 joinRoomDialogVisible: true,
......
...@@ -165,15 +165,28 @@ ...@@ -165,15 +165,28 @@
165 </view> 165 </view>
166 <!-- 已经定制 --> 166 <!-- 已经定制 -->
167 <view wx:if="{{detailData.customMade == 1}}" class="btn-wrap"> 167 <view wx:if="{{detailData.customMade == 1}}" class="btn-wrap">
168 <!-- 能加入状态 --> 168 <!-- 已加入状态 -->
169 <block wx:if="{{isJoin}}"> 169 <block wx:if="{{joined}}">
170 <button bindtap="onBlessJoinHandler" class="btn btn1">加入组队祝福</button> 170 <button bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button>
171 <button open-type="share" class="btn btn2">送祝福给亲友</button>
171 </block> 172 </block>
172 <!-- 不能加入状态 -->
173 <block wx:else> 173 <block wx:else>
174 <button data-data="join" open-type="share" class="btn btn1">邀亲友组团拜年</button> 174 <!-- 能加入状态 -->
175 <block wx:if="{{isJoin}}">
176 <button bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button>
177 <button bindtap="onBlessJoinHandler" class="btn btn2">加入组队祝福</button>
178 </block>
179 <!-- 不能加入状态 -->
180 <block wx:else>
181 <!-- 自己房间 -->
182 <button wx:if="{{ownerMember.mySelf == 1}}" data-data="join" open-type="share" class="btn btn1">
183 邀亲友组团拜年
184 </button>
185 <!-- 非自己房间 -->
186 <button wx:else bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button>
187 <button open-type="share" class="btn btn2">送祝福给亲友</button>
188 </block>
175 </block> 189 </block>
176 <button open-type="share" class="btn btn2">送祝福给亲友</button>
177 </view> 190 </view>
178 </block> 191 </block>
179 </view> 192 </view>
......