Commit 2d4977f3 by wjw

ww-我的预约列表

parents 20488053 61372954
Showing with 1084 additions and 1418 deletions
......@@ -8,13 +8,10 @@ let logicData = {
Page({
data: {
imageBase: App.globalData.appImageBase,
showPopup: false,
winSide: true,
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: [],
detailImageUrl: [
App.globalData.appResourcesBase + 'campsite/campsite-1.png',
......@@ -28,10 +25,8 @@ Page({
},
onLoad: function (options) {
this.setShopInfo(3, 1)
this.setSideHeight()
this.queryDetail()
this.queryActivity()
},
setSideHeight: function () {
......@@ -39,40 +34,11 @@ Page({
sideHeight: this.data.sideHeight * wx.getStorageSync('unitProportion')
})
},
// 获取后台信息
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 () {
wx.pageScrollTo({
scrollTop: 0
......@@ -101,7 +67,6 @@ Page({
this.setData({
winSide: false
})
wx.hideTabBar({animation: true})
}
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
......@@ -115,7 +80,6 @@ Page({
winSide: true,
navigationAnimationShow: 0
})
wx.showTabBar({animation: true})
}
// 恢复滚动事件
......@@ -124,97 +88,4 @@ Page({
clearTimeout(logicData.pageScrollTimer)
}, 40)
},
/**
* 缓存用户信息
* @function
* @param {object} - event
* @returns
*/
setShopInfo: function (funcShopAppId, funcShopType) {
// 获取门店基本信息
let funcShopId = App.globalData.shopId
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcShopAppId === funcShopId[i].appId) {
let funcShopInfo = {
'id': funcShopId[i].id,
'appId': funcShopId[i].appId,
'name': funcShopId[i].title[funcShopType],
'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover,
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
}
},
// 跳转到购买年卡/月卡/次卡界面
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,100 +3,18 @@
<navigation class="navigation" titleText="儿童营地" backIcon="/image/back.png"></navigation>
<view class="container">
<!-- <view class="appointment">
<view class="appointment">
<l-button l-class="appointment-button" bind:lintap="onServic">电话预约</l-button>
</view> -->
</view>
<view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
<!-- <button class="appointment-side-phone" bind:tap="onServic">
<button class="appointment-side-phone" bind:tap="onServic">
<image src="{{imageBase + 'phone.png'}}"></image>
</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 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>
</button>
</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">
<image mode="widthFix" src="{{item}}"></image>
</block>
<image mode="widthFix" src="{{bottomImage}}"></image>
</view>
\ No newline at end of file
......@@ -14,9 +14,9 @@
.appointment-side {
position: fixed;
right: 40rpx;
bottom: 180rpx;
width: 80rpx;
height: 80rpx;
bottom: 74rpx;
width: 112rpx;
height: 224rpx;
}
.appointment-side-top {
......@@ -50,153 +50,3 @@
.container > image {
width: 750rpx;
}
\ No newline at end of file
.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,7 +28,6 @@ Page({
},
onLoad: function (options) {
this.setShopInfo(3, 1)
this.setSideHeight()
this.queryDetail()
this.queryActivity()
......@@ -55,20 +54,20 @@ Page({
// 获取活动信息
queryActivity: function () {
let that = this
let shopInfo = wx.getStorageInfoSync('shopInfoBuffer')
App.wxRequest({
url: '/api/v1/activity/getList',
data: {
'listType': '1',
'pageSize': '5',
'pageNo': '1',
'officeId': shopInfo.id
'tagId': '103'
},
success: function(res) {
let funcData = res.data.list
console.log(funcData)
let childActivity = funcData.filter(v => v.childImg !== '')
console.log(childActivity)
that.setData({
childActivity: funcData
childActivity
})
}
})
......@@ -161,32 +160,15 @@ Page({
})
},
// 跳转到购买饮品界面
onBuySnacks: function (event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
onBuySnacks() {
wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food',
url: '/pages/commodity/menu-snacks/menu-snacks',
})
},
// 跳转到购买文创界面
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
onBuyArt() {
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + id,
url: '/pages/commodity/menu-art/menu-art',
})
},
// 点击分享图标
......
......@@ -53,7 +53,7 @@
<!-- 饮品预订 文创周边-->
<view class="buy-other row con-b">
<!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{3}}">
<view class="buy-snacks row" bindtap="onBuySnacks">
<view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image>
</view>
......@@ -63,7 +63,7 @@
</view>
</view>
<!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt" data-id="{{1}}">
<view class="buy-art row" bindtap="onBuyArt">
<view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image>
</view>
......@@ -77,13 +77,13 @@
<!-- 滚动图片 -->
<!-- 单张图片 -->
<view class="swiper" wx:if="{{childActivity.length <= 1}}">
<image mode="scaleToFill" src="{{childActivity[0].childImg}}"></image>
<image mode="aspectFit" 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>
<image mode="aspectFit" src="{{item.childImg}}"></image>
</swiper-item>
</block>
</swiper>
......
let App = getApp()
let logicData = {
option: {},
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({
data: {
......@@ -20,20 +14,6 @@ Page({
userInfo: {},
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 () {
......@@ -80,21 +60,7 @@ Page({
this.queryCommodity()
if (this.data.shopInfo.appId === 3) this.queryCommodityChild()
},
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 () {
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer')
......@@ -327,8 +293,18 @@ Page({
funcCommodityInfo.isActive = true
wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo])
switch (wx.getStorageSync('shopInfoBuffer').appId) {
case 7:
wx.navigateTo({
url: '/pages/play/service-sell/service-sell'
})
break
default:
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + funcCommodityInfo.typeId
})
}
},
})
\ No newline at end of file
<navigation class="navigation" titleText="{{navbarTitle}}" backIcon="/image/back.png" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<navigation class="navigation" titleText="{{navbarTitle}}" backIcon="/image/back.png"></navigation>
<view class="container con-s" style="background: {{bgColor}}">
<view class="background-img">
......
......@@ -141,7 +141,7 @@
</block>
<view class="commodity-price-operation row con-e align-c">
<button class="row con-c align-c" data-index="{{1}}" data-itemindex="{{index}}" bindtap="onBuy">购买门票</button>
<button class="row con-c align-c" data-index="{{1}}" data-itemindex="{{index}}" bindtap="onBuy">查看服务</button>
</view>
</view>
</view>
......
......@@ -160,7 +160,7 @@ Page({
let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart[funcIndex].quantityMax <= funcShoppingCart[funcIndex].quantity) return
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 1
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 1000
this.setData({
shoppingCart: funcShoppingCart
})
......
// pages/myAppointment/myAppointment.js
const app = getApp()
const App = getApp()
let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({
/**
* 页面的初始数据
*/
data: {
// 导航栏相关属性
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: '100rpx',
},
navigationScroll: 0,
navItem: [
{content:'主题活动',type:'0'},
{
......@@ -17,6 +39,76 @@ Page({
type: '2'
},
],
// 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
// 活动状态(0 未开始 1进行中 2 已结束)
activityList: [
{
orderId: 0,
name: '海滩夏日音乐节',
status: '0',
activeState: '0',
cover: '',
date: '6月30日 10:00-12:00',
address: '云之亭广场外侧',
num: 3,
amount: '326.00'
},
{
orderId: 1,
name: '海滩夏日音乐节',
status: '2',
activeState: '0',
cover: '',
date: '6月30日 10:00-12:00',
address: '云之亭广场外侧',
num: 3,
amount: '326.00'
},
{
orderId: 2,
name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
status: '2',
activeState: '1',
cover: '',
date: '6月30日 10:00-12:00',
address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
num: 3,
amount: '326.00'
},
{
orderId: 2,
name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
status: '3',
activeState: '2',
cover: '',
date: '6月30日 10:00-12:00',
address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
num: 3,
amount: '326.00'
},
{
orderId: 2,
name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
status: '4',
activeState: '1',
cover: '',
date: '6月30日 10:00-12:00',
address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
num: 3,
amount: '326.00'
},
{
orderId: 2,
name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
status: '-1',
activeState: '1',
cover: '',
date: '6月30日 10:00-12:00',
address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
num: 3,
amount: '326.00'
},
],
data: [ // 假数据数组,type=0入园预约,type=1 看房预约
{title:'夜间入园预约',type:'0',time:'6月30日 20:00-24:00',num:3,url:'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'},
{title:'看房预约',type:'1',time:'6月30日',num:3,url:' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'},
......@@ -27,10 +119,14 @@ Page({
// 点击导航切换,默认是全部的
chageNav(e) {
let index = e.currentTarget.dataset.index
if (index === 0) {
this.getActivity()
} else {
this.getList(index)
}
this.setData({
active: index
})
this.getList(index)
},
//预约凭证
gohotelAccommodation(e) {
......@@ -54,10 +150,61 @@ Page({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
})
// this.getList(this.data.active)
this.getActivity()
},
// 页面滚动
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)
},
// 我的活动
getActivity: function () {
let that = this
App.wxRequest({
url: '/api/v1/activity/getMyActivityList',
data: {
activeState: '', //""全部 0 未开始 1进行中 2已结束
pageSize: '10',
pageNo: '1',
type: '1'
},
success: function(res) {
let funcData = res.data.list
let tmpArr = []
funcData.forEach(item => {
let obj = {
orderId: item.orderId,
enrollId: item.enrollId,
name: item.name,
status: item.status, // 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
activeState: item.activeState, // 活动状态(0 未开始 1进行中 2 已结束)
cover: item.cover,
date: item.activeDate + ' ' + item.activeTime,
address: item.address,
num: item.number,
amount: item.totalMoney.toFixed(2)
}
tmpArr.push(obj)
})
that.setData({
activityList: tmpArr
})
}
})
},
// 预约列表/我的预约
getList(index) {
index = index - 1
let type = ''
switch (index) {
case 0:
......@@ -68,7 +215,7 @@ Page({
break;
}
let that = this
app.wxRequest({
App.wxRequest({
url: '/api/v1/subscribe/getList',
data: {
state: '',
......
<!--pages/myAppointment/myAppointment.wxml-->
<navigation class="navigation" titleText="我的预约" backIcon="/image/back.png"></navigation>
<navigation class="navigation" titleText="我的预约" backIcon="/image/back.png" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container all">
<view class="myActivity-container" style="min-height:{{height}}px;">
<view class="myAppointment-nav">
<!-- 遍历头部导航 -->
<view bindtap="chageNav" data-index="{{index}}" wx:for="{{navItem}}" wx:key="index" class="navItem {{index == active? 'active':''}}">{{item.content}}</view>
</view>
<view class="myAppointment-body">
<view class="appointment-wrapper">
<view class="appointment-time">8月15日-7月15日 10:00-12:00</view>
<view class="appointment-activity-content row">
<view class="myAppointment-body" wx:if="{{activityList.length > 0 && active === 0}}">
<block wx:for="{{activityList}}" wx:for-item="activity" wx:for-index="indexActivity" wx:key="orderId">
<!-- 待付款 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '0'}}">
<view class="appointment-time">{{activity.date}}</view>
<view class="appintment-activity-status-pay">
<text>待付款</text>
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src="{{activity.cover}}"></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>{{activity.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{activity.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="cancel-btn">删除报名</view>
<view class="confirm-btn">去支付</view>
</view>
</view>
</view>
<!-- 未开始 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '2' && activity.activeState === '0'}}">
<view class="appointment-time">{{activity.date}}</view>
<view class="appintment-activity-status">
<text>未开始</text>
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src="{{activity.cover}}"></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>{{activity.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{activity.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="confirm-btn">去使用</view>
</view>
</view>
</view>
<!-- 进行中 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '2' && activity.activeState === '1'}}">
<view class="appointment-time">{{activity.date}}</view>
<view class="appintment-activity-status">
<text>进行中</text>
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>{{activity.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{activity.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="confirm-btn">去使用</view>
</view>
</view>
</view>
<!-- 待评价 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '3' && activity.activeState === '2'}}">
<view class="appointment-time">{{activity.date}}</view>
<view class="appintment-activity-status">
<text>待评价</text>
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>{{activity.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{activity.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="confirm-btn">去评价</view>
</view>
</view>
</view>
<!-- 已过期 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '4'}}">
<view class="mask-cancel"></view>
<view class="appointment-time mask-cancel-time">{{activity.date}}</view>
<view class="appintment-activity-status-cancel">
<text>已过期</text>
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>{{activity.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{activity.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + activity.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="cancel-btn cancel-overtime">删除报名</view>
</view>
</view>
</view>
<!-- 已取消 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '-1'}}">
<view class="mask-cancel"></view>
<view class="appointment-time mask-cancel-time">7月15日 10:00-12:00</view>
<view class="appintment-activity-status-cancel">
<text>已取消</text>
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>日落观光游船体验活动</text>
<text>{{activity.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{activity.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>报名人数 3人</text>
<text>{{'共' + activity.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row con-b align-c">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="cancel-btn cancel">删除报名</view>
<view class="confirm-btn confirm-once">再次报名</view>
</view>
</view>
</view>
</block>
</view>
<view class="myAppointment-body" wx:if="{{data.length > 0 && active !== 0}}">
<view class="myAppointment-item" wx:for="{{data}}" wx:key="index">
<image src="{{item.url}}" class="item-img"></image>
<view class="item-content">
<view class="item-title {{item.type == 0 ?'item-num-1' : ''}}">{{item.title}}</view>
<view class="item-time {{item.type == 1 ?'item-time-1' : ''}}">预约时间 {{item.time}}</view>
<view wx:if="{{item.type == 0}}" class="item-num">预约人数 {{item.num}}人</view>
</view>
<view class="noActive" hidden="{{data.length > 0 || active == 1}}">
<view class="button" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view>
</view>
</view>
<view class="noActive" wx:if="{{data.length === 0 && active == 2}}">
<view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view>
<view class="noActive" hidden="{{data.length > 0 || active == 0}}">
<view class="noActive" wx:if="{{data.length === 0 && active == 1}}">
<view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view>
<view class="noActive" wx:if="{{data.length === 0 && active == 0}}">
<view class="noActive-title">暂无活动预约</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view>
</view>
<wxs module="m1">
......
......@@ -33,7 +33,7 @@
/* min-height: 1000rpx; */
height: auto;
/* background-color: rgb(245, 244, 249); */
padding-top: 50rpx;
padding-bottom: 132rpx;
}
.noActive {
......@@ -73,12 +73,68 @@
margin: 0 auto;
margin-top: 64rpx;
}
.myAppointment-item{
width: 670rpx;
height: 360rpx;
margin: auto;
margin-bottom: 50rpx;
background-color: rgb(220, 214, 220);
border-radius: 4px;
position: relative;
overflow: hidden;
}
.item-img{
width: 100%;
position: absolute;
height:360rpx;
}
.item-content{
width: 610rpx;
height: auto;
position: absolute;
bottom: 45rpx;
left: 30rpx;
}
.item-title{
font-size: 36rpx;
line-height: 70rpx;
}
.item-time{
line-height: 48rpx;
font-size: 28rpx;
color: rgb(220, 214, 220);
}
.item-num{
font-size:28rpx ;
color: rgb(220, 214, 220);
line-height: 48rpx;
}
/* 入园标题样式 */
.item-num-1{
color: rgb(244, 254, 255);
}
.item-time-1{
color: rgb(40, 50, 56);
}
.button{
width: 170rpx;
height: 70rpx;
position: absolute;
bottom: 45rpx;
right: 30rpx;
line-height: 70rpx;
text-align: center;
color: white;
background:rgba(255,255,255,0.53);
border-radius: 3px;
font-size: 28rpx;
}
.appointment-wrapper {
position: relative;
width: 670rpx;
height: 360rpx;
margin-top: 78rpx;
margin: auto;
margin: 78rpx auto 0;
padding: 24rpx 32rpx 0;
background-color: #FFFFFF;
border-radius: 4rpx;
......@@ -98,6 +154,32 @@
border-radius: 4rpx;
}
.appintment-activity-status {
color: #86C5E1;
text-align: right;
font-size: 26;
line-height: 36rpx;
}
.appintment-activity-status-pay {
color: #E66060;
font-size: 26;
text-align: right;
line-height: 36rpx;
}
.appintment-activity-status-cancel {
color: #C2C7CF;
font-size: 26;
text-align: right;
line-height: 36rpx;
}
.appointment-activity-content {
margin-top: 20rpx;
}
.appointment-activity-img image {
width: 140rpx;
height: 136rpx;
......@@ -110,16 +192,99 @@
}
.appointment-activity-title {
display: -webkit-box;
color: #15191F;
font-size: 30rpx;
font-weight: 600;
line-height: 42rpx;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.appointment-activity-num {
.appointment-activity-address {
display: -webkit-box;
margin-top: 16rpx;
color: #959DA9;
font-size: 26rpx;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.appointment-activity-num {
margin-left: 32rpx;
color: #959DA9;
font-size: 26rpx;
line-height: 36rpx;
letter-spacing: 2rpx;
}
.appointment-activity-footer {
margin-top: 48rpx;
}
.appointment-activity-price text:nth-child(1) {
color: #15191F;
font-size: 22rpx;
font-weight: 600;
}
.appointment-activity-price text:nth-child(2) {
color: #15191F;
font-size: 30rpx;
font-weight: 600;
}
.cancel-btn {
width: 120rpx;
height: 56rpx;
color: #656E7B;
font-size: 22rpx;
font-weight: 600;
text-align: center;
line-height: 56rpx;
border-radius: 4rpx;
border: 1px solid #C2C7CF;
}
.cancel-overtime {
position: absolute;
z-index: 11;
right: 32rpx;
bottom: 40rpx;
}
.cancel {
position: absolute;
z-index: 11;
right: 172rpx;
bottom: 40rpx;
}
.confirm-btn {
width: 120rpx;
height: 56rpx;
margin-left: 20rpx;
color: #fff;
font-size: 22rpx;
font-weight: 600;
text-align: center;
line-height: 56rpx;
background: #86C5E1;
border-radius: 4rpx;
}
.confirm-once {
position: absolute;
z-index: 11;
right: 32rpx;
bottom: 40rpx;
}
.mask-cancel {
position: absolute;
z-index: 1;
left: 0;
bottom: 0;
width: 670rpx;
height: 332rpx;
background-color: #fff;
opacity: .5;
}
.mask-cancel-time {
background-color: #D9DEE7;
}
/* 入园标题样式 */
......
......@@ -60,6 +60,12 @@ Page({
shopConfig: App.globalData.shopId,
isYearCard: true,
isMonthCard: false,
goodTypeCountData: {}
},
goQuestion: function () {
wx.navigateTo({
url: '/pages/mine/question/question',
})
},
// 跳转订单详情
onOrderDetail: function (event) {
......@@ -225,6 +231,25 @@ Page({
}
})
},
//获取分类统计
getCountByGoodType() {
let that = this
App.wxRequest({
url: '/api/v1/order/getCountByGoodType',
data: {
status: "", //0已过期1待使用2已使用(""全部)
pageNo: 1,
pageSize: -1
},
success: function (res) {
console.log(res, '获取分类统计');
let data = res.data ? res.data : {}
that.setData({
goodTypeCountData: data
})
}
})
},
setUserInfo: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
......@@ -265,6 +290,8 @@ Page({
this.getWillUseOrders()
this.getPermissions()
this.getIntegral()
this.getList()
this.getCountByGoodType()
},
})
} else {
......@@ -418,7 +445,6 @@ Page({
id: item.id,
mobile: item.mobile,
name: item.name,
}
tmpArr.push(obj)
})
......@@ -441,6 +467,11 @@ Page({
url: '/pages/mine/order/order'
})
},
onAppointment: function () {
wx.navigateTo({
url: '/pages/mine/appointment/appointment'
})
},
handleToCard: function () {
console.log('onOrder')
wx.navigateTo({
......
......@@ -99,41 +99,46 @@
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ passBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{passBadge > 0}}">{{passBadge > 99 ? '···' : passBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['1'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['1'] > 0}}">
{{goodTypeCountData['1'] > 99 ? '···' : goodTypeCountData['1']}}</view>
</view>
<text>门票</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ foodBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{foodBadge > 0}}">{{foodBadge > 99 ? '···' : foodBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['2'] > 0}}">
{{goodTypeCountData['2'] > 99 ? '···' : goodTypeCountData['2']}}</view>
</view>
<text>餐饮</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ movieBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{movieBadge > 0}}">{{movieBadge > 99 ? '···' : movieBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['3'] > 0}}">
{{goodTypeCountData['3'] > 99 ? '···' : goodTypeCountData['3']}}</view>
</view>
<text>影票</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ spaBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{spaBadge > 0}}">{{spaBadge > 99 ? '···' : spaBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['4'] > 0}}">
{{goodTypeCountData['4'] > 99 ? '···' : goodTypeCountData['4']}}</view>
</view>
<text>SPA</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ artBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{artBadge > 0}}">{{artBadge > 99 ? '···' : artBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['5'] > 0}}">
{{goodTypeCountData['5'] > 99 ? '···' : goodTypeCountData['5']}}</view>
</view>
<text>文创</text>
</view>
......@@ -141,7 +146,8 @@
<view class="more-wrapper" wx:if="{{myOrder}}}">
<!-- 订单卡片 -->
<!-- 年卡 -->
<view class="pass-wrapper" wx:if="{{myOrder.passOrder}}" bindtap="handleToCard">
<view class="pass-wrapper" wx:if="{{myOrder.passOrder&&myOrder.passOrder.length>0}}"
bindtap="handleToCard">
<image wx:if="{{ myOrder.passOrder[0].cardType==1}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{myOrder.passOrder[0].cardType==2}}" class="card-bg month-bg"
......@@ -172,8 +178,9 @@
</view>
<!-- 商品 -->
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this" data-item="{{item}}"
bindtap="onOrderDetail">
<block wx:if="myOrder.artOrder.orderList.length>0">
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this"
data-item="{{item}}" bindtap="onOrderDetail">
<view class="goods-logo-wrapper row align-c">
<view class="logo-box">
<image mode="aspectFit" src="{{imageResourcesBase+ item.logo}}"></image>
......@@ -187,7 +194,8 @@
</image>
</block>
<block wx:else>
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this">
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k"
wx:key="*this">
</image>
</block>
......@@ -198,7 +206,6 @@
<text>共{{item.smOrderDetails.length}}件</text>
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder">
<text wx:if="{{!showMoreOrder}}">展开更多</text>
......@@ -206,6 +213,7 @@
<image wx:if="{{!showMoreOrder}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</block>
</view>
</view>
<!-- 预约 -->
......@@ -214,7 +222,7 @@
<view class="order-activity-title row align-c">
<text>我的预约</text>
</view>
<view class="row align-c" bindtap="onOrder">
<view class="row align-c" bindtap="onAppointment">
<text>查看全部</text>
<image class="all-order-icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
......@@ -223,7 +231,7 @@
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</view>
</view>
......@@ -231,7 +239,7 @@
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</view>
</view>
......@@ -239,7 +247,7 @@
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</view>
</view>
......@@ -247,7 +255,7 @@
</view>
</view>
<!-- 预约卡片 -->
<view class="appintment">
<view class="appintment" >
<!-- 主题活动 -->
<view class="appointment-wrapper">
<view class="appointment-time">8月15日-7月15日 10:00-12:00</view>
......@@ -265,6 +273,7 @@
</view>
</view>
</view>
<view class="appointment-wrapper">
<view class="appointment-time">
<text>8月15日-7月15日 10:00-12:00</text>
......@@ -298,8 +307,8 @@
</view>
</view>
<view class="border-right"></view>
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view>
<!-- <view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view> -->
</view>
</view>
<!-- 看房预约 -->
......@@ -320,16 +329,15 @@
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreActivity">
<view class="more row align-c con-c" bindtap="onShowMoreActivity" >
<text wx:if="{{!showMoreActivity}}">展开更多</text>
<text wx:else>收起</text>
<image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</view>
<!-- 客服中心 -->
<view class="service row con-b align-c">
<view class="service row con-b align-c" bindtap="goQuestion">
<text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
......
......@@ -132,7 +132,7 @@ Page({
// 映射门店信息
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
if (funcItem.shopName === App.globalData.shopId[i].name) {
if (funcItem.shopName.toLowerCase() === App.globalData.shopId[i].name.toLowerCase()) {
funcItem.shopId = App.globalData.shopId[i].id
funcItem.shopAppId = App.globalData.shopId[i].appId
funcItem.shopLogo = App.globalData.shopId[i].logo
......
......@@ -35,7 +35,7 @@ Page({
buyContentCover: '',
buyContentTitle: '',
buyContentTime: '',
buyContentAmount: '36.00',
buyContentAmount: '',
// 购买清单
shoppingCartList: [],
......@@ -86,6 +86,7 @@ Page({
winStockTip: false,
},
onLoad: function (options) {
console.log(options)
if (options.type) options.type = Number(options.type)
logicData.option = options
......@@ -136,7 +137,6 @@ Page({
this.setData({
orderType: logicData.option.type,
buyContentTitle: this.data.shopInfo.name,
buyContentAmount: '360.00',
quantityTitle: '选择购买数量',
quantityTipText: '剩余库存',
contactTitle: '填写购买人信息',
......@@ -218,11 +218,13 @@ Page({
break
case 6:
wx.setNavigationBarTitle({
title: '活动报名'
})
this.setData({
orderType: logicData.option.type,
buyContentTitle: this.data.shopInfo.name,
noticeText: '报名须知',
buyContentAmount: '36.00',
quantityTitle: '报名人数',
quantityTipText: '剩余库存',
contactTitle: '填写报名信息',
......@@ -246,7 +248,6 @@ Page({
orderType: logicData.option.type,
buyContentTitle: this.data.shopInfo.name,
noticeText: '预约须知',
buyContentAmount: '免费',
quantityTitle: '选择预约座位',
quantityTipText: '剩余座位',
contactTitle: '填写预约信息',
......@@ -309,6 +310,8 @@ Page({
let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer')
console.log(JSON.stringify(funcShoppingCart))
// 设置商品单位价格
let funcPriceUnit = 0
// 设置商品的最终提交价格
let funcPayAmount = 0
for (let i = 0, l = funcShoppingCart.length; i < l; i++) {
......@@ -332,12 +335,14 @@ Page({
break
}
funcPriceUnit = funcShoppingCart[i].priceFinal
if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity
}
this.setData({
shoppingCartList: funcShoppingCart,
payAmount: App.modular.utils.formatAmount(funcPayAmount),
buyContentAmount: funcPriceUnit,
})
console.log('shoppingCartList', this.data.shoppingCartList)
......
......@@ -554,6 +554,7 @@
height: 72rpx;
margin-top: 40rpx;
padding: 0 40rpx;
border-radius: 4px;
background: #F5EEDF;
font-size: 22rpx;
......@@ -973,6 +974,7 @@
.stock-item {
width: 526rpx;
height: 96rpx;
min-height: 96rpx;
margin-top: 64rpx;
}
......
......@@ -38,7 +38,6 @@ Page({
},
onLoad: function (options) {
console.log(options.id)
this.setData({
id: options.id
})
......@@ -51,13 +50,11 @@ Page({
},
onContact: function () {
if (this.data.activeState == 1) {
wx.navigateTo({
url: '/pages/play/activity-entry/activity-entry?id=' + this.data.id
url: '/pages/pay/order-input/order-input?type=6'
})
}
},
/**
......@@ -79,44 +76,19 @@ Page({
url: '/api/v1/activity/getDetail',
data: { id: that.data.id },
success: function (res) {
var funcResponse = res.data
let funcItem = {
'id': funcResponse.id, // 活动标识
'title': funcResponse.name, // 活动名称
'banner': funcResponse.banners, // 活动封面
'quota': funcResponse.enrollNum, // 活动名额
'date': funcResponse.activeDate + ' ' + funcResponse.activeTime, // 活动时间
'price': funcResponse.visitorPrice, // 普通价
'priceText': funcResponse.visitorPrice.toFixed(2), // 普通价文本格式
'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)
var response = res.data
that.setData({
info: funcItem
banner: response.banners,
info: {
title: response.name,
date: response.activeDate + ' ' + response.activeTime,
address: response.address,
quota: response.enrollNum,
describe: response.content,
// contact: response.contact,
}
})
that.configActiveState(funcItem.activeState * 1)
that.configActiveState(response.activeState * 1)
}
})
},
......
......@@ -4,7 +4,7 @@
<view class="container">
<view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" style="{{navigationStyle}}" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{info.banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image>
</swiper-item>
......@@ -25,18 +25,17 @@
<view class="detail-other col">
<view class="row align-c">
<image src="/image/icon/g-time.png"></image>
<text>时间</text>
<text>活动时间</text>
<text>{{info.date}}</text>
</view>
<view style="height:auto;" class="row align-c">
<view style="height:auto;" class="row">
<image src="/image/icon/g-location.png"></image>
<text>地址</text>
<text>活动地址</text>
<text style="height:auto;">{{info.address}}</text>
<image src="/image/icon/arrow-r-1.png"></image>
</view>
<view class="row align-c">
<image src="/image/icon/g-custom.png"></image>
<text>名额</text>
<text>报名名额</text>
<text>{{info.quota}}人</text>
</view>
</view>
......@@ -46,43 +45,7 @@
</view>
</view>
<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>
<view class="contact">
<button class="{{isSubmit ? 'button' : 'button-disable'}} row con-c align-c" size="long" bindtap="onContact">{{stateText}}</button>
</view>
</view>
\ No newline at end of file
......@@ -86,9 +86,9 @@
}
.detail-other view text:nth-child(2) {
width: 60rpx;
width: 120rpx;
height: 42rpx;
margin-right: 24rpx;
margin-right: 32rpx;
font-size: 30rpx;
font-weight: 300;
color: #959DA9;
......@@ -96,18 +96,13 @@
}
.detail-other view text:nth-child(3) {
width: 500rpx;
width: 470rpx;
height: 40rpx;
font-size: 30rpx;
font-weight: 400;
color: #000000;
line-height: 42rpx;
}
.detail-other view image:nth-child(4) {
width: 32rpx;
height: 32rpx;
margin-left: 6rpx;
}
.detail-describe {
width: 670rpx;
......@@ -131,56 +126,8 @@
border-top: 1rpx #E2E7EF solid;
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 {
position: absolute;
right: 40rpx;
width: 200rpx;
width: 670rpx;
height: 96rpx;
margin-bottom: 40rpx;
background: #86C5E1;
......@@ -192,9 +139,7 @@
line-height: 42rpx;
}
.contact .button-disable {
position: absolute;
right: 40rpx;
width: 200rpx;
width: 670rpx;
height: 96rpx;
margin-bottom: 40rpx;
background: #C8E1EC;
......
......@@ -2,65 +2,43 @@ const App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
statusActive: 0,
statusList: [
{
id: 0,
name: '全部'
}, {
id: 1,
name: '亲子教育'
}, {
id: 2,
name: '健康'
}
],
navigationTitle: '主题活动',
option: {},
activity: [],
selectedActivity: [],
other: [],
shopInfo: {},
},
onLoad: function (option) {
var that = this
console.log(option)
if (option.officeId) {
App.login({
success: function () {
that.getActivityList(1, option.officeId)
that.getActivityList(0, option.officeId)
}
})
} else {
App.login({
success: function () {
that.getActivityList(1)
that.getActivityList(0)
}
})
}
onLoad: function (options) {
console.log(options.fromPage)
if (options.fromPage === 'serviceDetail') this.setData({ shopInfo: wx.getStorageSync('shopInfoBuffer')})
this.getActivityList(1)
this.getActivityList(0)
},
onActivityDetail: function (funcItem) {
console.log('onActivityDetail')
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.id
})
},
//主题活动列表 type 1 近期 0 往期
getActivityList(type, officeId) {
var that = this
App.wxRequest({
url: '/api/v1/activity/getList',
data: {
getActivityList(type) {
let funcParam = {
listType: type,
pageSize: 20,
pageNo: 1,
officeId: officeId
},
}
if (this.data.shopInfo.id) funcParam.officeId = this.data.shopInfo.id
var that = this
App.wxRequest({
url: '/api/v1/activity/getList',
data: funcParam,
success: function (res) {
var tmpArr = [];
res.data.list.forEach(item => {
......@@ -71,27 +49,6 @@ Page({
date: item.activeDate,//'6月30日-7月12日 10:00-12:00',
describe: item.summary,
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)
})
......@@ -103,10 +60,8 @@ Page({
// })
if (type == 1) {
// that.setTabs(tmpArr)
that.setData({
activity: tmpArr,
selectedActivity: tmpArr
activity: tmpArr
})
} else {
that.setData({
......@@ -115,46 +70,5 @@ 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="{{navigationTitle}}" background="#ffffff" backIcon="/image/back.png"></navigation>
<navigation class="navigation" titleText="主题活动" background="#ffffff" backIcon="/image/back.png"></navigation>
<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}}">
<!-- <view class="title row">
<view class="title row">
<image src="./image/title.png"></image>
</view> -->
</view>
<view class="list">
<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-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="item-info col">
<view class="item-title row con-b align-c">
<text>{{item.title}}</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>
<text class="item-title">{{item.title}}</text>
<text class="item-date">{{item.date}}</text>
<text class="item-describe">{{item.describe}}</text>
</view>
</view>
</block>
......@@ -69,7 +28,7 @@
<image src="./image/title-2.png"></image>
</view>
<!-- <view class="other row" >
<view class="other row" >
<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>
......@@ -82,39 +41,6 @@
</view>
</block>
<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>
</block>
</view>
\ No newline at end of file
......@@ -6,47 +6,9 @@
.container {
margin-top: 120rpx;
padding-bottom: 100rpx;
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 {
width: 750rpx;
height: 96rpx;
......@@ -55,19 +17,19 @@
}
.title image {
width: 138rpx;
width: 184rpx;
height: 96rpx;
}
/* 活动列表 */
.list {
padding: 0rpx 40rpx 50rpx 40rpx;
padding: 0 40rpx 50rpx 40rpx;
}
.item {
width: 670rpx;
height: 708rpx;
margin-top: 64rpx;
height: 644rpx;
margin-top: 48rpx;
border-radius: 2px;
overflow: hidden;
background: #ffffff;
......@@ -78,15 +40,13 @@
}
.item-title {
height: 44rpx;
margin-top: 32rpx;
}
.item-title text:nth-child(1) {
width: 606rpx;
height: 48rpx;
margin-top: 30rpx;
font-size: 34rpx;
font-weight: bold;
color: #15191F;
line-height: 44rpx;
line-height: 48rpx;
display: -webkit-box;
overflow: hidden;
white-space: normal;
......@@ -96,43 +56,22 @@
-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 {
width: 606rpx;
height: 40rpx;
margin-top: 8rpx;
height: 36rpx;
margin-top: 24rpx;
font-size: 26rpx;
color: #656E7B;
line-height: 40rpx;
}
.item-date image {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
color: #15191F;
line-height: 36rpx;
}
.item-describe {
width: 606rpx;
height: 80rpx;
height: 72rpx;
margin-top: 16rpx;
font-size: 26rpx;
color: #959DA9;
line-height: 40rpx;
line-height: 36rpx;
display: -webkit-box;
overflow: hidden;
white-space: normal;
......@@ -142,62 +81,6 @@
-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 {
width: 670rpx;
height: 376rpx;
......@@ -245,51 +128,3 @@
width: 286rpx;
height: 340rpx;
}
\ No newline at end of file
/* 游客攻略 */
.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

5.61 KB | W: | H:

2.82 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
......@@ -104,9 +104,10 @@ Page({
App.wxRequest({
url: '/api/v1/film/getAllFilm',
data: {
'weekType': 0,
'pageSize': 10,
'pageNo': 1,
'pageNo': '1',
'pageSize': '-1',
'weekType': '0',
'tagIds': '102'
},
success: (response) => {
let funcResponse = response.data.list
......@@ -210,7 +211,7 @@ Page({
swiperMovieCurrent
})
},
// 跳转到所有活动
onAllActivity: function () {
wx.navigateTo({
url: '/pages/play/activity/activity'
......
......@@ -24,7 +24,7 @@
<swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperRecentChange">
<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">
<image mode="scaleToFill" class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image>
<image mode="aspectFill" class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image>
</swiper-item>
</block>
</swiper>
......
......@@ -105,7 +105,7 @@
.activity-item image {
width: 648rpx;
height: 721rpx;
height: 720rpx;
background-color: #ccc;
}
......
......@@ -34,7 +34,6 @@ Page({
onLoad: function (options) {
let activityId = options.id
this.queryDetail(activityId)
this.setShopInfo(2, 1)
},
onPageScroll: function (funcEvent) {
// console.log(funcEvent)
......@@ -52,31 +51,6 @@ Page({
clearTimeout(logicData.pageScrollTimer)
}, 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) {
console.log(event.currentTarget.dataset.type)
......
......@@ -22,7 +22,7 @@
<!-- 电影信息 -->
<view class="movie-wrapper">
<view class="movie-cover">
<image mode="aspectFill" src="{{movieInfo.cover}}"></image>
<image src="{{movieInfo.cover}}"></image>
</view>
<view class="movie-info-wrapper">
<view class="movie-name row">
......@@ -56,7 +56,7 @@
</view>
</view>
<!-- 无场次 -->
<view class="show-end col align-c" wx:if="{{statusList.length === 0}}">
<view class="show-end col align-c" wx:if="{{showList[0].length === 0 && showList[1].length === 0}}">
<image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text>
</view>
......
......@@ -52,7 +52,6 @@ Page({
onLoad: function () {
this.getTodayFilm()
this.getAllFilm()
this.setShopInfo(2, 1)
},
onPageScroll: function (funcEvent) {
// console.log(funcEvent)
......@@ -71,31 +70,6 @@ Page({
}, 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
* @param
......
......@@ -25,7 +25,7 @@
</view>
<view class="row">
<view class="movie-cover">
<image mode="aspectFill" src="{{item.cover}}"></image>
<image src="{{item.cover}}"></image>
</view>
<view class="movie-info-wrapper">
<view class="movie-name-wrapper row align-c">
......@@ -97,7 +97,7 @@
<block wx:for="{{movieList.list}}" wx:key="id">
<view class="all-movie-wrapper" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
<view class="all-movie-cover">
<image mode="aspectFill" src="{{item.cover}}"></image>
<image src="{{item.cover}}"></image>
</view>
<view class="movie-info-wrapper">
<view class="movie-name-wrapper row align-c">
......@@ -151,10 +151,7 @@
</view>
</block>
</view>
<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>
<view class="footer-img">
<image src="/image/movie-bottom.png"></image>
</view>
</view>
\ No newline at end of file
......@@ -18,9 +18,7 @@ page {
height: 60rpx;
}
.contaniner {
position: relative;
margin-top: 200rpx;
min-height: calc(100vh - 200rpx);
}
/* 状态筛选菜单 */
......@@ -223,12 +221,6 @@ page {
height: 150rpx;
margin-top: 64rpx;
}
.empty-img {
position: absolute;
bottom: 0;
width: 750rpx;
height: 150rpx;
}
.show-end {
width: 750rpx;
......
......@@ -9,7 +9,7 @@ let logicData = {
Page({
data: {
imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase,
option: {},
// 弹出控制
showPopup: false,
......@@ -42,6 +42,10 @@ Page({
},
navigationScroll: 0,
// 内容类型
contentType: 'evaluate',
......@@ -52,44 +56,95 @@ Page({
info: {},
shopInfo: {},
detailActivity: [], // 活动
detailCommodity: [], // 商品
detailEvaluate: [], // 评论
officeService: 0,
officeServiceText: '5.0', // 门店服务评分
officeProduct: 0,
officeProductText: '5.0', // 门店产品评分
officeEnvironmental: 0,
officeEnvironmentalText: '5.0', // 门店环境评分
isBlack: false,
sideHeight: 550,
winSide: true,
commodityTitle: '',
winActivity: false, // 近期活动
winCommodity: false, // 商品列表
winCommodityMenu: false,
},
onLoad: function (options) {
this.setData({
option: options
option: options,
})
console.log('shopId', Number(options.id))
this.queryDetail(Number(options.id))
if (Number(options.id) === 2) {
this.queryDetailMovie()
// 根据商店查询相关订制内容
switch (Number(options.id)) {
case 1:
this.queryCommodity()
this.queryActivity()
this.setData({
commodityTitle: '文创商品',
})
break
case 2:
this.queryMovie()
this.setData({
navigationStyle: this.data.navigationStyleBlack
})
} else {
this.queryDetailActivity()
this.queryDetailCommodity()
break
case 3:
this.queryActivity()
this.setData({
commodityTitle: '拾光花坊',
winCommodityMenu: true
})
break
case 4:
this.setData({
commodityTitle: '原野MOJITO',
})
break
case 5:
this.queryActivity()
this.setData({
commodityTitle: '拾光花坊',
winCommodityMenu: true
})
break
case 6:
this.setData({
commodityTitle: '原味舒食',
})
break
case 7:
this.queryCommodity()
this.setData({
commodityTitle: 'SPA服务',
})
break
default:
this.queryCommodity()
}
this.getOfficeAppraise()
this.getAppraise()
},
/**
* 获取 banner 渲染数据
* 获取商店信息,缓存商店信息
* @function
* @param {string} - funcToken
* @returns
......@@ -255,6 +310,8 @@ Page({
contact: '13316748039'
}
]
// 查询景点信息
App.wxRequest({
url: '/api/v1/park/getList',
success: function(res) {
......@@ -308,119 +365,73 @@ Page({
'shopType': this.data.option.type
}
wx.setStorageSync('shopInfoBuffer', funcItem)
this.setData({
shopInfo: funcItem
})
break
}
}
// this.setData({
// banner: funcDetail[funcIndex].banner,
// shareImage: funcDetail[funcIndex].shareImage,
// info: {
// id: funcDetail[funcIndex].id,
// name: funcDetail[funcIndex].name,
// title: funcDetail[funcIndex].title,
// date: funcDetail[funcIndex].date,
// describe: funcDetail[funcIndex].describe,
// contact: funcDetail[funcIndex].contact,
// },
// detailActivity: funcDetail[funcIndex].activity,
// detailCommodity: funcDetail[funcIndex].commodity,
// detailEvaluate: funcDetail[funcIndex].evaluate,
// })
// if (this.data.info.id === 6) {
// this.setData({
// isBlack: true
// })
// }
},
// 查询活动详情
queryDetailActivity: function () {
let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer')
let officeId = shopInfo.id
let genre = shopInfo.shopType
/**
* 获取近期活动
* @function
* @param {string} - funcToken
* @returns
*/
queryActivity: function () {
App.wxRequest({
url: '/api/v1/activity/getList',
data: {
'listType': '1',
'pageSize': '5',
'listType': 1,
'pageSize': 10,
'pageNo': '1',
'officeId': officeId,
'genre': genre,
'tagId': '',
'officeId': this.data.shopInfo.id,
},
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
success: (response) => {
console.log(JSON.stringify(response))
this.setData({
winActivity: true
})
}
})
},
// 查询商品列表
queryDetailCommodity: function () {
let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer')
let officeId = shopInfo.id
let genre = shopInfo.shopType
/**
* 获取商品列表
* @function
* @param
* @returns
*/
queryCommodity: function () {
App.wxRequest({
url: '/api/v1/commodity/recommend',
data: {
'officeId': officeId,
'genre': genre,
'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType,
'tag': '201'
},
success: function(res) {
let funcResponse = res.data
let funcList = []
success: (response) => {
let funcCommodityList = []
let funcResponse = response.data
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'classifyId': funcResponse[i].classifyId,
'coverImg': funcResponse[i].coverImg,
'genre': funcResponse[i].genre,
'id': funcResponse[i].id,
'title': funcResponse[i].name,
'officeId': funcResponse[i].officeId,
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].genre, // 商品分类标识
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
'price': funcResponse[i].sightseerPrice, // 普通价
'priceText': funcResponse[i].sightseerPrice.toFixed(2), // 普通价文本格式
'priceText': App.modular.utils.formatAmount(funcResponse[i].sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价
'priceSpecialText': funcResponse[i].ownerPrice.toFixed(2), // 业主价文本格式
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'priceDiscount': funcResponse[i].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].price), // 活动价文本格式
'priceType': 1,
'content': funcResponse[i].synopsis,
'describe': funcResponse[i].synopsis,
'describeDetail': '', // 商品描述详情,在点击详情时获得数据
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
......@@ -434,16 +445,24 @@ Page({
funcItem.priceType = 3
}
}
funcList.push(funcItem)
funcCommodityList.push(funcItem)
}
that.setData({
detailCommodity: funcList
this.setData({
detailCommodity: funcCommodityList,
winCommodity: true,
})
}
})
},
// 查询电影列表
queryDetailMovie: function () {
/**
* 获取电影列表
* @function
* @param
* @returns
*/
queryMovie: function () {
App.wxRequest({
url: '/api/v1/film/getAllFilm',
data: {
......@@ -466,6 +485,11 @@ Page({
'movieType': funcResponse[i].filmType,
'movieKeyWord': funcResponse[i].keyword,
'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,
'tags': funcResponse[i].tags.split(' '),
}
......@@ -480,6 +504,44 @@ Page({
})
},
/**
* 查询评论列表
* @function
* @param
* @returns
*/
getAppraise: function () {
App.wxRequest({
url: '/api/v1/appraise/getList',
data: {
'pageNo': '1',
'pageSize': '-1',
'officeId': this.data.shopInfo.id
},
success: (res) => {
let funcData = res.data
this.setData({
detailEvaluate: funcData.list
})
}
})
},
onBuy: function (event) {
let funcCommodityInfo = event.currentTarget.dataset.item
// 补充必要参数
funcCommodityInfo.quantity = 1
funcCommodityInfo.quantityMin = 1
funcCommodityInfo.quantityMax = 1
funcCommodityInfo.isActive = true
wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo])
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + funcCommodityInfo.typeId
})
},
onLocation: function () {
wx.navigateTo({
url: '/pages/home/guide/guide?id=' + Number(this.data.option.id)
......@@ -510,8 +572,8 @@ Page({
},
onContact: function () {
wx.navigateTo({
url: '/pages/commodity/project-detail/project-detail'
wx.makePhoneCall({
phoneNumber: this.data.info.contact
})
},
......@@ -577,80 +639,7 @@ Page({
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 () {
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id
App.wxRequest({
url: '/api/v1/appraise/getList',
data: {
'pageNo': '1',
'pageSize': '-1',
'officeId': officeId
},
success: function(res) {
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
that.setData({
officeServiceText: funcData.serviceEvaluation.toFixed(1),
officeProductText: funcData.productEvaluatio.toFixed(1),
officeEnvironmentalText: funcData.environmentalEvaluation.toFixed(1),
})
}
})
},
// 预览图片
onPreviewImage: function(e) {
const current = e.currentTarget.dataset.url
......@@ -661,10 +650,6 @@ Page({
urls
})
},
// 查看评论全文
onShowMore: function () {
console.log(1)
},
// 点击分享图标
onShare: function () {
this.setData({
......@@ -693,32 +678,34 @@ Page({
url: '/pages/commodity/menu-art/menu-art',
})
},
// 跳转到全部电影
onAllMovie: function () {
/**
* banner 查看全部活动
* @function
* @param {object} - funcEvent
* @returns
*/
onActivityAll: function () {
wx.navigateTo({
url: '/pages/play/movie/movie',
url: '/pages/play/activity/activity?fromPage=serviceDetail',
})
},
// 跳转到所有活动
onAllActivity: function () {
let shopInfo = wx.getStorageSync('shopInfoBuffer')
/**
* banner 查看全部商品
* @function
* @param
* @returns
*/
onCommodityAll: function () {
wx.navigateTo({
url: '/pages/play/activity/activity?officeId=' + shopInfo.id
url: '/pages/commodity/menu-food/menu-food',
})
},
// 跳转到电影详情
onMovieDetail: function (event) {
let id = event.currentTarget.dataset.id
console.log(id)
onMovieAll: function () {
wx.navigateTo({
url: '/pages/play/movie-detail/movie-detail?id=' + id,
url: '/pages/play/movie/movie',
})
},
onToBuy: function (event) {
let id = event.currentTarget.dataset.id
let classifyId = event.currentTarget.dataset.classid
wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food?commodityId=' + id + '&sideBarId=' + classifyId
})
}
})
\ No newline at end of file
......@@ -23,7 +23,7 @@
<view class="commodity-title row align-c">
<text>{{info.name}}</text>
<image src="{{imageBase + 'icon/share-2.png'}}" bindtap="onShare"></image>
<image src="{{imageBase + 'icon/location-2.png'}}" bindtap="onLocation"></image>
<image src="{{imageBase + 'icon/location-2.png'}}" bind:tap="onLocation"></image>
</view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
......@@ -47,40 +47,28 @@
</view>
<!-- 近期活动 -->
<view class="commodity-card" wx:if="{{option.id === '1' || option.id === '5'}}">
<view class="commodity-card" wx:if="{{winActivity}}">
<view class="commodity-card-title row con-b align-e">
<text>近期活动</text>
<text bindtap="onAllActivity">查看全部</text>
<text bindtap="onActivityAll">查看全部</text>
</view>
<view class="commodity-card-list row">
<block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col" bindtap="onActivityDetail" data-id="{{item.id}}">
<image src="{{item.coverImg}}"></image>
<view class="commodity-card-item col">
<image src="{{item.cover}}"></image>
<view class="commodity-card-item-title row con-b align-c">
<text>{{item.title}}</text>
<text>{{item.tags}}</text>
<text>{{item.tab}}</text>
</view>
<view class="commodity-card-item-date row align-c">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.date}}</text>
<text>{{item.time}}</text>
</view>
<view class="commodity-card-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}}">
<view class="row align-c">
<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>
<text>免费</text>
<text>{{item.price}}</text>
</view>
<view>
<button class="row con-c align-c">报名</button>
......@@ -88,84 +76,61 @@
</view>
</view>
</block>
<block wx:if="{{detailActivity.length === 0}}">
<view class="commodity-card-item-nothing row con-c align-c">
<text>近期暂无活动安排</text>
</view>
</block>
</view>
</view>
<!-- SPA服务 -->
<view class="commodity-card" wx:if="{{option.id === '7'}}">
<!-- 商品 -->
<view class="commodity-card" wx:if="{{winCommodity}}">
<view class="commodity-card-title row con-b align-e">
<text>SPA服务</text>
<text bindtap="">查看全部</text>
<text>{{commodityTitle}}</text>
<text bindtap="onCommodityAll">查看全部</text>
</view>
<view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col">
<image src=""></image>
<image src="{{item.cover}}"></image>
<view class="commodity-card-item-title row con-b align-c">
<text>{{item.title}}</text>
<text>{{item.name}}</text>
</view>
<view class="commodity-card-item-date row align-c">
<text>{{item.content}}</text>
<text>{{item.describe}}</text>
</view>
<view class="commodity-card-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">购买</button>
</view>
</view>
</view>
</block>
</view>
</view>
<!-- 文创商品 -->
<view class="commodity-card" wx:if="{{option.id === '1'}}">
<view class="commodity-card-title row con-b align-e">
<text>文创商品</text>
<text bindtap="onArtAll">查看全部</text>
</view>
<view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col" bindtap="onToBuy" data-id="{{item.id}}" data-classid="{{item.classifyId}}">
<image src="{{item.coverImg}}"></image>
<view class="commodity-card-item-title row align-c">
<text>{{item.title}}</text>
</view>
<view class="commodity-card-item-operation row con-b align-c">
<!-- 活动价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>活动价</text>
<text class="detail-price-discount">活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
<text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
<text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text>
</view>
<!-- 业主价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>业主价</text>
<text class="detail-price-special">业主价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
<text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text>
</view>
<!-- 普通价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="">业主价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
<text class="price-unit">/人</text>
<text></text>
</view>
<view>
<button class="row con-c align-c" catchtap="onToBuy" data-id="{{item.id}}" data-classid="{{item.classifyId}}">购买</button>
<button class="row con-c align-c" data-item="{{item}}" bindtap="onBuy">购买</button>
</view>
</view>
</view>
......@@ -174,6 +139,10 @@
</view>
</view>
<view class="commodity-menu" wx:if="{{winCommodityMenu}}">
<view></view>
</view>
<!-- 简介,评价 -->
<view class="selection-content row">
<view class="row align-c {{contentType === 'detail' ? 'selection-content-item-active' : 'selection-content-item'}}" data-type="detail" bindtap="onSelectionContent">
......@@ -197,19 +166,19 @@
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/evaluate-1.png'}}"></image>
<text>服务</text>
<text>{{officeServiceText}}</text>
<text>0.5</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/shop-1.png'}}"></image>
<text>产品</text>
<text>{{officeProductText}}</text>
<text>0.5</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/album-1.png'}}"></image>
<text>环境</text>
<text>{{officeEnvironmentalText}}</text>
<text>0.5</text>
<text>分</text>
</view>
</view>
......@@ -218,12 +187,12 @@
<block wx:for="{{detailEvaluate}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="evaluate-item col">
<view class="row">
<image class="evaluate-item-avatar" src="{{item.avatar}}" mode="widthFix"></image>
<image class="evaluate-item-avatar" src="{{item}}" mode="widthFix"></image>
<view class="evaluate-item-info">
<view class="evaluate-item-info-text row align-c">
<text>{{item.nickName}}</text>
<text style="{{item.userType === '1' ? '' : 'display: none'}}">业主</text>
<text>{{item.createDate}}</text>
<text>{{item.name}}</text>
<text>业主</text>
<text>{{item.date}}</text>
</view>
<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">
......@@ -237,10 +206,10 @@
<view>
<text>{{item.content}}</text>
</view>
<!-- <view class="evaluate-item-content-more row con-b" bindtap="onShowMore">
<text style="">...</text>
<text>{{showMore ? '收起' : '全文'}}</text>
</view> -->
<view class="evaluate-item-content-more">
<text>... </text>
<text>全文</text>
</view>
</view>
<view class="evaluate-item-album">
......@@ -270,7 +239,7 @@
</view>
<!-- 星空影院 -->
<view class="container movie" wx:else>
<view class="container movie" wx:if="{{option.id === '2'}}">
<view id="banner" class="banner">
<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">
......@@ -287,12 +256,12 @@
</view>
</view>
<view class="commodity-movie">
<view class="commodity">
<!-- 详情标题,分享,位置 -->
<view class="commodity-title movie-title row align-c">
<text>{{info.title}}</text>
<image src="{{imageBase + 'icon/share-3.png'}}" bindtap="onShare"></image>
<image src="{{imageBase + 'icon/location-3.png'}}" bindtap="onLocation"></image>
<image src="{{imageBase + 'icon/location-3.png'}}" bind:tap="onLocation"></image>
</view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
......@@ -316,19 +285,19 @@
</view>
<!-- 背景 -->
<view class="movie-bg">
<image src="{{appResourcesBase + 'play/service/service-movie.png'}}"></image>
<view class="">
</view>
<!-- 热映影片 -->
<view class="commodity-movie-card">
<view class="commodity-card">
<view class="movie-card-title row con-b align-e">
<text>热映影片</text>
<text bindtap="onAllMovie">查看全部</text>
<text bindtap="onMovieAll">查看全部</text>
</view>
<view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="movie-card-item col" bindtap="onMovieDetail" data-id="{{item.name}}">
<view class="movie-card-item col">
<image src="{{item.cover}}"></image>
<view class="movie-card-item-title row align-c">
<text>{{item.movieName}}</text>
......@@ -367,7 +336,6 @@
<image src="/image/movie-bottom.png"></image>
</view>
<!-- 简介,评价 -->
<view class="selection-content movie-border row">
<view class="row align-c {{contentType === 'detail' ? 'selection-content-item-active-movie' : 'selection-content-item'}}" data-type="detail" bindtap="onSelectionContent">
......
......@@ -146,11 +146,6 @@
/* 二期整理样式 */
.commodity-movie {
position: relative;
height: 1380rpx;
}
.commodity-title {
width: 670rpx;
min-height: 76rpx;
......@@ -201,10 +196,6 @@
}
/* 近期活动,文创商品 */
.commodity-movie-card {
position: absolute;
top: 420rpx;
}
.commodity-card-title {
margin-top: 80rpx;
padding: 0 40rpx;
......@@ -213,10 +204,6 @@
margin-top:160rpx;
padding: 0 40rpx;
}
.movie-bg image{
width: 750rpx;
height: 620rpx;
}
.commodity-card-title text:nth-child(1) {
font-size: 40rpx;
......@@ -242,6 +229,12 @@
width: 0;
}
.commodity-card-item-nothing {
width: 670rpx;
height: 544rpx;
background: #F5F6F8;
}
.commodity-card-item {
width: 562rpx;
margin-right: 24rpx;
......@@ -330,6 +323,21 @@
white-space: nowrap;
}
/* 能量补给跳转 */
.commodity-menu {
width: 750rpx;
height: 256rpx;
padding: 0 40rpx;
border-radius: 4px;
overflow: hidden;
}
.commodity-menu > view {
width: 670rpx;
height: 256rpx;
background: #999999;
}
.movie-card-item-info {
height: 33rpx;
margin-top: 10rpx;
......@@ -372,7 +380,7 @@
height: 32rpx;
margin-right: 12rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4rpx;
border-radius: 4px;
text-align: center;
font-size: 18rpx;
......@@ -389,8 +397,22 @@
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) {
margin-right: 16rpx;
text-align: center;
font-size: 30rpx;
font-weight: 800;
......@@ -398,7 +420,7 @@
color: #15191F;
}
.commodity-card-item-operation text:nth-child(4) {
.commodity-card-item-operation text:nth-child(5) {
text-align: center;
font-size: 22rpx;
font-weight: 400;
......@@ -407,13 +429,19 @@
text-decoration: line-through;
}
.price-symbol {
margin-top: 8rpx;
color: #15191F;
font-size: 18rpx;
font-weight: 600;
}
.price-unit {
margin-top: 8rpx;
margin-right: 16rpx;
color: #15191F;
font-size: 18rpx;
font-weight: 600;
}
.commodity-card-item-operation button {
flex-grow: 1;
......@@ -441,6 +469,7 @@
.movie-footer image {
width: 750rpx;
height: 150rpx;
margin-top: 80rpx;
}
/* 分享弹窗 */
......@@ -512,7 +541,6 @@
/* 详情 */
.detail {
margin-top: 62rpx;
padding-bottom: 160rpx;
}
......@@ -571,7 +599,6 @@
width: 670rpx;
min-height: 292rpx;
margin: 48rpx 40rpx 0 40rpx;
border-bottom: 1px solid #E2E7EF;
}
.evaluate-item-avatar {
......@@ -629,15 +656,12 @@
width: 670rpx;
max-height: 132rpx;
margin-top: 32rpx;
overflow: hidden;
font-size: 26rpx;
font-weight: 400;
line-height: 44rpx;
color: #15191F;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.evaluate-item-content-more {
......@@ -648,13 +672,13 @@
height: 44rpx;
background: #FFFFFF;
text-align: right;
font-size: 26rpx;
font-weight: 400;
line-height: 44rpx;
}
.evaluate-item-content-more text:nth-child(1) {
text-align: left;
color: #15191F;
}
......@@ -687,3 +711,32 @@
margin-right: 0;
border: 1px red solid;
}
/* 价格样式 */
.detail-price-discount {
width: 90rpx;
height: 36rpx;
margin-right: 16rpx;
border-radius: 4px;
background: #FAEDEA;
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 32rpx;
color: #EF4E4E;
}
.detail-price-special {
width: 90rpx;
height: 36rpx;
margin-right: 16rpx;
border-radius: 4px;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 32rpx;
color: #E8D0AF;
}
\ No newline at end of file
let App = getApp()
Page({
data: {
bannerIndex: 0,
......@@ -26,7 +28,7 @@ Page({
}
},
onLoad: function (options) {
this.queryCommodityDetail()
},
/**
* banner 切换图片同步自定义标识组件
......@@ -47,5 +49,22 @@ Page({
*/
onLocation: function () {
console.log('点了位置')
},
queryCommodityDetail: function () {
let funcCommodity = wx.getStorageSync('shoppingCartBuffer')[0]
console.log('queryCommodityDetail', funcCommodity)
App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars',
data: {
'commodityId': funcCommodity.id,
'genre': funcCommodity.typeId,
},
success: (response) => {
}
})
},
})
\ No newline at end of file
......@@ -65,7 +65,7 @@ Page({
appId: 4,
id: App.globalData.pointInfo[3].id,
name: '原野MOJITO',
cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-3-2.png',
cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-bg-3-2.png',
logo: App.globalData.appResourcesBase + 'shop/logo-4.png',
shopType: '5'
}]
......@@ -77,7 +77,7 @@ Page({
appId: 2,
id: App.globalData.pointInfo[1].id,
name: '星空影院',
cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-4-1.png',
cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-bg-4-1.png',
logo: App.globalData.appResourcesBase + 'shop/logo-2.png',
shopType: ''
}]
......
......@@ -121,15 +121,11 @@
line-height: 52rpx;
}
.shop-summary {
display: -webkit-box;
height: 72rpx;
margin: 40rpx 60rpx 0;
font-size: 26rpx;
color: #959DA9;
line-height: 36rpx;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.shop-date {
margin: 80rpx 60rpx 0;
......
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