Commit f3a4fb50 by wjw

ww-儿童营地修改

parent e48bfde0
......@@ -8,6 +8,7 @@ let logicData = {
Page({
data: {
imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase,
showPopup: false,
winSide: true,
sideHeight: 1250,
......@@ -32,12 +33,35 @@ Page({
this.queryDetail()
this.queryActivity()
},
onShow: function () {
this.setShopInfo(3, 1)
},
setSideHeight: function () {
this.setData({
sideHeight: this.data.sideHeight * wx.getStorageSync('unitProportion')
})
},
// 缓存商店信息
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
}
}
},
// 获取后台信息
queryDetail: function () {
let that = this
......@@ -54,20 +78,21 @@ Page({
// 获取活动信息
queryActivity: function () {
let that = this
let shopInfo = wx.getStorageInfoSync('shopInfoBuffer')
App.wxRequest({
url: '/api/v1/activity/getList',
data: {
'listType': '1',
'pageSize': '5',
'pageNo': '1',
'tagId': '103'
'tagId': '103',
'officeId': shopInfo.id
},
success: function(res) {
let funcData = res.data.list
let childActivity = funcData.filter(v => v.childImg !== '')
console.log(childActivity)
console.log(funcData)
that.setData({
childActivity
childActivity: funcData
})
}
})
......@@ -100,7 +125,6 @@ Page({
this.setData({
winSide: false
})
wx.hideTabBar({animation: true})
}
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
......@@ -114,7 +138,6 @@ Page({
winSide: true,
navigationAnimationShow: 0
})
wx.showTabBar({animation: true})
}
// 恢复滚动事件
......@@ -151,7 +174,7 @@ Page({
// 跳转到购买年卡/月卡/次卡界面
onBuyMembership: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 1
let funcShopType = 3
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
......@@ -160,15 +183,32 @@ Page({
})
},
// 跳转到购买饮品界面
onBuySnacks() {
onBuySnacks(event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 6
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({
url: '/pages/commodity/menu-snacks/menu-snacks',
url: '/pages/commodity/menu-food/menu-food',
})
},
// 跳转到购买文创界面
onBuyArt() {
onBuyArt(event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 1
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food',
})
},
// 跳转到活动详情
onActivityDetail: function (event) {
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/commodity/menu-art/menu-art',
url: '/pages/play/activity-detail/activity-detail?id=' + id,
})
},
// 点击分享图标
......@@ -199,4 +239,10 @@ Page({
url: '/pages/home/guide/guide?id=' + 10
})
},
// 点击全部活动
onAllActivity: function () {
wx.navigateTo({
url: '/pages/play/activity/activity',
})
},
})
\ No newline at end of file
......@@ -38,7 +38,7 @@
</view>
<!-- 入园购票 -->
<view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon" bindtap="onBuyMembership" data-id="{{1}}">
<view class="buy-coupon-title row align-c">
<image src="./image/ruyuangoupiao.png"></image>
<image src="/image/more.png"></image>
......@@ -53,7 +53,7 @@
<!-- 饮品预订 文创周边-->
<view class="buy-other row con-b">
<!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks">
<view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{5}}">
<view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image>
</view>
......@@ -63,7 +63,7 @@
</view>
</view>
<!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt">
<view class="buy-art row" bindtap="onBuyArt" data-id="{{4}}">
<view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image>
</view>
......@@ -74,16 +74,21 @@
</view>
</view>
<!-- 全部活动 -->
<view class="activity" bindtap="onAllActivity">
<image src="{{appResourcesBase + 'campsite/title.png'}}"></image>
</view>
<!-- 滚动图片 -->
<!-- 单张图片 -->
<view class="swiper" wx:if="{{childActivity.length <= 1}}">
<image mode="aspectFit" src="{{childActivity[0].childImg}}"></image>
<image mode="scaleToFill" src="{{childActivity[0].childImg}}"></image>
</view>
<!-- 多张图片 -->
<swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:else>
<block wx:for="{{childActivity}}" wx:key="id">
<swiper-item>
<image mode="aspectFit" src="{{item.childImg}}"></image>
<image mode="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
</swiper-item>
</block>
</swiper>
......
......@@ -89,7 +89,7 @@
width: 670rpx;
height: 312rpx;
padding: 40rpx 32rpx;
background: rgba(255, 255, 255, 0.65);
background: rgba(255, 255, 255, 0.85);
box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3);
border-radius: 4rpx;
}
......@@ -143,7 +143,7 @@
.snacks-img {
position: absolute;
top: 28rpx;
top: 38rpx;
left: 42rpx;
width: 50rpx;
height: 76rpx;
......@@ -151,12 +151,22 @@
.art-img {
position: absolute;
top: 30rpx;
top: 42rpx;
left: 12rpx;
width: 86rpx;
height: 70rpx;
}
.activity {
position: absolute;
top: 1602rpx;
}
.activity image{
width: 160rpx;
height: 34rpx;
}
.swiper {
width: 750rpx;
height: 1160rpx;
......
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false
},
"compileType": "miniprogram",
"libVersion": "2.10.0",
"appid": "wx37a9b7a3d92029f2",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/pay/order-comment/order-comment",
"pathName": "pages/pay/order-comment/order-comment",
"query": "",
"scene": null
},
{
"id": 11,
"name": "pages/play/movie/movie",
"pathName": "pages/play/movie/movie",
"query": "",
"scene": null
},
{
"id": 12,
"name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "",
"scene": null
},
{
"id": 15,
"name": "pages/play/point-detail/point-detail",
"pathName": "pages/play/point-detail/point-detail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/accumulate/accumulate",
"pathName": "pages/mine/accumulate/accumulate",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/home/home",
"pathName": "pages/mine/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/campsite/home/home",
"pathName": "pages/campsite/home/home",
"query": "",
"scene": null
},
{
"id": 19,
"name": "pages/pay/order-detail/order-detail",
"pathName": "pages/pay/order-detail/order-detail",
"query": "id= 38f4a20175f444c899774ce379f94b83",
"scene": null
},
{
"id": 9,
"name": "pages/play/service/service",
"pathName": "pages/play/service/service",
"query": "type=2&title=美食",
"scene": null
},
{
"id": -1,
"name": "pages/play/activity-detail/activity-detail",
"pathName": "pages/play/activity-detail/activity-detail",
"query": "id=d1a698e4667645ea9d2920fc8b88c603",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=6&type=5",
"scene": null
},
{
"id": -1,
"name": "pages/play/activity/activity",
"pathName": "pages/play/activity/activity",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/appointment/appointment",
"pathName": "pages/mine/appointment/appointment",
"scene": null
}
]
}
}
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false
},
"compileType": "miniprogram",
"libVersion": "2.10.0",
"appid": "wx37a9b7a3d92029f2",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/pay/order-comment/order-comment",
"pathName": "pages/pay/order-comment/order-comment",
"query": "",
"scene": null
},
{
"id": 11,
"name": "pages/play/movie/movie",
"pathName": "pages/play/movie/movie",
"query": "",
"scene": null
},
{
"id": 12,
"name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "",
"scene": null
},
{
"id": 15,
"name": "pages/play/point-detail/point-detail",
"pathName": "pages/play/point-detail/point-detail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/accumulate/accumulate",
"pathName": "pages/mine/accumulate/accumulate",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/home/home",
"pathName": "pages/mine/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/campsite/home/home",
"pathName": "pages/campsite/home/home",
"query": "",
"scene": null
},
{
"id": 19,
"name": "pages/pay/order-detail/order-detail",
"pathName": "pages/pay/order-detail/order-detail",
"query": "id= 38f4a20175f444c899774ce379f94b83",
"scene": null
},
{
"id": 9,
"name": "pages/play/service/service",
"pathName": "pages/play/service/service",
"query": "type=2&title=美食",
"scene": null
},
{
"id": -1,
"name": "pages/play/activity-detail/activity-detail",
"pathName": "pages/play/activity-detail/activity-detail",
"query": "id=d1a698e4667645ea9d2920fc8b88c603",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=6&type=5",
"scene": null
},
{
"id": -1,
"name": "pages/play/activity/activity",
"pathName": "pages/play/activity/activity",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/appointment/appointment",
"pathName": "pages/mine/appointment/appointment",
"scene": null
}
]
}
}
}
\ No newline at end of file
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