55251512 by simon

默认提交

1 parent 181c0ddf
......@@ -28,7 +28,7 @@ module.exports = {
*/
areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询
wxacodeGet: "/mzcfsapi/qrcode/createV2", // 通用上传 ?path=/pages/index/index?pa=1
wxacodeGet: "/wx/create/wxacode", // 通用上传 ?path=/pages/index/index?pa=1
uploadFile: '/kdapi/file/upload', //上传图片通用接口
}
......
......@@ -58,6 +58,13 @@ Page({
options
} = this.data;
let title = "亲爱的家人们新年快乐";
if (detailData.type == 0) {
// 单人 给您拜年啦!来看看是怎样特别的祝福
title = `${ownerMember.memberName}给您拜年啦!来看看是怎样特别的祝福`;
} else {
// 团队
title = `${ownerMember.memberName}${ownerMember.memberName}${detailData.count}人给您拜年啦!看看这xx都是谁`;
}
let shareType = ""
// let imageUrl = detailData && detailData.thumbnail || "";
if (res.from === 'button') {
......@@ -143,7 +150,7 @@ Page({
}
});
/**
/**q
* 显示加入房间条件
* 1.已定制
* 2.类型为组队类型
......@@ -331,15 +338,18 @@ Page({
detailData
} = this.data;
let memberCode = app.store.getItem("memberCode");
let wxCodePath = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}`;
// let wxCodePath = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}`;
return new Promise((resolve, reject) => {
// 先获取小程序码
app.get({
mode: "common",
app.post({
url: app.api.wxacodeGet,
data: {
path: encodeURIComponent(wxCodePath)
page: "pages/blessing/blessing",
content: JSON.stringify({
blessCode: detailData.blessCode || "",
ownerMemberCode: memberCode || "",
})
}
}).then((result) => {
this.setData({
......@@ -441,6 +451,7 @@ Page({
{
width: 100,
height: 100,
borderRadius: 100,
x: 586,
y: 1198,
url: wxCodeUrl,
......@@ -486,15 +497,6 @@ Page({
let wid = 160;
let startY = 800;
memberDrawList.forEach((element, idx) => {
// blocks.push({
// x: endX - (idx * wid) - ((wid - 92)),
// y: startY,
// width: 92,
// height: 92,
// borderRadius: 92,
// zIndex: 90,
// borderColor: "#fee085",
// })
images.push({
x: endX - (idx * wid) - ((wid - 92) / 2) - 4,
y: startY + 2,
......@@ -516,15 +518,17 @@ Page({
})
});
texts.push({
x: 686,
y: startY + 200,
fontSize: 48,
color: "#fee085",
textAlign: "right",
zIndex: 11,
text: `长按查看全部${detailData.count}人 >>`,
})
if (detailData.count > 0) {
texts.push({
x: 686,
y: startY + 200,
fontSize: 48,
color: "#fee085",
textAlign: "right",
zIndex: 11,
text: `长按查看祝福`,
})
}
}
let posterData = {
......@@ -548,7 +552,6 @@ Page({
files: []
})
});
},
// 房主名字
......@@ -727,11 +730,16 @@ Page({
*/
queryBlessDetail() {
return new Promise((resolve, reject) => {
let {
options
} = this.data;
const scene = options.scene || "";
app.post({
url: app.api.blessDetail,
data: {
blessCode: this.data.options.c,
blessCode: this.data.options.c || "",
ownerMemberCode: this.data.options.m ? this.data.options.m : app.store.getItem("memberCode") ? app.store.getItem("memberCode") : "",
scene: scene || ""
}
}).then((result) => {
let blessContent = [];
......@@ -811,30 +819,37 @@ Page({
* 加入房间
*/
onBlessJoinHandler(e) {
let {
options,
detailData
} = this.data;
app.post({
url: app.api.blessJoin,
data: {
ownerMemberCode: options.m,
blessCode: detailData.blessCode
}
}).then((result) => {
this.setData({
isJoin: false
})
this.queryBlessDetail().then((result) => {
wx.showModal({
showCancel: false,
content: '加入成功',
success(res) {}
this.checkAuthShowComp().then((result) => {
let {
options,
detailData
} = this.data;
app.post({
url: app.api.blessJoin,
data: {
ownerMemberCode: options.m,
blessCode: detailData.blessCode
}
}).then((result) => {
this.setData({
isJoin: false
})
this.queryBlessDetail().then((result) => {
wx.showModal({
showCancel: false,
content: '加入成功',
success(res) {}
})
});
}).catch((err) => {
});
}).catch((err) => {
});
},
// 点击确认授权按钮
......
......@@ -21,18 +21,18 @@ $blessContentLabelWidth: 650px;
position: relative;
margin: 24px auto;
text-align: center;
width: 216px;
// width: 216px;
@extend .fcc;
&-inner {
width: 167px;
height: 167px;
border-radius: 167px;
width: 190px;
height: 190px;
border-radius: 190px;
}
&-border {
width: 191px;
height: 191px;
width: 216px;
height: 216px;
position: absolute;
}
}
......@@ -106,6 +106,9 @@ $blessContentLabelWidth: 650px;
height: 100%;
}
.ebggif {}
.main {
position: relative;
......@@ -129,6 +132,8 @@ $blessContentLabelWidth: 650px;
font-weight: 500;
text-align: center;
color: #fee085;
width: $blessContentWidth;
margin: 0 auto;
}
// 用户
......@@ -263,7 +268,7 @@ $blessContentLabelWidth: 650px;
}
}
.more2{
.more2 {
margin-top: 0;
}
......@@ -345,10 +350,38 @@ $blessContentLabelWidth: 650px;
margin-right: 40px;
margin-top: 24px;
.t1 {
text-decoration: underline;
}
}
&-item {
display: flex;
justify-content: flex-end;
.btn {
@extend .bb;
margin: 24px 45px 8px 0;
height: 76px;
line-height: 76px;
padding: 0 20px;
color: #fee085;
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, #e65638, #dd784d);
}
.btn2 {
color: #940023;
box-shadow: 5.9px 5.5px 18px 0 rgba(26, 36, 91, 0.73);
background-image: linear-gradient(to top, #f4b44d, #e8b976, #ffebb5);
}
}
}
&-image-bot {
......@@ -358,7 +391,7 @@ $blessContentLabelWidth: 650px;
}
&-bot-space {
min-height: 156px;
min-height: 166px;
}
}
......@@ -384,7 +417,7 @@ $blessContentLabelWidth: 650px;
position: relative;
display: flex;
justify-content: center;
margin: 0px auto 42px;
margin: 0px auto 52px;
.btn {
margin: 0 22px;
......@@ -395,6 +428,7 @@ $blessContentLabelWidth: 650px;
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, #e65638, #dd784d);
padding: 0;
}
.btn2 {
......
<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>
<!-- <view class="app__bg bg " style="background: url('{{detailData.backgroundImage}}')"></view> -->
<image mode="scaleToFill" class="ebg" src="{{detailData.backgroundImage}}" />
<image mode="aspectFill" class="ebg" src="{{detailData.backgroundGif}}" />
<!-- <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}}" />
......@@ -27,7 +28,7 @@
<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" />
<view class="tt t2">{{detailData.count}}人</view>
<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':''}}">
......@@ -40,12 +41,27 @@
</view>
<!-- 邀请 房主或组队模式显示 -->
<view class="group-item" wx:if="{{options.t || ownerMember.mySelf == 1}}">
<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>
<block wx:if="{{isAuth}}">
<!-- 已授权 -->
<!-- 未定制 -->
<block wx:if="{{detailData.customMade == 0}}">
<button bindtap="showTips" data-data="请定制祝福后再邀请" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
</block>
<!-- 已定制 -->
<block wx:else>
<button data-data="join" open-type="share" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
</block>
</block>
<block wx:else>
<!-- 未授权 -->
<button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
</block>
</view>
</view>
<!-- 更多 -->
......@@ -86,14 +102,12 @@
<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 wx:if="{{detailData.type == 0}}" bindtap="toReward" class="tail-btn-wrap-item more-template">
<span class="t1">赞赏祝福</span>
>>
<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-template">
<span class="t1">选择更多祝福模版</span>
>>
<view bindtap="onMoreTemplateHandler" class="tail-btn-wrap-item more-template2 ">
<view class="btn btn2">选择更多祝福模版 >></view>
</view>
</view>
<!-- 尾图 -->
......@@ -117,7 +131,7 @@
<!-- 已定制 -->
<view wx:if="{{detailData.customMade == 1}}" class="btn-wrap">
<button bindtap="onPosterHandler" class="btn btn1">分享图片祝福</button>
<button open-type="share" class="btn btn2">送出我的祝福</button>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</view>
</block>
<!-- 组队 -->
......@@ -127,7 +141,7 @@
<!-- 未授权 -->
<block wx:if="{{!isAuth}}">
<button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn1">
请家人加入
亲友组团拜年
</button>
<button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn2">
定制我的祝福
......@@ -135,7 +149,7 @@
</block>
<!-- 已授权 -->
<block wx:else>
<button bindtap="showTips" data-data="请定制祝福后再邀请" class="btn btn1">邀请家人加入</button>
<button bindtap="showTips" data-data="请定制祝福后再邀请" class="btn btn1">邀亲友组团拜年</button>
<button bindtap="onBlessMakeHandler" class="btn btn2">定制我的祝福</button>
</block>
</view>
......@@ -147,9 +161,9 @@
</block>
<!-- 不能加入状态 -->
<block wx:else>
<button data-data="join" open-type="share" class="btn btn1">邀请家人加入</button>
<button data-data="join" open-type="share" class="btn btn1">邀亲友组团拜年</button>
</block>
<button open-type="share" class="btn btn2">送出我的祝福</button>
<button open-type="share" class="btn btn2">送祝福给亲友</button>
</view>
</block>
</view>
......
......@@ -78,16 +78,19 @@
&-bless-item {
display: flex;
justify-content: space-between;
border-bottom: solid 2px #dfdfdf;
padding: 24px 0;
padding: 8px 0 8px;
position: relative;
border-radius: 8px;
.desc-wrap {
position: relative;
@extend .bb;
padding: 8px 14px;
height: 180px;
padding: 8px 16px 8px 20px;
height: 200px;
flex: 1;
background-color: #ffffff;
@include border-right-radius(8px);
}
.tit {
......@@ -106,9 +109,10 @@
}
.poster {
width: 350px;
height: 180px;
width: 300px;
height: 200px;
border-radius: 8px;
@include border-left-radius(8px);
}
}
......
......@@ -30,7 +30,7 @@
<image class="poster" src="{{item.thumbnail}}" />
<view class="desc-wrap">
<view class="tit">{{item.blessTitle}}</view>
<view class="scene">{{item.type == 0 ? '单人祝福 >> 送' : '团队祝福 >> 送'}}{{item.scene}}</view>
<view class="scene">{{item.type == 0 ? '我的祝福 >> 送' : '组团祝福 >> 送'}}{{item.scene}}</view>
</view>
</view>
</block>
......