Commit dee3ea7c by 严立

LL - 畅玩门店详情

parent 4626eb93
...@@ -8,13 +8,10 @@ let logicData = { ...@@ -8,13 +8,10 @@ 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',
...@@ -28,10 +25,8 @@ Page({ ...@@ -28,10 +25,8 @@ 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 () {
...@@ -39,40 +34,11 @@ Page({ ...@@ -39,40 +34,11 @@ 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
...@@ -101,7 +67,6 @@ Page({ ...@@ -101,7 +67,6 @@ 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
...@@ -115,7 +80,6 @@ Page({ ...@@ -115,7 +80,6 @@ Page({
winSide: true, winSide: true,
navigationAnimationShow: 0 navigationAnimationShow: 0
}) })
wx.showTabBar({animation: true})
} }
// 恢复滚动事件 // 恢复滚动事件
...@@ -124,97 +88,4 @@ Page({ ...@@ -124,97 +88,4 @@ 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,100 +3,18 @@ ...@@ -3,100 +3,18 @@
<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 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> </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: 180rpx; bottom: 74rpx;
width: 80rpx; width: 112rpx;
height: 80rpx; height: 224rpx;
} }
.appointment-side-top { .appointment-side-top {
...@@ -49,154 +49,4 @@ ...@@ -49,154 +49,4 @@
.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,7 +28,6 @@ Page({ ...@@ -28,7 +28,6 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
this.setShopInfo(3, 1)
this.setSideHeight() this.setSideHeight()
this.queryDetail() this.queryDetail()
this.queryActivity() this.queryActivity()
...@@ -55,20 +54,20 @@ Page({ ...@@ -55,20 +54,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',
'officeId': shopInfo.id 'tagId': '103'
}, },
success: function(res) { success: function(res) {
let funcData = res.data.list let funcData = res.data.list
console.log(funcData) let childActivity = funcData.filter(v => v.childImg !== '')
console.log(childActivity)
that.setData({ that.setData({
childActivity: funcData childActivity
}) })
} }
}) })
...@@ -161,32 +160,15 @@ Page({ ...@@ -161,32 +160,15 @@ Page({
}) })
}, },
// 跳转到购买饮品界面 // 跳转到购买饮品界面
onBuySnacks: function (event) { onBuySnacks() {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food', url: '/pages/commodity/menu-snacks/menu-snacks',
}) })
}, },
// 跳转到购买文创界面 // 跳转到购买文创界面
onBuyArt: function (event) { onBuyArt() {
// 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/play/activity-detail/activity-detail?id=' + id, url: '/pages/commodity/menu-art/menu-art',
}) })
}, },
// 点击分享图标 // 点击分享图标
......
...@@ -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" data-id="{{3}}"> <view class="buy-snacks row" bindtap="onBuySnacks">
<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" data-id="{{1}}"> <view class="buy-art row" bindtap="onBuyArt">
<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="scaleToFill" src="{{childActivity[0].childImg}}"></image> <image mode="aspectFit" 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="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image> <image mode="aspectFit" src="{{item.childImg}}"></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: {
...@@ -20,20 +14,6 @@ Page({ ...@@ -20,20 +14,6 @@ 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 () {
...@@ -80,21 +60,7 @@ Page({ ...@@ -80,21 +60,7 @@ Page({
this.queryCommodity() this.queryCommodity()
if (this.data.shopInfo.appId === 3) this.queryCommodityChild() 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 () { queryCommodity: function () {
this.setData({ this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer') shopInfo: wx.getStorageSync('shopInfoBuffer')
...@@ -327,8 +293,18 @@ Page({ ...@@ -327,8 +293,18 @@ Page({
funcCommodityInfo.isActive = true funcCommodityInfo.isActive = true
wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo]) wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo])
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + funcCommodityInfo.typeId 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="container con-s" style="background: {{bgColor}}">
<view class="background-img"> <view class="background-img">
......
...@@ -35,7 +35,7 @@ Page({ ...@@ -35,7 +35,7 @@ Page({
buyContentCover: '', buyContentCover: '',
buyContentTitle: '', buyContentTitle: '',
buyContentTime: '', buyContentTime: '',
buyContentAmount: '36.00', buyContentAmount: '',
// 购买清单 // 购买清单
shoppingCartList: [], shoppingCartList: [],
...@@ -136,7 +136,6 @@ Page({ ...@@ -136,7 +136,6 @@ Page({
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: this.data.shopInfo.name, buyContentTitle: this.data.shopInfo.name,
buyContentAmount: '360.00',
quantityTitle: '选择购买数量', quantityTitle: '选择购买数量',
quantityTipText: '剩余库存', quantityTipText: '剩余库存',
contactTitle: '填写购买人信息', contactTitle: '填写购买人信息',
...@@ -218,11 +217,13 @@ Page({ ...@@ -218,11 +217,13 @@ Page({
break break
case 6: case 6:
wx.setNavigationBarTitle({
title: '活动报名'
})
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: this.data.shopInfo.name, buyContentTitle: this.data.shopInfo.name,
noticeText: '报名须知', noticeText: '报名须知',
buyContentAmount: '36.00',
quantityTitle: '报名人数', quantityTitle: '报名人数',
quantityTipText: '剩余库存', quantityTipText: '剩余库存',
contactTitle: '填写报名信息', contactTitle: '填写报名信息',
...@@ -246,7 +247,6 @@ Page({ ...@@ -246,7 +247,6 @@ Page({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: this.data.shopInfo.name, buyContentTitle: this.data.shopInfo.name,
noticeText: '预约须知', noticeText: '预约须知',
buyContentAmount: '免费',
quantityTitle: '选择预约座位', quantityTitle: '选择预约座位',
quantityTipText: '剩余座位', quantityTipText: '剩余座位',
contactTitle: '填写预约信息', contactTitle: '填写预约信息',
...@@ -309,6 +309,8 @@ Page({ ...@@ -309,6 +309,8 @@ Page({
let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer') let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer')
console.log(JSON.stringify(funcShoppingCart)) console.log(JSON.stringify(funcShoppingCart))
// 设置商品单位价格
let funcPriceUnit = 0
// 设置商品的最终提交价格 // 设置商品的最终提交价格
let funcPayAmount = 0 let funcPayAmount = 0
for (let i = 0, l = funcShoppingCart.length; i < l; i++) { for (let i = 0, l = funcShoppingCart.length; i < l; i++) {
...@@ -332,12 +334,14 @@ Page({ ...@@ -332,12 +334,14 @@ Page({
break break
} }
funcPriceUnit = funcShoppingCart[i].priceFinal
if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity
} }
this.setData({ this.setData({
shoppingCartList: funcShoppingCart, shoppingCartList: funcShoppingCart,
payAmount: App.modular.utils.formatAmount(funcPayAmount), payAmount: App.modular.utils.formatAmount(funcPayAmount),
buyContentAmount: funcPriceUnit,
}) })
console.log('shoppingCartList', this.data.shoppingCartList) console.log('shoppingCartList', this.data.shoppingCartList)
......
...@@ -554,6 +554,7 @@ ...@@ -554,6 +554,7 @@
height: 72rpx; height: 72rpx;
margin-top: 40rpx; margin-top: 40rpx;
padding: 0 40rpx; padding: 0 40rpx;
border-radius: 4px;
background: #F5EEDF; background: #F5EEDF;
font-size: 22rpx; font-size: 22rpx;
......
...@@ -38,7 +38,6 @@ Page({ ...@@ -38,7 +38,6 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options.id)
this.setData({ this.setData({
id: options.id id: options.id
}) })
...@@ -51,13 +50,11 @@ Page({ ...@@ -51,13 +50,11 @@ Page({
}, },
onContact: function () { onContact: function () {
if (this.data.activeState == 1) { if (this.data.activeState == 1) {
wx.navigateTo({ 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({ ...@@ -79,44 +76,19 @@ 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 funcResponse = res.data var response = 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)
that.setData({ 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 @@ ...@@ -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="{{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"> <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,18 +25,17 @@ ...@@ -25,18 +25,17 @@
<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 align-c"> <view style="height:auto;" class="row">
<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>
...@@ -46,43 +45,7 @@ ...@@ -46,43 +45,7 @@
</view> </view>
</view> </view>
<view class="contact row"> <view class="contact">
<!-- 活动价样式 -->
<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: 60rpx; width: 120rpx;
height: 42rpx; height: 42rpx;
margin-right: 24rpx; margin-right: 32rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 300; font-weight: 300;
color: #959DA9; color: #959DA9;
...@@ -96,18 +96,13 @@ ...@@ -96,18 +96,13 @@
} }
.detail-other view text:nth-child(3) { .detail-other view text:nth-child(3) {
width: 500rpx; width: 470rpx;
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;
...@@ -131,56 +126,8 @@ ...@@ -131,56 +126,8 @@
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 {
position: absolute; width: 670rpx;
right: 40rpx;
width: 200rpx;
height: 96rpx; height: 96rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
background: #86C5E1; background: #86C5E1;
...@@ -192,9 +139,7 @@ ...@@ -192,9 +139,7 @@
line-height: 42rpx; line-height: 42rpx;
} }
.contact .button-disable { .contact .button-disable {
position: absolute; width: 670rpx;
right: 40rpx;
width: 200rpx;
height: 96rpx; height: 96rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
background: #C8E1EC; background: #C8E1EC;
......
...@@ -2,65 +2,43 @@ const App = getApp() ...@@ -2,65 +2,43 @@ const App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, option: {},
statusActive: 0,
statusList: [
{
id: 0,
name: '全部'
}, {
id: 1,
name: '亲子教育'
}, {
id: 2,
name: '健康'
}
],
navigationTitle: '主题活动',
activity: [], activity: [],
selectedActivity: [],
other: [], other: [],
shopInfo: {},
}, },
onLoad: function (option) { onLoad: function (options) {
var that = this console.log(options.fromPage)
console.log(option) if (options.fromPage === 'serviceDetail') this.setData({ shopInfo: wx.getStorageSync('shopInfoBuffer')})
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)
}
})
}
this.getActivityList(1)
this.getActivityList(0)
}, },
onActivityDetail: function (funcItem) { onActivityDetail: function (funcItem) {
console.log('onActivityDetail')
wx.navigateTo({ wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.id url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.id
}) })
}, },
//主题活动列表 type 1 近期 0 往期 //主题活动列表 type 1 近期 0 往期
getActivityList(type, officeId) { getActivityList(type) {
let funcParam = {
listType: type,
pageSize: 20,
pageNo: 1,
}
if (this.data.shopInfo.id) funcParam.officeId = this.data.shopInfo.id
var that = this var that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
data: { data: funcParam,
listType: type,
pageSize: 20,
pageNo: 1,
officeId: officeId
},
success: function (res) { success: function (res) {
var tmpArr = []; var tmpArr = [];
res.data.list.forEach(item => { res.data.list.forEach(item => {
...@@ -71,27 +49,6 @@ Page({ ...@@ -71,27 +49,6 @@ 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)
}) })
...@@ -103,10 +60,8 @@ Page({ ...@@ -103,10 +60,8 @@ 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({
...@@ -115,46 +70,5 @@ Page({ ...@@ -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="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">
<view class="item-title row con-b align-c"> <text class="item-title">{{item.title}}</text>
<text>{{item.title}}</text> <text class="item-date">{{item.date}}</text>
<text>{{item.tags}}</text> <text class="item-describe">{{item.describe}}</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>
...@@ -69,7 +28,7 @@ ...@@ -69,7 +28,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>
...@@ -82,39 +41,6 @@ ...@@ -82,39 +41,6 @@
</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,47 +6,9 @@ ...@@ -6,47 +6,9 @@
.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;
...@@ -55,19 +17,19 @@ ...@@ -55,19 +17,19 @@
} }
.title image { .title image {
width: 138rpx; width: 184rpx;
height: 96rpx; height: 96rpx;
} }
/* 活动列表 */ /* 活动列表 */
.list { .list {
padding: 0rpx 40rpx 50rpx 40rpx; padding: 0 40rpx 50rpx 40rpx;
} }
.item { .item {
width: 670rpx; width: 670rpx;
height: 708rpx; height: 644rpx;
margin-top: 64rpx; margin-top: 48rpx;
border-radius: 2px; border-radius: 2px;
overflow: hidden; overflow: hidden;
background: #ffffff; background: #ffffff;
...@@ -78,15 +40,13 @@ ...@@ -78,15 +40,13 @@
} }
.item-title { .item-title {
height: 44rpx; width: 606rpx;
margin-top: 32rpx; height: 48rpx;
} 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: 44rpx; line-height: 48rpx;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
white-space: normal; white-space: normal;
...@@ -96,43 +56,22 @@ ...@@ -96,43 +56,22 @@
-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: 40rpx; height: 36rpx;
margin-top: 8rpx; margin-top: 24rpx;
font-size: 26rpx; font-size: 26rpx;
color: #656E7B; color: #15191F;
line-height: 40rpx; line-height: 36rpx;
}
.item-date image {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
} }
.item-describe { .item-describe {
width: 606rpx; width: 606rpx;
height: 80rpx; height: 72rpx;
margin-top: 16rpx; margin-top: 16rpx;
font-size: 26rpx; font-size: 26rpx;
color: #959DA9; color: #959DA9;
line-height: 40rpx; line-height: 36rpx;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
white-space: normal; white-space: normal;
...@@ -142,62 +81,6 @@ ...@@ -142,62 +81,6 @@
-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;
...@@ -244,52 +127,4 @@ ...@@ -244,52 +127,4 @@
.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

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
...@@ -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 mode="scaleToFill" class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image> <image 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 mode="aspectFill" src="{{item.cover}}"></image> <image 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,7 +105,6 @@ ...@@ -105,7 +105,6 @@
.activity-item image { .activity-item image {
width: 648rpx; width: 648rpx;
height: 721rpx;
background-color: #ccc; background-color: #ccc;
} }
......
...@@ -34,7 +34,6 @@ Page({ ...@@ -34,7 +34,6 @@ 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)
...@@ -52,31 +51,6 @@ Page({ ...@@ -52,31 +51,6 @@ 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 mode="aspectFill" src="{{movieInfo.cover}}"></image> <image 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="{{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> <image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text> <text>观影已结束,请期待后续排片</text>
</view> </view>
......
...@@ -52,7 +52,6 @@ Page({ ...@@ -52,7 +52,6 @@ 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)
...@@ -70,31 +69,6 @@ Page({ ...@@ -70,31 +69,6 @@ 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 mode="aspectFill" src="{{item.cover}}"></image> <image 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 mode="aspectFill" src="{{item.cover}}"></image> <image 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,10 +151,7 @@ ...@@ -151,10 +151,7 @@
</view> </view>
</block> </block>
</view> </view>
<view class="footer-img" wx:if="{{movieToday.length > 0 || movieAll.moviewWeek.list.length > 0 || movieAll.movieNextWeek.list.length > 0}}"> <view class="footer-img">
<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,9 +18,7 @@ page { ...@@ -18,9 +18,7 @@ page {
height: 60rpx; height: 60rpx;
} }
.contaniner { .contaniner {
position: relative;
margin-top: 200rpx; margin-top: 200rpx;
min-height: calc(100vh - 200rpx);
} }
/* 状态筛选菜单 */ /* 状态筛选菜单 */
...@@ -223,12 +221,6 @@ page { ...@@ -223,12 +221,6 @@ 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,6 +42,10 @@ Page({ ...@@ -42,6 +42,10 @@ Page({
}, },
navigationScroll: 0, navigationScroll: 0,
// 内容类型 // 内容类型
contentType: 'evaluate', contentType: 'evaluate',
...@@ -52,44 +56,95 @@ Page({ ...@@ -52,44 +56,95 @@ Page({
info: {}, info: {},
shopInfo: {},
detailActivity: [], // 活动 detailActivity: [], // 活动
detailCommodity: [], // 商品 detailCommodity: [], // 商品
detailEvaluate: [], // 评论 detailEvaluate: [], // 评论
officeService: 0,
officeServiceText: '5.0', // 门店服务评分
officeProduct: 0,
officeProductText: '5.0', // 门店产品评分
officeEnvironmental: 0,
officeEnvironmentalText: '5.0', // 门店环境评分
isBlack: false, isBlack: false,
sideHeight: 550, sideHeight: 550,
winSide: true, winSide: true,
commodityTitle: '',
winActivity: false, // 近期活动
winCommodity: false, // 商品列表
winCommodityMenu: false,
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
option: options option: options,
}) })
console.log('shopId', Number(options.id))
this.queryDetail(Number(options.id)) this.queryDetail(Number(options.id))
if (Number(options.id) === 2) {
this.queryDetailMovie() // 根据商店查询相关订制内容
this.setData({ switch (Number(options.id)) {
navigationStyle: this.data.navigationStyleBlack case 1:
}) this.queryCommodity()
} else { this.queryActivity()
this.queryDetailActivity() this.setData({
this.queryDetailCommodity() commodityTitle: '文创商品',
})
break
case 2:
this.queryMovie()
this.setData({
navigationStyle: this.data.navigationStyleBlack
})
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() this.getAppraise()
}, },
/** /**
* 获取 banner 渲染数据 * 获取商店信息,缓存商店信息
* @function * @function
* @param {string} - funcToken * @param {string} - funcToken
* @returns * @returns
...@@ -255,6 +310,8 @@ Page({ ...@@ -255,6 +310,8 @@ Page({
contact: '13316748039' contact: '13316748039'
} }
] ]
// 查询景点信息
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getList', url: '/api/v1/park/getList',
success: function(res) { success: function(res) {
...@@ -308,119 +365,73 @@ Page({ ...@@ -308,119 +365,73 @@ Page({
'shopType': this.data.option.type 'shopType': this.data.option.type
} }
wx.setStorageSync('shopInfoBuffer', funcItem) wx.setStorageSync('shopInfoBuffer', funcItem)
this.setData({
shopInfo: funcItem
})
break 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') * @function
let officeId = shopInfo.id * @param {string} - funcToken
let genre = shopInfo.shopType * @returns
*/
queryActivity: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
data: { data: {
'listType': '1', 'listType': 1,
'pageSize': '5', 'pageSize': 10,
'pageNo': '1', 'pageNo': '1',
'officeId': officeId, 'tagId': '',
'genre': genre, 'officeId': this.data.shopInfo.id,
}, },
success: function(res) { success: (response) => {
let funcResponse = res.data.list console.log(JSON.stringify(response))
console.log(funcResponse) this.setData({
let funcList = [] winActivity: true
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 () { /**
let that = this * 获取商品列表
let shopInfo = wx.getStorageSync('shopInfoBuffer') * @function
let officeId = shopInfo.id * @param
let genre = shopInfo.shopType * @returns
*/
queryCommodity: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/recommend', url: '/api/v1/commodity/recommend',
data: { data: {
'officeId': officeId, 'officeId': this.data.shopInfo.id,
'genre': genre, 'genre': this.data.shopInfo.shopType,
'tag': '201' 'tag': '201'
}, },
success: function(res) { success: (response) => {
let funcResponse = res.data let funcCommodityList = []
let funcList = [] let funcResponse = response.data
for (let i = 0, l = funcResponse.length; i < l; i++) { for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = { let funcItem = {
'classifyId': funcResponse[i].classifyId, 'id': funcResponse[i].id, // 商品标识
'coverImg': funcResponse[i].coverImg, 'typeId': funcResponse[i].genre, // 商品分类标识
'genre': funcResponse[i].genre, 'name': funcResponse[i].name,
'id': funcResponse[i].id, 'cover': funcResponse[i].coverImg, // 商品封面
'title': funcResponse[i].name,
'officeId': funcResponse[i].officeId,
'price': funcResponse[i].sightseerPrice, // 普通价 'price': funcResponse[i].sightseerPrice, // 普通价
'priceText': funcResponse[i].sightseerPrice.toFixed(2), // 普通价文本格式 'priceText': App.modular.utils.formatAmount(funcResponse[i].sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价 '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, 'priceType': 1,
'content': funcResponse[i].synopsis, 'describe': funcResponse[i].synopsis,
'describeDetail': '', // 商品描述详情,在点击详情时获得数据
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型 // 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价 // 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
...@@ -434,16 +445,24 @@ Page({ ...@@ -434,16 +445,24 @@ Page({
funcItem.priceType = 3 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({ App.wxRequest({
url: '/api/v1/film/getAllFilm', url: '/api/v1/film/getAllFilm',
data: { data: {
...@@ -466,6 +485,11 @@ Page({ ...@@ -466,6 +485,11 @@ 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(' '),
} }
...@@ -480,6 +504,44 @@ Page({ ...@@ -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 () { onLocation: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/home/guide/guide?id=' + Number(this.data.option.id) url: '/pages/home/guide/guide?id=' + Number(this.data.option.id)
...@@ -510,8 +572,8 @@ Page({ ...@@ -510,8 +572,8 @@ Page({
}, },
onContact: function () { onContact: function () {
wx.navigateTo({ wx.makePhoneCall({
url: '/pages/commodity/project-detail/project-detail' phoneNumber: this.data.info.contact
}) })
}, },
...@@ -533,11 +595,11 @@ Page({ ...@@ -533,11 +595,11 @@ Page({
}, },
/** /**
* 页面滚动事件 * 页面滚动事件
* @function * @function
* @param {object} - funcEvent * @param {object} - funcEvent
* @returns * @returns
*/ */
setSideButton: function (funcEvent) { setSideButton: function (funcEvent) {
if (funcEvent.scrollTop >= this.data.sideHeight) { if (funcEvent.scrollTop >= this.data.sideHeight) {
if (this.data.winSide) { if (this.data.winSide) {
...@@ -577,81 +639,7 @@ Page({ ...@@ -577,81 +639,7 @@ 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 () {
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
console.log(funcData.serviceEvaluation)
that.setData({
officeServiceText: funcData.serviceEvaluation.toFixed(1),
officeProductText: funcData.productEvaluatio.toFixed(1),
officeEnvironmentalText: funcData.environmentalEvaluation.toFixed(1),
})
}
})
},
// 预览图片 // 预览图片
onPreviewImage: function(e) { onPreviewImage: function(e) {
const current = e.currentTarget.dataset.url const current = e.currentTarget.dataset.url
...@@ -662,10 +650,6 @@ Page({ ...@@ -662,10 +650,6 @@ Page({
urls urls
}) })
}, },
// 查看评论全文
onShowMore: function () {
console.log(1)
},
// 点击分享图标 // 点击分享图标
onShare: function () { onShare: function () {
this.setData({ this.setData({
...@@ -694,32 +678,34 @@ Page({ ...@@ -694,32 +678,34 @@ Page({
url: '/pages/commodity/menu-art/menu-art', url: '/pages/commodity/menu-art/menu-art',
}) })
}, },
// 跳转到全部电影
onAllMovie: function () { /**
* banner 查看全部活动
* @function
* @param {object} - funcEvent
* @returns
*/
onActivityAll: function () {
wx.navigateTo({ 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({ wx.navigateTo({
url: '/pages/play/activity/activity?officeId=' + shopInfo.id url: '/pages/commodity/menu-food/menu-food',
}) })
}, },
// 跳转到电影详情
onMovieDetail: function (event) { onMovieAll: function () {
let id = event.currentTarget.dataset.id
console.log(id)
wx.navigateTo({ 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 @@ ...@@ -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'}}" bindtap="onLocation"></image> <image src="{{imageBase + 'icon/location-2.png'}}" bind:tap="onLocation"></image>
</view> </view>
<!-- 分享弹出图片 --> <!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}"> <l-popup show="{{showPopup}}" animation="{{false}}">
...@@ -47,40 +47,28 @@ ...@@ -47,40 +47,28 @@
</view> </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"> <view class="commodity-card-title row con-b align-e">
<text>近期活动</text> <text>近期活动</text>
<text bindtap="onAllActivity">查看全部</text> <text bindtap="onActivityAll">查看全部</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" bindtap="onActivityDetail" data-id="{{item.id}}"> <view class="commodity-card-item col">
<image src="{{item.coverImg}}"></image> <image src="{{item.cover}}"></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.tags}}</text> <text>{{item.tab}}</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.date}}</text> <text>{{item.time}}</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" wx:if="{{item.priceType === 1}}"> <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 === 2}}">
<text>业主价</text> <text>业主价</text>
<text class="price-symbol">¥</text> <text>免费</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text> <text>{{item.price}}</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>
...@@ -88,84 +76,61 @@ ...@@ -88,84 +76,61 @@
</view> </view>
</view> </view>
</block> </block>
<block wx:if="{{detailActivity.length === 0}}">
<view class="commodity-card-item-nothing row con-c align-c">
<text>近期暂无活动安排</text>
</view>
</block>
</view> </view>
</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"> <view class="commodity-card-title row con-b align-e">
<text>SPA服务</text> <text>{{commodityTitle}}</text>
<text bindtap="">查看全部</text> <text bindtap="onCommodityAll">查看全部</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="commodity-card-item col"> <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"> <view class="commodity-card-item-title row con-b align-c">
<text>{{item.title}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="commodity-card-item-date row align-c"> <view class="commodity-card-item-date row align-c">
<text>{{item.content}}</text> <text>{{item.describe}}</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" 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}}"> <view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>活动价</text> <text class="detail-price-discount">活动价</text>
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text> <text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
<text>{{item.priceText}}</text> <text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text>
</view> </view>
<!-- 业主价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 2}}"> <view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>业主价</text> <text class="detail-price-special">业主价</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>{{item.priceText}}</text> <text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text>
</view> </view>
<!-- 普通价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 3}}"> <view class="row align-c" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text> <text class="">业主价</text>
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text> <text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
<text class="price-unit">/人</text>
<text></text>
</view> </view>
<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> </view>
</view> </view>
...@@ -174,6 +139,10 @@ ...@@ -174,6 +139,10 @@
</view> </view>
</view> </view>
<view class="commodity-menu" wx:if="{{winCommodityMenu}}">
<view></view>
</view>
<!-- 简介,评价 --> <!-- 简介,评价 -->
<view class="selection-content row"> <view class="selection-content row">
<view class="row align-c {{contentType === 'detail' ? 'selection-content-item-active' : 'selection-content-item'}}" data-type="detail" bindtap="onSelectionContent"> <view class="row align-c {{contentType === 'detail' ? 'selection-content-item-active' : 'selection-content-item'}}" data-type="detail" bindtap="onSelectionContent">
...@@ -195,24 +164,21 @@ ...@@ -195,24 +164,21 @@
<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 wx:if="{{options.id === 2}}" src="{{imageBase + 'icon/evaluate-2.png'}}"></image> <image src="{{imageBase + 'icon/evaluate-1.png'}}"></image>
<image wx:else src="{{imageBase + 'icon/evaluate-1.png'}}"></image>
<text>服务</text> <text>服务</text>
<text>{{officeServiceText}}</text> <text>0.5</text>
<text>分</text> <text>分</text>
</view> </view>
<view class="evaluate-option-item row align-c"> <view class="evaluate-option-item row align-c">
<image wx:if="{{options.id === 2}}" src="{{imageBase + 'icon/shop-2.png'}}"></image> <image src="{{imageBase + 'icon/shop-1.png'}}"></image>
<image wx:else src="{{imageBase + 'icon/shop-1.png'}}"></image>
<text>产品</text> <text>产品</text>
<text>{{officeProductText}}</text> <text>0.5</text>
<text>分</text> <text>分</text>
</view> </view>
<view class="evaluate-option-item row align-c"> <view class="evaluate-option-item row align-c">
<image wx:if="{{options.id === 2}}" src="{{imageBase + 'icon/album-2.png'}}"></image> <image src="{{imageBase + 'icon/album-1.png'}}"></image>
<image wx:else src="{{imageBase + 'icon/album-1.png'}}"></image>
<text>环境</text> <text>环境</text>
<text>{{officeEnvironmentalText}}</text> <text>0.5</text>
<text>分</text> <text>分</text>
</view> </view>
</view> </view>
...@@ -221,12 +187,12 @@ ...@@ -221,12 +187,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.avatar}}" mode="widthFix"></image> <image class="evaluate-item-avatar" src="{{item}}" 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.nickName}}</text> <text>{{item.name}}</text>
<text style="{{item.userType === '1' ? '' : 'display: none'}}">业主</text> <text>业主</text>
<text>{{item.createDate}}</text> <text>{{item.date}}</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">
...@@ -240,10 +206,10 @@ ...@@ -240,10 +206,10 @@
<view> <view>
<text>{{item.content}}</text> <text>{{item.content}}</text>
</view> </view>
<!-- <view class="evaluate-item-content-more row con-b" bindtap="onShowMore"> <view class="evaluate-item-content-more">
<text style="">...</text> <text>... </text>
<text>{{showMore ? '收起' : '全文'}}</text> <text>全文</text>
</view> --> </view>
</view> </view>
<view class="evaluate-item-album"> <view class="evaluate-item-album">
...@@ -273,7 +239,7 @@ ...@@ -273,7 +239,7 @@
</view> </view>
<!-- 星空影院 --> <!-- 星空影院 -->
<view class="container movie" wx:else> <view class="container movie" wx:if="{{option.id === '2'}}">
<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="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
...@@ -290,12 +256,12 @@ ...@@ -290,12 +256,12 @@
</view> </view>
</view> </view>
<view class="commodity-movie"> <view class="commodity">
<!-- 详情标题,分享,位置 --> <!-- 详情标题,分享,位置 -->
<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'}}" bindtap="onLocation"></image> <image src="{{imageBase + 'icon/location-3.png'}}" bind:tap="onLocation"></image>
</view> </view>
<!-- 分享弹出图片 --> <!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}"> <l-popup show="{{showPopup}}" animation="{{false}}">
...@@ -319,19 +285,19 @@ ...@@ -319,19 +285,19 @@
</view> </view>
<!-- 背景 --> <!-- 背景 -->
<view class="movie-bg"> <view class="">
<image src="{{appResourcesBase + 'play/service/service-movie.png'}}"></image>
</view> </view>
<!-- 热映影片 --> <!-- 热映影片 -->
<view class="commodity-movie-card"> <view class="commodity-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 bindtap="onAllMovie">查看全部</text> <text bindtap="onMovieAll">查看全部</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" bindtap="onMovieDetail" data-id="{{item.name}}"> <view class="movie-card-item col">
<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>
...@@ -370,7 +336,6 @@ ...@@ -370,7 +336,6 @@
<image src="/image/movie-bottom.png"></image> <image src="/image/movie-bottom.png"></image>
</view> </view>
<!-- 简介,评价 --> <!-- 简介,评价 -->
<view class="selection-content movie-border row"> <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"> <view class="row align-c {{contentType === 'detail' ? 'selection-content-item-active-movie' : 'selection-content-item'}}" data-type="detail" bindtap="onSelectionContent">
......
...@@ -146,11 +146,6 @@ ...@@ -146,11 +146,6 @@
/* 二期整理样式 */ /* 二期整理样式 */
.commodity-movie {
position: relative;
height: 1380rpx;
}
.commodity-title { .commodity-title {
width: 670rpx; width: 670rpx;
min-height: 76rpx; min-height: 76rpx;
...@@ -201,10 +196,6 @@ ...@@ -201,10 +196,6 @@
} }
/* 近期活动,文创商品 */ /* 近期活动,文创商品 */
.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;
...@@ -213,10 +204,6 @@ ...@@ -213,10 +204,6 @@
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;
...@@ -242,6 +229,12 @@ ...@@ -242,6 +229,12 @@
width: 0; width: 0;
} }
.commodity-card-item-nothing {
width: 670rpx;
height: 544rpx;
background: #F5F6F8;
}
.commodity-card-item { .commodity-card-item {
width: 562rpx; width: 562rpx;
margin-right: 24rpx; margin-right: 24rpx;
...@@ -330,6 +323,21 @@ ...@@ -330,6 +323,21 @@
white-space: nowrap; 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 { .movie-card-item-info {
height: 33rpx; height: 33rpx;
margin-top: 10rpx; margin-top: 10rpx;
...@@ -372,7 +380,7 @@ ...@@ -372,7 +380,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: 4rpx; border-radius: 4px;
text-align: center; text-align: center;
font-size: 18rpx; font-size: 18rpx;
...@@ -389,8 +397,22 @@ ...@@ -389,8 +397,22 @@
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;
...@@ -398,7 +420,7 @@ ...@@ -398,7 +420,7 @@
color: #15191F; color: #15191F;
} }
.commodity-card-item-operation text:nth-child(4) { .commodity-card-item-operation text:nth-child(5) {
text-align: center; text-align: center;
font-size: 22rpx; font-size: 22rpx;
font-weight: 400; font-weight: 400;
...@@ -407,13 +429,19 @@ ...@@ -407,13 +429,19 @@
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;
...@@ -441,6 +469,7 @@ ...@@ -441,6 +469,7 @@
.movie-footer image { .movie-footer image {
width: 750rpx; width: 750rpx;
height: 150rpx; height: 150rpx;
margin-top: 80rpx;
} }
/* 分享弹窗 */ /* 分享弹窗 */
...@@ -512,7 +541,6 @@ ...@@ -512,7 +541,6 @@
/* 详情 */ /* 详情 */
.detail { .detail {
margin-top: 62rpx;
padding-bottom: 160rpx; padding-bottom: 160rpx;
} }
...@@ -571,7 +599,6 @@ ...@@ -571,7 +599,6 @@
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 {
...@@ -629,15 +656,12 @@ ...@@ -629,15 +656,12 @@
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 {
...@@ -648,13 +672,13 @@ ...@@ -648,13 +672,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;
} }
...@@ -686,4 +710,33 @@ ...@@ -686,4 +710,33 @@
.evaluate-item-album image:nth-child(4n) { .evaluate-item-album image:nth-child(4n) {
margin-right: 0; margin-right: 0;
border: 1px red solid; 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({ Page({
data: { data: {
bannerIndex: 0, bannerIndex: 0,
...@@ -26,7 +28,7 @@ Page({ ...@@ -26,7 +28,7 @@ Page({
} }
}, },
onLoad: function (options) { onLoad: function (options) {
this.queryCommodityDetail()
}, },
/** /**
* banner 切换图片同步自定义标识组件 * banner 切换图片同步自定义标识组件
...@@ -47,5 +49,22 @@ Page({ ...@@ -47,5 +49,22 @@ Page({
*/ */
onLocation: function () { onLocation: function () {
console.log('点了位置') 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({ ...@@ -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-3-2.png', cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-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-4-1.png', cover: App.globalData.appResourcesBase + 'play/detail/shop-bg-bg-4-1.png',
logo: App.globalData.appResourcesBase + 'shop/logo-2.png', logo: App.globalData.appResourcesBase + 'shop/logo-2.png',
shopType: '' shopType: ''
}] }]
......
...@@ -121,15 +121,11 @@ ...@@ -121,15 +121,11 @@
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;
......
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