Commit 50fa1c529bcc12c4ad5aae06035080c9c8c80f46

Authored by wangfan
1 parent b76bd748

manager-invitation

... ... @@ -34,7 +34,8 @@
"pages/me/follow",
"pages/manager-invitation/index",
"pages/manager-invitation/review",
"pages/manager-invitation/editor"
"pages/manager-invitation/editor",
"pages/manager-invitation/display"
],
"subpackages": [
{
... ...
// pages/manager-invitation/review.js
import util from '../../utils/util';
import App from '../../utils/api';
import TP from '../../utils/tpls';
const {regeneratorRuntime} = global
Page({
/**
* 页面的初始数据
*/
data: {
height: 667,
current: 0,
tpls: [],
seller:{
name:'一键订示例餐厅',
room:'天香阁',
date:util.unixtoTime(new Date()/1000,'YYYY/MM/DD 星期WW HH:II'),
addr:'粤江西路啤酒文化创意艺术区B09'
},
options:{tplid:1},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let openid=getApp().openid;
if(options.fromid==openid && options.hasSellerShare==1){//商家分享自己点跳到商家预览页
wx.redirectTo({
url:util.http_build_query({rid:options.rid,tplid:options.tplid},'./review')
})
}
App.Invitation.SetInvitationRel({
id:options.rid,
initiator:options.fromid,
inviting:openid,
})
let param={
options:options,
}
if(options.rid){
param.tpls=[TP.tpls(options.tplid)]
}
this.setData(param)
this.initData(options);
},
initData(options){
App.Invitation.Detail({id:options.rid}).then(res=>{
this.setData({
seller:{
name:res.data.seller_name,
room:res.data.room_name,
date:util.unixtoTime(res.data.arrival_time,this.data.tpls[this.data.current].timeStr),
addr:res.data.seller_address,
image:res.data.image_url,
}
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
//导航栏自适应
let systemInfo = wx.getSystemInfoSync();
let reg = /ios/i;
let pt = 20;//导航状态栏上内边距
let h = 44;//导航状态栏高度
if (reg.test(systemInfo.system)) {
pt = systemInfo.statusBarHeight;
h = 44;
} else {
pt = systemInfo.statusBarHeight;
h = 48;
}
this.setData({
statusBarHeight: pt,
titleBarHeight: h,
height: systemInfo.windowHeight
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
let path=util.http_build_query({
...this.data.options,
fromid:openid,
hasSellerShare:'',
},'/pages/manager-invitation/display')
return {
title: '点击查看详情,发邀请函',
path: path,
imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-anpai2.jpg',
}
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white",
"navigationBarTitleText":"订座详情",
"usingComponents": {
"userinfo": "/components/userinfo/userinfo",
"nav":"/components/nav/nav",
"formids":"/components/formids/formids",
"userinfo-share": "/components/userinfo/share"
}
}
\ No newline at end of file
... ...
<!--pages/manager-invitation/review.wxml-->
<view class="pages bg-{{options.tplid}} flex-vc" style="height:{{height}}px;">
<template is="tpl-{{options.tplid}}" data="{{...seller,options}}"></template>
</view>
<!--//商务-->
<template name="tpl-1">
<view class="flex-vc shangwu">
<view class="invit-logo">
<image src="http://qn.colorcun.com/custom/lite-yd-cook/image/detail_owner_invitation-1-1.png"></image>
</view>
<view class="seller flex-vc">
<view class="title">餐厅</view>
<view class="content name">{{name}}</view>
<view class="title">包间</view>
<view class="content">{{room}}</view>
<view class="title">时间</view>
<view class="content">{{date}}</view>
<view class="title">店铺地址</view>
<view class="content flex-cc addr">
<image src="http://qn.colorcun.com/manager-invitation/wx/address.png" class="invit-addr"></image>
{{addr}}
</view>
</view>
<userinfo-share class="button-none flex-vc" binduserinfo="setUserInfoSuccess" wx:if="{{options.rid}}" catchtap="catchtap">
<view class="buts-share"></view>
</userinfo-share>
</view>
</template>
<!--//温馨-->
<template name="tpl-2">
<view class="wenxin-top"></view>
<view class="wenxin-bottom"></view>
<view class="flex-vc wenxin">
<view class="invit-logo">
<image src="http://qn.colorcun.com/manager-invitation/wx/%E6%B8%A9%E9%A6%A8-%E9%A2%84%E8%AE%A2%E5%AE%89%E6%8E%92.png"></image>
</view>
<view class="wenxin-mask">
<view class="wenxin-mask-bg" style="background-image: url({{image||'http://qn.colorcun.com/manager-invitation/wx/hunshazhao3.jpg'}})"></view>
<view class="wenxin-mask-img"></view>
</view>
<view class="wenxin-baitou"></view>
<view class="wenxin-line"></view>
<view class="seller flex-vc">
<view class="content">{{date}}</view>
<view class="content">{{name}}{{room}}</view>
<view class="content flex-cc addr">
<image src="http://qn.colorcun.com/manager-invitation/wx/address.png" class="invit-addr"></image>
{{addr}}
</view>
</view>
<userinfo-share class="button-none flex-vc" binduserinfo="setUserInfoSuccess" wx:if="{{options.rid}}" catchtap="catchtap">
<view class="buts-share"></view>
</userinfo-share>
</view>
</template>
... ...
/* pages/manager-invitation/review.wxss */
.pages{
font-size: 200rpx;
background-size: 100%;
font-size: 34rpx;
}
.tabs{
}
.tabs .item{
font-size: 32rpx;
color:#999999;
margin-left: 20rpx;
padding: 0 10rpx;
height: 66rpx;
line-height: 66rpx;
}
.tabs .item.active{
font-size: 36rpx;
font-weight: bold;
color: #E9D9B7;
border-bottom: 2rpx solid #E9D9B7;
}
.bg-1{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/invit-bg.png");
background-color: #353334;
color:#fefefe;
}
.bg-2{
background-image: url("http://qn.colorcun.com/manager-invitation/wx/%E5%BA%95%E9%83%A8.png");
background-color: #F4AFB2;
}
image{
width: 100%;
height: 100%;
}
.invit-logo{
width: 400rpx;
height: 170rpx;
position: relative;
}
.seller{
margin-top: 80rpx;
}
.seller .title{
font-size: 28rpx;
color:#999999;
margin-bottom: 18rpx;
height: 40rpx;
line-height: 40rpx;
}
.seller .content{
margin-bottom: 40rpx;
font-size: 36rpx;
line-height: 50rpx;
text-align: center;
align-items:flex-start;
}
.seller .content:last-child{
margin-bottom: 0;
}
.seller .addr{
width: 80%;
}
.seller .invit-addr{
width: 22rpx;
height: 28rpx;
margin-right: 10rpx;
margin-top: 10rpx;
min-width: 22rpx;
}
.editor{
position: fixed;
bottom: 0;
height:98rpx;
left: 0;
line-height: 98rpx;
font-size: 30rpx;
color: #353535;
background-color: #ECD9B7;
width: 100%;
}
.shangwu .seller{
margin-bottom: 152rpx;
}
.wenxin {
margin-top: 60rpx;
}
.wenxin-top{
position: fixed;
top:0;
left:0;
width:100%;
height: 80rpx;
background-image: url("http://qn.colorcun.com/manager-invitation/wx/%E9%A1%B6%E9%83%A8%E8%8A%B1%E8%BE%B9.png");
background-size: 100%;
}
.wenxin-bottom{
position: fixed;
bottom:0;
left:0;
width:100%;
height: 64rpx;
background-image: url("http://qn.colorcun.com/manager-invitation/wx/%E8%8A%B1%E8%BE%B9-%E5%BA%95%E9%83%A8.png");
background-size: 100%;
}
.wenxin .invit-logo{
width: 340rpx;
height: 184rpx;
}
.wenxin-mask{
margin-top: 10rpx;
width: 568rpx;
height: 560rpx;
position: relative;
}
.wenxin-mask-bg{
margin: 60rpx auto;
width: 468rpx;
height: 468rpx;
border-radius: 50%;
overflow: hidden;
background-image: url("http://qn.colorcun.com/manager-invitation/wx/hunshazhao3.jpg");
background-size: cover;
}
.wenxin-mask-img{
position: absolute;
left: 0;
top:0;
background-image: url("http://qn.colorcun.com/manager-invitation/wx/%E8%8A%B1%E7%8E%AF%E7%A9%BA.png");
width: 100%;
height: 560rpx;
background-size: 100%;
}
.wenxin-baitou{
margin-top: 20rpx;
width: 404rpx;
height: 42rpx;
background-size: 100%;
background-image: url("http://qn.colorcun.com/manager-invitation/wx/%E6%B0%B8%E7%BB%93%E5%90%8C%E5%BF%83-%E7%99%BD%E5%A4%B4%E5%81%95%E8%80%81.png");
}
.wenxin-line{
margin-top: 30rpx;
width: 600rpx;
height: 14rpx;
background-size: 100%;
background-image: url("http://qn.colorcun.com/manager-invitation/wx/%E5%88%86%E5%89%B2%E5%B0%96%E5%A4%B4.png");
}
.wenxin .seller{
margin-top: 30rpx;
color:#fefefe;
}
.wenxin .seller .title{
display: none;
}
.wenxin .seller .content{
margin-bottom: 20rpx;
font-size: 36rpx;
line-height: 50rpx;
text-align: center;
align-items:flex-start;
}
.wenxin .seller .content.addr{
width: 100%;
}
.quick-editor{
background-color: #ECD9B7;
width: 120rpx;
height: 40rpx;
line-height: 40rpx;
color: #353535;
font-size: 24rpx;
position: absolute;
top:50rpx;
right:-150rpx;
text-align: center;
}
.buts-share{
width: 560rpx;
height: 86rpx;
margin: 0 auto;
background-image: url("http://qn.colorcun.com/manager-invitation/wx/detail_owner_invitation-5.png");
background-size: 100%;
background-repeat: no-repeat;
background-position: center center;
animation-name: butAnimation;
animation-duration: 0.7s;
animation-iteration-count:9999;
position: relative;
}
@keyframes butAnimation
{
50% {background-size:90%;}
}
@-webkit-keyframes butAnimation
{
50% {background-size:90%;}
}
\ No newline at end of file
... ...
... ... @@ -135,7 +135,16 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
let path=util.http_build_query({
...this.data.options,
fromid:openid,
hasSellerShare:1,
},'/pages/manager-invitation/display')
return {
title: '点击查看详情,发邀请函',
path: path,
imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-anpai2.jpg',
}
},
swiperChange(e){
this.setData({
... ...
... ... @@ -31,7 +31,7 @@
"list": []
},
"miniprogram": {
"current": 43,
"current": 45,
"list": [
{
"id": 0,
... ... @@ -370,6 +370,13 @@
"pathName": "pages/manager-invitation/editor",
"query": "tplid=2",
"scene": null
},
{
"id": 45,
"name": "pages/manager-invitation/display",
"pathName": "pages/manager-invitation/display",
"query": "rid=5&tplid=2&fromid=oB-xJ5KJCIasaEdgMRckqoL1cwg8&hasSellerShare=",
"scene": null
}
]
}
... ...
... ... @@ -204,6 +204,11 @@ export default {
//邀请函详情
'App.Invitation.Detail':null,
//客户经理、预定人、受邀人信息建立
'App.Invitation.SetInvitationRel':{
//cachetime: -1,
},
//上传图片,只能上传单个图片文件
'App.Examples_Upload.UploadQn':null,
}
\ No newline at end of file
... ...