Commit 3f10e4ac by wjw

ww-儿童营地

parent dfb4d546
......@@ -8,13 +8,13 @@ let logicData = {
Page({
data: {
imageBase: App.globalData.appImageBase,
showPopup: false,
winSide: true,
sideHeight: 1250,
shareImage: App.globalData.appResourcesBase + 'share/share-1.png',
swiperImage: [],
bannerImage: '',
bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png',
bottomImage: App.globalData.appResourcesBase + 'campsite/bottom.png',
detailImage: [],
detailImageUrl: [
App.globalData.appResourcesBase + 'campsite/campsite-1.png',
......@@ -103,13 +103,40 @@ Page({
clearTimeout(logicData.pageScrollTimer)
}, 40)
},
/**
* 缓存用户信息
* @function
* @param {object} - event
* @returns
*/
setShopInfo: function (funcShopAppId, funcShopType) {
// 获取门店基本信息
let funcShopId = App.globalData.shopId
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcShopAppId === funcShopId[i].appId) {
let funcShopInfo = {
'id': funcShopId[i].id,
'appId': funcShopId[i].appId,
'name': funcShopId[i].title[funcShopType],
'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover,
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
}
},
// 跳转到购买年卡/月卡/次卡界面
onBuyCoupon: function (event) {
console.log(event)
let { type } = event.currentTarget.dataset
onBuyMembership: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 1
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + type
url: '/pages/commodity/project-detail/project-detail'
})
},
// 跳转到购买饮品界面
......@@ -119,9 +146,37 @@ Page({
})
},
// 跳转到购买文创界面
onBuySnacks() {
onBuyArt() {
wx.navigateTo({
url: '/pages/commodity/menu-art/menu-art',
})
}
},
// 点击分享图标
onShare: function () {
this.setData({
showPopup: true
})
},
// 点击取消
onCancel: function () {
this.setData({
showPopup: false
})
},
// 点击下载图片
onDownload: function () {
wx.showToast({
title: '已保存到相册',
icon: 'success'
})
this.setData({
showPopup: false
})
},
// 点击位置图标
onLocation: function () {
wx.navigateTo({
url: '/pages/home/guide/guide?id=' + 10
})
},
})
\ No newline at end of file
......@@ -12,27 +12,41 @@
</view>
<!-- 头部背景图 -->
<image class="banner" src="bannerImage"></image>
<image class="banner" src="{{bannerImage}}"></image>
<!-- 分享按钮 -->
<view class="share col con-c align-c">
<view class="share col con-c align-c" bindtap="onShare">
<image class="icon-share" src="/image/icon/share-3.png"></image>
</view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
<view class="popupImage">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
</view>
<view class="download" bindtap="onDownload">
<text>下载图片</text>
</view>
</view>
</l-popup>
<!-- 位置按钮 -->
<view class="location col con-c align-c">
<view class="location col con-c align-c" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image>
</view>
<!-- 入园购票 -->
<view class="buy-coupon">
<view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon-title row align-c">
<image></image>
<image></image>
<image src="./image/ruyuangoupiao.png"></image>
<image src="/image/more.png"></image>
</view>
<view class="buy-coupon-type row con-b">
<image bindtap="onBuyCoupon" data-type="2"></image>
<image bindtap="onBuyCoupon" data-type="1"></image>
<image bindtap="onBuyCoupon" data-type="1"></image>
<image src="./image/single.png"></image>
<image src="./image/month.png"></image>
<image src="./image/year.png"></image>
</view>
</view>
......@@ -41,21 +55,21 @@
<!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks">
<view class="buy-left col con-c">
<image></image>
<image src="./image/yinpinyuding.png"></image>
</view>
<view class="buy-right col con-c">
<image></image>
<image class="snacks-img"></image>
<image src="./image/icon-bg.png"></image>
<image class="snacks-img" src="./image/yinpin.png"></image>
</view>
</view>
<!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt">
<view class="buy-left col con-c">
<image></image>
<image src="./image/wenchuangzhoubian.png"></image>
</view>
<view class="buy-right col con-c">
<image></image>
<image class="art-img"></image>
<image src="./image/icon-bg.png"></image>
<image class="art-img" src="./image/shanzi.png"></image>
</view>
</view>
</view>
......@@ -80,5 +94,5 @@
<image mode="widthFix" src="{{item}}"></image>
</block>
<image mode="widthFix" src="{{bottomImage}}"></image>
</view>
\ No newline at end of file
......@@ -54,7 +54,6 @@
.banner {
width: 750rpx;
height: 1676rpx;
background-color: #ccc;
}
.share {
......@@ -98,14 +97,12 @@
.buy-coupon-title image:nth-child(1) {
width: 120rpx;
height: 34rpx;
background-color: red;
}
.buy-coupon-title image:nth-child(2) {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
background-color: red;
}
.buy-coupon-type {
......@@ -114,7 +111,6 @@
.buy-coupon-type image {
width: 170rpx;
height: 166rpx;
background-color: aqua;
}
.buy-other {
......@@ -175,3 +171,27 @@
.wx-swiper-dots.wx-swiper-dots-horizontal{
margin-bottom: 64rpx;
}
/* 分享弹窗 */
.popupImage image {
width: 606rpx;
height: 977rpx;
margin-bottom: 64rpx;
}
.cancel, .download {
width: 288rpx;
height: 96rpx;
text-align: center;
line-height: 96rpx;
border-radius: 4rpx;
}
.cancel {
color: #15191F;
background-color: #fff;
}
.download {
color: #fff;
background-color: #15191F;
}
\ No newline at end of file
......@@ -57,7 +57,7 @@
</view>
<!-- 无场次 -->
<view class="show-end col align-c" wx:if="{{showList[0].length === 0 && showList[1].length === 0}}">
<image src=""></image>
<image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text>
</view>
<!-- 有场次 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment