Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
home-with-kids-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f69c73a6
authored
2020-01-16 01:58:08 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
e76cb64c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
31 deletions
src/app.scss
src/component/authorize-comp/authorize-comp.js
src/component/authorize-comp/authorize-comp.scss
src/component/authorize-comp/authorize-comp.wxml
src/pages/blessing/blessing.js
src/pages/blessing/blessing.scss
src/pages/blessing/blessing.wxml
src/app.scss
View file @
f69c73a
...
...
@@ -154,7 +154,6 @@ button {
}
// web font icon
@font-face
{
...
...
src/component/authorize-comp/authorize-comp.js
View file @
f69c73a
...
...
@@ -15,7 +15,11 @@ Component({
cancelDesc
:
{
type
:
String
,
value
:
"同意授权才能获得更多体验哦~"
,
}
},
evttype
:
{
type
:
String
,
value
:
''
,
},
},
data
:
{
// 这里是一些组件内部数据
...
...
@@ -31,21 +35,23 @@ Component({
// 隐藏蒙层
hideMask
()
{
this
.
triggerEvent
(
'evtcomp'
,
{
name
:
"_evt_hide_mask"
name
:
"_evt_hide_mask"
,
});
},
// 授权成功事件
authComplete
()
{
this
.
triggerEvent
(
'evtcomp'
,
{
name
:
"_evt_auth_complete"
name
:
"_evt_auth_complete"
,
data
:
{
evttype
:
this
.
properties
.
evttype
}
});
},
// 点击暂不授权按钮
cancelAuth
(
e
)
{
console
.
log
(
"this.properties.evttype:"
,
this
.
properties
.
evttype
);
this
.
hideMask
();
// this.triggerEvent('evtcomp', {
// name: "_evt_auth_cancel"
...
...
src/component/authorize-comp/authorize-comp.scss
View file @
f69c73a
...
...
@@ -3,10 +3,18 @@
.comp-item
{
width
:
6
5
0px
;
min-height
:
496
px
;
border-radius
:
1
0
px
;
width
:
6
3
0px
;
min-height
:
360
px
;
border-radius
:
1
6
px
;
background-color
:
#ffffff
;
position
:
relative
;
.close
{
position
:
absolute
;
top
:
12px
;
right
:
28px
;
font-size
:
52px
;
}
.cspace
{
height
:
80px
;
...
...
@@ -16,6 +24,7 @@
text-align
:
center
;
width
:
520px
;
margin
:
0
auto
;
border-radius
:
10px
;
.logo
{
margin
:
0
auto
;
...
...
@@ -29,13 +38,13 @@
}
.tit
{
font-size
:
4
0
px
;
font-size
:
4
2
px
;
color
:
#333333
;
}
.tips
{
margin-top
:
28px
;
font-size
:
3
2
px
;
font-size
:
3
6
px
;
color
:
#333333
;
padding-bottom
:
244px
;
}
...
...
@@ -45,14 +54,14 @@
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
80
px
;
bottom
:
64
px
;
margin
:
0
auto
;
display
:
flex
;
justify-content
:
center
;
}
.btn
{
@include
cb
(
2
40px
,
80
px
);
@include
cb
(
2
80px
,
96
px
);
margin
:
0
24px
;
}
...
...
@@ -62,3 +71,5 @@
}
}
...
...
src/component/authorize-comp/authorize-comp.wxml
View file @
f69c73a
<view class="comp-item">
<view class="close" bindtap="hideMask">x</view>
<view class="cspace"></view>
<view class="cont">
<!-- <view class="logo">
...
...
@@ -6,11 +7,11 @@
</view> -->
<view class="tit">家有儿孙</view>
<view class="tips">
<text>
需要获取您的微信昵称等信息才可以体验更多哦
</text>
<text>
将头像昵称改为你的?
</text>
</view>
</view>
<view class="btn-wrap">
<
button class="btn btn2" bindtap="cancelAuth">暂不授权</button
>
<
!-- <button class="btn btn2" bindtap="cancelAuth">暂不授权</button> --
>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
</view>
</view>
...
...
src/pages/blessing/blessing.js
View file @
f69c73a
...
...
@@ -8,14 +8,15 @@ import Poster from '../../miniprogram_dist/poster/poster';
// import calendar from '../../utils/calendar.js';
let
calendar
=
require
(
'../../utils/calendar.js'
);
const
innerAudio
=
wx
.
createInnerAudioContext
();
let
app
=
getApp
();
Page
({
data
:
{
isOverShare
:
true
,
authorizeVisible
:
false
,
evttype
:
""
,
total
:
0
,
page
:
1
,
size
:
10
,
...
...
@@ -63,7 +64,11 @@ Page({
title
=
`
${
ownerMember
.
memberName
}
给您拜年啦!来看看是怎样特别的祝福`
;
}
else
{
// 团队
title
=
`
${
ownerMember
.
memberName
}
携
${
ownerMember
.
memberName
}${
detailData
.
count
}
人给您拜年啦!看看这xx都是谁`
;
if
(
detailData
.
count
>
0
)
{
title
=
`
${
ownerMember
.
memberName
}
携
${
detailData
.
familyName
}${
detailData
.
count
}
人给您拜年啦!看看这
${
detailData
.
count
}
人都是谁`
;
}
else
{
title
=
`
${
ownerMember
.
memberName
}
给您拜年啦!来看看是怎样特别的祝福`
;
}
}
let
shareType
=
""
// let imageUrl = detailData && detailData.thumbnail || "";
...
...
@@ -123,12 +128,22 @@ Page({
// });
});
},
checkAuthShowComp
()
{
checkAuthShowComp
(
evttype
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
checkAuth
().
then
((
result
)
=>
{
if
(
result
)
{
resolve
(
true
);
}
else
{
if
(
evttype
)
{
this
.
setData
({
evttype
})
}
else
{
this
.
setData
({
evttype
:
""
})
}
console
.
log
(
"checkAuthShowComp evttype:"
,
this
.
data
.
evttype
);
this
.
showAuth
();
}
});
...
...
@@ -542,6 +557,7 @@ Page({
})
});
if
(
memberDrawList
.
length
>
0
)
{
texts
.
push
({
x
:
686
,
...
...
@@ -550,7 +566,7 @@ Page({
color
:
"#fee085"
,
textAlign
:
"right"
,
zIndex
:
11
,
text
:
`长按查看
祝福
`
,
text
:
`长按查看
全部
${
detailData
.
count
}
人
`
,
})
}
else
{
texts
.
push
({
...
...
@@ -560,7 +576,7 @@ Page({
color
:
"#fee085"
,
textAlign
:
"right"
,
zIndex
:
11
,
text
:
`长按查看
全部
${
detailData
.
count
}
人
`
,
text
:
`长按查看
祝福
`
,
})
}
}
...
...
@@ -875,7 +891,7 @@ Page({
* 加入房间
*/
onBlessJoinHandler
(
e
)
{
this
.
checkAuthShowComp
().
then
((
result
)
=>
{
this
.
checkAuthShowComp
(
"join"
).
then
((
result
)
=>
{
let
{
options
,
detailData
...
...
@@ -980,6 +996,11 @@ Page({
name
,
data
}
=
evt
.
detail
;
console
.
log
(
"evt:"
,
evt
);
console
.
log
(
"data:"
,
data
);
if
(
data
&&
data
.
evttype
&&
data
.
evttype
==
"join"
)
{
console
.
log
(
"55555"
);
}
switch
(
name
)
{
// 隐藏蒙层
...
...
@@ -993,7 +1014,14 @@ Page({
case
"_evt_auth_complete"
:
// this.initData();
this
.
hideMask
();
console
.
log
(
"_evt_auth_complete:"
,
data
.
evttype
);
if
(
data
&&
data
.
evttype
&&
data
.
evttype
==
"join"
)
{
this
.
queryBlessDetail
().
then
((
result
)
=>
{
this
.
onBlessJoinHandler
();
});
}
else
{
this
.
queryBlessDetail
();
}
break
;
default
:
...
...
src/pages/blessing/blessing.scss
View file @
f69c73a
...
...
@@ -285,7 +285,7 @@ $blessContentLabelWidth: 650px;
&
-item
{
width
:
$blessContentWidth
;
margin
:
48px
auto
;
margin
:
0
auto
;
font-size
:
42px
;
text-align
:
center
;
color
:
#333333
;
...
...
@@ -293,10 +293,12 @@ $blessContentLabelWidth: 650px;
&
-text
{
width
:
$blessContentLabelWidth
;
font-weight
:
bold
;
margin
:
16px
auto
;
}
&
-image
{
width
:
$blessContentWidth
;
margin
:
16px
auto
;
}
}
...
...
src/pages/blessing/blessing.wxml
View file @
f69c73a
...
...
@@ -22,12 +22,12 @@
<!-- 用户名称 -->
<view class="name">
<view class="tt">{{isAuth ? ownerMember.memberName : '我'}}</view>
<image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
<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}}" bindtap="showUpdateRoomDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
<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>
<!-- 用户组 -->
...
...
@@ -74,7 +74,7 @@
<image class="icon-down" mode="widthFix" src="../../image/blessing/icon-up-arrow.png" />
</view>
<!-- 自定义句子 -->
<view class="sentence">{{detailData.
blessTitl
e}}</view>
<view class="sentence">{{detailData.
sentenc
e}}</view>
</view>
<!-- 祝福内容 -->
<view class="blessing">
...
...
@@ -82,9 +82,9 @@
<!-- 图片 -->
<image mode="widthFix" wx:if="{{item.type == 'image' && item.url}}" class="blessing-item-image" src="{{item.url}}" />
<!-- 文本 -->
<
text
wx:if="{{item.type == 'text'}}" class="blessing-item-text" style="color: {{item.color ? item.color : '#333333'}};">
<
view
wx:if="{{item.type == 'text'}}" class="blessing-item-text" style="color: {{item.color ? item.color : '#333333'}};">
{{item.content}}
</
text
>
</
view
>
</view>
</view>
<!-- 尾部内容 暂时不显示 -->
...
...
@@ -101,13 +101,16 @@
<!-- 按钮组 -->
<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" />
<!-- <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 btn
2
">选择更多祝福模版 >></view>
<view class="btn btn
1
">选择更多祝福模版 >></view>
</view>
</view>
<!-- 尾图 -->
...
...
@@ -210,8 +213,8 @@
<view class="t1">邀请你一起加入组队送祝福!</view>
</view>
</van-dialog>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
<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}}" />
...
...
Please
register
or
sign in
to post a comment