483cfd0f by simon

默认提交

1 parent 4e6738af
......@@ -28,6 +28,11 @@
align-items: center;
}
.fc{
display: flex;
justify-content: center;
}
// 为元素设定的宽度和高度决定了元素的边框盒。
.bb {
box-sizing: border-box;
......
......@@ -4,7 +4,7 @@
.comp {
position: fixed;
bottom: 30%;
right: 2%;
right: -20px;
z-index: 91;
color: #ffffff;
......@@ -32,7 +32,7 @@
background-color: rgba($color: #000000, $alpha: 0.6);
}
$contactWidth:140px;
$contactWidth:172px;
.contact {
background-color: transparent;
@extend .fcc;
......@@ -40,8 +40,8 @@
color: #ffffff;
width: $contactWidth;
height: $contactWidth;
margin-left: -18px;
margin-top: -8px;
margin-left: -26px;
margin-top: -18px;
.img {
width: $contactWidth;
......
......@@ -5,7 +5,7 @@
<view wx:for="{{pics}}" wx:key="{{index}}" data-data="{{item}}" bindtap="onTapHandler" class="btn">
<image mode="aspectFit" src="{{'../../image/shortcut/'+item+'.png'}}" class="pics" />
</view>
<!-- <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">
<image class="img" mode="widthFix" src="../../image/shortcut/contact.jpg" />
</button> -->
<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">
<image class="img" mode="widthFix" src="../../image/shortcut/more-bless.png" />
</button>
</view>
......
......@@ -47,22 +47,27 @@ Page({
wxCodeUrl: "", // 微信小程序码
},
onShareAppMessage(res) {
let {
detailData,
ownerMember,
isAuth
} = this.data;
let title = `${ownerMember.memberName}邀请您组队发祝福!体验今年最火爆的拜年方式`;
let shareType = ""
// let imageUrl = detailData && detailData.thumbnail || "";
if (res.from === 'button') {
// 来自页面内转发按钮
// shareType == join 分享给家人,能加入 组队模式
shareType = res.target.dataset.data || "";
console.log("shareType:", shareType);
title
} else {}
let {
detailData
} = this.data;
let memberCode = app.store.getItem("memberCode");
let title = "";
// 已经定制会提供房主的memberCode
let memberCode = detailData.customMade == 1 ? app.store.getItem("memberCode") : "";
let path = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}&t=${shareType}`;
console.log("share path:", path);
// let imageUrl = detailData && detailData.thumbnail || "";
return {
// title,
path,
......@@ -74,6 +79,22 @@ Page({
authorizeVisible: true
})
},
checkAuthShowComp() {
return new Promise((resolve, reject) => {
checkAuth().then((result) => {
this.setData({
isAuth: result
})
if (result) {
resolve(true);
} else {
this.setData({
authorizeVisible: true
});
}
});
});
},
onHide() {
},
......@@ -135,7 +156,13 @@ Page({
* 基础方法
* 授权完毕重拉数据用
*/
initData() {},
initData() {
checkAuth().then((result) => {
_this.setData({
isAuth: result
});
}).catch((err) => {});
},
playBgm() {
let _this = this;
let {
......@@ -237,10 +264,12 @@ Page({
wx.saveImageToPhotosAlbum({
filePath: _this.data.imageUrl,
success(res) {
wx.showToast({
title: '保存成功',
icon: 'success'
});
wx.showModal({
content: '图片已经保存到你的相册,快去发送到朋友圈拜年吧!',
showCancel: false,
confirmText: '确认',
success(res) {}
})
},
fail(err) {
wx.getSetting({
......@@ -482,11 +511,14 @@ Page({
// 显示更新用户信息
showUpdateUserInfoDialog() {
this.setData({
updateUserInfoDialogVisible: true,
updateUserInfo: {},
files: []
})
this.checkAuthShowComp().then((result) => {
this.setData({
updateUserInfoDialogVisible: true,
updateUserInfo: {},
files: []
})
});
},
// 房主名字
......@@ -500,10 +532,12 @@ Page({
// 显示更新用户信息
showUpdateRoomDialog() {
this.setData({
updateRoomDialogVisible: true,
updateRoomInfo: {},
})
this.checkAuthShowComp().then((result) => {
this.setData({
updateRoomDialogVisible: true,
updateRoomInfo: {},
})
});
},
// 家庭名称
......@@ -786,6 +820,9 @@ Page({
// 授权操作
getUserInfo(e) {
let {
detailData
} = this.data;
let _this = this;
if (e.encryptedData && e.iv) {
// 同意授权
......@@ -793,6 +830,7 @@ Page({
url: app.api.register,
sid: false,
data: {
blessCode: detailData.blessCode,
encryptedData: e.encryptedData,
iv: e.iv,
code: app.store.getItem("wxcode"),
......@@ -802,6 +840,7 @@ Page({
wx.hideLoading();
if (res2 && res2.sessionId) {
app.store.setItem('sessionId', res2.sessionId);
app.store.setItem('memberCode', res2.memberCode);
}
wx.showModal({
content: '授权成功',
......@@ -811,6 +850,7 @@ Page({
_this.setData({
isAuth: result
});
this.queryBlessDetail();
}).catch((err) => {});
}).catch((err) => {
wx.hideLoading();
......
// @import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
$blessContentWidth: 690px;
$blessContentLabelWidth: 650px;
.van-button__text {
font-size: 36rpx;
}
......@@ -28,8 +31,8 @@
}
&-border {
width: 167px;
height: 167px;
width: 191px;
height: 191px;
position: absolute;
}
}
......@@ -181,7 +184,6 @@
width: 660px;
display: flex;
justify-content: flex-start;
// justify-content: center;
flex-wrap: wrap;
margin: 36px auto 0;
height: 450px;
......@@ -235,6 +237,12 @@
}
}
.fc {
display: flex;
justify-content: center;
}
.all {
height: auto;
// overflow: auto;
......@@ -266,7 +274,7 @@
// 祝福内容
.blessing {
margin: 72px auto 72px;
$blessContentWidth: 690px;
&-item {
width: $blessContentWidth;
......@@ -276,7 +284,7 @@
color: #333333;
&-text {
width: $blessContentWidth;
width: $blessContentLabelWidth;
font-weight: bold;
}
......@@ -289,6 +297,7 @@
// 尾部
.tail {
text-align: center;
// 尾部头像
.portrait {
......@@ -340,6 +349,12 @@
}
}
&-image-bot {
margin: 48px auto;
width: $blessContentWidth;
}
}
}
......@@ -353,7 +368,7 @@
.bottom-bg {
width: 750px;
height: 132px;
height: 148px;
position: absolute;
bottom: 0;
}
......@@ -363,7 +378,7 @@
position: relative;
display: flex;
justify-content: center;
margin: 0px auto 24px;
margin: 0px auto 36px;
.btn {
margin: 0 22px;
......@@ -372,7 +387,8 @@
font-size: 36px;
border-radius: 8px;
box-shadow: 5.9px 5.5px 18px 0 rgba(26, 36, 91, 0.73);
background-image: linear-gradient(to top, #b41d36, #bb2634);
// background-image: linear-gradient(to top, #b41d36, #bb2634);
background-image: linear-gradient(to top, #e65638, #dd784d);
}
.btn2 {
......@@ -387,6 +403,7 @@
.music {
width: 66px;
height: 66px;
position: fixed;
right: 24px;
top: 24px;
......@@ -435,3 +452,8 @@
#poster {
position: absolute;
}
.editBase64 {
// background: url("https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/jyes/assets/oss/icon-edit.png");
// @extend .bis;
}
......
......@@ -3,6 +3,7 @@
<view class="app__bgc bgc" style="background-color: {{detailData.background}};"></view>
<!-- <view class="app__bg bg " style="background: url('{{detailData.backgroundImage}}')"></view> -->
<image mode="scaleToFill" class="ebg" src="{{detailData.backgroundImage}}" />
<image mode="aspectF" class="ebg" src="{{detailData.backgroundGif}}" />
<view class="app__content main">
<!-- 顶部背景 -->
<image class="top-bg" mode="widthFix" src="{{detailData.headImage}}" />
......@@ -19,17 +20,17 @@
</view>
<!-- 用户名称 -->
<view class="name">
<view class="tt">{{ownerMember.memberName}}</view>
<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" />
</view>
<!-- 编辑房间信息 组队时候才显示 -->
<view wx:if="{{detailData.type == 1}}" class="edit">
<view class="tt t1">{{detailData.familyName}}</view>
<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" />
<view class="tt t2">{{detailData.count}}人</view>
</view>
<!-- 用户组 -->
<view wx:if="{{detailData.type == 1}}" class="group {{isMore ? 'all' : ''}}">
<view wx:if="{{detailData.type == 1}}" class="group {{isMore ? 'all' : ''}} {{memberList.length < 1 ? 'fc':''}}">
<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">
......@@ -39,7 +40,10 @@
</view>
<!-- 邀请 房主或组队模式显示 -->
<view class="group-item" wx:if="{{options.t || ownerMember.mySelf == 1}}">
<button data-data="join" open-type="share" class="group-item-inv">
<button wx:if="{{isAuth}}" data-data="join" open-type="share" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
<button wx:else open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
</view>
......@@ -64,7 +68,7 @@
</view>
</view>
<!-- 尾部内容 暂时不显示 -->
<view class="tail" wx:if="{{1>0}}">
<view class="tail">
<!-- 尾部头像 -->
<view class="portrait">
<image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" />
......@@ -88,11 +92,14 @@
>>
</view>
</view>
<!-- 尾图 -->
<image class="tail-image-bot" mode="scaleToFill" src="{{detailData.tailImage}}" />
</view>
</view>
<!-- fix底部 -->
<view class="bottom">
<image class="bottom-bg" mode="scaleToFill" src="{{detailData.tailImage}}" />
<!-- <image class="bottom-bg" mode="scaleToFill" src="{{detailData.tailImage}}" /> -->
<!-- <image class="bottom-bg" mode="widthFix" src="{{detailData.tailImage}}" /> -->
<!-- 分情况显示btn-wrap -->
<!-- 单人 -->
<block wx:if="{{detailData.type == 0}}">
......@@ -193,4 +200,4 @@
<image bindtap="onPreviewImageHandler" class="poster" mode="widthFix" src="{{imageUrl}}" />
<view bindtap="saveImageToPhotosAlbum" class="save-btn">一键保存</view>
</van-popup>
<shortcut2 types="{{[]}}" pics="{{['red-package2','more-bless']}}"></shortcut2>
<shortcut2 types="{{[]}}" pics="{{['red-package2']}}"></shortcut2>
......
......@@ -91,16 +91,17 @@
}
.tit {
font-size: 36px;
@include ellipsis(3);
font-size: 40px;
@include ellipsis(2);
color: #fc464a;
}
.scene {
position: absolute;
font-size: 36px;
font-size: 32px;
bottom: 12px;
left: 14px;
color: #333333;
@include ellipsis(1);
}
......
......@@ -30,7 +30,7 @@
<image class="poster" src="{{item.thumbnail}}" />
<view class="desc-wrap">
<view class="tit">{{item.blessTitle}}</view>
<view class="scene">{{item.scene}}</view>
<view class="scene">{{item.type == 0 ? '单人祝福 >> 送' : '单团队祝福 >> 送'}}{{item.scene}}</view>
</view>
</view>
</block>
......