Commit 3f10e4ac by wjw

ww-儿童营地

parent dfb4d546
...@@ -8,13 +8,13 @@ let logicData = { ...@@ -8,13 +8,13 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
showPopup: false,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
shareImage: App.globalData.appResourcesBase + 'share/share-1.png',
swiperImage: [], swiperImage: [],
bannerImage: '', bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png',
bottomImage: App.globalData.appResourcesBase + 'campsite/bottom.png',
detailImage: [], detailImage: [],
detailImageUrl: [ detailImageUrl: [
App.globalData.appResourcesBase + 'campsite/campsite-1.png', App.globalData.appResourcesBase + 'campsite/campsite-1.png',
...@@ -103,13 +103,40 @@ Page({ ...@@ -103,13 +103,40 @@ Page({
clearTimeout(logicData.pageScrollTimer) clearTimeout(logicData.pageScrollTimer)
}, 40) }, 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) { onBuyMembership: function (event) {
console.log(event) // funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let { type } = event.currentTarget.dataset let funcShopType = 1
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({ wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + type url: '/pages/commodity/project-detail/project-detail'
}) })
}, },
// 跳转到购买饮品界面 // 跳转到购买饮品界面
...@@ -119,9 +146,37 @@ Page({ ...@@ -119,9 +146,37 @@ Page({
}) })
}, },
// 跳转到购买文创界面 // 跳转到购买文创界面
onBuySnacks() { onBuyArt() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/menu-art/menu-art', 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 @@ ...@@ -12,27 +12,41 @@
</view> </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> <image class="icon-share" src="/image/icon/share-3.png"></image>
</view> </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> <image class="icon-location" src="/image/icon/location-3.png"></image>
</view> </view>
<!-- 入园购票 --> <!-- 入园购票 -->
<view class="buy-coupon"> <view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon-title row align-c"> <view class="buy-coupon-title row align-c">
<image></image> <image src="./image/ruyuangoupiao.png"></image>
<image></image> <image src="/image/more.png"></image>
</view> </view>
<view class="buy-coupon-type row con-b"> <view class="buy-coupon-type row con-b">
<image bindtap="onBuyCoupon" data-type="2"></image> <image src="./image/single.png"></image>
<image bindtap="onBuyCoupon" data-type="1"></image> <image src="./image/month.png"></image>
<image bindtap="onBuyCoupon" data-type="1"></image> <image src="./image/year.png"></image>
</view> </view>
</view> </view>
...@@ -41,21 +55,21 @@ ...@@ -41,21 +55,21 @@
<!-- 饮品预订 --> <!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks"> <view class="buy-snacks row" bindtap="onBuySnacks">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image></image> <image src="./image/yinpinyuding.png"></image>
</view> </view>
<view class="buy-right col con-c"> <view class="buy-right col con-c">
<image></image> <image src="./image/icon-bg.png"></image>
<image class="snacks-img"></image> <image class="snacks-img" src="./image/yinpin.png"></image>
</view> </view>
</view> </view>
<!-- 文创周边 --> <!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt"> <view class="buy-art row" bindtap="onBuyArt">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image></image> <image src="./image/wenchuangzhoubian.png"></image>
</view> </view>
<view class="buy-right col con-c"> <view class="buy-right col con-c">
<image></image> <image src="./image/icon-bg.png"></image>
<image class="art-img"></image> <image class="art-img" src="./image/shanzi.png"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -79,6 +93,6 @@ ...@@ -79,6 +93,6 @@
<block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image mode="widthFix" src="{{item}}"></image> <image mode="widthFix" src="{{item}}"></image>
</block> </block>
<image mode="widthFix" src="{{bottomImage}}"></image>
</view> </view>
\ No newline at end of file
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
.banner { .banner {
width: 750rpx; width: 750rpx;
height: 1676rpx; height: 1676rpx;
background-color: #ccc;
} }
.share { .share {
...@@ -98,14 +97,12 @@ ...@@ -98,14 +97,12 @@
.buy-coupon-title image:nth-child(1) { .buy-coupon-title image:nth-child(1) {
width: 120rpx; width: 120rpx;
height: 34rpx; height: 34rpx;
background-color: red;
} }
.buy-coupon-title image:nth-child(2) { .buy-coupon-title image:nth-child(2) {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-left: 8rpx; margin-left: 8rpx;
background-color: red;
} }
.buy-coupon-type { .buy-coupon-type {
...@@ -114,7 +111,6 @@ ...@@ -114,7 +111,6 @@
.buy-coupon-type image { .buy-coupon-type image {
width: 170rpx; width: 170rpx;
height: 166rpx; height: 166rpx;
background-color: aqua;
} }
.buy-other { .buy-other {
...@@ -174,4 +170,28 @@ ...@@ -174,4 +170,28 @@
} }
.wx-swiper-dots.wx-swiper-dots-horizontal{ .wx-swiper-dots.wx-swiper-dots-horizontal{
margin-bottom: 64rpx; 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
...@@ -3,7 +3,7 @@ const App = getApp() ...@@ -3,7 +3,7 @@ const App = getApp()
Page({ Page({
data: { data: {
bannerImg: App.globalData.appResourcesBase + 'play/home/type.png', bannerImg: App.globalData.appResourcesBase + 'play/home/type.png',
navigationLogoTop: 0, navigationLogoTop: 0,
navigationLogoMarginTop: 0, navigationLogoMarginTop: 0,
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</view> </view>
<!-- 无场次 --> <!-- 无场次 -->
<view class="show-end col align-c" wx:if="{{showList[0].length === 0 && showList[1].length === 0}}"> <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> <text>观影已结束,请期待后续排片</text>
</view> </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