Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dee3ea7c
authored
Sep 21, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
LL - 畅玩门店详情
parent
4626eb93
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
225 additions
and
1065 deletions
pages/campsite/home-mirror/home-mirror.js
pages/campsite/home-mirror/home-mirror.wxml
pages/campsite/home-mirror/home-mirror.wxss
pages/campsite/home/home.js
pages/campsite/home/home.wxml
pages/commodity/project-detail/project-detail.js
pages/commodity/project-detail/project-detail.wxml
pages/pay/order-input/order-input.js
pages/pay/order-input/order-input.wxss
pages/play/activity-detail/activity-detail.js
pages/play/activity-detail/activity-detail.wxml
pages/play/activity-detail/activity-detail.wxss
pages/play/activity/activity.js
pages/play/activity/activity.wxml
pages/play/activity/activity.wxss
pages/play/activity/image/title-2.png
pages/play/home/home.js
pages/play/home/home.wxml
pages/play/home/home.wxss
pages/play/movie-detail/movie-detail.js
pages/play/movie-detail/movie-detail.wxml
pages/play/movie/movie.js
pages/play/movie/movie.wxml
pages/play/movie/movie.wxss
pages/play/service-detail/service-detail.js
pages/play/service-detail/service-detail.wxml
pages/play/service-detail/service-detail.wxss
pages/play/service-sell/service-sell.js
pages/play/service/service.js
pages/play/service/service.wxss
pages/campsite/home-mirror/home-mirror.js
View file @
dee3ea7c
...
...
@@ -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
pages/campsite/home-mirror/home-mirror.wxml
View file @
dee3ea7c
...
...
@@ -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
pages/campsite/home-mirror/home-mirror.wxss
View file @
dee3ea7c
...
...
@@ -14,9 +14,9 @@
.appointment-side {
position: fixed;
right: 40rpx;
bottom:
180
rpx;
width:
80
rpx;
height:
80
rpx;
bottom:
74
rpx;
width:
112
rpx;
height:
224
rpx;
}
.appointment-side-top {
...
...
@@ -49,154 +49,4 @@
.container > image {
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
pages/campsite/home/home.js
View file @
dee3ea7c
...
...
@@ -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'
,
})
},
// 点击分享图标
...
...
pages/campsite/home/home.wxml
View file @
dee3ea7c
...
...
@@ -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>
...
...
pages/commodity/project-detail/project-detail.js
View file @
dee3ea7c
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
])
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
pages/commodity/project-detail/project-detail.wxml
View file @
dee3ea7c
<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">
...
...
pages/pay/order-input/order-input.js
View file @
dee3ea7c
...
...
@@ -35,7 +35,7 @@ Page({
buyContentCover
:
''
,
buyContentTitle
:
''
,
buyContentTime
:
''
,
buyContentAmount
:
'
36.00
'
,
buyContentAmount
:
''
,
// 购买清单
shoppingCartList
:
[],
...
...
@@ -136,7 +136,6 @@ Page({
this
.
setData
({
orderType
:
logicData
.
option
.
type
,
buyContentTitle
:
this
.
data
.
shopInfo
.
name
,
buyContentAmount
:
'360.00'
,
quantityTitle
:
'选择购买数量'
,
quantityTipText
:
'剩余库存'
,
contactTitle
:
'填写购买人信息'
,
...
...
@@ -218,11 +217,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 +247,6 @@ Page({
orderType
:
logicData
.
option
.
type
,
buyContentTitle
:
this
.
data
.
shopInfo
.
name
,
noticeText
:
'预约须知'
,
buyContentAmount
:
'免费'
,
quantityTitle
:
'选择预约座位'
,
quantityTipText
:
'剩余座位'
,
contactTitle
:
'填写预约信息'
,
...
...
@@ -309,6 +309,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 +334,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
)
...
...
pages/pay/order-input/order-input.wxss
View file @
dee3ea7c
...
...
@@ -554,6 +554,7 @@
height: 72rpx;
margin-top: 40rpx;
padding: 0 40rpx;
border-radius: 4px;
background: #F5EEDF;
font-size: 22rpx;
...
...
pages/play/activity-detail/activity-detail.js
View file @
dee3ea7c
...
...
@@ -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/p
lay/activity-entry/activity-entry?id='
+
this
.
data
.
id
url
:
'/pages/p
ay/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
)
}
})
},
...
...
pages/play/activity-detail/activity-detail.wxml
View file @
dee3ea7c
...
...
@@ -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
pages/play/activity-detail/activity-detail.wxss
View file @
dee3ea7c
...
...
@@ -86,9 +86,9 @@
}
.detail-other view text:nth-child(2) {
width:
6
0rpx;
width:
12
0rpx;
height: 42rpx;
margin-right:
24
rpx;
margin-right:
32
rpx;
font-size: 30rpx;
font-weight: 300;
color: #959DA9;
...
...
@@ -96,18 +96,13 @@
}
.detail-other view text:nth-child(3) {
width:
50
0rpx;
width:
47
0rpx;
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;
...
...
pages/play/activity/activity.js
View file @
dee3ea7c
...
...
@@ -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
)
{
getActivityList
(
type
)
{
let
funcParam
=
{
listType
:
type
,
pageSize
:
20
,
pageNo
:
1
,
}
if
(
this
.
data
.
shopInfo
.
id
)
funcParam
.
officeId
=
this
.
data
.
shopInfo
.
id
var
that
=
this
App
.
wxRequest
({
url
:
'/api/v1/activity/getList'
,
data
:
{
listType
:
type
,
pageSize
:
20
,
pageNo
:
1
,
officeId
:
officeId
},
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
pages/play/activity/activity.wxml
View file @
dee3ea7c
<!-- 畅玩 - 活动列表 -->
<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
pages/play/activity/activity.wxss
View file @
dee3ea7c
...
...
@@ -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: 1
38
rpx;
width: 1
84
rpx;
height: 96rpx;
}
/* 活动列表 */
.list {
padding: 0
rpx
40rpx 50rpx 40rpx;
padding: 0 40rpx 50rpx 40rpx;
}
.item {
width: 670rpx;
height:
708
rpx;
margin-top:
64
rpx;
height:
644
rpx;
margin-top:
48
rpx;
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: 4
4
rpx;
line-height: 4
8
rpx;
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:
40
rpx;
margin-top:
8
rpx;
height:
36
rpx;
margin-top:
24
rpx;
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:
80
rpx;
height:
72
rpx;
margin-top: 16rpx;
font-size: 26rpx;
color: #959DA9;
line-height:
40
rpx;
line-height:
36
rpx;
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;
...
...
@@ -244,52 +127,4 @@
.other-item image {
width: 286rpx;
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
pages/play/activity/image/title-2.png
View file @
dee3ea7c
5.61 KB
|
W:
|
H:
2.82 KB
|
W:
|
H:
2-up
Swipe
Onion skin
pages/play/home/home.js
View file @
dee3ea7c
...
...
@@ -210,7 +210,7 @@ Page({
swiperMovieCurrent
})
},
// 跳转到所有活动
onAllActivity
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/play/activity/activity'
...
...
pages/play/home/home.wxml
View file @
dee3ea7c
...
...
@@ -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 class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image>
</swiper-item>
</block>
</swiper>
...
...
@@ -39,7 +39,7 @@
<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-cover">
<image
mode="aspectFill"
src="{{item.cover}}"></image>
<image src="{{item.cover}}"></image>
</view>
<view class="movie-info-wrapper">
<view class="row align-c">
...
...
pages/play/home/home.wxss
View file @
dee3ea7c
...
...
@@ -105,7 +105,6 @@
.activity-item image {
width: 648rpx;
height: 721rpx;
background-color: #ccc;
}
...
...
pages/play/movie-detail/movie-detail.js
View file @
dee3ea7c
...
...
@@ -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
)
...
...
pages/play/movie-detail/movie-detail.wxml
View file @
dee3ea7c
...
...
@@ -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="{{s
tatusList
.length === 0}}">
<view class="show-end col align-c" wx:if="{{s
howList[0].length === 0 && showList[1]
.length === 0}}">
<image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text>
</view>
...
...
pages/play/movie/movie.js
View file @
dee3ea7c
...
...
@@ -52,7 +52,6 @@ Page({
onLoad
:
function
()
{
this
.
getTodayFilm
()
this
.
getAllFilm
()
this
.
setShopInfo
(
2
,
1
)
},
onPageScroll
:
function
(
funcEvent
)
{
// console.log(funcEvent)
...
...
@@ -70,31 +69,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
}
}
},
/**
* 查询今日放映
* @function
...
...
pages/play/movie/movie.wxml
View file @
dee3ea7c
...
...
@@ -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
pages/play/movie/movie.wxss
View file @
dee3ea7c
...
...
@@ -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;
...
...
pages/play/service-detail/service-detail.js
View file @
dee3ea7c
This diff is collapsed.
Click to expand it.
pages/play/service-detail/service-detail.wxml
View file @
dee3ea7c
This diff is collapsed.
Click to expand it.
pages/play/service-detail/service-detail.wxss
View file @
dee3ea7c
...
...
@@ -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: 4
r
px;
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;
}
...
...
@@ -686,4 +710,33 @@
.evaluate-item-album image:nth-child(4n) {
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
pages/play/service-sell/service-sell.js
View file @
dee3ea7c
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
pages/play/service/service.js
View file @
dee3ea7c
...
...
@@ -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
:
''
}]
...
...
pages/play/service/service.wxss
View file @
dee3ea7c
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment