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
e38c3d53
authored
Sep 30, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
LL - 影院问题修复
parent
d897eff5
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
230 additions
and
123 deletions
pages/commodity/room-appointment/room-appointment.js
pages/commodity/room-appointment/room-appointment.wxss
pages/home/night-appointment/night-appointment.js
pages/home/night-appointment/night-appointment.wxml
pages/home/night-appointment/night-appointment.wxss
pages/pay/order-detail/order-detail.wxml
pages/pay/order-detail/order-detail.wxss
pages/pay/order-input/order-input.js
pages/pay/order-input/order-input.wxml
pages/play/movie/movie.js
pages/play/movie/movie.wxml
pages/play/service-detail/service-detail.js
read.js
pages/commodity/room-appointment/room-appointment.js
View file @
e38c3d53
...
...
@@ -238,17 +238,9 @@ Page({
this
.
setData
({
appointmentComplete
:
false
,
})
if
(
this
.
data
.
frompage
==
'appointment'
)
{
wx
.
redirectTo
({
url
:
'/pages/mine/appointment/appointment?tab='
+
this
.
data
.
optionsTab
,
url
:
'/pages/mine/appointment/appointment?tab='
+
this
.
data
.
optionsTab
,
})
}
else
{
wx
.
navigateBack
({
delta
:
1
,
})
}
},
getNextDay
(
d
,
t
)
{
...
...
pages/commodity/room-appointment/room-appointment.wxss
View file @
e38c3d53
...
...
@@ -20,12 +20,12 @@
.appointment-complete-tip {
position: relative;
width: 606rpx;
height:
840
rpx;
height:
974
rpx;
}
.appointment-complete-tip image {
width: 606rpx;
height:
840
rpx;
height:
974
rpx;
}
.appointment-complete .button {
...
...
pages/home/night-appointment/night-appointment.js
View file @
e38c3d53
...
...
@@ -265,16 +265,9 @@ Page({
this
.
setData
({
appointmentComplete
:
false
,
})
if
(
this
.
data
.
frompage
==
'appointment'
)
{
wx
.
redirectTo
({
url
:
'/pages/mine/appointment/appointment?tab='
+
this
.
data
.
optionsTab
,
})
}
else
{
wx
.
navigateBack
({
delta
:
1
,
})
}
},
// 预约入园查询返回剩余名额
...
...
pages/home/night-appointment/night-appointment.wxml
View file @
e38c3d53
...
...
@@ -4,8 +4,7 @@
<view class="appointment-complete row con-c align-c" wx:if="{{appointmentComplete}}">
<view class="appointment-complete-tip">
<image src="{{resourcesBase + 'home/night-appointment/tip.png'}}"></image>
<l-button l-class="button" plain="{{true}}" bind:lintap="onAppointmentComplete">我知道了</l-button>
<image src="{{resourcesBase + 'home/night-appointment/tip.png'}}" bindtap="onAppointmentComplete"></image>
</view>
</view>
...
...
pages/home/night-appointment/night-appointment.wxss
View file @
e38c3d53
...
...
@@ -20,12 +20,12 @@
.appointment-complete-tip {
position: relative;
width: 606rpx;
height:
840
rpx;
height:
974
rpx;
}
.appointment-complete-tip image {
width: 606rpx;
height:
840
rpx;
height:
974
rpx;
}
.appointment-complete .button {
...
...
pages/pay/order-detail/order-detail.wxml
View file @
e38c3d53
...
...
@@ -95,7 +95,7 @@
</block>
</block>
<!-- 餐品 文创 门票-->
<block wx:if="{{orderInfo.commodityType === 5
||orderInfo.commodityType === 4||
orderInfo.commodityType === 3}}">
<block wx:if="{{orderInfo.commodityType === 5
|| orderInfo.commodityType === 4 ||
orderInfo.commodityType === 3}}">
<view class="info-content col con-c {{ orderInfo.state!==2?'p-relative':'' }}">
<view class="info-content-item row">
<text class="info-content-item-label">使用门店</text>
...
...
@@ -134,7 +134,6 @@
</block>
<!-- 活动 -->
<block wx:if="{{orderInfo.commodityType === -1}}">
<view class="info-content col con-c">
<view class="info-content-item row">
...
...
@@ -176,7 +175,6 @@
</block>
<!-- 观影 -->
<block wx:if="{{orderInfo.commodityType === -2}}">
<view class="info-content col con-c">
<view class="info-content-item row">
...
...
@@ -211,14 +209,16 @@
<text>{{orderInfo.expireTime}}</text>
</view>
</block>
</block>
</view>
<view wx:if="{{orderInfo.commodityType === 5}}" class="buy-content-art-tip row align-c">
<image src="{{imageBase + 'fail-icon-4.png'}}"></image>
<text>请在下单3天内取餐,逾期失效</text>
</view>
<view class="notice-wrapper row con-e" bindtap="handleNotice">
<view class="notice">使用须知</view>
<!-- <view class="notice">活动须知</view>
<view class="notice">观影须知</view> -->
<l-icon name="right" color="#959DAA" size="22" />
</view>
...
...
pages/pay/order-detail/order-detail.wxss
View file @
e38c3d53
...
...
@@ -845,3 +845,24 @@ image {
max-width: 100%;
max-height: 100%;
}
/* 取餐提示 */
.buy-content-art-tip {
width: 670rpx;
height: 72rpx;
margin-top: 40rpx;
padding: 0 32rpx;
background: #F5EEDF;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #837048;
}
.buy-content-art-tip image {
display: block;
width: 28rpx;
height: 28rpx;
margin-right: 14rpx;
}
\ No newline at end of file
pages/pay/order-input/order-input.js
View file @
e38c3d53
...
...
@@ -6,9 +6,11 @@ let logicData = {
'name'
:
''
,
'phone'
:
''
,
'identity'
:
''
,
'remarks'
:
''
,
'errorName'
:
''
,
'errorPhone'
:
''
,
'errorIdentity'
:
''
,
'errorRemarks'
:
''
,
}
}
...
...
@@ -141,7 +143,7 @@ Page({
case
2
:
this
.
setData
({
orderType
:
logicData
.
option
.
type
,
buyContentTitle
:
this
.
data
.
shop
Info
.
name
,
buyContentTitle
:
this
.
data
.
shop
pingCartList
[
0
]
.
name
,
quantityTitle
:
'选择购买数量'
,
quantityTipText
:
'剩余库存'
,
contactTitle
:
'填写购买人信息'
,
...
...
@@ -228,7 +230,8 @@ Page({
})
this
.
setData
({
orderType
:
logicData
.
option
.
type
,
buyContentTitle
:
this
.
data
.
shopInfo
.
name
,
buyContentCover
:
this
.
data
.
shoppingCartList
[
0
].
cover
,
buyContentTitle
:
this
.
data
.
shoppingCartList
[
0
].
name
,
noticeText
:
'报名须知'
,
quantityTitle
:
'报名人数'
,
quantityTipText
:
'剩余库存'
,
...
...
@@ -251,7 +254,8 @@ Page({
case
7
:
this
.
setData
({
orderType
:
logicData
.
option
.
type
,
buyContentTitle
:
this
.
data
.
shopInfo
.
name
,
buyContentCover
:
this
.
data
.
shoppingCartList
[
0
].
cover
,
buyContentTitle
:
this
.
data
.
shoppingCartList
[
0
].
name
,
noticeText
:
'预约须知'
,
quantityTitle
:
'选择预约座位'
,
quantityTipText
:
'剩余座位'
,
...
...
@@ -375,6 +379,12 @@ Page({
funcRegisterInfo
[
funcIndex
].
identity
=
funcValue
funcRegisterInfo
[
funcIndex
].
errorIdentity
=
funcMessage
break
case
'remarks'
:
funcRegisterInfo
[
funcIndex
].
remarks
=
funcValue
funcRegisterInfo
[
funcIndex
].
errorRemarks
=
funcMessage
break
}
this
.
setData
({
...
...
@@ -531,16 +541,9 @@ Page({
* @returns
*/
onEntryComplete
:
function
()
{
// 一般活动跳转到我的预约,观影跳转到订单列表
if
(
logicData
.
option
.
type
===
7
)
{
wx
.
reLaunch
({
url
:
'/pages/mine/order/order?fromPage=pay'
})
}
else
{
wx
.
reLaunch
({
url
:
'/pages/mine/appointment/appointment?fromPage=pay'
})
}
},
/**
...
...
@@ -623,12 +626,18 @@ Page({
case
'name'
:
this
.
setUserInfo
(
funcType
,
funcValue
,
funcIndex
,
App
.
modular
.
rule
.
item
(
'name'
,
funcValue
))
break
case
'phone'
:
this
.
setUserInfo
(
funcType
,
funcValue
,
funcIndex
,
App
.
modular
.
rule
.
item
(
'phone'
,
funcValue
))
break
case
'identity'
:
this
.
setUserInfo
(
funcType
,
funcValue
,
funcIndex
,
App
.
modular
.
rule
.
item
(
'identity'
,
funcValue
))
break
case
'remarks'
:
this
.
setUserInfo
(
funcType
,
funcValue
,
funcIndex
,
App
.
modular
.
rule
.
item
(
'remarks'
,
funcValue
))
break
}
},
...
...
@@ -926,6 +935,7 @@ Page({
'name'
:
funcRegisterInfo
[
i
].
name
,
'cellphone'
:
funcRegisterInfo
[
i
].
phone
,
'identityCard'
:
funcRegisterInfo
[
i
].
identity
,
'remarks'
:
funcRegisterInfo
[
i
].
remarks
}
funcUserInfo
.
push
(
funcItem
)
}
...
...
@@ -1193,7 +1203,6 @@ Page({
if
(
funcPayResult
)
{
switch
(
logicData
.
option
.
type
)
{
case
6
:
case
7
:
this
.
setData
({
winActivityResult
:
true
})
...
...
pages/pay/order-input/order-input.wxml
View file @
e38c3d53
...
...
@@ -94,7 +94,8 @@
<!-- 活动 -->
<view class="buy-content-activity row align-c" wx:if="{{orderType === 6}}">
<image src="{{resourcesBase + shopInfo.cover}}"></image>
<!-- <image src="{{resourcesBase + shopInfo.cover}}"></image> -->
<image src="{{buyContentCover}}"></image>
<view class="buy-content-activity-info col con-b">
<view class="title">
<text>{{buyContentTitle}}</text>
...
...
@@ -113,7 +114,7 @@
<image src="{{shoppingCartList[0].cover}}"></image>
<view class="buy-content-activity-info col con-b">
<view class="title">
<text>{{
shoppingCartList[0].nam
e}}</text>
<text>{{
buyContentTitl
e}}</text>
</view>
<view class="time">
<text>{{buyContentTime}}</text>
...
...
@@ -233,14 +234,19 @@
</view>
<view class="contact-input col">
<text class="contact-input-mark">姓名</text>
<input placeholder="请
输入
姓名" value="{{registerInfo[0].name}}" data-type="name" data-index="{{0}}" bindblur="onInputBlur"></input>
<input placeholder="请
填写
姓名" value="{{registerInfo[0].name}}" data-type="name" data-index="{{0}}" bindblur="onInputBlur"></input>
<text>{{registerInfo[0].errorName}}</text>
</view>
<view class="contact-input col">
<text>手机号</text>
<input placeholder="请
输入
手机号" value="{{registerInfo[0].phone}}" maxlength="11" type="number" data-type="phone" data-index="{{0}}" bindblur="onInputBlur"></input>
<input placeholder="请
填写
手机号" value="{{registerInfo[0].phone}}" maxlength="11" type="number" data-type="phone" data-index="{{0}}" bindblur="onInputBlur"></input>
<text>{{registerInfo[0].errorPhone}}</text>
</view>
<view class="contact-input col">
<text>备注</text>
<input placeholder="请填写备注" value="{{registerInfo[0].remarks}}" maxlength="50" data-type="remarks" data-index="{{0}}" bindblur="onInputBlur"></input>
<text>{{registerInfo[0].errorRemarks}}</text>
</view>
</view>
<!-- winRegister -->
...
...
@@ -259,17 +265,17 @@
</view>
<view class="contact-input col">
<text class="contact-input-mark">姓名</text>
<input placeholder="请
输入
姓名" value="{{item.name}}" data-type="name" data-index="{{index}}" bindblur="onInputBlur"></input>
<input placeholder="请
填写
姓名" value="{{item.name}}" data-type="name" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorName}}</text>
</view>
<view class="contact-input col">
<text>手机号</text>
<input placeholder="请
输入
手机号" value="{{item.phone}}" maxlength="11" type="number" data-type="phone" data-index="{{index}}" bindblur="onInputBlur"></input>
<input placeholder="请
填写
手机号" value="{{item.phone}}" maxlength="11" type="number" data-type="phone" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorPhone}}</text>
</view>
<view class="contact-input col">
<text>身份证号</text>
<input placeholder="请
输入
身份证号" value="{{item.identity}}" data-type="identity" data-index="{{index}}" bindblur="onInputBlur"></input>
<input placeholder="请
填写
身份证号" value="{{item.identity}}" data-type="identity" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorIdentity}}</text>
</view>
</block>
...
...
pages/play/movie/movie.js
View file @
e38c3d53
...
...
@@ -85,7 +85,7 @@ Page({
clearTimeout
(
logicData
.
pageScrollTimer
)
},
10
)
},
setShowHeight
:
function
()
{
setShowHeight
:
function
()
{
wx
.
getSystemInfo
({
success
:
(
result
)
=>
{
this
.
setData
({
...
...
@@ -94,15 +94,19 @@ Page({
},
})
},
setFooterLocation
:
function
()
{
setFooterLocation
:
function
()
{
let
that
=
this
let
{
windowHeight
,
marginTop
,
footerFixed
}
=
this
.
data
let
{
windowHeight
,
marginTop
,
footerFixed
}
=
this
.
data
let
footerHeight
=
Math
.
floor
(
214
*
wx
.
getStorageSync
(
'unitProportion'
))
// 显示高度
let
showHeight
=
windowHeight
-
footerHeight
-
marginTop
let
query
=
wx
.
createSelectorQuery
()
query
.
select
(
'#page'
).
boundingClientRect
()
query
.
exec
(
function
(
res
){
query
.
exec
(
function
(
res
)
{
if
(
res
[
0
].
height
>
showHeight
)
{
footerFixed
=
false
}
...
...
@@ -120,7 +124,11 @@ Page({
getTodayFilm
:
function
()
{
wx
.
showLoading
({
title
:
'加载中...'
,
success
:
()
=>
{
this
.
setData
({
loading
:
true
})}
success
:
()
=>
{
this
.
setData
({
loading
:
true
})
}
})
App
.
wxRequest
({
url
:
'/api/v1/film/getTodayFilm'
,
...
...
@@ -130,37 +138,57 @@ Page({
},
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
let
movieToday
=
funcResponse
.
list
movieToday
.
forEach
(
v
=>
{
v
.
endTime
=
v
.
endTime
+
' 散场'
v
.
filmType
=
v
.
filmType
v
.
filmDirector
=
v
.
filmDirector
v
.
filmLead
=
v
.
filmLead
v
.
priceSpecialText
=
App
.
modular
.
utils
.
formatAmount
(
v
.
ownerPrice
),
v
.
priceText
=
App
.
modular
.
utils
.
formatAmount
(
v
.
visitorPrice
),
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcResponse
.
list
[
i
].
activityId
,
'entryId'
:
funcResponse
.
list
[
i
].
filmId
,
'activityId'
:
funcResponse
.
list
[
i
].
filmId
,
'cover'
:
funcResponse
.
list
[
i
].
cover
,
'endTime'
:
funcResponse
.
list
[
i
].
endTime
+
' 散场'
,
'beginTime'
:
funcResponse
.
list
[
i
].
beginTime
,
'keyword'
:
funcResponse
.
list
[
i
].
keyword
,
'filmName'
:
funcResponse
.
list
[
i
].
filmName
,
'filmType'
:
funcResponse
.
list
[
i
].
filmType
,
'filmDirector'
:
funcResponse
.
list
[
i
].
filmDirector
,
'filmLead'
:
funcResponse
.
list
[
i
].
filmLead
,
'price'
:
funcResponse
.
list
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
sightseerPrice
),
'priceSpecial'
:
funcResponse
.
list
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
ownerPrice
),
'priceDiscount'
:
funcResponse
.
list
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
price
),
'priceType'
:
1
,
'tags'
:
funcResponse
.
list
[
i
].
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
),
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
v
.
priceDiscount
)
{
v
.
priceType
=
1
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
v
.
price
!==
v
.
ownerPrice
&&
funcUserType
)
{
v
.
priceType
=
2
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
v
.
priceType
=
3
funcItem
.
priceType
=
3
}
}
})
funcList
.
push
(
funcItem
)
}
this
.
setData
({
movieToday
},
function
()
{
movieToday
:
funcList
,
},
function
()
{
this
.
setFooterLocation
()
})
wx
.
hideLoading
({
success
:
()
=>
{
this
.
setData
({
loading
:
false
})},
success
:
()
=>
{
this
.
setData
({
loading
:
false
})
},
})
}
})
...
...
@@ -174,7 +202,11 @@ Page({
getAllFilm
:
function
()
{
wx
.
showLoading
({
title
:
'加载中...'
,
success
:
()
=>
{
this
.
setData
({
loading
:
true
})}
success
:
()
=>
{
this
.
setData
({
loading
:
true
})
}
})
// weekType: 0本周热映 1下周
let
movieWeek
=
[]
...
...
@@ -189,38 +221,59 @@ Page({
},
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
movieWeek
=
funcResponse
.
list
movieWeek
.
forEach
(
v
=>
{
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
priceSpecialText
=
App
.
modular
.
utils
.
formatAmount
(
v
.
ownerPrice
),
v
.
priceText
=
App
.
modular
.
utils
.
formatAmount
(
v
.
visitorPrice
),
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
replace
(
/
(
)
+$/
,
''
).
split
(
' '
)
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcResponse
.
list
[
i
].
activityId
,
'entryId'
:
funcResponse
.
list
[
i
].
filmId
,
'activityId'
:
funcResponse
.
list
[
i
].
filmId
,
'cover'
:
funcResponse
.
list
[
i
].
cover
,
'endTime'
:
funcResponse
.
list
[
i
].
endTime
+
' 散场'
,
'beginTime'
:
funcResponse
.
list
[
i
].
beginTime
,
'keyword'
:
funcResponse
.
list
[
i
].
keyword
,
'filmName'
:
funcResponse
.
list
[
i
].
filmName
,
'filmType'
:
funcResponse
.
list
[
i
].
filmType
,
'filmDirector'
:
funcResponse
.
list
[
i
].
filmDirector
,
'filmLead'
:
funcResponse
.
list
[
i
].
filmLead
,
'price'
:
funcResponse
.
list
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
sightseerPrice
),
'priceSpecial'
:
funcResponse
.
list
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
ownerPrice
),
'priceDiscount'
:
funcResponse
.
list
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
price
),
'priceType'
:
1
,
'tags'
:
funcResponse
.
list
[
i
].
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
),
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
v
.
priceDiscount
)
{
v
.
priceType
=
1
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
v
.
price
!==
v
.
ownerPrice
&&
funcUserType
)
{
v
.
priceType
=
2
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
v
.
priceType
=
3
funcItem
.
priceType
=
3
}
}
})
funcList
.
push
(
funcItem
)
}
this
.
setData
({
'movieAll.movieWeek'
:
{
title
:
'本周热映'
,
list
:
movieWeek
list
:
funcList
}
},
function
()
{
},
function
()
{
this
.
setFooterLocation
()
})
wx
.
hideLoading
({
success
:
()
=>
{
this
.
setData
({
loading
:
false
})},
success
:
()
=>
{
this
.
setData
({
loading
:
false
})
},
})
}
})
...
...
@@ -233,38 +286,59 @@ Page({
},
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
movieNextWeek
=
funcResponse
.
list
movieNextWeek
.
forEach
(
v
=>
{
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
priceSpecialText
=
App
.
modular
.
utils
.
formatAmount
(
v
.
ownerPrice
),
v
.
priceText
=
App
.
modular
.
utils
.
formatAmount
(
v
.
visitorPrice
),
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcResponse
.
list
[
i
].
activityId
,
'entryId'
:
funcResponse
.
list
[
i
].
filmId
,
'activityId'
:
funcResponse
.
list
[
i
].
filmId
,
'cover'
:
funcResponse
.
list
[
i
].
cover
,
'endTime'
:
funcResponse
.
list
[
i
].
endTime
+
' 散场'
,
'beginTime'
:
funcResponse
.
list
[
i
].
beginTime
,
'keyword'
:
funcResponse
.
list
[
i
].
keyword
,
'filmName'
:
funcResponse
.
list
[
i
].
filmName
,
'filmType'
:
funcResponse
.
list
[
i
].
filmType
,
'filmDirector'
:
funcResponse
.
list
[
i
].
filmDirector
,
'filmLead'
:
funcResponse
.
list
[
i
].
filmLead
,
'price'
:
funcResponse
.
list
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
sightseerPrice
),
'priceSpecial'
:
funcResponse
.
list
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
ownerPrice
),
'priceDiscount'
:
funcResponse
.
list
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
list
[
i
].
price
),
'priceType'
:
1
,
'tags'
:
funcResponse
.
list
[
i
].
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
),
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
v
.
priceDiscount
)
{
v
.
priceType
=
1
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
v
.
price
!==
v
.
ownerPrice
&&
funcUserType
)
{
v
.
priceType
=
2
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
v
.
priceType
=
3
funcItem
.
priceType
=
3
}
}
})
funcList
.
push
(
funcItem
)
}
this
.
setData
({
'movieAll.movieNextWeek'
:
{
title
:
'下周热映'
,
list
:
movieNextWeek
list
:
funcList
}
},
function
()
{
},
function
()
{
this
.
setFooterLocation
()
})
wx
.
hideLoading
({
success
:
()
=>
{
this
.
setData
({
loading
:
false
})},
success
:
()
=>
{
this
.
setData
({
loading
:
false
})
},
})
}
})
...
...
@@ -292,19 +366,21 @@ Page({
// 跳转到报名页面
onReportMovie
:
function
(
event
)
{
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
console
.
log
(
funcItem
)
let
funcMovieInfo
=
{
'id'
:
funcItem
.
activityId
,
// 活动 id
'id'
:
funcItem
.
id
,
// 活动 id
'name'
:
funcItem
.
filmName
,
// 电影名称
'cover'
:
funcItem
.
cover
,
// 电影封面
'entryId'
:
funcItem
.
filmId
,
// 场次 id
'price'
:
funcItem
.
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcItem
.
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcItem
.
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcItem
.
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
funcItem
.
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcItem
.
price
),
// 活动价文本格式
'priceType'
:
1
,
'price'
:
funcItem
.
price
,
// 普通价
'priceText'
:
funcItem
.
priceText
,
'priceSpecial'
:
funcItem
.
priceSpecial
,
// 业主价
'priceSpecialText'
:
funcItem
.
priceSpecialText
,
'priceDiscount'
:
funcItem
.
price
Discount
,
// 活动价
'priceDiscountText'
:
funcItem
.
priceDiscountText
,
'priceType'
:
funcItem
.
priceType
,
'quantity'
:
1
,
'quantityMin'
:
1
,
...
...
pages/play/movie/movie.wxml
View file @
e38c3d53
...
...
@@ -12,7 +12,7 @@
</view>
<view wx:if="{{statusActive === 0}}">
<block wx:for="{{movieToday}}" wx:key="
id
" wx:if="{{movieToday.length !== 0}}">
<block wx:for="{{movieToday}}" wx:key="
{{index}}
" wx:if="{{movieToday.length !== 0}}">
<view class="movie-wrapper row" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
<view class="movie-time-wrapper row align-c">
<view class="movie-time-start">
...
...
@@ -64,13 +64,13 @@
<text wx:if="{{item.keyword}}">{{item.keyword}}</text>
</view>
<view class="movie-free" wx:if="{{item.priceType === 1}}">
<text>{{item.priceDiscount === 0 ? '免费' : '¥' + item.priceDiscount}}</text>
<text>{{item.priceDiscount === 0 ? '免费' : '¥' + item.priceDiscount
Text
}}</text>
</view>
<view class="movie-free" wx:if="{{item.priceType === 2}}">
<text>{{item.
ownerPrice
=== 0 ? '免费' : '¥' + item.priceSpecialText}}</text>
<text>{{item.
priceSpecial
=== 0 ? '免费' : '¥' + item.priceSpecialText}}</text>
</view>
<view class="movie-free" wx:if="{{item.priceType === 3}}">
<text>{{item.
visitorP
rice === 0 ? '免费' : '¥' + item.priceText}}</text>
<text>{{item.
p
rice === 0 ? '免费' : '¥' + item.priceText}}</text>
</view>
<view class="movie-btn" catchtap="onReportMovie" data-item="{{item}}">
<text>报名观影</text>
...
...
@@ -88,7 +88,7 @@
</block>
</view>
<view wx:if="{{statusActive === 1}}">
<block wx:for="{{movieAll}}" wx:for-index="
key" wx:for-item="movieList" wx:key="key
" wx:if="{{movieAll.movieWeek.list.length > 0 || movieAll.movieNextWeek.list.length > 0}}">
<block wx:for="{{movieAll}}" wx:for-index="
index" wx:for-item="movieList" wx:key="{{index}}
" wx:if="{{movieAll.movieWeek.list.length > 0 || movieAll.movieNextWeek.list.length > 0}}">
<view class="movie-week row align-c con-c" wx:if="{{movieList.list.length > 0}}">
<view class="line"></view>
<view class="movie-week-title">
...
...
@@ -98,7 +98,7 @@
</view>
<view class="line"></view>
</view>
<block wx:for="{{movieList.list}}" wx:key="
id
">
<block wx:for="{{movieList.list}}" wx:key="
{{index}}" wx:for-index="index
">
<view class="all-movie-wrapper" bindtap="onToMovieDetail" data-movieId="{{item.activityId}}">
<view class="all-movie-cover">
<image src="{{item.cover}}"></image>
...
...
@@ -140,13 +140,16 @@
<text wx:if="{{item.keyword}}">{{item.keyword}}</text>
</view>
<view class="movie-free" wx:if="{{item.priceType === 1}}">
<text>{{item.priceDiscount === 0 ? '免费' : '¥' + item.priceDiscount}}</text>
<text>{{item.priceDiscount === 0 ? '免费' : '¥' + item.priceDiscount
Text
}}</text>
</view>
<view class="movie-free" wx:if="{{item.priceType === 2}}">
<text>{{item.
ownerPrice
=== 0 ? '免费' : '¥' + item.priceSpecialText}}</text>
<text>{{item.
priceSpecial
=== 0 ? '免费' : '¥' + item.priceSpecialText}}</text>
</view>
<view class="movie-free" wx:if="{{item.priceType === 3}}">
<text>{{item.visitorPrice === 0 ? '免费' : '¥' + item.priceText}}</text>
<text>{{item.price === 0 ? '免费' : '¥' + item.priceText}}</text>
</view>
<view class="movie-btn" catchtap="onReportMovie" data-item="{{item}}">
<text>报名观影</text>
</view>
</view>
</view>
...
...
pages/play/service-detail/service-detail.js
View file @
e38c3d53
...
...
@@ -520,6 +520,7 @@ Page({
'weekType'
:
0
,
'pageSize'
:
10
,
'pageNo'
:
1
,
'tagIds'
:
'102'
},
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
.
list
...
...
@@ -544,9 +545,11 @@ Page({
'tagsId'
:
funcResponse
[
i
].
tagIds
,
'tags'
:
funcResponse
[
i
].
tags
.
split
(
' '
),
}
if
(
funcItem
.
tagsId
.
includes
(
'102'
))
{
funcList
.
push
(
funcItem
)
}
// if (funcItem.tagsId.includes('102')) {
// }
}
this
.
setData
({
detailCommodity
:
funcList
...
...
read.js
View file @
e38c3d53
...
...
@@ -13,4 +13,7 @@
*
* 代码编写规范 - js - 函数命名
* query
*
* js - 列表相关
* 循环一定添加 key index
*/
\ No newline at end of file
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