Browse Source

团队预约改了部分样式

团队预约改了部分样式
master
xuetaotao 5 years ago
parent
commit
9e625fd8b1
  1. 4
      pages/index/index.wxml
  2. 3
      pages/info/museumInfo/index.js
  3. 43
      pages/info/museumInfo/index.wxml
  4. 75
      pages/info/museumInfo/index.wxss
  5. 179
      pages/order/components/date/index.js
  6. 2
      pages/order/components/date/index.wxml
  7. 2
      pages/pbService/group/index.wxml
  8. 4
      project.private.config.json

4
pages/index/index.wxml

@ -241,9 +241,9 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb6.png" mode="widthFix"></image>
<view>博物馆查询</view>
</view>
<view bindtap="gotoPath" data-title="团预约" data-path="/pages/pbService/group/index" class="pbservice-item">
<view bindtap="gotoPath" data-title="团预约" data-path="/pages/pbService/group/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb9.png" mode="widthFix"></image>
<view>团预约</view>
<view>团预约</view>
</view>
<view bindtap="gotoPath" data-title="精彩回顾" data-path="/pages/pbService/activity/index" class="pbservice-item">

3
pages/info/museumInfo/index.js

@ -409,7 +409,8 @@ Page({
sku: this.data.info.product_venue.sku[0],
infoDate: this.data.date,
infoTime: this.data.time,
isGroup: this.data.isGroup
isGroup: this.data.isGroup,
isTeam: this.data.info.team_order
}
wx.navigateTo({
url: '/pages/order/scene/index?type=museum'

43
pages/info/museumInfo/index.wxml

@ -1,20 +1,28 @@
<!--pages/info/museumInfo/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" />
<title title="场馆详情"></title>
<title title="场馆团体预约" wx:if="{{info.team_order}}"></title>
<title title="场馆详情" wx:else></title>
<view class="iconfont icon-fenxiang" bindtap="share"></view>
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}"
autoplay="{{true}}" interval="{{2000}}" duration="{{300}}">
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{true}}" interval="{{2000}}"
duration="{{300}}">
<block wx:for="{{info.listimg}}" wx:key="*this">
<swiper-item>
<image src="{{item}}" mode="aspectFill"></image>
</swiper-item>
</block>
<view class="title" wx:if="{{info && info.team_order}}">{{info.title}}(团体预约)</view>
</swiper>
<view class="info" wx:if="{{info}}">
<!-- 普通详情样式 -->
<view class="info" wx:if="{{info && !info.team_order}}">
<view class="title">{{info.title}}</view>
<view class="location"><text class="iconfont icon-location"></text>{{info.address}}</view>
<view class="location" style="margin-bottom:0"><text class="iconfont icon-dianhua2"></text>{{info.tel}}</view>
</view>
<!-- 团体预约的详情样式 -->
<view class="team_info" wx:if="{{info && info.team_order}}">
<view class="location"><text class="iconfont icon-location"></text>{{info.address}}</view>
<view class="location" style="margin-bottom:0"><text class="iconfont icon-dianhua2"></text>{{info.tel}}</view>
</view>
<view class="menu-box{{fixed?' menu-fixed':''}}" style="top:{{top}}px" wx:if="{{isGroup!=1}}">
<view class="menu-item{{type==1?' active':''}}" bindtap="changeType" data-type="1">场馆介绍</view>
<view class="menu-item{{type==2?' active':''}}" bindtap="changeType" data-type="2">场馆活动</view>
@ -22,7 +30,8 @@
<view style="height:102rpx;" wx:if="{{fixed}}"></view>
<view id="content">
<view wx:if="{{type==1}}">
<date wx:if="{{isLogin && product && product.sku && product.product}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date>
<date wx:if="{{isLogin && product && product.sku && product.product}}" bind:onChangeDate="changeDate"
bind:onChangeTime="changeTime" product="{{product}}" isTeam="{{info.team_order}}"></date>
<view class="detail-title">预订须知</view>
<rich-text wx:if="{{info}}" class="detail" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text>
<view class="detail-title">场馆介绍</view>
@ -43,12 +52,13 @@
</navigator>
<view style="font-size:26rpx;text-align:center;line-height:200rpx;" wx:if="{{actList.length==0}}">暂无活动</view>
</view>
<view style="height:104rpx" wx:if="{{info.product_venue && info.product_venue.sku && info.product_venue.sku.length>0}}"></view>
<view style="height:104rpx"
wx:if="{{info.product_venue && info.product_venue.sku && info.product_venue.sku.length>0}}"></view>
</view>
<view class="fixed-btn" wx:if="{{info.product_venue && info.product_venue.sku && info.product_venue.sku.length>0}}">
<view bindtap="order" class="btn">参观预约</view>
<view bindtap="order" class="btn {{info && info.team_order ? 'team' : ''}}">参观预约</view>
</view>
<view style="position:absolute;right:0;left:-10000rpx;top:-200rpx;">
<view style="position:absolute;right:0;left:-10000rpx;top:-200rpx;z-index:-1">
<canvas canvas-id='imageCanvas' class='imageCanvas' style="width:551rpx;height:643rpx;" disable-scroll='true'>
</canvas>
<canvas class="canvasCode" style="opacity:0;width:500px;height:500px" canvas-id="myQrcode"></canvas>
@ -59,15 +69,22 @@
<image class="share-img" src="{{shareImg}}" mode="widthFix"></image>
<view class="share-tips">
<view style="position:relative">
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/img.png" mode="widthFix"></image>
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/img.png" mode="widthFix">
</image>
<view>保存图片到相册</view>
<view class="tipimg"><image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image></view>
<view class="tipimg">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image>
</view>
</view>
<image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png" mode="widthFix"></image>
<image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png"
mode="widthFix"></image>
<view style="position:relative">
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix"></image>
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix">
</image>
<view>微信识别二维码</view>
<view class="tipimg"><image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok1.png" mode="widthFix"></image></view>
<view class="tipimg">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok1.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="save-btn" bindtap="save">保存到相册</view>

75
pages/info/museumInfo/index.wxss

@ -1,9 +1,23 @@
/* pages/info/museumInfo/index.wxss */
.swiper,.swiper image {
.swiper,
.swiper image {
width: 100%;
height: 330rpx;
display: block;
}
.swiper {
position: relative;
}
.swiper .title {
position: absolute;
left: 30rpx;
bottom: 20rpx;
box-sizing: border-box;
color: #FFFFFF;
}
.info {
margin: 0 25rpx;
margin-top: -30rpx;
@ -14,20 +28,24 @@
border-radius: 13rpx;
padding: 30rpx;
}
.info .title {
font-size: 31rpx;
color: #000;
margin-bottom: 20rpx;
}
.info .location {
color: #999999;
font-size: 24rpx;
margin-bottom: 20rpx;
}
.info .location .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
}
.detail-title {
font-weight: 500;
font-size: 35rpx;
@ -35,10 +53,12 @@
margin: 26rpx;
margin-top: 45rpx;
}
.detail {
display: block;
padding: 26rpx;
}
.fixed-btn {
position: fixed;
left: 0;
@ -51,6 +71,7 @@
align-items: center;
justify-content: center;
}
.fixed-btn .btn {
width: 391rpx;
line-height: 73rpx;
@ -61,6 +82,16 @@
font-size: 31rpx;
font-weight: 500;
}
.fixed-btn .btn.team {
width: 100%;
box-sizing: border-box;
height: 100%;
line-height: 104rpx;
background-color: #0B898E;
border-radius: 0;
}
.menu-box {
display: flex;
align-items: center;
@ -68,17 +99,20 @@
height: 100rpx;
border-bottom: 1rpx solid #CCCCCC;
}
.menu-item {
font-size: 35rpx;
line-height: 100rpx;
position: relative;
}
.menu-item.active {
font-size: 37rpx;
font-weight: bold;
}
.menu-item.active::after {
content:"!";
content: "!";
font-size: 0;
display: block;
position: absolute;
@ -90,6 +124,7 @@
margin-left: -33rpx;
top: 93rpx;
}
.activity-item {
display: flex;
background: #F4F4F4;
@ -101,6 +136,7 @@
position: relative;
justify-content: space-between;
}
.end-box {
position: absolute;
right: 22rpx;
@ -114,16 +150,19 @@
color: #fff;
font-size: 36rpx;
}
.activity-item .textOver2 {
font-size: 31rpx;
color: #333;
}
.activity-info {
display: flex;
height: 193rpx;
flex-direction: column;
justify-content: space-between;
}
.activity-item image {
flex-shrink: 0;
display: block;
@ -131,13 +170,15 @@
height: 193rpx;
margin-left: 15rpx;
}
.activity-info .textOver {
margin-bottom: 10rpx;
}
.menu-fixed {
position: fixed;
left: 0;
background:white;
background: white;
right: 0;
}
@ -148,6 +189,7 @@
bottom: 0;
width: 100%;
}
.mask-content .icon-close {
position: absolute;
right: 40rpx;
@ -163,10 +205,12 @@
align-items: center;
justify-content: center;
}
.share-img {
display: block;
width: 551rpx;
}
.share-tips {
width: 426rpx;
height: 150rpx;
@ -182,12 +226,14 @@
text-align: center;
line-height: 40rpx;
}
.share-tips .img {
display: block;
width: 55rpx;
margin: 0 auto;
margin-bottom: 4rpx;
}
.tipimg {
position: absolute;
left: 50%;
@ -201,11 +247,13 @@
justify-content: center;
top: 34rpx;
}
.tipimg image {
width: 21rpx;
display: block;
}
.save-btn {
width: 403rpx;
line-height: 77rpx;
@ -217,3 +265,24 @@
font-weight: 500;
margin-top: 50rpx;
}
.team_info {
position: relative;
z-index: 1;
background: #FFFFFF;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
border-radius: 13rpx;
padding: 30rpx;
}
.team_info .location {
color: #666666;
font-size: 24rpx;
margin-bottom: 20rpx;
}
.team_info .location .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
color: #0B898E;
}

179
pages/order/components/date/index.js

@ -11,9 +11,14 @@ Component({
addGlobalClass: true
},
properties: {
product:{
type:Object,
default:{}
product: {
type: Object,
default: {}
},
// 是否是团体预约的场馆
isTeam: {
type: Number,
default: 0
}
},
@ -21,81 +26,81 @@ Component({
* 组件的初始数据
*/
data: {
threeDays:[],
activeDate:"",
datelist:[],
showMoreDateFlag:false,
moreFlag:true,
timelist:[],
timeIndex:0,
isSzMuseum:false,
kjIdCom:null,
gpIdCom:null
threeDays: [],
activeDate: "",
datelist: [],
showMoreDateFlag: false,
moreFlag: true,
timelist: [],
timeIndex: 0,
isSzMuseum: false,
kjIdCom: null,
gpIdCom: null
},
lifetimes: {
attached: function() {
attached: function () {
this.setData({
kjIdCom:app.globalData.kjId,
gpIdCom:app.globalData.gp_id || app.globalData.team_id
kjIdCom: app.globalData.kjId,
gpIdCom: app.globalData.gp_id || app.globalData.team_id
})
// 在组件实例进入页面节点树时执行
let product = app.globalData.product,today = util.formatDate(new Date()),end_date = util.formatDate(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000));
if(product.product.title.indexOf("苏州博物馆")!=-1){
let product = app.globalData.product, today = util.formatDate(new Date()), end_date = util.formatDate(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000));
if (product.product.title.indexOf("苏州博物馆") != -1) {
this.setData({
isSzMuseum:true
isSzMuseum: true
})
}
commonApi.user_post("token/check").then(res=>{
if(res.code==1){
commonApi.user_post("token/check").then(res => {
if (res.code == 1) {
// 获取价格日历
commonApi.user_post("product/product_date_price",{
start_date:today,
end_date:end_date,
sku_id:product.sku.id
}).then(res=>{
commonApi.user_post("product/product_date_price", {
start_date: today,
end_date: end_date,
sku_id: product.sku.id
}).then(res => {
// 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了
if(app.globalData.product.infoDate){
let dateIndex = res.data.slice(0,3).findIndex(item=>item.date==app.globalData.product.infoDate.date)
if (app.globalData.product.infoDate) {
let dateIndex = res.data.slice(0, 3).findIndex(item => item.date == app.globalData.product.infoDate.date)
// if(!app.globalData.product.infoDate.short_date){
// app.globalData.product.infoDate.short_date = app.globalData.product.infoDate.date.split("-").splice(1,2).join("-")
// }
this.setData({
activeDate:app.globalData.product.infoDate,
moreFlag:dateIndex!=-1
activeDate: app.globalData.product.infoDate,
moreFlag: dateIndex != -1
})
this.getTimeStock()
this.triggerEvent("onChangeDate",app.globalData.product.infoDate)
this.triggerEvent("onChangeDate", app.globalData.product.infoDate)
}
else {
for(let i=0;i<res.data.length;i++){
if(res.data[i].stock>0){
res.data[i].short_date = res.data[i].date.split("-").splice(1,2).join("-")
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].stock > 0) {
res.data[i].short_date = res.data[i].date.split("-").splice(1, 2).join("-")
this.setData({
activeDate:res.data[i]
activeDate: res.data[i]
})
this.getTimeStock()
this.triggerEvent("onChangeDate",this.data.activeDate)
this.triggerEvent("onChangeDate", this.data.activeDate)
break;
}
}
}
if(this.data.gpIdCom){
if (this.data.gpIdCom) {
// 拼团的话 价格日历无效 所有价格都是sku里面的event_price
res.data.map(item=>{
res.data.map(item => {
item.price = product.sku.event_price
})
}
this.setData({
datelist:res.data
datelist: res.data
})
this.setData({
threeDays:res.data.slice(0,3)
threeDays: res.data.slice(0, 3)
})
let index = this.data.threeDays.findIndex(item=>item.date==this.data.activeDate.date)
let index = this.data.threeDays.findIndex(item => item.date == this.data.activeDate.date)
this.setData({
moreFlag:index!=-1
moreFlag: index != -1
})
console.log(res)
})
@ -103,15 +108,15 @@ Component({
})
},
detached: function() {
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
pageLifetimes:{
show:function(){
pageLifetimes: {
show: function () {
this.setData({
kjIdCom:app.globalData.kjId,
gpIdCom:app.globalData.gp_id || app.globalData.team_id
kjIdCom: app.globalData.kjId,
gpIdCom: app.globalData.gp_id || app.globalData.team_id
})
}
},
@ -119,80 +124,80 @@ Component({
* 组件的方法列表
*/
methods: {
showMoreDate:function(){
showMoreDate: function () {
this.setData({
showMoreDateFlag:true
showMoreDateFlag: true
})
},
hideCalendar:function(){
hideCalendar: function () {
this.setData({
showMoreDateFlag:false
showMoreDateFlag: false
})
},
changeDate:function(e){
changeDate: function (e) {
let date = e.currentTarget.dataset.date;
if(date.stock<=0) return;
if(date.stock==null) return;
if(date.price==null) return;
if (date.stock <= 0) return;
if (date.stock == null) return;
if (date.price == null) return;
this.setData({
activeDate:date,
moreFlag:true
activeDate: date,
moreFlag: true
})
this.triggerEvent("onChangeDate",this.data.activeDate)
this.triggerEvent("onChangeDate", this.data.activeDate)
this.getTimeStock()
},
// 修改日期
onTapDay:function(e){
let threeDays = this.data.threeDays,flag=false;
threeDays.map(item=>{
if(item.date==e.detail.date){
onTapDay: function (e) {
let threeDays = this.data.threeDays, flag = false;
threeDays.map(item => {
if (item.date == e.detail.date) {
flag = true
}
})
e.detail.short_date = e.detail.date.substr(5,5);
e.detail.short_date = e.detail.date.substr(5, 5);
this.setData({
activeDate:e.detail,
showMoreDateFlag:false,
moreFlag:flag
activeDate: e.detail,
showMoreDateFlag: false,
moreFlag: flag
})
this.triggerEvent("onChangeDate",this.data.activeDate)
this.triggerEvent("onChangeDate", this.data.activeDate)
this.getTimeStock()
},
getTimeStock:function(){
if(this.data.activeDate.is_time_stock!=true) return;
commonApi.user_post("product/product_timestock_price",{
date:this.data.activeDate.date,
sku_id:this.data.activeDate.sku_id?this.data.activeDate.sku_id:app.globalData.product.sku.id
}).then(res=>{
getTimeStock: function () {
if (this.data.activeDate.is_time_stock != true) return;
commonApi.user_post("product/product_timestock_price", {
date: this.data.activeDate.date,
sku_id: this.data.activeDate.sku_id ? this.data.activeDate.sku_id : app.globalData.product.sku.id
}).then(res => {
let timeIndex = -1;
if(app.globalData.product.infoTime){
this.triggerEvent("onChangeTime",app.globalData.product.infoTime);
timeIndex = res.data.findIndex(item=>item.start_time==app.globalData.product.infoTime.start_time)
if (app.globalData.product.infoTime) {
this.triggerEvent("onChangeTime", app.globalData.product.infoTime);
timeIndex = res.data.findIndex(item => item.start_time == app.globalData.product.infoTime.start_time)
this.setData({
timelist:res.data,
timeIndex:timeIndex
timelist: res.data,
timeIndex: timeIndex
})
return;
}
for(let i=0;i<res.data.length;i++){
if(res.data[i].stock_number>0){
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].stock_number > 0) {
timeIndex = i;
break;
}
}
this.setData({
timelist:res.data,
timeIndex:timeIndex
timelist: res.data,
timeIndex: timeIndex
})
this.triggerEvent("onChangeTime",this.data.timelist[this.data.timeIndex])
this.triggerEvent("onChangeTime", this.data.timelist[this.data.timeIndex])
})
},
selectTime:function(e){
if(this.data.timelist[e.currentTarget.dataset.index].stock_number!=0){
selectTime: function (e) {
if (this.data.timelist[e.currentTarget.dataset.index].stock_number != 0) {
this.setData({
timeIndex:e.currentTarget.dataset.index
timeIndex: e.currentTarget.dataset.index
})
this.triggerEvent("onChangeTime",this.data.timelist[this.data.timeIndex])
this.triggerEvent("onChangeTime", this.data.timelist[this.data.timeIndex])
}
}

2
pages/order/components/date/index.wxml

@ -4,7 +4,7 @@
<view class="dates-boxes">
<view bindtap="changeDate" data-date="{{item}}" class="date-item{{activeDate.date==item.date?' active':''}}{{(item.stock<=0 || item.stock==null || item.price==null)?' disable':''}}" wx:for="{{threeDays}}">
<view>{{item.date}}</view>
<view class="price" wx:if="{{item.stock!=0 && item.stock!=null && item.price!=null}}">{{item.price==0 || kjIdCom?'免费':('¥'+item.price/100)}}</view>
<view class="price" wx:if="{{ !isTeam && item.stock!=0 && item.stock!=null && item.price!=null}}">{{item.price==0 || kjIdCom?'免费':('¥'+item.price/100)}}</view>
<!-- <view class="price" wx:if="{{item.stock==null || item.price==null}}">不可定</view> -->
<view class="price" wx:if="{{item.stock==0}}">售罄</view>
</view>

2
pages/pbService/group/index.wxml

@ -11,7 +11,7 @@
<navigator url="/pages/info/museumInfo/index?id={{item.id}}&isGroup=1" class="group-item" wx:for="{{list}}">
<image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="group-info">
<view class="group-title textOver">{{item.title}}</view>
<view class="group-title textOver">{{item.title}}(团体预约)</view>
<view class="iconfont textOver"><text class="icon-dianhua3"></text>电话:{{item.tel}}</view>
<view class="iconfont textOver"><text class="icon-location1"></text>{{item.address}}</view>
<view class="group-bottom">

4
project.private.config.json

@ -61,8 +61,8 @@
"scene": null
},
{
"name": "我的",
"pathName": "pages/user/user",
"name": "团体预约场馆",
"pathName": "pages/pbService/group/index",
"query": "",
"scene": null
}

Loading…
Cancel
Save