Commit f2a6f545 by wjw

ww-畅玩修改

parent c40da588
...@@ -8,10 +8,13 @@ let logicData = { ...@@ -8,10 +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',
childActivity: [],
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',
...@@ -25,8 +28,10 @@ Page({ ...@@ -25,8 +28,10 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
this.setShopInfo(3, 1)
this.setSideHeight() this.setSideHeight()
this.queryDetail() this.queryDetail()
this.queryActivity()
}, },
setSideHeight: function () { setSideHeight: function () {
...@@ -34,11 +39,40 @@ Page({ ...@@ -34,11 +39,40 @@ Page({
sideHeight: this.data.sideHeight * wx.getStorageSync('unitProportion') sideHeight: this.data.sideHeight * wx.getStorageSync('unitProportion')
}) })
}, },
// 获取后台信息
queryDetail: function () { queryDetail: function () {
let that = this
App.wxRequest({
url: '/api/v1/park/getList',
success: function(res) {
let funcData = res.list.filter(v => v.name === '儿童营地')
that.setData({
detailImageUrl: funcData[0].content
})
}
})
},
// 获取活动信息
queryActivity: function () {
let that = this
let shopInfo = wx.getStorageInfoSync('shopInfoBuffer')
App.wxRequest({
url: '/api/v1/activity/getList',
data: {
'listType': '1',
'pageSize': '5',
'pageNo': '1',
'officeId': shopInfo.id
},
success: function(res) {
let funcData = res.data.list
console.log(funcData)
that.setData({
childActivity: funcData
})
}
})
}, },
onBackTop: function () { onBackTop: function () {
wx.pageScrollTo({ wx.pageScrollTo({
scrollTop: 0 scrollTop: 0
...@@ -67,6 +101,7 @@ Page({ ...@@ -67,6 +101,7 @@ Page({
this.setData({ this.setData({
winSide: false winSide: false
}) })
wx.hideTabBar({animation: true})
} }
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40 let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
...@@ -80,6 +115,7 @@ Page({ ...@@ -80,6 +115,7 @@ Page({
winSide: true, winSide: true,
navigationAnimationShow: 0 navigationAnimationShow: 0
}) })
wx.showTabBar({animation: true})
} }
// 恢复滚动事件 // 恢复滚动事件
...@@ -88,4 +124,97 @@ Page({ ...@@ -88,4 +124,97 @@ 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
}
}
},
// 跳转到购买年卡/月卡/次卡界面
onBuyMembership: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 1
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({
url: '/pages/commodity/project-detail/project-detail'
})
},
// 跳转到购买饮品界面
onBuySnacks: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food',
})
},
// 跳转到购买文创界面
onBuyArt: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 4
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/play/activity-detail/activity-detail?id=' + id,
})
},
// 点击分享图标
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
...@@ -3,18 +3,100 @@ ...@@ -3,18 +3,100 @@
<navigation class="navigation" titleText="儿童营地" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="儿童营地" backIcon="/image/back.png"></navigation>
<view class="container"> <view class="container">
<view class="appointment"> <!-- <view class="appointment">
<l-button l-class="appointment-button" bind:lintap="onServic">电话预约</l-button> <l-button l-class="appointment-button" bind:lintap="onServic">电话预约</l-button>
</view> </view> -->
<view class="appointment-side col con-b align-c" hidden="{{winSide}}"> <view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop"> <button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image> <image src="{{imageBase + 'top.png'}}"></image>
</button> </button>
<button class="appointment-side-phone" bind:tap="onServic"> <!-- <button class="appointment-side-phone" bind:tap="onServic">
<image src="{{imageBase + 'phone.png'}}"></image> <image src="{{imageBase + 'phone.png'}}"></image>
</button> </button> -->
</view>
<!-- 头部背景图 -->
<image class="banner" src="{{bannerImage}}"></image>
<!-- 分享按钮 -->
<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" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image>
</view>
<!-- 入园购票 -->
<view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon-title row align-c">
<image src="./image/ruyuangoupiao.png"></image>
<image src="/image/more.png"></image>
</view>
<view class="buy-coupon-type row con-b">
<image src="./image/single.png"></image>
<image src="./image/month.png"></image>
<image src="./image/year.png"></image>
</view>
</view> </view>
<!-- 饮品预订 文创周边-->
<view class="buy-other row con-b">
<!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{3}}">
<view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image>
</view>
<view class="buy-right col con-c">
<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" data-id="{{1}}">
<view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image>
</view>
<view class="buy-right col con-c">
<image src="./image/icon-bg.png"></image>
<image class="art-img" src="./image/shanzi.png"></image>
</view>
</view>
</view>
<!-- 滚动图片 -->
<!-- 单张图片 -->
<view class="swiper" wx:if="{{childActivity.length <= 1}}">
<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="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
</swiper-item>
</block>
</swiper>
<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
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
.appointment-side { .appointment-side {
position: fixed; position: fixed;
right: 40rpx; right: 40rpx;
bottom: 74rpx; bottom: 180rpx;
width: 112rpx; width: 80rpx;
height: 224rpx; height: 80rpx;
} }
.appointment-side-top { .appointment-side-top {
...@@ -49,4 +49,154 @@ ...@@ -49,4 +49,154 @@
.container > image { .container > image {
width: 750rpx; width: 750rpx;
}
.banner {
width: 750rpx;
height: 1676rpx;
}
.share {
position: absolute;
top: 710rpx;
right: 136rpx;
width: 64rpx;
height: 64rpx;
background: #F28FA2;
box-shadow: 8rpx 8rpx 20rpx 0rpx rgba(242,143,162,0.3);
border-radius: 50%;
}
.location {
position: absolute;
top: 710rpx;
right: 40rpx;
width: 64rpx;
height: 64rpx;
background: #F28FA2;
box-shadow: 8rpx 8rpx 20rpx 0rpx rgba(242,143,162,0.3);
border-radius: 50%;
}
.icon-share, .icon-location {
width: 40rpx;
height: 40rpx;
}
.buy-coupon {
position: absolute;
top: 804rpx;
width: 670rpx;
height: 312rpx;
padding: 40rpx 32rpx;
background: rgba(255, 255, 255, 0.65);
box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3);
border-radius: 4rpx;
}
.buy-coupon-title image:nth-child(1) {
width: 120rpx;
height: 34rpx;
}
.buy-coupon-title image:nth-child(2) {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
.buy-coupon-type {
margin-top: 32rpx;
}
.buy-coupon-type image {
width: 170rpx;
height: 166rpx;
}
.buy-other {
position: absolute;
top: 1140rpx;
width: 670rpx;
}
.buy-snacks, .buy-art {
width: 322rpx;
height: 154rpx;
background: rgba(255, 255, 255, 0.65);
box-shadow: 8rpx 8rpx 52rpx 0rpx rgba(238,211,153,0.3);
border-radius: 4rpx;
}
.buy-left, .buy-right {
position: relative;
margin-left: 32rpx;
}
.buy-left image{
width: 120rpx;
height: 34rpx;
}
.buy-right image:first-child {
width: 132rpx;
height: 136rpx;
}
.snacks-img {
position: absolute;
top: 28rpx;
left: 42rpx;
width: 50rpx;
height: 76rpx;
}
.art-img {
position: absolute;
top: 30rpx;
left: 12rpx;
width: 86rpx;
height: 70rpx;
}
.swiper {
width: 750rpx;
height: 1160rpx;
background-color: #FCF8F0;
}
.swiper image {
width: 750rpx;
height: 1160rpx;
}
.wx-swiper-dots{
position:relative;
left: 0;
right: 0;
}
.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
...@@ -28,6 +28,7 @@ Page({ ...@@ -28,6 +28,7 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
this.setShopInfo(3, 1)
this.setSideHeight() this.setSideHeight()
this.queryDetail() this.queryDetail()
this.queryActivity() this.queryActivity()
...@@ -54,20 +55,20 @@ Page({ ...@@ -54,20 +55,20 @@ Page({
// 获取活动信息 // 获取活动信息
queryActivity: function () { queryActivity: function () {
let that = this let that = this
let shopInfo = wx.getStorageInfoSync('shopInfoBuffer')
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
data: { data: {
'listType': '1', 'listType': '1',
'pageSize': '5', 'pageSize': '5',
'pageNo': '1', 'pageNo': '1',
'tagId': '103' 'officeId': shopInfo.id
}, },
success: function(res) { success: function(res) {
let funcData = res.data.list let funcData = res.data.list
let childActivity = funcData.filter(v => v.childImg !== '') console.log(funcData)
console.log(childActivity)
that.setData({ that.setData({
childActivity childActivity: funcData
}) })
} }
}) })
...@@ -160,15 +161,32 @@ Page({ ...@@ -160,15 +161,32 @@ Page({
}) })
}, },
// 跳转到购买饮品界面 // 跳转到购买饮品界面
onBuySnacks() { onBuySnacks: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/menu-snacks/menu-snacks', url: '/pages/commodity/menu-food/menu-food',
}) })
}, },
// 跳转到购买文创界面 // 跳转到购买文创界面
onBuyArt() { onBuyArt: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 4
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({ wx.navigateTo({
url: '/pages/commodity/menu-art/menu-art', url: '/pages/play/activity-detail/activity-detail?id=' + id,
}) })
}, },
// 点击分享图标 // 点击分享图标
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<!-- 饮品预订 文创周边--> <!-- 饮品预订 文创周边-->
<view class="buy-other row con-b"> <view class="buy-other row con-b">
<!-- 饮品预订 --> <!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks"> <view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{3}}">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image> <image src="./image/yinpinyuding.png"></image>
</view> </view>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</view> </view>
</view> </view>
<!-- 文创周边 --> <!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt"> <view class="buy-art row" bindtap="onBuyArt" data-id="{{1}}">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image> <image src="./image/wenchuangzhoubian.png"></image>
</view> </view>
...@@ -77,13 +77,13 @@ ...@@ -77,13 +77,13 @@
<!-- 滚动图片 --> <!-- 滚动图片 -->
<!-- 单张图片 --> <!-- 单张图片 -->
<view class="swiper" wx:if="{{childActivity.length <= 1}}"> <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> </view>
<!-- 多张图片 --> <!-- 多张图片 -->
<swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:else> <swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:else>
<block wx:for="{{childActivity}}" wx:key="id"> <block wx:for="{{childActivity}}" wx:key="id">
<swiper-item> <swiper-item>
<image mode="aspectFit" src="{{item.childImg}}"></image> <image mode="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
......
let App = getApp() let App = getApp()
let logicData = {
option: {},
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({ Page({
data: { data: {
...@@ -14,6 +20,20 @@ Page({ ...@@ -14,6 +20,20 @@ Page({
userInfo: {}, userInfo: {},
commodityList: [], commodityList: [],
// 导航栏相关属性
navigationStyle: {
normal: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 0)'
},
change: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 1)'
},
scroll: '600rpx',
},
}, },
onLoad: function () { onLoad: function () {
...@@ -59,7 +79,21 @@ Page({ ...@@ -59,7 +79,21 @@ Page({
this.queryCommodity() this.queryCommodity()
}, },
onPageScroll: function (funcEvent) {
// 优化滚动事件触发频率
if (logicData.pageScrollLock) return
logicData.pageScrollLock = true
this.setData({
navigationScroll: funcEvent.scrollTop
})
// 恢复滚动事件
logicData.pageScrollTimer = setTimeout(function () {
logicData.pageScrollLock = false
clearTimeout(logicData.pageScrollTimer)
}, 10)
},
queryCommodity: function () { queryCommodity: function () {
this.setData({ this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer') shopInfo: wx.getStorageSync('shopInfoBuffer')
......
<navigation class="navigation" titleText="{{navbarTitle}}" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="{{navbarTitle}}" backIcon="/image/back.png" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container con-s" style="background: {{bgColor}}"> <view class="container con-s" style="background: {{bgColor}}">
<view class="background-img"> <view class="background-img">
......
...@@ -38,6 +38,7 @@ Page({ ...@@ -38,6 +38,7 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options.id)
this.setData({ this.setData({
id: options.id id: options.id
}) })
...@@ -78,19 +79,44 @@ Page({ ...@@ -78,19 +79,44 @@ Page({
url: '/api/v1/activity/getDetail', url: '/api/v1/activity/getDetail',
data: { id: that.data.id }, data: { id: that.data.id },
success: function (res) { success: function (res) {
var response = res.data var funcResponse = res.data
that.setData({ let funcItem = {
banner: response.banners, 'id': funcResponse.id, // 活动标识
info: { 'title': funcResponse.name, // 活动名称
title: response.name, 'banner': funcResponse.banners, // 活动封面
date: response.activeDate + ' ' + response.activeTime, 'quota': funcResponse.enrollNum, // 活动名额
address: response.address, 'date': funcResponse.activeDate + ' ' + funcResponse.activeTime, // 活动时间
quota: response.enrollNum, 'price': funcResponse.visitorPrice, // 普通价
describe: response.content, 'priceText': funcResponse.visitorPrice.toFixed(2), // 普通价文本格式
// contact: response.contact, 'priceSpecial': funcResponse.ownerPrice, // 业主价
'priceSpecialText': funcResponse.ownerPrice.toFixed(2), // 业主价文本格式
//'priceDiscount': funcResponse.price, // 活动价
//'priceDiscountText': funcResponse.price.toFixed(2), // 活动价文本格式
'address': funcResponse.address, // 活动地址
'activeState': funcResponse.activeState,
'priceType': 1,
'describe': funcResponse.content,
'tags': funcResponse.tags,
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) {
funcItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2
} else {
funcItem.priceType = 3
} }
}
console.log(funcItem)
that.setData({
info: funcItem
}) })
that.configActiveState(response.activeState * 1) that.configActiveState(funcItem.activeState * 1)
} }
}) })
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="container"> <view class="container">
<view id="banner" class="banner"> <view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" style="{{navigationStyle}}" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange"> <swiper autoplay circular class="banner-swiper" style="{{navigationStyle}}" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{info.banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item"> <swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image> <image class="banner-swiper-image" src="{{item}}"></image>
</swiper-item> </swiper-item>
...@@ -25,17 +25,18 @@ ...@@ -25,17 +25,18 @@
<view class="detail-other col"> <view class="detail-other col">
<view class="row align-c"> <view class="row align-c">
<image src="/image/icon/g-time.png"></image> <image src="/image/icon/g-time.png"></image>
<text>活动时间</text> <text>时间</text>
<text>{{info.date}}</text> <text>{{info.date}}</text>
</view> </view>
<view style="height:auto;" class="row"> <view style="height:auto;" class="row align-c">
<image src="/image/icon/g-location.png"></image> <image src="/image/icon/g-location.png"></image>
<text>活动地址</text> <text>地址</text>
<text style="height:auto;">{{info.address}}</text> <text style="height:auto;">{{info.address}}</text>
<image src="/image/icon/arrow-r-1.png"></image>
</view> </view>
<view class="row align-c"> <view class="row align-c">
<image src="/image/icon/g-custom.png"></image> <image src="/image/icon/g-custom.png"></image>
<text>报名名额</text> <text>名额</text>
<text>{{info.quota}}人</text> <text>{{info.quota}}人</text>
</view> </view>
</view> </view>
...@@ -45,7 +46,43 @@ ...@@ -45,7 +46,43 @@
</view> </view>
</view> </view>
<view class="contact"> <view class="contact row">
<!-- 活动价样式 -->
<view wx:if="{{info.priceType === 1}}">
<view class="info-price row align-c">
<text class="item-price-discount">活动价</text>
<text>¥</text>
<text>{{info.priceDiscountText}}</text>
<text>/人</text>
</view>
<view class="item-info-old-price row align-c">
<text>¥</text>
<text>{{info.priceText}}</text>
<text>/人</text>
</view>
</view>
<!-- 业主价样式 -->
<view class="row" wx:if="{{info.priceType === 2}}">
<view class="item-price row align-c">
<text class="item-price-special">业主价</text>
<text>¥</text>
<text>{{info.priceSpecialText}}</text>
<text>/人</text>
</view>
<view class="item-info-old-price row align-c">
<text>¥</text>
<text>{{info.priceText}}</text>
<text>/人</text>
</view>
</view>
<!-- 普通价样式 -->
<view class="row" wx:if="{{info.priceType === 3}}">
<view class="item-price row align-c">
<text>¥</text>
<text>{{info.priceText}}</text>
<text>/人</text>
</view>
</view>
<button class="{{isSubmit ? 'button' : 'button-disable'}} row con-c align-c" size="long" bindtap="onContact">{{stateText}}</button> <button class="{{isSubmit ? 'button' : 'button-disable'}} row con-c align-c" size="long" bindtap="onContact">{{stateText}}</button>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
} }
.detail-other view text:nth-child(2) { .detail-other view text:nth-child(2) {
width: 120rpx; width: 60rpx;
height: 42rpx; height: 42rpx;
margin-right: 32rpx; margin-right: 24rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 300; font-weight: 300;
color: #959DA9; color: #959DA9;
...@@ -96,13 +96,18 @@ ...@@ -96,13 +96,18 @@
} }
.detail-other view text:nth-child(3) { .detail-other view text:nth-child(3) {
width: 470rpx; width: 500rpx;
height: 40rpx; height: 40rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
line-height: 42rpx; line-height: 42rpx;
} }
.detail-other view image:nth-child(4) {
width: 32rpx;
height: 32rpx;
margin-left: 6rpx;
}
.detail-describe { .detail-describe {
width: 670rpx; width: 670rpx;
...@@ -126,8 +131,56 @@ ...@@ -126,8 +131,56 @@
border-top: 1rpx #E2E7EF solid; border-top: 1rpx #E2E7EF solid;
background: #ffffff; background: #ffffff;
} }
.item-price {
color: #15191F;
margin-right: 12rpx;
}
.item-price-special {
width: 78rpx;
height: 36rpx;
margin-right: 12rpx;
border-radius: 4rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 36rpx;
color: #E8D0AF;
}
.item-price text:nth-child(2) {
font-size: 26rpx;
font-weight: 600;
}
.item-price text:nth-child(3) {
font-size: 38rpx;
font-weight: 600;
}
.item-price text:nth-child(4) {
font-size: 26rpx;
}
.item-info-old-price {
color: #C2C7CF;
text-decoration: line-through;
}
.item-info-old-price text:nth-child(1) {
font-size: 30rpx;
}
.item-info-old-price text:nth-child(2) {
font-size: 30rpx;
}
.item-info-old-price text:nth-child(3) {
font-size: 26rpx;
}
.contact .button { .contact .button {
width: 670rpx; position: absolute;
right: 40rpx;
width: 200rpx;
height: 96rpx; height: 96rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
background: #86C5E1; background: #86C5E1;
...@@ -139,7 +192,9 @@ ...@@ -139,7 +192,9 @@
line-height: 42rpx; line-height: 42rpx;
} }
.contact .button-disable { .contact .button-disable {
width: 670rpx; position: absolute;
right: 40rpx;
width: 200rpx;
height: 96rpx; height: 96rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
background: #C8E1EC; background: #C8E1EC;
......
...@@ -2,18 +2,45 @@ const App = getApp() ...@@ -2,18 +2,45 @@ const App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
statusActive: 0,
statusList: [
{
id: 0,
name: '全部'
}, {
id: 1,
name: '亲子教育'
}, {
id: 2,
name: '健康'
}
],
navigationTitle: '主题活动',
activity: [], activity: [],
selectedActivity: [],
other: [], other: [],
}, },
onLoad: function () { onLoad: function (option) {
var that = this var that = this
App.login({ console.log(option)
success: function () { if (option.officeId) {
that.getActivityList(1) App.login({
that.getActivityList(0) success: function () {
} that.getActivityList(1, option.officeId)
}) that.getActivityList(0, option.officeId)
}
})
} else {
App.login({
success: function () {
that.getActivityList(1)
that.getActivityList(0)
}
})
}
}, },
...@@ -24,7 +51,7 @@ Page({ ...@@ -24,7 +51,7 @@ Page({
}, },
//主题活动列表 type 1 近期 0 往期 //主题活动列表 type 1 近期 0 往期
getActivityList(type) { getActivityList(type, officeId) {
var that = this var that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
...@@ -32,6 +59,7 @@ Page({ ...@@ -32,6 +59,7 @@ Page({
listType: type, listType: type,
pageSize: 20, pageSize: 20,
pageNo: 1, pageNo: 1,
officeId: officeId
}, },
success: function (res) { success: function (res) {
var tmpArr = []; var tmpArr = [];
...@@ -43,6 +71,27 @@ Page({ ...@@ -43,6 +71,27 @@ Page({
date: item.activeDate,//'6月30日-7月12日 10:00-12:00', date: item.activeDate,//'6月30日-7月12日 10:00-12:00',
describe: item.summary, describe: item.summary,
beginDate: item.activeDate.split('-')[0], beginDate: item.activeDate.split('-')[0],
price: item.sightseerPrice, // 普通价
priceText: App.modular.utils.formatAmount(item.sightseerPrice), // 普通价文本格式
priceSpecial: item.ownerPrice, // 业主价
priceSpecialText: App.modular.utils.formatAmount(item.ownerPrice), // 业主价文本格式
tags: item.tags,
tagsId: item.tagsId,
date: item.activeDate + ' ' + item.activeTime, // 活动时间
priceType: 1,
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (tmpItem.priceDiscount) {
tmpItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (tmpItem.price !== tmpItem.priceSpecial && funcUserType) {
tmpItem.priceType = 2
} else {
tmpItem.priceType = 3
}
} }
tmpArr.push(tmpItem) tmpArr.push(tmpItem)
}) })
...@@ -54,8 +103,10 @@ Page({ ...@@ -54,8 +103,10 @@ Page({
// }) // })
if (type == 1) { if (type == 1) {
// that.setTabs(tmpArr)
that.setData({ that.setData({
activity: tmpArr activity: tmpArr,
selectedActivity: tmpArr
}) })
} else { } else {
that.setData({ that.setData({
...@@ -64,7 +115,46 @@ Page({ ...@@ -64,7 +115,46 @@ Page({
} }
} }
}) })
},
setTabs: function (tmpArr) {
let that = this
console.log(tmpArr)
let statusList = this.data.statusList
tmpArr.forEach(item => {
let status = {
id: item.tagsId,
name: item.tags
}
statusList.push(status)
})
console.log(statusList)
that.setData({
statusList
})
},
// 选择标签
onSelectionStatus: function (event) {
console.log(event.currentTarget.dataset.type)
let index = event.currentTarget.dataset.type
let statusList = this.data.statusList
let selected = this.data.activity
if (index === '0') {
return
} else {
selected = selected.filter(item => {
item.tagsId === statusList[index].id
})
}
this.setData({
selected,
statusActive: Number(event.currentTarget.dataset.type)
})
},
// 活动报名
onReport: function (event) {
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/play/activity-entry/activity-entry?id=' + id
})
} }
}) })
\ No newline at end of file
<!-- 畅玩 - 活动列表 --> <!-- 畅玩 - 活动列表 -->
<navigation class="navigation" titleText="主题活动" background="#ffffff" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="{{navigationTitle}}" background="#ffffff" backIcon="/image/back.png"></navigation>
<view class="container"> <view class="container">
<!-- 活动类别 -->
<view class="status row align-c" wx:if="{{statusList[0].id !== 'undefind'}}">
<block wx:for="{{statusList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="status-item row con-c align-c" data-type="{{index}}" bindtap="onSelectionStatus">
<view class="row con-c align-c {{index === statusActive ? 'status-item-active' : ''}}">
<text>{{item.name}}</text>
</view>
</view>
</block>
</view>
<block wx:if="{{activity.length > 0}}"> <block wx:if="{{activity.length > 0}}">
<view class="title row"> <!-- <view class="title row">
<image src="./image/title.png"></image> <image src="./image/title.png"></image>
</view> </view> -->
<view class="list"> <view class="list">
<block wx:for="{{activity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{activity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<!-- <block wx:for="{{selected}}" wx:for-index="index" wx:for-item="item" wx:key="index"> 测试 -->
<view class="item" data-id="{{item.id}}" bindtap="onActivityDetail"> <view class="item" data-id="{{item.id}}" bindtap="onActivityDetail">
<view class="item-cover" wx:if="{{item.cover !== ''}}"> <view class="item-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="aspectFill"></image> <image src="{{item.cover}}" mode="aspectFill"></image>
</view> </view>
<view class="item-info col"> <view class="item-info col">
<text class="item-title">{{item.title}}</text> <view class="item-title row con-b align-c">
<text class="item-date">{{item.date}}</text> <text>{{item.title}}</text>
<text class="item-describe">{{item.describe}}</text> <text>{{item.tags}}</text>
</view>
<view class="item-date row align-c">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.date}}</text>
</view>
<view class="item-describe">
<text>{{item.describe}}</text>
</view>
<view class="item-operation row con-b align-c">
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>业主价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row con-c align-c" catchtap="onReport" data-id="{{item.id}}">报名</button>
</view>
</view>
</view> </view>
</view> </view>
</block> </block>
...@@ -28,7 +69,7 @@ ...@@ -28,7 +69,7 @@
<image src="./image/title-2.png"></image> <image src="./image/title-2.png"></image>
</view> </view>
<view class="other row" > <!-- <view class="other row" >
<block wx:for="{{other}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{other}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="other-item col" data-id="{{item.id}}" bindtap="onActivityDetail"> <view class="other-item col" data-id="{{item.id}}" bindtap="onActivityDetail">
<view> <view>
...@@ -41,6 +82,39 @@ ...@@ -41,6 +82,39 @@
</view> </view>
</block> </block>
<view class="other-item col"></view> <view class="other-item col"></view>
</view> -->
<view class="route-list row con-b">
<!-- 左侧列表 -->
<view class="route-list-left">
<block wx:for="{{other}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 0}}" data-id="{{item.id}}" bindtap="onActivityDetail">
<view class="row con-c align-c">
<image src="{{item.cover}}" mode="aspectFill"></image>
</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 con-c align-c">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row align-c">
<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> </view>
</block> </block>
</view> </view>
\ No newline at end of file
...@@ -6,9 +6,47 @@ ...@@ -6,9 +6,47 @@
.container { .container {
margin-top: 120rpx; margin-top: 120rpx;
padding-bottom: 100rpx;
background: linear-gradient(#ffffff, #F2F2F2); background: linear-gradient(#ffffff, #F2F2F2);
} }
/* 状态筛选菜单 */
.status {
width: 750rpx;
height: 76rpx;
margin-top: 80rpx;
padding: 0 40rpx;
border-bottom: 1px #E2E7EF solid;
overflow: scroll;
flex-wrap: nowrap;
}
.status-item {
height: 76rpx;
margin-right: 80rpx;
font-size: 26rpx;
font-weight: 400;
color: #959DA9;
}
.status-item text {
display: inline-block;
white-space: nowrap;
}
.status-item:last-child {
padding-right: 40rpx;
}
.status-item-active {
height: 76rpx;
color: #15191F;
font-weight: 600;
border-bottom: 4rpx #15191F solid;
}
.status::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.title { .title {
width: 750rpx; width: 750rpx;
height: 96rpx; height: 96rpx;
...@@ -17,19 +55,19 @@ ...@@ -17,19 +55,19 @@
} }
.title image { .title image {
width: 184rpx; width: 138rpx;
height: 96rpx; height: 96rpx;
} }
/* 活动列表 */ /* 活动列表 */
.list { .list {
padding: 0 40rpx 50rpx 40rpx; padding: 0rpx 40rpx 50rpx 40rpx;
} }
.item { .item {
width: 670rpx; width: 670rpx;
height: 644rpx; height: 708rpx;
margin-top: 48rpx; margin-top: 64rpx;
border-radius: 2px; border-radius: 2px;
overflow: hidden; overflow: hidden;
background: #ffffff; background: #ffffff;
...@@ -40,13 +78,15 @@ ...@@ -40,13 +78,15 @@
} }
.item-title { .item-title {
width: 606rpx; height: 44rpx;
height: 48rpx; margin-top: 32rpx;
margin-top: 30rpx; }
.item-title text:nth-child(1) {
font-size: 34rpx; font-size: 34rpx;
font-weight: bold; font-weight: bold;
color: #15191F; color: #15191F;
line-height: 48rpx; line-height: 44rpx;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
white-space: normal; white-space: normal;
...@@ -56,22 +96,43 @@ ...@@ -56,22 +96,43 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.item-title text:nth-child(2) {
width: 96rpx;
height: 32rpx;
border-radius: 4rpx;
border: 1px solid #86C5E1;
background: rgba(134, 197, 225, 0.1);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 24rpx;
color: #86C5E1;
}
.item-date { .item-date {
width: 606rpx; width: 606rpx;
height: 36rpx; height: 40rpx;
margin-top: 24rpx; margin-top: 8rpx;
font-size: 26rpx; font-size: 26rpx;
color: #15191F; color: #656E7B;
line-height: 36rpx; line-height: 40rpx;
}
.item-date image {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
} }
.item-describe { .item-describe {
width: 606rpx; width: 606rpx;
height: 72rpx; height: 80rpx;
margin-top: 16rpx; margin-top: 16rpx;
font-size: 26rpx; font-size: 26rpx;
color: #959DA9; color: #959DA9;
line-height: 36rpx; line-height: 40rpx;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
white-space: normal; white-space: normal;
...@@ -81,6 +142,62 @@ ...@@ -81,6 +142,62 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.price-symbol {
margin-top: 8rpx;
color: #15191F;
font-size: 18rpx;
font-weight: 600;
}
.item-operation {
margin-top: 16rpx;
}
.item-operation text:nth-child(1) {
width: 78rpx;
height: 32rpx;
margin-right: 12rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4rpx;
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 28rpx;
color: #E8D0AF;
}
.item-operation text:nth-child(3) {
margin-right: 16rpx;
text-align: center;
font-size: 30rpx;
font-weight: 600;
line-height: 36rpx;
color: #15191F;
}
.item-operation text:nth-child(4) {
text-align: center;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #C2C7CF;
text-decoration: line-through;
}
.item-operation button {
flex-grow: 1;
width: 132rpx;
height: 56rpx;
border-radius: 4rpx;
background: #86C5E1;
color: #FFFFFF;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
}
.item-cover image { .item-cover image {
width: 670rpx; width: 670rpx;
height: 376rpx; height: 376rpx;
...@@ -127,4 +244,52 @@ ...@@ -127,4 +244,52 @@
.other-item image { .other-item image {
width: 286rpx; width: 286rpx;
height: 340rpx; height: 340rpx;
}
/* 游客攻略 */
.route-list {
margin-top: 48rpx;
}
.route-list-left,
.route-list-right {
width: 320rpx;
}
.route-item {
display: flex;
flex-direction: column;
max-width: 328rpx;
margin-top: 16rpx;
border-radius: 4rpx;
overflow: hidden;
background: #ffffff;
}
.route-item image {
height: 354rpx;
}
.route-list-right .route-item:first-child image {
height: 354rpx;
}
.route-item-title {
display: -webkit-box;
margin: 32rpx 32rpx 8rpx;
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-content {
margin: 0 32rpx 32rpx 32rpx;
font-size: 22rpx;
color: #959DA9;
} }
\ No newline at end of file

2.82 KB | W: | H:

5.61 KB | W: | H:

pages/play/activity/image/title-2.png
pages/play/activity/image/title-2.png
pages/play/activity/image/title-2.png
pages/play/activity/image/title-2.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -210,7 +210,7 @@ Page({ ...@@ -210,7 +210,7 @@ Page({
swiperMovieCurrent swiperMovieCurrent
}) })
}, },
// 跳转到所有活动
onAllActivity: function () { onAllActivity: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/play/activity/activity' url: '/pages/play/activity/activity'
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperRecentChange"> <swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperRecentChange">
<block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="activity-item" data-item="{{item}}" bindtap="onActivityDetail"> <swiper-item class="activity-item" data-item="{{item}}" bindtap="onActivityDetail">
<image class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image> <image mode="scaleToFill" class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<swiper-item class="movie-item col con-e"> <swiper-item class="movie-item col con-e">
<view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}"> <view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}">
<view class="movie-cover"> <view class="movie-cover">
<image src="{{item.cover}}"></image> <image mode="aspectFill" src="{{item.cover}}"></image>
</view> </view>
<view class="movie-info-wrapper"> <view class="movie-info-wrapper">
<view class="row align-c"> <view class="row align-c">
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
.activity-item image { .activity-item image {
width: 648rpx; width: 648rpx;
height: 721rpx;
background-color: #ccc; background-color: #ccc;
} }
......
...@@ -34,6 +34,7 @@ Page({ ...@@ -34,6 +34,7 @@ Page({
onLoad: function (options) { onLoad: function (options) {
let activityId = options.id let activityId = options.id
this.queryDetail(activityId) this.queryDetail(activityId)
this.setShopInfo(2, 1)
}, },
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
// console.log(funcEvent) // console.log(funcEvent)
...@@ -51,6 +52,31 @@ Page({ ...@@ -51,6 +52,31 @@ Page({
clearTimeout(logicData.pageScrollTimer) clearTimeout(logicData.pageScrollTimer)
}, 10) }, 10)
}, },
/**
* 缓存用户信息
* @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
}
}
},
// 选择标签页日期 // 选择标签页日期
onSelectionStatus: function (event) { onSelectionStatus: function (event) {
console.log(event.currentTarget.dataset.type) console.log(event.currentTarget.dataset.type)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<!-- 电影信息 --> <!-- 电影信息 -->
<view class="movie-wrapper"> <view class="movie-wrapper">
<view class="movie-cover"> <view class="movie-cover">
<image src="{{movieInfo.cover}}"></image> <image mode="aspectFill" src="{{movieInfo.cover}}"></image>
</view> </view>
<view class="movie-info-wrapper"> <view class="movie-info-wrapper">
<view class="movie-name row"> <view class="movie-name row">
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</view> </view>
</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="{{statusList.length === 0}}">
<image src="/image/no-movie.png"></image> <image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text> <text>观影已结束,请期待后续排片</text>
</view> </view>
......
...@@ -52,6 +52,7 @@ Page({ ...@@ -52,6 +52,7 @@ Page({
onLoad: function () { onLoad: function () {
this.getTodayFilm() this.getTodayFilm()
this.getAllFilm() this.getAllFilm()
this.setShopInfo(2, 1)
}, },
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
// console.log(funcEvent) // console.log(funcEvent)
...@@ -69,6 +70,31 @@ Page({ ...@@ -69,6 +70,31 @@ Page({
clearTimeout(logicData.pageScrollTimer) clearTimeout(logicData.pageScrollTimer)
}, 10) }, 10)
}, },
/**
* 缓存用户信息
* @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
}
}
},
/** /**
* 查询今日放映 * 查询今日放映
* @function * @function
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</view> </view>
<view class="row"> <view class="row">
<view class="movie-cover"> <view class="movie-cover">
<image src="{{item.cover}}"></image> <image mode="aspectFill" src="{{item.cover}}"></image>
</view> </view>
<view class="movie-info-wrapper"> <view class="movie-info-wrapper">
<view class="movie-name-wrapper row align-c"> <view class="movie-name-wrapper row align-c">
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<block wx:for="{{movieList.list}}" wx:key="id"> <block wx:for="{{movieList.list}}" wx:key="id">
<view class="all-movie-wrapper" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}"> <view class="all-movie-wrapper" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
<view class="all-movie-cover"> <view class="all-movie-cover">
<image src="{{item.cover}}"></image> <image mode="aspectFill" src="{{item.cover}}"></image>
</view> </view>
<view class="movie-info-wrapper"> <view class="movie-info-wrapper">
<view class="movie-name-wrapper row align-c"> <view class="movie-name-wrapper row align-c">
...@@ -151,7 +151,10 @@ ...@@ -151,7 +151,10 @@
</view> </view>
</block> </block>
</view> </view>
<view class="footer-img"> <view class="footer-img" wx:if="{{movieToday.length > 0 || movieAll.moviewWeek.list.length > 0 || movieAll.movieNextWeek.list.length > 0}}">
<image src="/image/movie-bottom.png"></image>
</view>
<view class="empty-img" wx:else>
<image src="/image/movie-bottom.png"></image> <image src="/image/movie-bottom.png"></image>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -18,7 +18,9 @@ page { ...@@ -18,7 +18,9 @@ page {
height: 60rpx; height: 60rpx;
} }
.contaniner { .contaniner {
position: relative;
margin-top: 200rpx; margin-top: 200rpx;
min-height: calc(100vh - 200rpx);
} }
/* 状态筛选菜单 */ /* 状态筛选菜单 */
...@@ -221,6 +223,12 @@ page { ...@@ -221,6 +223,12 @@ page {
height: 150rpx; height: 150rpx;
margin-top: 64rpx; margin-top: 64rpx;
} }
.empty-img {
position: absolute;
bottom: 0;
width: 750rpx;
height: 150rpx;
}
.show-end { .show-end {
width: 750rpx; width: 750rpx;
......
...@@ -9,7 +9,7 @@ let logicData = { ...@@ -9,7 +9,7 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase,
option: {}, option: {},
// 弹出控制 // 弹出控制
showPopup: false, showPopup: false,
...@@ -42,10 +42,6 @@ Page({ ...@@ -42,10 +42,6 @@ Page({
}, },
navigationScroll: 0, navigationScroll: 0,
// 内容类型 // 内容类型
contentType: 'evaluate', contentType: 'evaluate',
...@@ -60,7 +56,12 @@ Page({ ...@@ -60,7 +56,12 @@ Page({
detailCommodity: [], // 商品 detailCommodity: [], // 商品
detailEvaluate: [], // 评论 detailEvaluate: [], // 评论
officeService: 0,
officeServiceText: '5.0', // 门店服务评分
officeProduct: 0,
officeProductText: '5.0', // 门店产品评分
officeEnvironmental: 0,
officeEnvironmentalText: '5.0', // 门店环境评分
isBlack: false, isBlack: false,
...@@ -80,8 +81,10 @@ Page({ ...@@ -80,8 +81,10 @@ Page({
navigationStyle: this.data.navigationStyleBlack navigationStyle: this.data.navigationStyleBlack
}) })
} else { } else {
this.queryDetailActivity()
this.queryDetailCommodity() this.queryDetailCommodity()
} }
this.getOfficeAppraise()
this.getAppraise() this.getAppraise()
}, },
...@@ -331,11 +334,63 @@ Page({ ...@@ -331,11 +334,63 @@ Page({
// }) // })
// } // }
}, },
// 查询活动详情
queryDetailActivity: function () { queryDetailActivity: function () {
let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer')
let officeId = shopInfo.id
let genre = shopInfo.shopType
App.wxRequest({
url: '/api/v1/activity/getList',
data: {
'listType': '1',
'pageSize': '5',
'pageNo': '1',
'officeId': officeId,
'genre': genre,
},
success: function(res) {
let funcResponse = res.data.list
console.log(funcResponse)
let funcList = []
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'coverImg': funcResponse[i].cover,
'genre': funcResponse[i].genre,
'id': funcResponse[i].id,
'title': funcResponse[i].name,
'officeId': funcResponse[i].officeId,
'price': funcResponse[i].sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'tags': funcResponse[i].tags,
'date': funcResponse[i].activeDate + ' ' + funcResponse[i].activeTime, // 活动时间
'priceType': 1,
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) {
funcItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2
} else {
funcItem.priceType = 3
}
}
console.log(funcItem)
funcList.push(funcItem)
}
that.setData({
detailActivity: funcList
})
}
})
}, },
// 查询商品列表
queryDetailCommodity: function () { queryDetailCommodity: function () {
let that = this let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer') let shopInfo = wx.getStorageSync('shopInfoBuffer')
...@@ -359,13 +414,26 @@ Page({ ...@@ -359,13 +414,26 @@ Page({
'id': funcResponse[i].id, 'id': funcResponse[i].id,
'title': funcResponse[i].name, 'title': funcResponse[i].name,
'officeId': funcResponse[i].officeId, 'officeId': funcResponse[i].officeId,
'price': funcResponse[i].sightseerPrice, // 普通价 'price': funcResponse[i].sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].sightseerPrice), // 普通价文本格式 'priceText': funcResponse[i].sightseerPrice.toFixed(2), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价 'priceSpecial': funcResponse[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式 'priceSpecialText': funcResponse[i].ownerPrice.toFixed(2), // 业主价文本格式
'priceType': 1, 'priceType': 1,
'content': funcResponse[i].synopsis, 'content': funcResponse[i].synopsis,
} }
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) {
funcItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2
} else {
funcItem.priceType = 3
}
}
funcList.push(funcItem) funcList.push(funcItem)
} }
that.setData({ that.setData({
...@@ -374,7 +442,7 @@ Page({ ...@@ -374,7 +442,7 @@ Page({
} }
}) })
}, },
// 查询电影列表
queryDetailMovie: function () { queryDetailMovie: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getAllFilm', url: '/api/v1/film/getAllFilm',
...@@ -398,11 +466,6 @@ Page({ ...@@ -398,11 +466,6 @@ Page({
'movieType': funcResponse[i].filmType, 'movieType': funcResponse[i].filmType,
'movieKeyWord': funcResponse[i].keyword, 'movieKeyWord': funcResponse[i].keyword,
'movieLeader': funcResponse[i].filmLead, 'movieLeader': funcResponse[i].filmLead,
'price': funcResponse[i].visitorPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].visitorPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'priceType': 1,
'tagsId': funcResponse[i].tagIds, 'tagsId': funcResponse[i].tagIds,
'tags': funcResponse[i].tags.split(' '), 'tags': funcResponse[i].tags.split(' '),
} }
...@@ -447,8 +510,8 @@ Page({ ...@@ -447,8 +510,8 @@ Page({
}, },
onContact: function () { onContact: function () {
wx.makePhoneCall({ wx.navigateTo({
phoneNumber: this.data.info.contact url: '/pages/commodity/project-detail/project-detail'
}) })
}, },
...@@ -514,6 +577,13 @@ Page({ ...@@ -514,6 +577,13 @@ Page({
bannerIndex: funcEvent.detail.current bannerIndex: funcEvent.detail.current
}) })
}, },
// 跳转到活动详情
onActivityDetail: function (event) {
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + id,
})
},
// 查询评论列表 // 查询评论列表
getAppraise: function () { getAppraise: function () {
let that = this let that = this
...@@ -526,9 +596,58 @@ Page({ ...@@ -526,9 +596,58 @@ Page({
'officeId': officeId 'officeId': officeId
}, },
success: function(res) { success: function(res) {
let funcData = res.data let funcData = res.data.list
let funcList = []
let officeServiceText = '0'
let officeProductText = '0'
let officeEnvironmentalText = '0'
for (let i=0, l=funcData.length; i<l; i++) {
let funcItem = {
'avatar': funcData[i].headImg, // 头像
'nickName': funcData[i].nickname,
'userType': funcData[i].userType,
'content': funcData[i].content, // 内容
'imgUrls': funcData[i].imgUrls, // 图片
'environmentalEvaluation': funcData[i].environmentalEvaluation, // 环境评分
'productEvaluation': funcData[i].productEvaluation, // 产品评分
'serviceEvaluation': funcData[i].serviceEvaluation, // 服务评分
'createDate': funcData[i].createDate, // 评价时间
'star': Math.floor((funcData[i].environmentalEvaluation + funcData[i].productEvaluation + funcData[i].serviceEvaluation) / 3)
}
funcList.push(funcItem)
}
if (funcList.length === 0) {
officeServiceText = '5.0'
officeProductText = '5.0'
officeEnvironmentalText = '5.0'
that.setData({
officeServiceText,
officeProductText,
officeEnvironmentalText
})
}
that.setData({
detailEvaluate: funcList,
})
}
})
},
// 查询门店评分
getOfficeAppraise: function () {
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id
App.wxRequest({
url: '/api/v1/appraise/getOfficeAppraise',
data: {
'officeId': officeId
},
success: function (response) {
let funcData = response.data
console.log(funcData.serviceEvaluation)
that.setData({ that.setData({
detailEvaluate: funcData.list officeServiceText: funcData.serviceEvaluation.toFixed(1),
officeProductText: funcData.productEvaluatio.toFixed(1),
officeEnvironmentalText: funcData.environmentalEvaluation.toFixed(1),
}) })
} }
}) })
...@@ -543,6 +662,10 @@ Page({ ...@@ -543,6 +662,10 @@ Page({
urls urls
}) })
}, },
// 查看评论全文
onShowMore: function () {
console.log(1)
},
// 点击分享图标 // 点击分享图标
onShare: function () { onShare: function () {
this.setData({ this.setData({
...@@ -571,6 +694,27 @@ Page({ ...@@ -571,6 +694,27 @@ Page({
url: '/pages/commodity/menu-art/menu-art', url: '/pages/commodity/menu-art/menu-art',
}) })
}, },
// 跳转到全部电影
onAllMovie: function () {
wx.navigateTo({
url: '/pages/play/movie/movie',
})
},
// 跳转到所有活动
onAllActivity: function () {
let shopInfo = wx.getStorageSync('shopInfoBuffer')
wx.navigateTo({
url: '/pages/play/activity/activity?officeId=' + shopInfo.id
})
},
// 跳转到电影详情
onMovieDetail: function (event) {
let id = event.currentTarget.dataset.id
console.log(id)
wx.navigateTo({
url: '/pages/play/movie-detail/movie-detail?id=' + id,
})
},
onToBuy: function (event) { onToBuy: function (event) {
let id = event.currentTarget.dataset.id let id = event.currentTarget.dataset.id
let classifyId = event.currentTarget.dataset.classid let classifyId = event.currentTarget.dataset.classid
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view class="commodity-title row align-c"> <view class="commodity-title row align-c">
<text>{{info.name}}</text> <text>{{info.name}}</text>
<image src="{{imageBase + 'icon/share-2.png'}}" bindtap="onShare"></image> <image src="{{imageBase + 'icon/share-2.png'}}" bindtap="onShare"></image>
<image src="{{imageBase + 'icon/location-2.png'}}" bind:tap="onLocation"></image> <image src="{{imageBase + 'icon/location-2.png'}}" bindtap="onLocation"></image>
</view> </view>
<!-- 分享弹出图片 --> <!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}"> <l-popup show="{{showPopup}}" animation="{{false}}">
...@@ -50,25 +50,37 @@ ...@@ -50,25 +50,37 @@
<view class="commodity-card" wx:if="{{option.id === '1' || option.id === '5'}}"> <view class="commodity-card" wx:if="{{option.id === '1' || option.id === '5'}}">
<view class="commodity-card-title row con-b align-e"> <view class="commodity-card-title row con-b align-e">
<text>近期活动</text> <text>近期活动</text>
<text>查看全部</text> <text bindtap="onAllActivity">查看全部</text>
</view> </view>
<view class="commodity-card-list row"> <view class="commodity-card-list row">
<block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col"> <view class="commodity-card-item col" bindtap="onActivityDetail" data-id="{{item.id}}">
<image src=""></image> <image src="{{item.coverImg}}"></image>
<view class="commodity-card-item-title row con-b align-c"> <view class="commodity-card-item-title row con-b align-c">
<text>{{item.title}}</text> <text>{{item.title}}</text>
<text>{{item.tab}}</text> <text>{{item.tags}}</text>
</view> </view>
<view class="commodity-card-item-date row align-c"> <view class="commodity-card-item-date row align-c">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image> <image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.time}}</text> <text>{{item.date}}</text>
</view> </view>
<view class="commodity-card-item-operation row con-b align-c"> <view class="commodity-card-item-operation row con-b align-c">
<view class="row align-c"> <view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>业主价</text> <text>业主价</text>
<text>免费</text> <text class="price-symbol">¥</text>
<text>{{item.price}}</text> <text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view> </view>
<view> <view>
<button class="row con-c align-c">报名</button> <button class="row con-c align-c">报名</button>
...@@ -95,12 +107,22 @@ ...@@ -95,12 +107,22 @@
<text>{{item.content}}</text> <text>{{item.content}}</text>
</view> </view>
<view class="commodity-card-item-operation row con-b align-c"> <view class="commodity-card-item-operation row con-b align-c">
<view class="row align-c"> <view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>业主价</text> <text>业主价</text>
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text> <text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text class="price-unit">/人</text> <text>{{item.priceText}}</text>
<text>{{'¥' + item.priceText}}</text> </view>
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view> </view>
<view> <view>
<button class="row con-c align-c">购买</button> <button class="row con-c align-c">购买</button>
...@@ -119,21 +141,31 @@ ...@@ -119,21 +141,31 @@
</view> </view>
<view class="commodity-card-list row"> <view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col"> <view class="commodity-card-item col" bindtap="onToBuy" data-id="{{item.id}}" data-classid="{{item.classifyId}}">
<image src="{{item.coverImg}}"></image> <image src="{{item.coverImg}}"></image>
<view class="commodity-card-item-title row align-c"> <view class="commodity-card-item-title row align-c">
<text>{{item.title}}</text> <text>{{item.title}}</text>
</view> </view>
<view class="commodity-card-item-operation row con-b align-c"> <view class="commodity-card-item-operation row con-b align-c">
<view class="row align-c"> <view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>业主价</text> <text>业主价</text>
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text> <text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text class="price-unit">/人</text>
<text>{{item.priceText}}</text> <text>{{item.priceText}}</text>
</view> </view>
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view>
<view> <view>
<button class="row con-c align-c" bindtap="onToBuy" data-id="{{item.id}}" data-classid="{{item.classifyId}}">购买</button> <button class="row con-c align-c" catchtap="onToBuy" data-id="{{item.id}}" data-classid="{{item.classifyId}}">购买</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -163,21 +195,24 @@ ...@@ -163,21 +195,24 @@
<view class="evaluate" wx:if="{{contentType === 'evaluate'}}"> <view class="evaluate" wx:if="{{contentType === 'evaluate'}}">
<view class="evaluate-option row con-b align-c"> <view class="evaluate-option row con-b align-c">
<view class="evaluate-option-item row align-c"> <view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/evaluate-1.png'}}"></image> <image wx:if="{{options.id === 2}}" src="{{imageBase + 'icon/evaluate-2.png'}}"></image>
<image wx:else src="{{imageBase + 'icon/evaluate-1.png'}}"></image>
<text>服务</text> <text>服务</text>
<text>0.5</text> <text>{{officeServiceText}}</text>
<text>分</text> <text>分</text>
</view> </view>
<view class="evaluate-option-item row align-c"> <view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/shop-1.png'}}"></image> <image wx:if="{{options.id === 2}}" src="{{imageBase + 'icon/shop-2.png'}}"></image>
<image wx:else src="{{imageBase + 'icon/shop-1.png'}}"></image>
<text>产品</text> <text>产品</text>
<text>0.5</text> <text>{{officeProductText}}</text>
<text>分</text> <text>分</text>
</view> </view>
<view class="evaluate-option-item row align-c"> <view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/album-1.png'}}"></image> <image wx:if="{{options.id === 2}}" src="{{imageBase + 'icon/album-2.png'}}"></image>
<image wx:else src="{{imageBase + 'icon/album-1.png'}}"></image>
<text>环境</text> <text>环境</text>
<text>0.5</text> <text>{{officeEnvironmentalText}}</text>
<text>分</text> <text>分</text>
</view> </view>
</view> </view>
...@@ -186,12 +221,12 @@ ...@@ -186,12 +221,12 @@
<block wx:for="{{detailEvaluate}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailEvaluate}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="evaluate-item col"> <view class="evaluate-item col">
<view class="row"> <view class="row">
<image class="evaluate-item-avatar" src="{{item}}" mode="widthFix"></image> <image class="evaluate-item-avatar" src="{{item.avatar}}" mode="widthFix"></image>
<view class="evaluate-item-info"> <view class="evaluate-item-info">
<view class="evaluate-item-info-text row align-c"> <view class="evaluate-item-info-text row align-c">
<text>{{item.name}}</text> <text>{{item.nickName}}</text>
<text>业主</text> <text style="{{item.userType === '1' ? '' : 'display: none'}}">业主</text>
<text>{{item.date}}</text> <text>{{item.createDate}}</text>
</view> </view>
<view class="evaluate-item-info-star row align-c"> <view class="evaluate-item-info-star row align-c">
<block wx:for="{{item.star}}" wx:for-index="indexStar" wx:for-item="itemStar" wx:key="indexStar"> <block wx:for="{{item.star}}" wx:for-index="indexStar" wx:for-item="itemStar" wx:key="indexStar">
...@@ -205,10 +240,10 @@ ...@@ -205,10 +240,10 @@
<view> <view>
<text>{{item.content}}</text> <text>{{item.content}}</text>
</view> </view>
<view class="evaluate-item-content-more"> <!-- <view class="evaluate-item-content-more row con-b" bindtap="onShowMore">
<text>... </text> <text style="">...</text>
<text>全文</text> <text>{{showMore ? '收起' : '全文'}}</text>
</view> </view> -->
</view> </view>
<view class="evaluate-item-album"> <view class="evaluate-item-album">
...@@ -255,12 +290,12 @@ ...@@ -255,12 +290,12 @@
</view> </view>
</view> </view>
<view class="commodity"> <view class="commodity-movie">
<!-- 详情标题,分享,位置 --> <!-- 详情标题,分享,位置 -->
<view class="commodity-title movie-title row align-c"> <view class="commodity-title movie-title row align-c">
<text>{{info.title}}</text> <text>{{info.title}}</text>
<image src="{{imageBase + 'icon/share-3.png'}}" bindtap="onShare"></image> <image src="{{imageBase + 'icon/share-3.png'}}" bindtap="onShare"></image>
<image src="{{imageBase + 'icon/location-3.png'}}" bind:tap="onLocation"></image> <image src="{{imageBase + 'icon/location-3.png'}}" bindtap="onLocation"></image>
</view> </view>
<!-- 分享弹出图片 --> <!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}"> <l-popup show="{{showPopup}}" animation="{{false}}">
...@@ -284,19 +319,19 @@ ...@@ -284,19 +319,19 @@
</view> </view>
<!-- 背景 --> <!-- 背景 -->
<view class=""> <view class="movie-bg">
<image src="{{appResourcesBase + 'play/service/service-movie.png'}}"></image>
</view> </view>
<!-- 热映影片 --> <!-- 热映影片 -->
<view class="commodity-card"> <view class="commodity-movie-card">
<view class="movie-card-title row con-b align-e"> <view class="movie-card-title row con-b align-e">
<text>热映影片</text> <text>热映影片</text>
<text>查看全部</text> <text bindtap="onAllMovie">查看全部</text>
</view> </view>
<view class="commodity-card-list row"> <view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="movie-card-item col"> <view class="movie-card-item col" bindtap="onMovieDetail" data-id="{{item.name}}">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
<view class="movie-card-item-title row align-c"> <view class="movie-card-item-title row align-c">
<text>{{item.movieName}}</text> <text>{{item.movieName}}</text>
......
...@@ -146,6 +146,11 @@ ...@@ -146,6 +146,11 @@
/* 二期整理样式 */ /* 二期整理样式 */
.commodity-movie {
position: relative;
height: 1380rpx;
}
.commodity-title { .commodity-title {
width: 670rpx; width: 670rpx;
min-height: 76rpx; min-height: 76rpx;
...@@ -196,6 +201,10 @@ ...@@ -196,6 +201,10 @@
} }
/* 近期活动,文创商品 */ /* 近期活动,文创商品 */
.commodity-movie-card {
position: absolute;
top: 420rpx;
}
.commodity-card-title { .commodity-card-title {
margin-top: 80rpx; margin-top: 80rpx;
padding: 0 40rpx; padding: 0 40rpx;
...@@ -204,6 +213,10 @@ ...@@ -204,6 +213,10 @@
margin-top:160rpx; margin-top:160rpx;
padding: 0 40rpx; padding: 0 40rpx;
} }
.movie-bg image{
width: 750rpx;
height: 620rpx;
}
.commodity-card-title text:nth-child(1) { .commodity-card-title text:nth-child(1) {
font-size: 40rpx; font-size: 40rpx;
...@@ -359,7 +372,7 @@ ...@@ -359,7 +372,7 @@
height: 32rpx; height: 32rpx;
margin-right: 12rpx; margin-right: 12rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%); background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4px; border-radius: 4rpx;
text-align: center; text-align: center;
font-size: 18rpx; font-size: 18rpx;
...@@ -376,22 +389,8 @@ ...@@ -376,22 +389,8 @@
line-height: 40rpx; line-height: 40rpx;
} }
.commodity-card-item-operation text:nth-child(1) {
width: 78rpx;
height: 32rpx;
margin-right: 12rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4px;
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 28rpx;
color: #E8D0AF;
}
.commodity-card-item-operation text:nth-child(3) { .commodity-card-item-operation text:nth-child(3) {
margin-right: 16rpx;
text-align: center; text-align: center;
font-size: 30rpx; font-size: 30rpx;
font-weight: 800; font-weight: 800;
...@@ -399,7 +398,7 @@ ...@@ -399,7 +398,7 @@
color: #15191F; color: #15191F;
} }
.commodity-card-item-operation text:nth-child(5) { .commodity-card-item-operation text:nth-child(4) {
text-align: center; text-align: center;
font-size: 22rpx; font-size: 22rpx;
font-weight: 400; font-weight: 400;
...@@ -408,19 +407,13 @@ ...@@ -408,19 +407,13 @@
text-decoration: line-through; text-decoration: line-through;
} }
.price-symbol { .price-symbol {
margin-top: 8rpx; margin-top: 8rpx;
color: #15191F; color: #15191F;
font-size: 18rpx; font-size: 18rpx;
font-weight: 600; font-weight: 600;
} }
.price-unit {
margin-top: 8rpx;
margin-right: 16rpx;
color: #15191F;
font-size: 18rpx;
font-weight: 600;
}
.commodity-card-item-operation button { .commodity-card-item-operation button {
flex-grow: 1; flex-grow: 1;
...@@ -448,7 +441,6 @@ ...@@ -448,7 +441,6 @@
.movie-footer image { .movie-footer image {
width: 750rpx; width: 750rpx;
height: 150rpx; height: 150rpx;
margin-top: 80rpx;
} }
/* 分享弹窗 */ /* 分享弹窗 */
...@@ -520,6 +512,7 @@ ...@@ -520,6 +512,7 @@
/* 详情 */ /* 详情 */
.detail { .detail {
margin-top: 62rpx;
padding-bottom: 160rpx; padding-bottom: 160rpx;
} }
...@@ -578,6 +571,7 @@ ...@@ -578,6 +571,7 @@
width: 670rpx; width: 670rpx;
min-height: 292rpx; min-height: 292rpx;
margin: 48rpx 40rpx 0 40rpx; margin: 48rpx 40rpx 0 40rpx;
border-bottom: 1px solid #E2E7EF;
} }
.evaluate-item-avatar { .evaluate-item-avatar {
...@@ -635,12 +629,15 @@ ...@@ -635,12 +629,15 @@
width: 670rpx; width: 670rpx;
max-height: 132rpx; max-height: 132rpx;
margin-top: 32rpx; margin-top: 32rpx;
overflow: hidden;
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
line-height: 44rpx; line-height: 44rpx;
color: #15191F; color: #15191F;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
} }
.evaluate-item-content-more { .evaluate-item-content-more {
...@@ -651,13 +648,13 @@ ...@@ -651,13 +648,13 @@
height: 44rpx; height: 44rpx;
background: #FFFFFF; background: #FFFFFF;
text-align: right;
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
line-height: 44rpx; line-height: 44rpx;
} }
.evaluate-item-content-more text:nth-child(1) { .evaluate-item-content-more text:nth-child(1) {
text-align: left;
color: #15191F; color: #15191F;
} }
......
...@@ -65,7 +65,7 @@ Page({ ...@@ -65,7 +65,7 @@ Page({
appId: 4, appId: 4,
id: App.globalData.pointInfo[3].id, id: App.globalData.pointInfo[3].id,
name: '原野MOJITO', name: '原野MOJITO',
cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-bg-3-2.png', cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-3-2.png',
logo: App.globalData.appResourcesBase + 'shop/logo-4.png', logo: App.globalData.appResourcesBase + 'shop/logo-4.png',
shopType: '5' shopType: '5'
}] }]
...@@ -77,7 +77,7 @@ Page({ ...@@ -77,7 +77,7 @@ Page({
appId: 2, appId: 2,
id: App.globalData.pointInfo[1].id, id: App.globalData.pointInfo[1].id,
name: '星空影院', name: '星空影院',
cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-bg-4-1.png', cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-4-1.png',
logo: App.globalData.appResourcesBase + 'shop/logo-2.png', logo: App.globalData.appResourcesBase + 'shop/logo-2.png',
shopType: '' shopType: ''
}] }]
......
...@@ -121,11 +121,15 @@ ...@@ -121,11 +121,15 @@
line-height: 52rpx; line-height: 52rpx;
} }
.shop-summary { .shop-summary {
display: -webkit-box;
height: 72rpx; height: 72rpx;
margin: 40rpx 60rpx 0; margin: 40rpx 60rpx 0;
font-size: 26rpx; font-size: 26rpx;
color: #959DA9; color: #959DA9;
line-height: 36rpx; line-height: 36rpx;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
} }
.shop-date { .shop-date {
margin: 80rpx 60rpx 0; margin: 80rpx 60rpx 0;
......
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
"checkSiteMap": false, "checkSiteMap": false,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": true, "useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"enableEngineNative": false "enableEngineNative": false
...@@ -71,82 +71,12 @@ ...@@ -71,82 +71,12 @@
"list": [ "list": [
{ {
"id": -1, "id": -1,
"name": "pages/myActivity/myActivity",
"pathName": "pages/myActivity/myActivity",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/activityDetail/activityDetail",
"pathName": "pages/activityDetail/activityDetail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/login/login",
"pathName": "pages/login/login",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/myAppointment/myAppointment",
"pathName": "pages/myAppointment/myAppointment",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/customerService/customerService",
"pathName": "pages/customerService/customerService",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/ownerCertification/ownerCertification",
"pathName": "pages/ownerCertification/ownerCertification",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/moreProblems/moreProblems",
"pathName": "pages/moreProblems/moreProblems",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/home/home",
"pathName": "pages/mine/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/mine/card/card",
"pathName": "pages/mine/card/card",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/pay/order-comment/order-comment", "name": "pages/pay/order-comment/order-comment",
"pathName": "pages/pay/order-comment/order-comment", "pathName": "pages/pay/order-comment/order-comment",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": 10,
"name": "pages/commodity/project-detail/project-detail",
"pathName": "pages/commodity/project-detail/project-detail",
"query": "",
"scene": null
},
{
"id": 11, "id": 11,
"name": "pages/play/movie/movie", "name": "pages/play/movie/movie",
"pathName": "pages/play/movie/movie", "pathName": "pages/play/movie/movie",
...@@ -168,13 +98,6 @@ ...@@ -168,13 +98,6 @@
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "pages/commodity/shopping-cart/shopping-cart",
"pathName": "pages/commodity/shopping-cart/shopping-cart",
"query": "",
"scene": null
},
{
"id": 15, "id": 15,
"name": "pages/play/point-detail/point-detail", "name": "pages/play/point-detail/point-detail",
"pathName": "pages/play/point-detail/point-detail", "pathName": "pages/play/point-detail/point-detail",
...@@ -210,9 +133,30 @@ ...@@ -210,9 +133,30 @@
"scene": null "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, "id": -1,
"name": "pages/mine/order/order", "name": "pages/play/activity/activity",
"pathName": "pages/mine/order/order", "pathName": "pages/play/activity/activity",
"query": "", "query": "",
"scene": null "scene": null
} }
......
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