默认提交
Showing
7 changed files
with
83 additions
and
33 deletions
| ... | @@ -15,7 +15,11 @@ Component({ | ... | @@ -15,7 +15,11 @@ Component({ |
| 15 | cancelDesc: { | 15 | cancelDesc: { |
| 16 | type: String, | 16 | type: String, |
| 17 | value: "同意授权才能获得更多体验哦~", | 17 | value: "同意授权才能获得更多体验哦~", |
| 18 | } | 18 | }, |
| 19 | evttype: { | ||
| 20 | type: String, | ||
| 21 | value: '', | ||
| 22 | }, | ||
| 19 | }, | 23 | }, |
| 20 | data: { | 24 | data: { |
| 21 | // 这里是一些组件内部数据 | 25 | // 这里是一些组件内部数据 |
| ... | @@ -31,21 +35,23 @@ Component({ | ... | @@ -31,21 +35,23 @@ Component({ |
| 31 | // 隐藏蒙层 | 35 | // 隐藏蒙层 |
| 32 | hideMask() { | 36 | hideMask() { |
| 33 | this.triggerEvent('evtcomp', { | 37 | this.triggerEvent('evtcomp', { |
| 34 | name: "_evt_hide_mask" | 38 | name: "_evt_hide_mask", |
| 35 | }); | 39 | }); |
| 36 | }, | 40 | }, |
| 37 | 41 | ||
| 38 | // 授权成功事件 | 42 | // 授权成功事件 |
| 39 | authComplete() { | 43 | authComplete() { |
| 40 | this.triggerEvent('evtcomp', { | 44 | this.triggerEvent('evtcomp', { |
| 41 | name: "_evt_auth_complete" | 45 | name: "_evt_auth_complete", |
| 46 | data: { | ||
| 47 | evttype: this.properties.evttype | ||
| 48 | } | ||
| 42 | }); | 49 | }); |
| 43 | |||
| 44 | |||
| 45 | }, | 50 | }, |
| 46 | 51 | ||
| 47 | // 点击暂不授权按钮 | 52 | // 点击暂不授权按钮 |
| 48 | cancelAuth(e) { | 53 | cancelAuth(e) { |
| 54 | console.log("this.properties.evttype:", this.properties.evttype); | ||
| 49 | this.hideMask(); | 55 | this.hideMask(); |
| 50 | // this.triggerEvent('evtcomp', { | 56 | // this.triggerEvent('evtcomp', { |
| 51 | // name: "_evt_auth_cancel" | 57 | // name: "_evt_auth_cancel" | ... | ... |
| ... | @@ -3,10 +3,18 @@ | ... | @@ -3,10 +3,18 @@ |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | .comp-item { | 5 | .comp-item { |
| 6 | width: 650px; | 6 | width: 630px; |
| 7 | min-height: 496px; | 7 | min-height: 360px; |
| 8 | border-radius: 10px; | 8 | border-radius: 16px; |
| 9 | background-color: #ffffff; | 9 | background-color: #ffffff; |
| 10 | position: relative; | ||
| 11 | |||
| 12 | .close{ | ||
| 13 | position: absolute; | ||
| 14 | top: 12px; | ||
| 15 | right: 28px; | ||
| 16 | font-size: 52px; | ||
| 17 | } | ||
| 10 | 18 | ||
| 11 | .cspace { | 19 | .cspace { |
| 12 | height: 80px; | 20 | height: 80px; |
| ... | @@ -16,6 +24,7 @@ | ... | @@ -16,6 +24,7 @@ |
| 16 | text-align: center; | 24 | text-align: center; |
| 17 | width: 520px; | 25 | width: 520px; |
| 18 | margin: 0 auto; | 26 | margin: 0 auto; |
| 27 | border-radius: 10px; | ||
| 19 | 28 | ||
| 20 | .logo { | 29 | .logo { |
| 21 | margin: 0 auto; | 30 | margin: 0 auto; |
| ... | @@ -29,13 +38,13 @@ | ... | @@ -29,13 +38,13 @@ |
| 29 | } | 38 | } |
| 30 | 39 | ||
| 31 | .tit { | 40 | .tit { |
| 32 | font-size: 40px; | 41 | font-size: 42px; |
| 33 | color: #333333; | 42 | color: #333333; |
| 34 | } | 43 | } |
| 35 | 44 | ||
| 36 | .tips { | 45 | .tips { |
| 37 | margin-top: 28px; | 46 | margin-top: 28px; |
| 38 | font-size: 32px; | 47 | font-size: 36px; |
| 39 | color: #333333; | 48 | color: #333333; |
| 40 | padding-bottom: 244px; | 49 | padding-bottom: 244px; |
| 41 | } | 50 | } |
| ... | @@ -45,14 +54,14 @@ | ... | @@ -45,14 +54,14 @@ |
| 45 | position: absolute; | 54 | position: absolute; |
| 46 | left: 0; | 55 | left: 0; |
| 47 | right: 0; | 56 | right: 0; |
| 48 | bottom: 80px; | 57 | bottom: 64px; |
| 49 | margin: 0 auto; | 58 | margin: 0 auto; |
| 50 | display: flex; | 59 | display: flex; |
| 51 | justify-content: center; | 60 | justify-content: center; |
| 52 | } | 61 | } |
| 53 | 62 | ||
| 54 | .btn { | 63 | .btn { |
| 55 | @include cb(240px, 80px); | 64 | @include cb(280px, 96px); |
| 56 | margin: 0 24px; | 65 | margin: 0 24px; |
| 57 | } | 66 | } |
| 58 | 67 | ||
| ... | @@ -62,3 +71,5 @@ | ... | @@ -62,3 +71,5 @@ |
| 62 | } | 71 | } |
| 63 | 72 | ||
| 64 | } | 73 | } |
| 74 | |||
| 75 | ... | ... |
| 1 | <view class="comp-item"> | 1 | <view class="comp-item"> |
| 2 | <view class="close" bindtap="hideMask">x</view> | ||
| 2 | <view class="cspace"></view> | 3 | <view class="cspace"></view> |
| 3 | <view class="cont"> | 4 | <view class="cont"> |
| 4 | <!-- <view class="logo"> | 5 | <!-- <view class="logo"> |
| ... | @@ -6,11 +7,11 @@ | ... | @@ -6,11 +7,11 @@ |
| 6 | </view> --> | 7 | </view> --> |
| 7 | <view class="tit">家有儿孙</view> | 8 | <view class="tit">家有儿孙</view> |
| 8 | <view class="tips"> | 9 | <view class="tips"> |
| 9 | <text>需要获取您的微信昵称等信息才可以体验更多哦</text> | 10 | <text>将头像昵称改为你的?</text> |
| 10 | </view> | 11 | </view> |
| 11 | </view> | 12 | </view> |
| 12 | <view class="btn-wrap"> | 13 | <view class="btn-wrap"> |
| 13 | <button class="btn btn2" bindtap="cancelAuth">暂不授权</button> | 14 | <!-- <button class="btn btn2" bindtap="cancelAuth">暂不授权</button> --> |
| 14 | <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button> | 15 | <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button> |
| 15 | </view> | 16 | </view> |
| 16 | </view> | 17 | </view> | ... | ... |
| ... | @@ -8,14 +8,15 @@ import Poster from '../../miniprogram_dist/poster/poster'; | ... | @@ -8,14 +8,15 @@ import Poster from '../../miniprogram_dist/poster/poster'; |
| 8 | 8 | ||
| 9 | // import calendar from '../../utils/calendar.js'; | 9 | // import calendar from '../../utils/calendar.js'; |
| 10 | let calendar = require('../../utils/calendar.js'); | 10 | let calendar = require('../../utils/calendar.js'); |
| 11 | |||
| 12 | const innerAudio = wx.createInnerAudioContext(); | 11 | const innerAudio = wx.createInnerAudioContext(); |
| 13 | 12 | ||
| 13 | |||
| 14 | let app = getApp(); | 14 | let app = getApp(); |
| 15 | Page({ | 15 | Page({ |
| 16 | data: { | 16 | data: { |
| 17 | isOverShare: true, | 17 | isOverShare: true, |
| 18 | authorizeVisible: false, | 18 | authorizeVisible: false, |
| 19 | evttype: "", | ||
| 19 | total: 0, | 20 | total: 0, |
| 20 | page: 1, | 21 | page: 1, |
| 21 | size: 10, | 22 | size: 10, |
| ... | @@ -63,7 +64,11 @@ Page({ | ... | @@ -63,7 +64,11 @@ Page({ |
| 63 | title = `${ownerMember.memberName}给您拜年啦!来看看是怎样特别的祝福`; | 64 | title = `${ownerMember.memberName}给您拜年啦!来看看是怎样特别的祝福`; |
| 64 | } else { | 65 | } else { |
| 65 | // 团队 | 66 | // 团队 |
| 66 | title = `${ownerMember.memberName}携${ownerMember.memberName}${detailData.count}人给您拜年啦!看看这xx都是谁`; | 67 | if (detailData.count > 0) { |
| 68 | title = `${ownerMember.memberName}携${detailData.familyName}${detailData.count}人给您拜年啦!看看这${detailData.count}人都是谁`; | ||
| 69 | } else { | ||
| 70 | title = `${ownerMember.memberName}给您拜年啦!来看看是怎样特别的祝福`; | ||
| 71 | } | ||
| 67 | } | 72 | } |
| 68 | let shareType = "" | 73 | let shareType = "" |
| 69 | // let imageUrl = detailData && detailData.thumbnail || ""; | 74 | // let imageUrl = detailData && detailData.thumbnail || ""; |
| ... | @@ -123,12 +128,22 @@ Page({ | ... | @@ -123,12 +128,22 @@ Page({ |
| 123 | // }); | 128 | // }); |
| 124 | }); | 129 | }); |
| 125 | }, | 130 | }, |
| 126 | checkAuthShowComp() { | 131 | checkAuthShowComp(evttype) { |
| 127 | return new Promise((resolve, reject) => { | 132 | return new Promise((resolve, reject) => { |
| 128 | this.checkAuth().then((result) => { | 133 | this.checkAuth().then((result) => { |
| 129 | if (result) { | 134 | if (result) { |
| 130 | resolve(true); | 135 | resolve(true); |
| 131 | } else { | 136 | } else { |
| 137 | if (evttype) { | ||
| 138 | this.setData({ | ||
| 139 | evttype | ||
| 140 | }) | ||
| 141 | } else { | ||
| 142 | this.setData({ | ||
| 143 | evttype: "" | ||
| 144 | }) | ||
| 145 | } | ||
| 146 | console.log("checkAuthShowComp evttype:", this.data.evttype); | ||
| 132 | this.showAuth(); | 147 | this.showAuth(); |
| 133 | } | 148 | } |
| 134 | }); | 149 | }); |
| ... | @@ -542,6 +557,7 @@ Page({ | ... | @@ -542,6 +557,7 @@ Page({ |
| 542 | }) | 557 | }) |
| 543 | }); | 558 | }); |
| 544 | 559 | ||
| 560 | |||
| 545 | if (memberDrawList.length > 0) { | 561 | if (memberDrawList.length > 0) { |
| 546 | texts.push({ | 562 | texts.push({ |
| 547 | x: 686, | 563 | x: 686, |
| ... | @@ -550,7 +566,7 @@ Page({ | ... | @@ -550,7 +566,7 @@ Page({ |
| 550 | color: "#fee085", | 566 | color: "#fee085", |
| 551 | textAlign: "right", | 567 | textAlign: "right", |
| 552 | zIndex: 11, | 568 | zIndex: 11, |
| 553 | text: `长按查看祝福`, | 569 | text: `长按查看全部${detailData.count}人`, |
| 554 | }) | 570 | }) |
| 555 | } else { | 571 | } else { |
| 556 | texts.push({ | 572 | texts.push({ |
| ... | @@ -560,7 +576,7 @@ Page({ | ... | @@ -560,7 +576,7 @@ Page({ |
| 560 | color: "#fee085", | 576 | color: "#fee085", |
| 561 | textAlign: "right", | 577 | textAlign: "right", |
| 562 | zIndex: 11, | 578 | zIndex: 11, |
| 563 | text: `长按查看全部${detailData.count}人`, | 579 | text: `长按查看祝福`, |
| 564 | }) | 580 | }) |
| 565 | } | 581 | } |
| 566 | } | 582 | } |
| ... | @@ -875,7 +891,7 @@ Page({ | ... | @@ -875,7 +891,7 @@ Page({ |
| 875 | * 加入房间 | 891 | * 加入房间 |
| 876 | */ | 892 | */ |
| 877 | onBlessJoinHandler(e) { | 893 | onBlessJoinHandler(e) { |
| 878 | this.checkAuthShowComp().then((result) => { | 894 | this.checkAuthShowComp("join").then((result) => { |
| 879 | let { | 895 | let { |
| 880 | options, | 896 | options, |
| 881 | detailData | 897 | detailData |
| ... | @@ -980,6 +996,11 @@ Page({ | ... | @@ -980,6 +996,11 @@ Page({ |
| 980 | name, | 996 | name, |
| 981 | data | 997 | data |
| 982 | } = evt.detail; | 998 | } = evt.detail; |
| 999 | console.log("evt:", evt); | ||
| 1000 | console.log("data:", data); | ||
| 1001 | if (data && data.evttype && data.evttype == "join") { | ||
| 1002 | console.log("55555"); | ||
| 1003 | } | ||
| 983 | switch (name) { | 1004 | switch (name) { |
| 984 | 1005 | ||
| 985 | // 隐藏蒙层 | 1006 | // 隐藏蒙层 |
| ... | @@ -993,7 +1014,14 @@ Page({ | ... | @@ -993,7 +1014,14 @@ Page({ |
| 993 | case "_evt_auth_complete": | 1014 | case "_evt_auth_complete": |
| 994 | // this.initData(); | 1015 | // this.initData(); |
| 995 | this.hideMask(); | 1016 | this.hideMask(); |
| 996 | this.queryBlessDetail(); | 1017 | console.log("_evt_auth_complete:", data.evttype); |
| 1018 | if (data && data.evttype && data.evttype == "join") { | ||
| 1019 | this.queryBlessDetail().then((result) => { | ||
| 1020 | this.onBlessJoinHandler(); | ||
| 1021 | }); | ||
| 1022 | } else { | ||
| 1023 | this.queryBlessDetail(); | ||
| 1024 | } | ||
| 997 | break; | 1025 | break; |
| 998 | 1026 | ||
| 999 | default: | 1027 | default: | ... | ... |
| ... | @@ -285,7 +285,7 @@ $blessContentLabelWidth: 650px; | ... | @@ -285,7 +285,7 @@ $blessContentLabelWidth: 650px; |
| 285 | 285 | ||
| 286 | &-item { | 286 | &-item { |
| 287 | width: $blessContentWidth; | 287 | width: $blessContentWidth; |
| 288 | margin: 48px auto; | 288 | margin: 0 auto; |
| 289 | font-size: 42px; | 289 | font-size: 42px; |
| 290 | text-align: center; | 290 | text-align: center; |
| 291 | color: #333333; | 291 | color: #333333; |
| ... | @@ -293,10 +293,12 @@ $blessContentLabelWidth: 650px; | ... | @@ -293,10 +293,12 @@ $blessContentLabelWidth: 650px; |
| 293 | &-text { | 293 | &-text { |
| 294 | width: $blessContentLabelWidth; | 294 | width: $blessContentLabelWidth; |
| 295 | font-weight: bold; | 295 | font-weight: bold; |
| 296 | margin: 16px auto; | ||
| 296 | } | 297 | } |
| 297 | 298 | ||
| 298 | &-image { | 299 | &-image { |
| 299 | width: $blessContentWidth; | 300 | width: $blessContentWidth; |
| 301 | margin: 16px auto; | ||
| 300 | } | 302 | } |
| 301 | 303 | ||
| 302 | } | 304 | } | ... | ... |
| ... | @@ -22,12 +22,12 @@ | ... | @@ -22,12 +22,12 @@ |
| 22 | <!-- 用户名称 --> | 22 | <!-- 用户名称 --> |
| 23 | <view class="name"> | 23 | <view class="name"> |
| 24 | <view class="tt">{{isAuth ? ownerMember.memberName : '我'}}</view> | 24 | <view class="tt">{{isAuth ? ownerMember.memberName : '我'}}</view> |
| 25 | <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> | 25 | <image wx:if="{{ownerMember.mySelf == 1 && detailData.customMade == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> |
| 26 | </view> | 26 | </view> |
| 27 | <!-- 编辑房间信息 组队时候才显示 --> | 27 | <!-- 编辑房间信息 组队时候才显示 --> |
| 28 | <view wx:if="{{detailData.type == 1}}" class="edit"> | 28 | <view wx:if="{{detailData.type == 1}}" class="edit"> |
| 29 | <view class="tt t1">{{isAuth ? '携' + detailData.familyName : '携家人'}}</view> | 29 | <view class="tt t1">{{isAuth ? '携' + detailData.familyName : '携家人'}}</view> |
| 30 | <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateRoomDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> | 30 | <image wx:if="{{ownerMember.mySelf == 1 && detailData.customMade == 1}}" bindtap="showUpdateRoomDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> |
| 31 | <view wx:if="{{memberList.length > 0}}" class="tt t2">{{detailData.count}}人</view> | 31 | <view wx:if="{{memberList.length > 0}}" class="tt t2">{{detailData.count}}人</view> |
| 32 | </view> | 32 | </view> |
| 33 | <!-- 用户组 --> | 33 | <!-- 用户组 --> |
| ... | @@ -74,7 +74,7 @@ | ... | @@ -74,7 +74,7 @@ |
| 74 | <image class="icon-down" mode="widthFix" src="../../image/blessing/icon-up-arrow.png" /> | 74 | <image class="icon-down" mode="widthFix" src="../../image/blessing/icon-up-arrow.png" /> |
| 75 | </view> | 75 | </view> |
| 76 | <!-- 自定义句子 --> | 76 | <!-- 自定义句子 --> |
| 77 | <view class="sentence">{{detailData.blessTitle}}</view> | 77 | <view class="sentence">{{detailData.sentence}}</view> |
| 78 | </view> | 78 | </view> |
| 79 | <!-- 祝福内容 --> | 79 | <!-- 祝福内容 --> |
| 80 | <view class="blessing"> | 80 | <view class="blessing"> |
| ... | @@ -82,9 +82,9 @@ | ... | @@ -82,9 +82,9 @@ |
| 82 | <!-- 图片 --> | 82 | <!-- 图片 --> |
| 83 | <image mode="widthFix" wx:if="{{item.type == 'image' && item.url}}" class="blessing-item-image" src="{{item.url}}" /> | 83 | <image mode="widthFix" wx:if="{{item.type == 'image' && item.url}}" class="blessing-item-image" src="{{item.url}}" /> |
| 84 | <!-- 文本 --> | 84 | <!-- 文本 --> |
| 85 | <text wx:if="{{item.type == 'text'}}" class="blessing-item-text" style="color: {{item.color ? item.color : '#333333'}};"> | 85 | <view wx:if="{{item.type == 'text'}}" class="blessing-item-text" style="color: {{item.color ? item.color : '#333333'}};"> |
| 86 | {{item.content}} | 86 | {{item.content}} |
| 87 | </text> | 87 | </view> |
| 88 | </view> | 88 | </view> |
| 89 | </view> | 89 | </view> |
| 90 | <!-- 尾部内容 暂时不显示 --> | 90 | <!-- 尾部内容 暂时不显示 --> |
| ... | @@ -101,13 +101,16 @@ | ... | @@ -101,13 +101,16 @@ |
| 101 | <!-- 按钮组 --> | 101 | <!-- 按钮组 --> |
| 102 | <view class="tail-btn-wrap"> | 102 | <view class="tail-btn-wrap"> |
| 103 | <!-- 分享团队图片 --> | 103 | <!-- 分享团队图片 --> |
| 104 | <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" /> | 104 | <!-- <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" /> --> |
| 105 | <view bindtap="onPosterHandler" wx:if="{{detailData.type == 1}}" class="tail-btn-wrap-item more-template2 "> | ||
| 106 | <view class="btn btn2">分享团队图片</view> | ||
| 107 | </view> | ||
| 105 | <view wx:if="{{detailData.type == 0}}" bindtap="toReward" class="tail-btn-wrap-item more-template2"> | 108 | <view wx:if="{{detailData.type == 0}}" bindtap="toReward" class="tail-btn-wrap-item more-template2"> |
| 106 | <view class="btn btn2">赞赏祝福</view> | 109 | <view class="btn btn2">赞赏祝福</view> |
| 107 | </view> | 110 | </view> |
| 108 | <!-- 选择更多祝福模板 --> | 111 | <!-- 选择更多祝福模板 --> |
| 109 | <view bindtap="onMoreTemplateHandler" class="tail-btn-wrap-item more-template2 "> | 112 | <view bindtap="onMoreTemplateHandler" class="tail-btn-wrap-item more-template2 "> |
| 110 | <view class="btn btn2">选择更多祝福模版 >></view> | 113 | <view class="btn btn1">选择更多祝福模版 >></view> |
| 111 | </view> | 114 | </view> |
| 112 | </view> | 115 | </view> |
| 113 | <!-- 尾图 --> | 116 | <!-- 尾图 --> |
| ... | @@ -210,11 +213,11 @@ | ... | @@ -210,11 +213,11 @@ |
| 210 | <view class="t1">邀请你一起加入组队送祝福!</view> | 213 | <view class="t1">邀请你一起加入组队送祝福!</view> |
| 211 | </view> | 214 | </view> |
| 212 | </van-dialog> | 215 | </van-dialog> |
| 213 | <van-popup show="{{ authorizeVisible }}"> | 216 | <van-popup class="poster-popup" show="{{ authorizeVisible }}"> |
| 214 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | 217 | <authorize-comp evttype="{{evttype}}" bind:evtcomp="evtcomp"></authorize-comp> |
| 215 | </van-popup> | 218 | </van-popup> |
| 216 | <van-popup class="poster-popup" bind:click-overlay="onHidePosterHandler" show="{{ posterVisible }}"> | 219 | <van-popup class="poster-popup" bind:click-overlay="onHidePosterHandler" show="{{ posterVisible }}"> |
| 217 | <image bindtap="onPreviewImageHandler" class="poster" mode="widthFix" src="{{imageUrl}}" /> | 220 | <image bindtap="onPreviewImageHandler" class="poster" mode="widthFix" src="{{imageUrl}}" /> |
| 218 | <view bindtap="saveImageToPhotosAlbum" class="save-btn">一键保存</view> | 221 | <view bindtap="saveImageToPhotosAlbum" class="save-btn">一键保存</view> |
| 219 | </van-popup> | 222 | </van-popup> |
| 220 | <shortcut2 types="{{[]}}" pics="{{['red-package2']}}"></shortcut2> | 223 | <shortcut2 types="{{[]}}" pics="{{['red-package2']}}"></shortcut2> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment