Commit 36d8dfb0 by 严立

畅玩板块合并改版

parent ab6bcc51
Showing with 982 additions and 180 deletions
{
"pagePath": "pages/play/home/home",
"iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png",
"text": "畅玩"
},
\ No newline at end of file
......@@ -26,17 +26,6 @@ App({
},
onLaunch: function (options) {
// wx.setEnableDebug({
// enableDebug: true
// })
wx.getNetworkType({
success: (res) => {
console.log('getNetworkType', res.errMsg)
console.log('getNetworkType', res.networkType)
}
})
wxApiExtend(wx) // wx.api 拓展,重新定义某些 api 接口。
pageExtend(this) // Page 实例拓展,为所有 Page 统一增加属性或者方法
iMui(this) // m-ui 相关函数引入
......
{
"pages": [
"pages/home/home/home",
"pages/home/guide/guide",
"pages/home/history/history",
......@@ -60,10 +59,12 @@
"pages/mall/exchange-record/exchange-record",
"pages/mall/exchange-submit/exchange-submit",
"pages/login/login",
"pages/campsite/evaluate/evaluate"
"pages/campsite/evaluate/evaluate",
"pages/home/official-account/official-account"
],
"usingComponents": {
"coupon-code": "/component/coupon-code/coupon-code",
"home-activity": "/component/home-activity/home-activity",
"swiper-point": "./component/swiper-point/swiper-point",
"m-button-bottom": "./component/m-ui/m-button-bottom/m-button-bottom",
"m-checkbox": "./component/m-ui/m-checkbox/m-checkbox",
......@@ -97,12 +98,6 @@
"text": "首页"
},
{
"pagePath": "pages/play/home/home",
"iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png",
"text": "畅玩"
},
{
"pagePath": "pages/commodity/home/home",
"iconPath": "image/tabbar/service.png",
"selectedIconPath": "image/tabbar/service-s.png",
......
......@@ -104,8 +104,4 @@ page {
max-height: 860rpx;
margin: 40rpx 0 90rpx 0;
overflow-y: scroll;
}
.iphoneX-bottom-fill {
padding-bottom: env(safe-area-inset-bottom);
}
\ No newline at end of file
Component({
properties: {
currentIndex: {
type: Number,
value: 0,
},
contentList: {
type: Array,
value: []
},
},
data: {
list: [],
disableOperation: '',
},
observers: {
'contentList': function (value) {
let nothindItem = {
banner: '',
name: '',
timeDate: '',
timePeriod: '',
isNothing: true,
}
let list = []
for (let i = 0, l = value.length; i < l; i++) {
value[i].isNothing = false
list.push(value[i])
}
switch (value.length) {
case 0:
this.setData({
list: [nothindItem, nothindItem, nothindItem],
disableOperation: true
})
break
case 1:
list.push(nothindItem)
list.push(nothindItem)
this.setData({
list: list,
disableOperation: true
})
break
case 2:
list.push(nothindItem)
this.setData({
list: list,
disableOperation: ''
})
break
case 3:
this.setData({
list: list,
disableOperation: ''
})
break
default:
this.setData({
list: list,
disableOperation: ''
})
break
}
},
},
methods: {
onItem: function (event) {
this.triggerEvent('onItem', event.currentTarget.dataset.item )
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="swiper-container column cc ac">
<swiper class="swiper-list" circular="{{true}}" current="{{currentIndex}}">
<swiper-item class="swiper-item" wx:for="{{list}}" wx:for-index="index" wx:for-item="item" wx:key="index" catchtouchmove="{{disableOperation}}">
<view wx:if="{{!item.isNothing}}" class="card row ae" data-item="{{item}}" bindtap="onItem">
<view class="card-content column cc">
<image class="card-cover" mode="heightFix" src="{{item.banner}}"></image>
<view class="card-name row ac">
<text class="fs38 fw700 c01 overflow_point_1">{{item.name}}</text>
</view>
<view class="card-date row ac">
<text class="fs22 fw400 c32">{{item.timeDate + item.timePeriod}}</text>
</view>
</view>
</view>
<view wx:if="{{item.isNothing}}">
<view class="card-content-nothing column cc ac">
<image class="nothing-icon" src="./image/nothing.png"></image>
<text class="nothing-tip">更多活动 敬请期待</text>
</view>
</view>
</swiper-item>
</swiper>
</view>
\ No newline at end of file
@import '../m-ui/m-main.wxss';
/* 券码弹窗 */
.swiper-container {
width: 750rpx;
margin: 30rpx 0 0 0;
padding: 20rpx 0 0 0;
}
.swiper-list {
width: 750rpx;
height: 570rpx;
}
.swiper-item {
left: 110rpx;
width: 500rpx !important;
height: 570rpx !important;
padding: 0 16rpx;
}
.card {
position: relative;
width: 500rpx;
height: 570rpx;
}
.card-content {
width: 500rpx;
height: 550rpx;
padding: 380rpx 50rpx 0 50rpx;
border-radius: 2px;
background: #EEF3F9;
overflow: visible;
}
.card-cover {
position: absolute;
top: 0;
left: 50rpx;
width: 400rpx;
height: 400rpx;
border-radius: 2px;
}
.card-name {
height: 52rpx;
margin: -10rpx 0 0 0;
}
.card-date {
margin: 16rpx 0 0 0;
}
.card-content-nothing {
width: 500rpx;
height: 550rpx;
margin: 20rpx 0 0 0;
border-radius: 2px;
background: #EEF3F9;
overflow: visible;
}
.nothing-icon {
width: 96rpx;
height: 76rpx;
}
.nothing-tip {
margin-top: 42rpx;
font-size: 30rpx;
color: #959da9;
line-height: 42rpx;
font-weight: 600;
}
\ No newline at end of file
......@@ -20,8 +20,7 @@ Page({
bannerImage: this.data.resourcesBase + 'campsite/campsite-header.png',
})
this.setSideHeight()
this.setData({ appStatus: App.globalData.appStatus })
App.setAppStatus(this)
App.setAppStatus(this, '营地')
},
onShow: function () {
this.setShopInfo(3, 1)
......@@ -50,7 +49,7 @@ Page({
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
console.log('44')
console.log('22')
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
......@@ -89,6 +88,8 @@ Page({
this.setData({
childActivity: funcData
})
console.log(this.data.childActivity)
})
},
......@@ -177,7 +178,6 @@ Page({
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
console.log('55')
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
......@@ -218,6 +218,7 @@ Page({
},
// 跳转到活动详情
onActivityDetail: function (event) {
console.log('onActivityDetail')
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + id,
......@@ -288,8 +289,9 @@ Page({
},
// 点击全部活动
onActivityAll: function () {
console.log('onActivityAll')
wx.navigateTo({
url: '/pages/play/activity/activity?fromPage=serviceDetail',
})
})
},
})
\ No newline at end of file
......@@ -7,16 +7,16 @@
<!-- 开放时间,总合评价,分享,位置 -->
<view class="other">
<view class="other_business_hours row ac">
<image class="other_business_hours_title" src="../home/image/business-hours-title.png"></image>
<image class="other_business_hours_time" src="../home/image/business-hours.png"></image>
<image class="other_business_hours_title" src="./image/business-hours-title.png"></image>
<image class="other_business_hours_time" src="./image/business-hours.png"></image>
</view>
<view class="row cb ac">
<view class="other_evaluate row ac">
<image class="other_evaluate_title" src="../home/image/evaluate-title.png"></image>
<image class="other_evaluate_title" src="./image/evaluate-title.png"></image>
<block wx:for="{{average}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image class="other_evaluate_start" src="{{imageBase + 'icon/star-1.png'}}"></image>
</block>
<image class="other_evaluate_more" src="../home/image/evaluate.png" bindtap="onEvaluateMore"></image>
<image class="other_evaluate_more" src="./image/evaluate.png" bindtap="onEvaluateMore"></image>
</view>
<view class="row ac">
<view class="share column cc ac" bindtap="onShare">
......@@ -32,25 +32,25 @@
<!-- 入园购票 -->
<view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon-title row ac">
<image src="../home/image/ruyuangoupiao.png"></image>
<image src="./image/ruyuangoupiao.png"></image>
<image src="{{imageBase + 'icon/arrow-r-1.png'}}"></image>
</view>
<view class="buy-coupon-type row cb">
<image src="../home/image/single.png"></image>
<image src="../home/image/month.png"></image>
<image src="../home/image/year.png"></image>
<image src="./image/single.png"></image>
<image src="./image/month.png"></image>
<image src="./image/year.png"></image>
</view>
</view>
<!-- 餐品预定,文创周边 -->
<view class="buy-other row cb" wx:if="{{appStatus}}">
<image src="../home/image/shop-food.png" data-id="{{3}}" bindtap="onBuySnacks"></image>
<image src="../home/image/shop-art.png" data-id="{{3}}" bindtap="onBuyArt"></image>
<image src="./image/shop-food.png" data-id="{{3}}" bindtap="onBuySnacks"></image>
<image src="./image/shop-art.png" data-id="{{3}}" bindtap="onBuyArt"></image>
</view>
<!-- 活动展示 -->
<view class="all_activity" bindtap="onActivityAll">
<image class="all_activity_title" src="{{resourcesBase + 'campsite/all-activities.png'}}"></image>
<view class="all_activity">
<image class="all_activity_title" src="./image/all-activities.png" bindtap="onActivityAll"></image>
<!-- 单活动 -->
<view class="swiper" wx:if="{{childActivity.length === 1}}">
......@@ -65,7 +65,7 @@
</block>
</swiper>
<view class="all_activity_nothing">
<view class="all_activity_nothing" wx:if="{{childActivity.length === 0}}">
<image src="{{resourcesBase + 'campsite/all-activities-nothing.png'}}"></image>
</view>
</view>
......@@ -75,7 +75,6 @@
<block wx:for="{{campsiteDescribe}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image mode="widthFix" src="{{item}}"></image>
</block>
<image mode="widthFix" src="{{resourcesBase + 'campsite/bottom.png'}}"></image>
</view>
</view>
......
.title {
z-index: -1;
position: absolute;
top: 0;
left: 0;
......@@ -182,6 +183,7 @@
.swiper {
width: 750rpx;
height: 1160rpx;
padding: 40rpx 0 0 0;
background-color: #FCF8F0;
}
......
......@@ -12,12 +12,15 @@ Page({
campsiteDescribe: [],
average: 0,
userInfo: {},
},
onLoad: function (options) {
this.setData({
shareImage: this.data.resourcesBase + 'share/share-1.png',
bannerImage: this.data.resourcesBase + 'campsite/campsite-header.png',
userInfo: wx.getStorageSync('userInfo')
})
this.setSideHeight()
App.setAppStatus(this, '营地')
......@@ -88,6 +91,8 @@ Page({
this.setData({
childActivity: funcData
})
console.log(this.data.childActivity)
})
},
......@@ -216,6 +221,7 @@ Page({
},
// 跳转到活动详情
onActivityDetail: function (event) {
console.log('onActivityDetail')
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + id,
......@@ -286,8 +292,9 @@ Page({
},
// 点击全部活动
onActivityAll: function () {
console.log('onActivityAll')
wx.navigateTo({
url: '/pages/play/activity/activity?fromPage=serviceDetail',
})
})
},
})
\ No newline at end of file
......@@ -49,8 +49,8 @@
</view>
<!-- 活动展示 -->
<view class="all_activity" bindtap="onActivityAll">
<image class="all_activity_title" src="{{resourcesBase + 'campsite/all-activities.png'}}"></image>
<view class="all_activity">
<image class="all_activity_title" src="./image/all-activities.png" bindtap="onActivityAll"></image>
<!-- 单活动 -->
<view class="swiper" wx:if="{{childActivity.length === 1}}">
......@@ -75,7 +75,6 @@
<block wx:for="{{campsiteDescribe}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image mode="widthFix" src="{{item}}"></image>
</block>
<image mode="widthFix" src="{{resourcesBase + 'campsite/bottom.png'}}"></image>
</view>
</view>
......
.title {
z-index: -1;
position: absolute;
top: 0;
left: 0;
......
......@@ -104,7 +104,6 @@ Page({
},
setShopInfo: function () {
console.log('this.data.option', this.data.option)
if (this.data.option.formPage === 'order' || this.data.option.from === 'subscription') {
let funcAppId = Number(this.data.option.shopAppId)
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
......@@ -127,6 +126,7 @@ Page({
this.setData({
shopInfo: funcShopInfo
})
console.log(this.data.shopInfo)
},
resetShoppingCart: function () {
......
......@@ -42,9 +42,7 @@ Page({
navTitle: '儿童营地入园购票',
banner: 'service/detail-banner-3.png',
bgColor: '#F6DADA',
// 测试
// buyText: '购买门票',
buyText: '暂未开售',
buyText: '购买门票',
unitText: '/人',
commodityList: []
})
......@@ -285,7 +283,6 @@ Page({
},
setShopInfo: function () {
console.log('this.data.option', this.data.option)
if (this.data.option.from === 'subscription') {
let funcAppId = Number(this.data.option.shopAppId)
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
......@@ -337,10 +334,6 @@ Page({
* @returns
*/
onBuy: function (event) {
// 测试
// 正式环境临时隐藏儿童营地
if (this.data.shopInfo.appId === 3) return
if (this.data.shopInfo.appId === 7) {
this.onCommodityDetail(event)
return
......
......@@ -6,6 +6,8 @@ Page({
shopId: '',
shopLogo: '',
shoppingCart: [], // 购物车列表
shoppingCartGoodsId: '',
shoppingCartGoodsName: '',
shoppingCartSelection: 0, // 购物车选择数量
selectionTotal: 0, // 当前选择件数
......@@ -26,6 +28,7 @@ Page({
})
this.selectionTotal()
this.transformShoppingCart()
},
onShow: function () {
......@@ -47,6 +50,23 @@ Page({
})
},
transformShoppingCart: function () {
let funcShoppingCartList = this.data.shoppingCart
let funcShoppingCartGoodsId = []
let funcShoppingCartGoodsName = []
funcShoppingCartList.forEach((item, index) => {
funcShoppingCartGoodsId.push(item.id)
funcShoppingCartGoodsName.push(item.name)
})
this.setData({
shoppingCartGoodsId: funcShoppingCartGoodsId.join(),
shoppingCartGoodsName: funcShoppingCartGoodsName.join(),
})
console.log('shoppingCartGoodsId', this.data.shoppingCartGoodsId)
console.log('shoppingCartGoodsName', this.data.shoppingCartGoodsName)
},
/**
* 勾选状态
* @function
......@@ -64,6 +84,7 @@ Page({
})
this.selectionTotal()
this.transformShoppingCart()
},
/**
......@@ -87,6 +108,7 @@ Page({
shoppingCart: funcShoppingCart
})
this.selectionTotal()
this.transformShoppingCart()
},
/**
......@@ -106,6 +128,7 @@ Page({
})
this.selectionTotal()
this.transformShoppingCart()
},
/**
......@@ -126,6 +149,7 @@ Page({
})
this.selectionTotal()
this.transformShoppingCart()
},
/**
......@@ -148,6 +172,7 @@ Page({
})
this.selectionTotal()
this.transformShoppingCart()
},
fail: () => {
console.log('fail')
......
let App = getApp()
Page({
data: {
appStatus: App.globalData.appStatus,
banner: [],
bannerIndex: 0,
notice: [],
history: [],
// 近期活动
recentActivitiesList: [],
recentActivitiesListA: [],
recentActivitiesListB: [],
// 游客攻略
touristRouteList: [],
touristRoutePageNo: 1,
touristRoutePageSize: 10,
isLogin: false, // 是否登录
},
onLoad: function (options) {
App.setAppStatus(this, '畅玩')
this.setLogin()
this.queryBanner()
this.queryNotice()
this.queryBrand()
this.queryActivity()
this.routeList()
},
/**
......@@ -53,7 +67,8 @@ Page({
'cover': funcData[i].img,
'targetId': funcData[i].jumpId,
'targetType': funcData[i].jumpColumnId ? Number(funcData[i].jumpColumnId) : funcData[i].jumpColumnId,
'type': Number(funcData[i].smColumnId)
'type': Number(funcData[i].smColumnId),
'question': funcData[i].questionUrl
}
if (funcItem.type === 0) funcList.push(funcItem)
......@@ -64,6 +79,37 @@ Page({
})
},
//跳转到艺文
onToArt: function () {
wx.navigateTo({
url: '/pages/play/service/service?type=0&title=艺文'
})
},
//跳转到健康
onToHealth: function () {
wx.navigateTo({
url: '/pages/play/service/service?type=1&title=健康'
})
},
//跳转到美食
onToFood: function () {
wx.navigateTo({
url: '/pages/play/service/service?type=2&title=美食'
})
},
//跳转到休闲
onToLeisure: function () {
wx.navigateTo({
url: '/pages/play/service/service?type=3&title=休闲'
})
},
//跳转到住宿
onToHotel: function () {
wx.navigateTo({
url: '/pages/play/service/service?type=4&title=住宿'
})
},
/**
* 最新动态列表
* @function
......@@ -99,6 +145,50 @@ Page({
},
/**
* 查询主题活动
* @function
* @param
* @returns
*/
queryActivity: function () {
App.request({
url: 'v1/activity/getList',
params: {
'tagId': '101',
'listType': 1,
'pageNo': 1,
'pageSize': 10,
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].id,
'name': funcData[i].name,
'cover': funcData[i].cover,
'banner': funcData[i].playImg,
'describe': funcData[i].summary,
'timeDate': funcData[i].activeDate,
'timePeriod': funcData[i].activeTime,
'ownerPrice': funcData[i].ownerPrice,
'visitorPrice': funcData[i].visitorPrice,
'tagId': funcData[i].tagIds,
'shopId': funcData[i].officeId,
}
funcList.push(funcItem)
}
this.setData({ recentActivitiesList: JSON.parse(JSON.stringify(funcList)) })
funcList.push(this.data.recentActivitiesList[0])
this.setData({ recentActivitiesListA: JSON.parse(JSON.stringify(funcList)) })
funcList.push(this.data.recentActivitiesList[0])
this.setData({ recentActivitiesListB: JSON.parse(JSON.stringify(funcList)) })
}).catch((response) => {
})
},
/**
* 品牌故事
* @function
* @param
......@@ -114,6 +204,18 @@ Page({
})
},
onAllActivity: function () {
wx.navigateTo({
url: '/pages/play/activity/activity'
})
},
onActivityDetail: function (funcItem) {
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.detail.id
})
},
/**
* banner 跳转
* @function
......@@ -122,6 +224,14 @@ Page({
*/
onBanner: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
if (funcItem.question) {
wx.navigateToMiniProgram({
appId: 'wxd947200f82267e58',
path: 'pages/wjxqList/wjxqList?activityId=' + funcItem.question
})
return
}
switch (funcItem.targetType) {
case 1:
// 活动详情
......@@ -219,11 +329,80 @@ Page({
},
onImageLoad: function (funcEvent) {
console.log('首页 ImageLoad')
},
onImageError: function (funcEvent) {
console.log('首页 ImageError', funcEvent.detail.errMsg)
},
/**
* 查询游客攻略
* @function
* @param
* @returns
*/
routeList: function () {
App.request({
url: 'v1/strategy/getList',
params: {
'pageNo': this.data.touristRoutePageNo,
'pageSize': this.data.touristRoutePageSize,
},
})
.then((response) => {
let funcResponse = response.data
let funcList = []
for (let i = 0, l = funcResponse.list.length; i < l; i++) {
let funcItem = {
'id': funcResponse.list[i].id,
'cover': funcResponse.list[i].cover,
'title': funcResponse.list[i].title,
'content': funcResponse.list[i].content,
'date': funcResponse.list[i].updateDate,
'tags': funcResponse.list[i].tags.split('#'),
// 'isTop': Number(funcResponse.list[i].top) === 1 ? true : false,
// 'topCover': '',
}
// if (funcItem) funcItem.topCover = funcResponse.list[i].topImg
funcList.push(funcItem)
}
this.setData({
touristRouteList: this.data.touristRoutePageNo === 1 ? funcList : this.data.touristRouteList.concat(funcList)
})
})
},
/**
* 游客攻略详情
* @function
* @param
* @returns
*/
onTouristRouteDetail: function (event) {
let funcItem = event.currentTarget.dataset.item
wx.navigateTo({
url: '/pages/play/strategy-detail/strategy-detail?id=' + funcItem.id
})
},
onOfficialAccount: function (funcEvent) {
wx.navigateTo({ url: '/pages/home/official-account/official-account' })
},
onOfficialAccountError: function (funcEvent) {
console.log(funcEvent)
},
onReachBottom: function () {
if (this.data.touristRouteList.length === 0) return
this.setData({
touristRoutePageNo: this.data.touristRoutePageNo + 1
})
this.routeList()
},
/**
......
<m-nav scrollHeight="{{navScroll}}" changeHeight="650rpx" styleIndex="{{4}}" isOccupy="{{false}}"></m-nav>
<view class="container iphoneX-bottom-fill">
<view class="container">
<view class="banner">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="5000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item" data-item="{{item}}" bindtap="onBanner">
<image class="banner-swiper-image" src="{{item.cover}}" bindload="onImageLoad" binderror="onImageError"></image>
<image class="banner-swiper-image" src="{{item.cover}}"></image>
</swiper-item>
</block>
</swiper>
......@@ -17,73 +17,153 @@
<image src="/image/ornament-0.png" mode="widthFix"></image>
</view>
</view>
<view class="location-container">
<!-- 微信登录 -->
<view class="sign-in row ac" bindtap="onSignIn" wx:if="{{!isLogin}}">
<view class="row ac">
<image class="sign-in-icon" src="/image/wechat.png"></image>
<image class="sign-in-title" src="./image/login.png"></image>
</view>
<view class="row cb ac">
<text class="sign-in-content">消费积分 业主特权</text>
<image class="i32" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
<!-- 关注公众号 -->
<view class="official-account" bindtap="onOfficialAccount">
<image src="./image/official-account.png"></image>
</view>
<!-- <official-account binderror="onOfficialAccountError"></official-account> -->
<!-- 微信登录 -->
<view class="sign-in row ac" bindtap="onSignIn" wx:if="{{!isLogin}}">
<view class="row ac">
<image class="sign-in-icon" src="/image/wechat.png"></image>
<image class="sign-in-title" src="./image/login.png"></image>
</view>
<view class="row cb ac">
<text class="sign-in-content">消费积分 业主特权</text>
<image class="i32" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
<!-- 最新动态 -->
<view class="notice row ac">
<view class="row ac">
<image class="notice-icon" src="./image/inform.png"></image>
<image class="notice-title" src="./image/title-news.png"></image>
<!-- 畅玩分类 -->
<block wx:if="{{appStatus}}">
<view class="play">
<view class="title row ac">
<image src="./image/title-play.png"></image>
</view>
<view class="row cb ac">
<swiper vertical="{{true}}">
<block wx:for="{{notice}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<swiper-item class="row ac">
<text data-item="{{item}}" bindtap="onNoticeDetail">{{item.title}}</text>
</swiper-item>
</block>
</swiper>
<image class="i32" src="{{imageBase + 'icon/arrow-r-2.png'}}" bindtap="onNoticeList"></image>
<view class="play-cover">
<image src="./image/play.png"></image>
<button class="art-button" bindtap="onToArt"></button>
<button class="health-button" bindtap="onToHealth"></button>
<button class="food-button" bindtap="onToFood"></button>
<button class="leisure-button" bindtap="onToLeisure"></button>
<button class="hotel-button" bindtap="onToHotel"></button>
</view>
</view>
</block>
<view class="detail">
<!-- 预约公告 -->
<view class="night row cb" bindtap="onAppointmentInto">
<image src="{{resourcesBase + 'home/into.png'}}" mode="aspectFit"></image>
<view class="night-content">
<view class="night-info-title row ac">
<image src="./image/night.png"></image>
<image src="./image/title-night.png"></image>
</view>
<view class="night-info-describe">
<text>20:00后入园需提前预约,每日限流200人</text>
</view>
</view>
<view class="night-info-more row ac">
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
<!-- 最新动态 -->
<!--
<view class="notice row ac">
<view class="row ac">
<image class="notice-icon" src="./image/inform.png"></image>
<image class="notice-title" src="./image/title-news.png"></image>
</view>
<view class="row cb ac">
<swiper vertical="{{true}}">
<block wx:for="{{notice}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<swiper-item class="row ac">
<text data-item="{{item}}" bindtap="onNoticeDetail">{{item.title}}</text>
</swiper-item>
</block>
</swiper>
<image class="i32" src="{{imageBase + 'icon/arrow-r-2.png'}}" bindtap="onNoticeList"></image>
</view>
</view>
-->
<view class="detail">
<!-- 预约公告 -->
<view class="night row cb" bindtap="onAppointmentInto">
<view class="title row ac">
<image src="./image/title-night.png"></image>
</view>
<view>
<image class="night-info" src="./image/night.png" mode="aspectFit"></image>
</view>
</view>
<!-- 智慧导览 -->
<view class="guide detail-item" bind:tap="onGuide">
<image src="./image/title-guide.png"></image>
<view class="guide-content">
<image class="background-image" src="{{resourcesBase + 'home/guide.png'}}" mode="aspectFit"></image>
<view class="operation column">
<image src="./image/explore.png"></image>
<button class="row cc ac">进入电子地图</button>
</view>
<!-- 智慧导览 -->
<view class="guide detail-item" bind:tap="onGuide">
<image src="./image/title-guide.png"></image>
<view class="guide-content">
<image class="background-image" src="{{resourcesBase + 'home/guide.png'}}" mode="aspectFit"></image>
<view class="operation column">
<image src="./image/explore.png"></image>
<button class="row cc ac">进入电子地图</button>
</view>
</view>
</view>
</view>
<view class="history">
<block wx:for="{{history}}" wx:key="brandId">
<image src="{{item.cover}}" bindtap="onToHistory" data-index="{{index}}"></image>
</block>
<!--
<view class="history">
<block wx:for="{{history}}" wx:key="brandId">
<image src="{{item.cover}}" bindtap="onToHistory" data-index="{{index}}"></image>
</block>
</view>
-->
<!-- 近期活动 -->
<view class="activity">
<view class="title row cb ac" style="padding-left: 30rpx;">
<image src="./image/title-activity.png"></image>
<text class="fs26 fw400 c31" bindtap="onAllActivity">查看全部</text>
</view>
<view class="recent_activities_list row" bindchange="swiperRecentChange">
<home-activity contentList="{{[]}}" bind:onItem="onActivityDetail"></home-activity>
<!-- <home-activity contentList="{{recentActivitiesList}}" bind:onItem="onActivityDetail"></home-activity> -->
</view>
</view>
<home-activity contentList="{{recentActivitiesList}}" bind:onItem="onActivityDetail"></home-activity>
<home-activity contentList="{{recentActivitiesListA}}" bind:onItem="onActivityDetail"></home-activity>
<home-activity contentList="{{recentActivitiesListB}}" bind:onItem="onActivityDetail"></home-activity>
<!-- 游客攻略 -->
<view class="route">
<block wx:if="{{touristRouteList.length > 0}}">
<view class="title row ac">
<image src="./image/title-route.png"></image>
</view>
<view class="route-list row cb">
<!-- 左侧列表 -->
<view class="route-list-left">
<block wx:for="{{touristRouteList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 0}}" data-item="{{item}}" bindtap="onTouristRouteDetail">
<view class="row cc ac">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row ac">
<block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
<text>{{'# ' + itemTags}}</text>
</block>
</view>
<text class="route-item-title">{{item.title}}</text>
<text class="route-item-content">{{item.date}}</text>
</view>
</block>
</view>
<!-- 右侧列表 -->
<view class="route-list-right">
<block wx:for="{{touristRouteList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 1}}" data-item="{{item}}" bindtap="onTouristRouteDetail">
<view class="row cc ac">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row ac">
<block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
<text>{{'# ' + itemTags}}</text>
</block>
</view>
<text class="route-item-title">{{item.title}}</text>
<text class="route-item-content">{{item.date}}</text>
</view>
</block>
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
.logo {
z-index: 1100;
position: fixed;
top: 60rpx;
left: 50rpx;
width: 200rpx;
height: 60rpx;
}
.container {
position: relative;
background: linear-gradient(#ffffff, #F2F2F2);
}
.banner {
position: relative;
width: 750rpx;
height: 870rpx;
height: 680rpx;
background: #ffffff;
}
......@@ -27,19 +17,19 @@
top: 0 !important;
left: 0 !important;
width: 750rpx;
height: 870rpx;
height: 750rpx;
}
.banner-swiper-point {
position: relative;
top: 620rpx;
top: 540rpx;
left: 0;
}
.banner-wave {
z-index: 2;
position: relative;
top: 712rpx;
top: 600rpx;
left: 0;
width: 100%;
height: 160rpx;
......@@ -50,6 +40,88 @@
height: 150rpx;
}
.official-account {
z-index: 4;
width: 670rpx;
height: 168rpx;
}
.official-account > image {
width: 670rpx;
height: 168rpx;
}
/* 畅玩分类按钮 */
.title {
padding: 0 40rpx 0 0;
}
.title > image {
width: 184rpx;
height: 46rpx;
}
.play {
z-index: 4;
}
.play-cover {
position: relative;
width: 670rpx;
height: 590rpx;
margin: 50rpx 0 0 0;
}
.play-cover > image {
width: 670rpx;
height: 590rpx;
}
.art-button {
position: absolute;
top: 0;
left: 0;
width: 330rpx;
height: 390rpx;
background: transparent;
}
.health-button {
position: absolute;
top: 0;
left: 340rpx;
width: 330rpx;
height: 180rpx;
background: transparent;
}
.food-button {
position: absolute;
top: 200rpx;
left: 340rpx;
width: 330rpx;
height: 190rpx;
background: transparent;
}
.leisure-button {
position: absolute;
top: 410rpx;
left: 0;
width: 330rpx;
height: 180rpx;
background: transparent;
}
.hotel-button {
position: absolute;
top: 410rpx;
left: 340rpx;
width: 330rpx;
height: 180rpx;
background: transparent;
}
/* 主页内容与 banner 元素重合 */
.location-container {
z-index: 3;
......@@ -63,7 +135,7 @@
z-index: 3;
width: 670rpx;
height: 108rpx;
margin: 0 40rpx 40rpx 40rpx;
margin: 40rpx;
padding: 0 32rpx;
box-shadow: 0px 16rpx 48rpx 0 rgba(0, 0, 0, .05);
border-radius: 4rpx;
......@@ -134,6 +206,7 @@
}
.detail {
margin: 50rpx 0 0 0;
padding: 0 40rpx;
}
......@@ -157,7 +230,7 @@
overflow: hidden;
}
.night > image {
.night-info {
position: absolute;
top: 0;
left: 0;
......@@ -165,48 +238,6 @@
height: 150rpx;
}
.night-content {
z-index: 3;
}
.night-info-title {
height: 42rpx;
font-size: 30rpx;
font-weight: bold;
color: #ffffff;
line-height: 42rpx;
}
.night-info-title image:nth-child(1) {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
.night-info-title image:nth-child(2) {
width: 184rpx;
height: 30rpx;
}
.night-info-describe {
margin-top: 20rpx;
font-size: 22rpx;
color: #B8CBDC;
letter-spacing: 1rpx;
}
.night-info-more {
z-index: 3;
font-size: 26rpx;
color: #ffffff;
line-height: 36rpx;
}
.night-info-more image {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
/* 智慧导览 */
.guide-content {
z-index: 3;
......@@ -355,4 +386,92 @@
.history image:last-child {
margin-bottom: 0rpx;
}
/* 近期活动 */
.activity {
width: 750rpx;
margin: 50rpx 0 0 0;
}
.recent_activities_list {
width: 750rpx;
}
/* 游客攻略 */
.route {
width: 750rpx;
margin: 50rpx 0 0 0;
padding: 0 40rpx 100rpx 40rpx;
}
.route-list {
margin: 40rpx 0 0 0;
}
.route-list-left,
.route-list-right {
width: 328rpx;
}
.route-item {
display: flex;
flex-direction: column;
max-width: 328rpx;
margin-top: 16rpx;
border-radius: 4rpx;
overflow: hidden;
background: #ffffff;
}
.route-item image {
height: 468rpx;
}
.route-list-right .route-item:first-child image {
height: 354rpx;
}
.route-item-title {
display: -webkit-box;
margin: 24rpx 20rpx;
font-size: 26rpx;
font-weight: bolder;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.route-item-tags {
flex-wrap: wrap;
height: 32rpx;
margin-top: 24rpx;
padding: 0 24rpx;
overflow: hidden;
word-wrap: break-word;
}
.route-item-tags text {
display: inline-block;
height: 32rpx;
margin-right: 16rpx;
padding: 0 12rpx;
border-radius: 4rpx;
background: #15191F;
white-space: nowrap;
font-size: 18.6rpx;
font-weight: 500;
line-height: 32rpx;
color: #FFFFFF;
}
.route-item-content {
margin: 0 24rpx 24rpx 24rpx;
font-size: 22rpx;
color: #959DA9;
}
\ No newline at end of file

3.89 KB | W: | H:

34.5 KB | W: | H:

pages/home/home/image/night.png
pages/home/home/image/night.png
pages/home/home/image/night.png
pages/home/home/image/night.png
  • 2-up
  • Swipe
  • Onion skin

4.5 KB | W: | H:

6.53 KB | W: | H:

pages/home/home/image/title-night.png
pages/home/home/image/title-night.png
pages/home/home/image/title-night.png
pages/home/home/image/title-night.png
  • 2-up
  • Swipe
  • Onion skin
// pages/home/official-account/official-account.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<m-nav titleText="关注微信公众号" styleIndex="2" isOccupy="{{false}}"></m-nav>
<view class="official-account">
<!-- <image class="code" src="./image/code.png"></image> -->
<image mode="widthFix" src="{{resourcesBase + 'official-account.png'}}"></image>
</view>
\ No newline at end of file
.official-account {
width: 750rpx;
}
.official-account > image {
display: block;
width: 750rpx;
}
.code {
z-index: 4;
position: fixed;
top: 610rpx;
left: 220rpx;
width: 312rpx !important;
height: 312rpx !important;
}
\ No newline at end of file
......@@ -433,7 +433,6 @@ Page({
'couponState': Number(funcData[0].status),
})
}
console.log(funcEvent)
let funcItem = funcEvent.currentTarget.dataset.item
if (funcItem) {
for (let i = 0, l = funcList.length; i < l; i++ ) {
......
......@@ -19,6 +19,7 @@ let pagePayId = ''
Page({
data: {
animation: {},
userInfo: {},
shopInfo: {},
orderId: '',
orderType: 1, // 1 - 年卡月卡,2 - 普通商品, 3 - 门票商品, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
......@@ -40,6 +41,8 @@ Page({
// 购买清单
shoppingCartList: [],
shoppingCartGoodsId: '',
shoppingCartGoodsName: '',
noticeText: '购买须知',
......@@ -97,6 +100,7 @@ Page({
if (options.type) options.type = Number(options.type)
logicData.option = options
this.setData({ userInfo: wx.getStorageSync('userInfo') })
this.setShopInfo()
this.setShoppingCartData()
this.setView()
......@@ -318,6 +322,7 @@ Page({
setShoppingCartData: function () {
// 读取上级页面的购物车数据,默认选中所有。
let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer')
this.transformShoppingCart(funcShoppingCart)
// 设置商品单位价格
let funcPriceUnit = 0
......@@ -506,6 +511,21 @@ Page({
})
},
transformShoppingCart: function (funcShoppingCart) {
let funcShoppingCartList = funcShoppingCart
let funcShoppingCartGoodsId = []
let funcShoppingCartGoodsName = []
funcShoppingCartList.forEach((item, index) => {
funcShoppingCartGoodsId.push(item.id)
funcShoppingCartGoodsName.push(item.name)
})
this.setData({
shoppingCartGoodsId: funcShoppingCartGoodsId.join(),
shoppingCartGoodsName: funcShoppingCartGoodsName.join(),
})
},
/**
* 活动 - 选择数值事件
* @function
......
......@@ -2,12 +2,24 @@ let App = getApp()
Page({
data: {
// 上报数据
userInfo: {},
shoppingCart: [], // 购物车列表
shoppingCartGoodsId: '',
shoppingCartGoodsName: '',
payState: '',
payAmount: 0,
orderId: '',
},
onLoad: function (options) {
this.setData({
userInfo: wx.getStorageSync('userInfo'),
shoppingCart: wx.getStorageSync('shoppingCartBuffer'),
})
this.transformShoppingCart()
if (options.state === 'true') {
this.setData({
payState: true,
......@@ -25,6 +37,23 @@ Page({
})
},
transformShoppingCart: function () {
let funcShoppingCartList = this.data.shoppingCart
let funcShoppingCartGoodsId = []
let funcShoppingCartGoodsName = []
funcShoppingCartList.forEach((item, index) => {
funcShoppingCartGoodsId.push(item.id)
funcShoppingCartGoodsName.push(item.name)
})
this.setData({
shoppingCartGoodsId: funcShoppingCartGoodsId.join(),
shoppingCartGoodsName: funcShoppingCartGoodsName.join(),
})
console.log('shoppingCartGoodsId', this.data.shoppingCartGoodsId)
console.log('shoppingCartGoodsName', this.data.shoppingCartGoodsName)
},
onHome: function () {
wx.switchTab({
url: '/pages/home/home/home'
......
......@@ -251,9 +251,7 @@ Page({
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
if (funcShopId === App.globalData.shopId[i].id) {
let funcShopInfo = JSON.parse(JSON.stringify(App.globalData.shopId[i]))
console.log(funcShopInfo.name)
if (funcShopType) funcShopInfo.shopType = funcShopType
console.log('1111')
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
}
}
......
......@@ -42,7 +42,7 @@
"compileType": "miniprogram",
"libVersion": "2.10.0",
"appid": "wx7c468a29cb33a246",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%B8%89%E6%9C%9F",
"debugOptions": {
"hidedInDevtools": []
},
......@@ -108,6 +108,12 @@
"pathName": "pages/commodity/project-detail/project-detail",
"query": "shopAppId=7&commodityType=2&from=subscription",
"scene": null
},
{
"name": "pages/home/home/home",
"pathName": "pages/home/home/home",
"query": "",
"scene": 1047
}
]
}
......
{
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"name": "原味舒食",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "shopAppId=6&commodityType=5&from=subscription",
"scene": 1047
},
{
"name": "原野MOJITO",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "shopAppId=4&commodityType=5&from=subscription",
"scene": null
},
{
"name": "补给儿童营地",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "shopAppId=3&commodityType=5&from=subscription",
"scene": null
},
{
"name": "补给拾光花坊",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "shopAppId=5&commodityType=5&from=subscription",
"scene": null
},
{
"name": "文创儿童营地",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "shopAppId=3&commodityType=4&from=subscription",
"scene": null
},
{
"name": "门票儿童营地",
"pathName": "pages/commodity/project-detail/project-detail",
"query": "shopAppId=3&commodityType=1&from=subscription",
"scene": null
},
{
"name": "门票海错",
"pathName": "pages/commodity/project-detail/project-detail",
"query": "shopAppId=1&commodityType=3&from=subscription",
"scene": null
},
{
"name": "门票元养水韵",
"pathName": "pages/commodity/project-detail/project-detail",
"query": "shopAppId=7&commodityType=2&from=subscription",
"scene": null
},
{
"name": "pages/home/home/home",
"pathName": "pages/home/home/home",
"query": "",
"scene": 1089
}
]
}
}
}
\ No newline at end of file
......@@ -47,7 +47,6 @@ function emit (wxObject) {
function navigateBack (wxObject) {
let funcOriginal = wx.navigateBack
let funcRedefinition = function (object) {
console.log('[extend api] navigateBack', object)
if (object && object.event && inspectEventFormat(object.event)) {
let funcPageList = getCurrentPages()
let funcReceivePagePath = object.event.receivePage || funcPageList[funcPageList.length - 2].route
......
......@@ -23,7 +23,7 @@
.ac { align-items: center; }
.ae { align-items: flex-end; }
.overflow_point_1 { overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.overflow_point_1 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.overflow_point_2 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.overflow_point_3 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.overflow_point_4 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
\ 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