blessing.wxml
14.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<poster id="poster" hide-loading="{{true}}" preload="{{false}}" config="{{posterConfig}}" bind:success="onPosterSuccess" bind:fail="onPosterFail"></poster>
<view class="page">
<view class="app__bgc bgc" style="background-color: {{detailData.background}};"></view>
<image mode="scaleToFill" class="ebg" src="{{detailData.backgroundImage}}" />
<!-- <image mode="aspectFill" class="ebg" src="{{detailData.backgroundGif}}" /> -->
<view class="ebggif" style="background: url('{{detailData.backgroundGif}}');position: fixed;width: 100%;height: 100%; background-size: 100% 100%;background-size: contain;"></view>
<!-- <view class="ebggif" ></view> -->
<view class="app__content main">
<!-- 顶部背景 -->
<image class="top-bg" mode="widthFix" src="{{detailData.headImage}}" />
<!-- <view class="top-bg"></view> -->
<view class="top-space"></view>
<view class="content">
<view class="title">{{lunarDate}}</view>
<!-- 用户 -->
<view class="user">
<!-- 用户头像 -->
<view class="portrait">
<image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" />
<image class="portrait-border ani-rotation" mode="scaleToFill" src="{{detailData.headFrame}}" />
</view>
<!-- 用户名称 -->
<view class="name">
<view class="tt">{{ ownerMember.memberName || '我'}}</view>
<image wx:if="{{ownerMember.mySelf == 1 && detailData.customMade == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
</view>
<!-- 编辑房间信息 组队时候才显示 -->
<view wx:if="{{detailData.type == 1}}" class="edit">
<view class="tt t1">{{isAuth ? '携' + detailData.familyName : '携家人'}}</view>
<image wx:if="{{ownerMember.mySelf == 1 && detailData.customMade == 1}}" bindtap="showUpdateRoomDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
<view wx:if="{{memberList.length > 0}}" class="tt t2">{{detailData.count}}人</view>
</view>
<!-- 用户组 -->
<view wx:if="{{detailData.type == 1}}" class="group {{isMore ? 'all' : ''}} {{memberList.length >= 6 && !isMore ? 'six':''}}">
<view wx:for="{{memberList}}" wx:key="{{index}}" class="group-item">
<image class="group-item-portrait" mode="scaleToFill" src="{{item.memberHead}}" />
<view class="group-item-name">
<view class="t1">{{item.memberName}}</view>
<image wx:if="{{item.mySelf == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
</view>
</view>
<!-- 邀请 房主或组队模式显示 -->
<view class="group-item" wx:if="{{options.t || ownerMember.mySelf == 1}}">
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
<button wx:else data-data="join" open-type="share" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
<!-- <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn1">
邀亲友组团拜年
</button> -->
</view>
</view>
<!-- 更多 -->
<view bindtap="onShowMoreHandler" wx:if="{{memberList.length >= 6 && !isMore}}" class="more">
查看更多
<image class="icon-down" mode="widthFix" src="../../image/blessing/icon-down-arrow.png" />
</view>
<view bindtap="onHideMoreHandler" wx:if="{{memberList.length >= 6 && isMore}}" class="more more2">
收起
<image class="icon-down" mode="widthFix" src="../../image/blessing/icon-up-arrow.png" />
</view>
<!-- 自定义句子 -->
<view class="sentence">{{detailData.sentence}}</view>
</view>
<!-- 祝福内容 -->
<view class="blessing">
<view wx:for="{{blessContent}}" wx:key="{{index}}" class="blessing-item">
<!-- 图片 -->
<image mode="widthFix" wx:if="{{item.type == 'image' && item.url}}" class="blessing-item-image" src="{{item.url}}" />
<!-- 文本 -->
<view wx:if="{{item.type == 'text'}}" class="blessing-item-text" style="color: {{item.color ? item.color : '#333333'}};">
{{item.content}}
</view>
</view>
</view>
<!-- 尾部内容 暂时不显示 -->
<view class="tail">
<!-- 尾部头像 -->
<view class="portrait">
<image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" />
<image class="portrait-border ani-rotation" mode="scaleToFill" src="{{detailData.headFrame}}" />
</view>
<view class="name">
<view class="tt t1">{{ownerMember.memberName}}</view>
<view class="tt t2">{{detailData.sentence}}</view>
</view>
<!-- 按钮组 -->
<view class="tail-btn-wrap">
<!-- 分享团队图片 -->
<!-- <image bindtap="onPosterHandler" wx:if="{{detailData.type == 1}}" mode="widthFix" class="tail-btn-wrap-item blessing-share-group-btn" src="../../image/blessing/blessing-share-group-btn.png" /> -->
<view bindtap="onPosterHandler" wx:if="{{detailData.type == 1}}" class="tail-btn-wrap-item more-template2 ">
<view class="btn btn2">分享团队图片</view>
</view>
<view wx:if="{{detailData.type == 0}}" bindtap="toReward" class="tail-btn-wrap-item more-template2">
<view class="btn btn2">赞赏祝福</view>
</view>
<!-- 选择更多祝福模板 -->
<view bindtap="onMoreTemplateHandler" class="tail-btn-wrap-item more-template2 ">
<view class="btn btn1">选择更多祝福模版 >></view>
</view>
</view>
<!-- 尾图 -->
<image wx:if="{{detailData.tailImage}}" class="tail-image-bot" mode="widthFix" src="{{detailData.tailImage}}" />
<view wx:else class="tail-bot-space"></view>
</view>
</view>
<!-- fix底部 -->
<view class="bottom">
<!-- 分情况显示btn-wrap -->
<!-- 单人 -->
<block wx:if="{{detailData.type == 0}}">
<!-- 自己 -->
<block wx:if="{{ownerMember.mySelf == 1}}">
<!-- 未定制 -->
<view wx:if="{{detailData.customMade == 0}}" class="btn-wrap">
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn1">
分享图片祝福
</button>
<button wx:else bindtap="onPosterHandler" class="btn btn1">分享图片祝福</button>
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="btn btn2">
定制我的祝福
</button>
<view wx:else bindtap="onBlessMakeHandler" class="btn btn2">定制我的祝福</view>
</view>
<!-- 已定制 -->
<view wx:if="{{detailData.customMade == 1}}" class="btn-wrap">
<button bindtap="onPosterHandler" class="btn btn1">分享图片祝福</button>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</view>
</block>
<block wx:else>
<view class="btn-wrap">
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="btn btn1">
定制我的祝福
</button>
<view wx:else bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</view>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</view>
</block>
</block>
<!-- 组队 -->
<block wx:if="{{detailData.type == 1}}">
<!-- 未定制 -->
<view wx:if="{{detailData.customMade == 0}}" class="btn-wrap">
<!-- 未授权 -->
<block wx:if="{{!isAuth}}">
<button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn1">
邀亲友组团拜年
</button>
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="btn btn2">
定制我的祝福
</button>
<view wx:else bindtap="onBlessMakeHandler" class="btn btn2">定制我的祝福</view>
</block>
<!-- 已授权 -->
<block wx:else>
<button data-data="join" data-act="made" open-type="share" class="btn btn1">
邀亲友组团拜年
</button>
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="btn btn2">
定制我的祝福
</button>
<view wx:else bindtap="onBlessMakeHandler" class="btn btn2">定制我的祝福</view>
</block>
</view>
<!-- 已经定制 -->
<view wx:if="{{detailData.customMade == 1}}" class="btn-wrap">
<!-- 已加入状态 -->
<block wx:if="{{joined}}">
<button bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</block>
<block wx:else>
<!-- 能加入状态 -->
<block wx:if="{{isJoin}}">
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="btn btn1">
定制我的祝福
</button>
<view wx:else bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</view>
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo2" class="btn btn2">
加入组队祝福
</button>
<button wx:else bindtap="onBlessJoinHandler" class="btn btn2">加入组队祝福</button>
</block>
<!-- 不能加入状态 -->
<block wx:else>
<!-- 自己房间 -->
<block wx:if="{{ownerMember.mySelf == 1}}">
<button data-data="join" open-type="share" class="btn btn1">邀亲友组团拜年</button>
</block>
<!-- 非自己房间 -->
<block wx:else>
<!-- <button bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</button> -->
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="btn btn1">
定制我的祝福
</button>
<view wx:else bindtap="onBlessMakeHandler" class="btn btn1">定制我的祝福</view>
</block>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</block>
</block>
</view>
</block>
</view>
</view>
</view>
<!-- 背景音乐 -->
<image wx:if="{{detailData.musicUrl}}" bindtap="onBgmHandler" src="../../image/icon/icon-music.png" class="music {{isPlayingBgm?'ani-rotation-music':''}}" mode="widthFix"></image>
<!-- <audio src="{{detailData.musicUrl}}" id="myAudio"></audio> -->
<!-- 修改用户信息 -->
<van-dialog close-on-click-overlay use-slot title="修改信息" confirm-button-text="确认修改" show="{{ updateUserInfoDialogVisible }}" show-cancel-button bind:confirm="onUpdateUserInfoHander">
<view class="dialog">
<view class="dialog-item">
<view class="label">名称</view>
<input value="{{ updateUserInfo.memberName }}" placeholder="请输入用户名" bindinput="onUpdateUserInfoBindInput" />
</view>
<view class="dialog-item">
<view class="label">头像</view>
<view class="upload">
<image class="image" bindtap="onUploadHandler" mode="aspectFit" src="{{files[0] && files[0].path?files[0].path:'../../image/icon/icon-plus.png'}}" />
</view>
</view>
</view>
</van-dialog>
<!-- 修改房间信息 -->
<van-dialog close-on-click-overlay use-slot title="修改信息" confirm-button-text="确认修改" show="{{ updateRoomDialogVisible }}" show-cancel-button bind:confirm="onUpdateRoomHander">
<view class="dialog">
<view class="dialog-item">
<view class="label">团队名称</view>
<input value="{{ updateRoomInfo.familyName }}" placeholder="请输入团队名称" bindinput="onUpdateFamilyNameBindInput" />
</view>
<view class="dialog-item">
<view class="label">祝福语</view>
<input value="{{ updateRoomInfo.sentence }}" placeholder="请输入祝福语" bindinput="onUpdateSentenceBindInput" />
</view>
</view>
</van-dialog>
<!-- 加入房间 -->
<van-dialog close-on-click-overlay use-slot confirm-button-text="点击加入" show="{{ joinRoomDialogVisible }}" bind:confirm="onBlessJoinHandler">
<view class="dialog dialog2">
<view class="portrait">
<image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" />
</view>
<view class="nickname">{{ownerMember.memberName}}</view>
<view class="t1">邀请你一起加入组队送祝福!</view>
</view>
</van-dialog>
<van-dialog close-on-click-overlay use-slot confirm-button-text="点击加入" show="{{ joinRoomDialogVisibleUnAuth }}" confirm-button-open-type="getUserInfo" bind:getuserinfo="getUserInfo2">
<view class="dialog dialog2">
<view class="portrait">
<image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" />
</view>
<view class="nickname">{{ownerMember.memberName}}</view>
<view class="t1">邀请你一起加入组队送祝福!</view>
</view>
</van-dialog>
<van-popup class="poster-popup" show="{{ authorizeVisible }}">
<authorize-comp evttype="{{evttype}}" bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<van-popup class="poster-popup" bind:click-overlay="onHidePosterHandler" show="{{ posterVisible }}">
<image bindtap="onPreviewImageHandler" class="poster" mode="widthFix" src="{{imageUrl}}" />
<view bindtap="saveImageToPhotosAlbum" class="save-btn">一键保存</view>
</van-popup>
<shortcut2 types="{{[]}}" pics="{{['red-package2']}}"></shortcut2>