483cfd0f by simon

默认提交

1 parent 4e6738af
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
28 align-items: center; 28 align-items: center;
29 } 29 }
30 30
31 .fc{
32 display: flex;
33 justify-content: center;
34 }
35
31 // 为元素设定的宽度和高度决定了元素的边框盒。 36 // 为元素设定的宽度和高度决定了元素的边框盒。
32 .bb { 37 .bb {
33 box-sizing: border-box; 38 box-sizing: border-box;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 .comp { 4 .comp {
5 position: fixed; 5 position: fixed;
6 bottom: 30%; 6 bottom: 30%;
7 right: 2%; 7 right: -20px;
8 z-index: 91; 8 z-index: 91;
9 color: #ffffff; 9 color: #ffffff;
10 10
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
32 background-color: rgba($color: #000000, $alpha: 0.6); 32 background-color: rgba($color: #000000, $alpha: 0.6);
33 } 33 }
34 34
35 $contactWidth:140px; 35 $contactWidth:172px;
36 .contact { 36 .contact {
37 background-color: transparent; 37 background-color: transparent;
38 @extend .fcc; 38 @extend .fcc;
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
40 color: #ffffff; 40 color: #ffffff;
41 width: $contactWidth; 41 width: $contactWidth;
42 height: $contactWidth; 42 height: $contactWidth;
43 margin-left: -18px; 43 margin-left: -26px;
44 margin-top: -8px; 44 margin-top: -18px;
45 45
46 .img { 46 .img {
47 width: $contactWidth; 47 width: $contactWidth;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 <view wx:for="{{pics}}" wx:key="{{index}}" data-data="{{item}}" bindtap="onTapHandler" class="btn"> 5 <view wx:for="{{pics}}" wx:key="{{index}}" data-data="{{item}}" bindtap="onTapHandler" class="btn">
6 <image mode="aspectFit" src="{{'../../image/shortcut/'+item+'.png'}}" class="pics" /> 6 <image mode="aspectFit" src="{{'../../image/shortcut/'+item+'.png'}}" class="pics" />
7 </view> 7 </view>
8 <!-- <button class="contact" wx:if="{{contact}}" open-type="contact" show-message-card="true" send-message-title="家有儿孙" end-message-path="/pages/index/index" send-message-img="https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/jyes/assets/logo.jpg" bindcontact="handleContact"> 8 <button class="contact" wx:if="{{contact}}" open-type="contact" show-message-card="true" send-message-title="家有儿孙" end-message-path="/pages/index/index" send-message-img="https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/jyes/assets/logo.jpg" bindcontact="handleContact">
9 <image class="img" mode="widthFix" src="../../image/shortcut/contact.jpg" /> 9 <image class="img" mode="widthFix" src="../../image/shortcut/more-bless.png" />
10 </button> --> 10 </button>
11 </view> 11 </view>
......
...@@ -47,22 +47,27 @@ Page({ ...@@ -47,22 +47,27 @@ Page({
47 wxCodeUrl: "", // 微信小程序码 47 wxCodeUrl: "", // 微信小程序码
48 }, 48 },
49 onShareAppMessage(res) { 49 onShareAppMessage(res) {
50 let {
51 detailData,
52 ownerMember,
53 isAuth
54 } = this.data;
55 let title = `${ownerMember.memberName}邀请您组队发祝福!体验今年最火爆的拜年方式`;
50 let shareType = "" 56 let shareType = ""
57 // let imageUrl = detailData && detailData.thumbnail || "";
51 if (res.from === 'button') { 58 if (res.from === 'button') {
52 // 来自页面内转发按钮 59 // 来自页面内转发按钮
53 // shareType == join 分享给家人,能加入 组队模式 60 // shareType == join 分享给家人,能加入 组队模式
54 shareType = res.target.dataset.data || ""; 61 shareType = res.target.dataset.data || "";
55 console.log("shareType:", shareType); 62 console.log("shareType:", shareType);
63 title
56 } else {} 64 } else {}
57 let {
58 detailData
59 } = this.data;
60 65
61 let memberCode = app.store.getItem("memberCode"); 66 // 已经定制会提供房主的memberCode
62 let title = ""; 67 let memberCode = detailData.customMade == 1 ? app.store.getItem("memberCode") : "";
63 let path = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}&t=${shareType}`; 68 let path = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}&t=${shareType}`;
64 console.log("share path:", path); 69 console.log("share path:", path);
65 // let imageUrl = detailData && detailData.thumbnail || ""; 70
66 return { 71 return {
67 // title, 72 // title,
68 path, 73 path,
...@@ -74,6 +79,22 @@ Page({ ...@@ -74,6 +79,22 @@ Page({
74 authorizeVisible: true 79 authorizeVisible: true
75 }) 80 })
76 }, 81 },
82 checkAuthShowComp() {
83 return new Promise((resolve, reject) => {
84 checkAuth().then((result) => {
85 this.setData({
86 isAuth: result
87 })
88 if (result) {
89 resolve(true);
90 } else {
91 this.setData({
92 authorizeVisible: true
93 });
94 }
95 });
96 });
97 },
77 onHide() { 98 onHide() {
78 99
79 }, 100 },
...@@ -135,7 +156,13 @@ Page({ ...@@ -135,7 +156,13 @@ Page({
135 * 基础方法 156 * 基础方法
136 * 授权完毕重拉数据用 157 * 授权完毕重拉数据用
137 */ 158 */
138 initData() {}, 159 initData() {
160 checkAuth().then((result) => {
161 _this.setData({
162 isAuth: result
163 });
164 }).catch((err) => {});
165 },
139 playBgm() { 166 playBgm() {
140 let _this = this; 167 let _this = this;
141 let { 168 let {
...@@ -237,10 +264,12 @@ Page({ ...@@ -237,10 +264,12 @@ Page({
237 wx.saveImageToPhotosAlbum({ 264 wx.saveImageToPhotosAlbum({
238 filePath: _this.data.imageUrl, 265 filePath: _this.data.imageUrl,
239 success(res) { 266 success(res) {
240 wx.showToast({ 267 wx.showModal({
241 title: '保存成功', 268 content: '图片已经保存到你的相册,快去发送到朋友圈拜年吧!',
242 icon: 'success' 269 showCancel: false,
243 }); 270 confirmText: '确认',
271 success(res) {}
272 })
244 }, 273 },
245 fail(err) { 274 fail(err) {
246 wx.getSetting({ 275 wx.getSetting({
...@@ -482,11 +511,14 @@ Page({ ...@@ -482,11 +511,14 @@ Page({
482 511
483 // 显示更新用户信息 512 // 显示更新用户信息
484 showUpdateUserInfoDialog() { 513 showUpdateUserInfoDialog() {
514 this.checkAuthShowComp().then((result) => {
485 this.setData({ 515 this.setData({
486 updateUserInfoDialogVisible: true, 516 updateUserInfoDialogVisible: true,
487 updateUserInfo: {}, 517 updateUserInfo: {},
488 files: [] 518 files: []
489 }) 519 })
520 });
521
490 }, 522 },
491 523
492 // 房主名字 524 // 房主名字
...@@ -500,10 +532,12 @@ Page({ ...@@ -500,10 +532,12 @@ Page({
500 532
501 // 显示更新用户信息 533 // 显示更新用户信息
502 showUpdateRoomDialog() { 534 showUpdateRoomDialog() {
535 this.checkAuthShowComp().then((result) => {
503 this.setData({ 536 this.setData({
504 updateRoomDialogVisible: true, 537 updateRoomDialogVisible: true,
505 updateRoomInfo: {}, 538 updateRoomInfo: {},
506 }) 539 })
540 });
507 }, 541 },
508 542
509 // 家庭名称 543 // 家庭名称
...@@ -786,6 +820,9 @@ Page({ ...@@ -786,6 +820,9 @@ Page({
786 820
787 // 授权操作 821 // 授权操作
788 getUserInfo(e) { 822 getUserInfo(e) {
823 let {
824 detailData
825 } = this.data;
789 let _this = this; 826 let _this = this;
790 if (e.encryptedData && e.iv) { 827 if (e.encryptedData && e.iv) {
791 // 同意授权 828 // 同意授权
...@@ -793,6 +830,7 @@ Page({ ...@@ -793,6 +830,7 @@ Page({
793 url: app.api.register, 830 url: app.api.register,
794 sid: false, 831 sid: false,
795 data: { 832 data: {
833 blessCode: detailData.blessCode,
796 encryptedData: e.encryptedData, 834 encryptedData: e.encryptedData,
797 iv: e.iv, 835 iv: e.iv,
798 code: app.store.getItem("wxcode"), 836 code: app.store.getItem("wxcode"),
...@@ -802,6 +840,7 @@ Page({ ...@@ -802,6 +840,7 @@ Page({
802 wx.hideLoading(); 840 wx.hideLoading();
803 if (res2 && res2.sessionId) { 841 if (res2 && res2.sessionId) {
804 app.store.setItem('sessionId', res2.sessionId); 842 app.store.setItem('sessionId', res2.sessionId);
843 app.store.setItem('memberCode', res2.memberCode);
805 } 844 }
806 wx.showModal({ 845 wx.showModal({
807 content: '授权成功', 846 content: '授权成功',
...@@ -811,6 +850,7 @@ Page({ ...@@ -811,6 +850,7 @@ Page({
811 _this.setData({ 850 _this.setData({
812 isAuth: result 851 isAuth: result
813 }); 852 });
853 this.queryBlessDetail();
814 }).catch((err) => {}); 854 }).catch((err) => {});
815 }).catch((err) => { 855 }).catch((err) => {
816 wx.hideLoading(); 856 wx.hideLoading();
......
1 // @import '../../assets/scss/mixins'; 1 // @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils'; 2 @import '../../assets/scss/utils';
3 3
4 $blessContentWidth: 690px;
5 $blessContentLabelWidth: 650px;
6
4 .van-button__text { 7 .van-button__text {
5 font-size: 36rpx; 8 font-size: 36rpx;
6 } 9 }
...@@ -28,8 +31,8 @@ ...@@ -28,8 +31,8 @@
28 } 31 }
29 32
30 &-border { 33 &-border {
31 width: 167px; 34 width: 191px;
32 height: 167px; 35 height: 191px;
33 position: absolute; 36 position: absolute;
34 } 37 }
35 } 38 }
...@@ -181,7 +184,6 @@ ...@@ -181,7 +184,6 @@
181 width: 660px; 184 width: 660px;
182 display: flex; 185 display: flex;
183 justify-content: flex-start; 186 justify-content: flex-start;
184 // justify-content: center;
185 flex-wrap: wrap; 187 flex-wrap: wrap;
186 margin: 36px auto 0; 188 margin: 36px auto 0;
187 height: 450px; 189 height: 450px;
...@@ -235,6 +237,12 @@ ...@@ -235,6 +237,12 @@
235 } 237 }
236 } 238 }
237 239
240 .fc {
241 display: flex;
242 justify-content: center;
243 }
244
245
238 .all { 246 .all {
239 height: auto; 247 height: auto;
240 // overflow: auto; 248 // overflow: auto;
...@@ -266,7 +274,7 @@ ...@@ -266,7 +274,7 @@
266 // 祝福内容 274 // 祝福内容
267 .blessing { 275 .blessing {
268 margin: 72px auto 72px; 276 margin: 72px auto 72px;
269 $blessContentWidth: 690px; 277
270 278
271 &-item { 279 &-item {
272 width: $blessContentWidth; 280 width: $blessContentWidth;
...@@ -276,7 +284,7 @@ ...@@ -276,7 +284,7 @@
276 color: #333333; 284 color: #333333;
277 285
278 &-text { 286 &-text {
279 width: $blessContentWidth; 287 width: $blessContentLabelWidth;
280 font-weight: bold; 288 font-weight: bold;
281 } 289 }
282 290
...@@ -289,6 +297,7 @@ ...@@ -289,6 +297,7 @@
289 297
290 // 尾部 298 // 尾部
291 .tail { 299 .tail {
300 text-align: center;
292 301
293 // 尾部头像 302 // 尾部头像
294 .portrait { 303 .portrait {
...@@ -340,6 +349,12 @@ ...@@ -340,6 +349,12 @@
340 } 349 }
341 } 350 }
342 351
352 &-image-bot {
353
354 margin: 48px auto;
355 width: $blessContentWidth;
356 }
357
343 } 358 }
344 359
345 } 360 }
...@@ -353,7 +368,7 @@ ...@@ -353,7 +368,7 @@
353 368
354 .bottom-bg { 369 .bottom-bg {
355 width: 750px; 370 width: 750px;
356 height: 132px; 371 height: 148px;
357 position: absolute; 372 position: absolute;
358 bottom: 0; 373 bottom: 0;
359 } 374 }
...@@ -363,7 +378,7 @@ ...@@ -363,7 +378,7 @@
363 position: relative; 378 position: relative;
364 display: flex; 379 display: flex;
365 justify-content: center; 380 justify-content: center;
366 margin: 0px auto 24px; 381 margin: 0px auto 36px;
367 382
368 .btn { 383 .btn {
369 margin: 0 22px; 384 margin: 0 22px;
...@@ -372,7 +387,8 @@ ...@@ -372,7 +387,8 @@
372 font-size: 36px; 387 font-size: 36px;
373 border-radius: 8px; 388 border-radius: 8px;
374 box-shadow: 5.9px 5.5px 18px 0 rgba(26, 36, 91, 0.73); 389 box-shadow: 5.9px 5.5px 18px 0 rgba(26, 36, 91, 0.73);
375 background-image: linear-gradient(to top, #b41d36, #bb2634); 390 // background-image: linear-gradient(to top, #b41d36, #bb2634);
391 background-image: linear-gradient(to top, #e65638, #dd784d);
376 } 392 }
377 393
378 .btn2 { 394 .btn2 {
...@@ -387,6 +403,7 @@ ...@@ -387,6 +403,7 @@
387 403
388 .music { 404 .music {
389 width: 66px; 405 width: 66px;
406 height: 66px;
390 position: fixed; 407 position: fixed;
391 right: 24px; 408 right: 24px;
392 top: 24px; 409 top: 24px;
...@@ -435,3 +452,8 @@ ...@@ -435,3 +452,8 @@
435 #poster { 452 #poster {
436 position: absolute; 453 position: absolute;
437 } 454 }
455
456 .editBase64 {
457 // background: url("https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/jyes/assets/oss/icon-edit.png");
458 // @extend .bis;
459 }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
3 <view class="app__bgc bgc" style="background-color: {{detailData.background}};"></view> 3 <view class="app__bgc bgc" style="background-color: {{detailData.background}};"></view>
4 <!-- <view class="app__bg bg " style="background: url('{{detailData.backgroundImage}}')"></view> --> 4 <!-- <view class="app__bg bg " style="background: url('{{detailData.backgroundImage}}')"></view> -->
5 <image mode="scaleToFill" class="ebg" src="{{detailData.backgroundImage}}" /> 5 <image mode="scaleToFill" class="ebg" src="{{detailData.backgroundImage}}" />
6 <image mode="aspectF" class="ebg" src="{{detailData.backgroundGif}}" />
6 <view class="app__content main"> 7 <view class="app__content main">
7 <!-- 顶部背景 --> 8 <!-- 顶部背景 -->
8 <image class="top-bg" mode="widthFix" src="{{detailData.headImage}}" /> 9 <image class="top-bg" mode="widthFix" src="{{detailData.headImage}}" />
...@@ -19,17 +20,17 @@ ...@@ -19,17 +20,17 @@
19 </view> 20 </view>
20 <!-- 用户名称 --> 21 <!-- 用户名称 -->
21 <view class="name"> 22 <view class="name">
22 <view class="tt">{{ownerMember.memberName}}</view> 23 <view class="tt">{{isAuth ? ownerMember.memberName : '我'}}</view>
23 <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> 24 <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
24 </view> 25 </view>
25 <!-- 编辑房间信息 组队时候才显示 --> 26 <!-- 编辑房间信息 组队时候才显示 -->
26 <view wx:if="{{detailData.type == 1}}" class="edit"> 27 <view wx:if="{{detailData.type == 1}}" class="edit">
27 <view class="tt t1">{{detailData.familyName}}</view> 28 <view class="tt t1">{{isAuth ? '携' + detailData.familyName : '携家人'}}</view>
28 <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateRoomDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> 29 <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateRoomDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
29 <view class="tt t2">{{detailData.count}}人</view> 30 <view class="tt t2">{{detailData.count}}人</view>
30 </view> 31 </view>
31 <!-- 用户组 --> 32 <!-- 用户组 -->
32 <view wx:if="{{detailData.type == 1}}" class="group {{isMore ? 'all' : ''}}"> 33 <view wx:if="{{detailData.type == 1}}" class="group {{isMore ? 'all' : ''}} {{memberList.length < 1 ? 'fc':''}}">
33 <view wx:for="{{memberList}}" wx:key="{{index}}" class="group-item"> 34 <view wx:for="{{memberList}}" wx:key="{{index}}" class="group-item">
34 <image class="group-item-portrait" mode="scaleToFill" src="{{item.memberHead}}" /> 35 <image class="group-item-portrait" mode="scaleToFill" src="{{item.memberHead}}" />
35 <view class="group-item-name"> 36 <view class="group-item-name">
...@@ -39,7 +40,10 @@ ...@@ -39,7 +40,10 @@
39 </view> 40 </view>
40 <!-- 邀请 房主或组队模式显示 --> 41 <!-- 邀请 房主或组队模式显示 -->
41 <view class="group-item" wx:if="{{options.t || ownerMember.mySelf == 1}}"> 42 <view class="group-item" wx:if="{{options.t || ownerMember.mySelf == 1}}">
42 <button data-data="join" open-type="share" class="group-item-inv"> 43 <button wx:if="{{isAuth}}" data-data="join" open-type="share" class="group-item-inv">
44 <image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
45 </button>
46 <button wx:else open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="group-item-inv">
43 <image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" /> 47 <image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
44 </button> 48 </button>
45 </view> 49 </view>
...@@ -64,7 +68,7 @@ ...@@ -64,7 +68,7 @@
64 </view> 68 </view>
65 </view> 69 </view>
66 <!-- 尾部内容 暂时不显示 --> 70 <!-- 尾部内容 暂时不显示 -->
67 <view class="tail" wx:if="{{1>0}}"> 71 <view class="tail">
68 <!-- 尾部头像 --> 72 <!-- 尾部头像 -->
69 <view class="portrait"> 73 <view class="portrait">
70 <image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" /> 74 <image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" />
...@@ -88,11 +92,14 @@ ...@@ -88,11 +92,14 @@
88 >> 92 >>
89 </view> 93 </view>
90 </view> 94 </view>
95 <!-- 尾图 -->
96 <image class="tail-image-bot" mode="scaleToFill" src="{{detailData.tailImage}}" />
91 </view> 97 </view>
92 </view> 98 </view>
93 <!-- fix底部 --> 99 <!-- fix底部 -->
94 <view class="bottom"> 100 <view class="bottom">
95 <image class="bottom-bg" mode="scaleToFill" src="{{detailData.tailImage}}" /> 101 <!-- <image class="bottom-bg" mode="scaleToFill" src="{{detailData.tailImage}}" /> -->
102 <!-- <image class="bottom-bg" mode="widthFix" src="{{detailData.tailImage}}" /> -->
96 <!-- 分情况显示btn-wrap --> 103 <!-- 分情况显示btn-wrap -->
97 <!-- 单人 --> 104 <!-- 单人 -->
98 <block wx:if="{{detailData.type == 0}}"> 105 <block wx:if="{{detailData.type == 0}}">
...@@ -193,4 +200,4 @@ ...@@ -193,4 +200,4 @@
193 <image bindtap="onPreviewImageHandler" class="poster" mode="widthFix" src="{{imageUrl}}" /> 200 <image bindtap="onPreviewImageHandler" class="poster" mode="widthFix" src="{{imageUrl}}" />
194 <view bindtap="saveImageToPhotosAlbum" class="save-btn">一键保存</view> 201 <view bindtap="saveImageToPhotosAlbum" class="save-btn">一键保存</view>
195 </van-popup> 202 </van-popup>
196 <shortcut2 types="{{[]}}" pics="{{['red-package2','more-bless']}}"></shortcut2> 203 <shortcut2 types="{{[]}}" pics="{{['red-package2']}}"></shortcut2>
......
...@@ -91,16 +91,17 @@ ...@@ -91,16 +91,17 @@
91 } 91 }
92 92
93 .tit { 93 .tit {
94 font-size: 36px; 94 font-size: 40px;
95 @include ellipsis(3); 95 @include ellipsis(2);
96 color: #fc464a; 96 color: #fc464a;
97 } 97 }
98 98
99 .scene { 99 .scene {
100 position: absolute; 100 position: absolute;
101 font-size: 36px; 101 font-size: 32px;
102 bottom: 12px; 102 bottom: 12px;
103 left: 14px; 103 left: 14px;
104 color: #333333;
104 @include ellipsis(1); 105 @include ellipsis(1);
105 } 106 }
106 107
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 <image class="poster" src="{{item.thumbnail}}" /> 30 <image class="poster" src="{{item.thumbnail}}" />
31 <view class="desc-wrap"> 31 <view class="desc-wrap">
32 <view class="tit">{{item.blessTitle}}</view> 32 <view class="tit">{{item.blessTitle}}</view>
33 <view class="scene">{{item.scene}}</view> 33 <view class="scene">{{item.type == 0 ? '单人祝福 >> 送' : '单团队祝福 >> 送'}}{{item.scene}}</view>
34 </view> 34 </view>
35 </view> 35 </view>
36 </block> 36 </block>
......