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
45962e2d
authored
Sep 22, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Plain Diff
LL - 观影报名
parents
c6171533
8cc2e3b2
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
232 additions
and
179 deletions
app.js
component/navigation/navigation.wxss
pages/campsite/home/home.js
pages/campsite/home/home.wxml
pages/commodity/menu-food/menu-food.js
pages/commodity/shopping-cart/shopping-cart.wxml
pages/commodity/shopping-cart/shopping-cart.wxss
pages/pay/order-input/order-input.js
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/service-detail/service-detail.js
pages/play/service-detail/service-detail.wxml
pages/play/service-detail/service-detail.wxss
pages/play/service/service.wxss
project.config.json
app.js
View file @
45962e2d
...
@@ -163,6 +163,13 @@ App({
...
@@ -163,6 +163,13 @@ App({
if
(
obj
&&
obj
.
success
)
{
if
(
obj
&&
obj
.
success
)
{
obj
.
success
(
funcResponse
.
token
)
obj
.
success
(
funcResponse
.
token
)
}
}
// 防止无限刷新 token 的紧急修复手段
if
(
obj
&&
obj
.
error
)
{
wx
.
switchTab
({
url
:
'/pages/home/home'
})
}
},
},
})
})
}
}
...
@@ -269,13 +276,7 @@ App({
...
@@ -269,13 +276,7 @@ App({
this
.
globalData
.
token
=
''
this
.
globalData
.
token
=
''
this
.
globalData
.
refreshToken
=
''
this
.
globalData
.
refreshToken
=
''
// 记录原始请求参数
this
.
login
({
error
:
true
})
let
funcCallBackFunction
=
{
success
:
()
=>
{
this
.
wxRequest
(
obj
)
}
}
this
.
login
(
funcCallBackFunction
)
break
break
}
}
}
}
...
...
component/navigation/navigation.wxss
View file @
45962e2d
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
flex-direction: row;
flex-direction: row;
align-items: center;
align-items: center;
width: 200rpx;
width: 200rpx;
padding-left: 14rpx;
}
}
.navbar-operation-back,
.navbar-operation-back,
...
@@ -26,5 +27,6 @@
...
@@ -26,5 +27,6 @@
}
}
.title-text text {
.title-text text {
font-size: 14px;
font-size: 17px;
font-weight: 500;
}
}
\ No newline at end of file
pages/campsite/home/home.js
View file @
45962e2d
...
@@ -30,11 +30,11 @@ Page({
...
@@ -30,11 +30,11 @@ Page({
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
setSideHeight
()
this
.
setSideHeight
()
this
.
queryDetail
()
this
.
queryActivity
()
},
},
onShow
:
function
()
{
onShow
:
function
()
{
this
.
setShopInfo
(
3
,
1
)
this
.
setShopInfo
(
3
,
1
)
this
.
queryDetail
()
this
.
queryActivity
()
},
},
setSideHeight
:
function
()
{
setSideHeight
:
function
()
{
...
...
pages/campsite/home/home.wxml
View file @
45962e2d
...
@@ -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="{{
6
}}">
<view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{
3
}}">
<view class="buy-left col con-c">
<view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image>
<image src="./image/yinpinyuding.png"></image>
</view>
</view>
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
</view>
</view>
</view>
</view>
<!-- 文创周边 -->
<!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt" data-id="{{
1
}}">
<view class="buy-art row" bindtap="onBuyArt" data-id="{{
3
}}">
<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>
...
...
pages/commodity/menu-food/menu-food.js
View file @
45962e2d
...
@@ -34,6 +34,7 @@ Page({
...
@@ -34,6 +34,7 @@ Page({
},
},
onLoad
:
function
(
option
)
{
onLoad
:
function
(
option
)
{
console
.
log
(
option
)
this
.
setData
({
this
.
setData
({
option
:
option
option
:
option
})
})
...
...
pages/commodity/shopping-cart/shopping-cart.wxml
View file @
45962e2d
...
@@ -109,23 +109,23 @@
...
@@ -109,23 +109,23 @@
<text>{{'共' + selectionTotal + '件,优惠 ¥' + amountDiscount}}</text>
<text>{{'共' + selectionTotal + '件,优惠 ¥' + amountDiscount}}</text>
</view>
</view>
</view>
</view>
<view class="order
_pay_
wrap row con-c align-c" bindtap="onPaySubmit">结算</view>
<view class="order
-pay-
wrap row con-c align-c" bindtap="onPaySubmit">结算</view>
<!-- 库存提示弹窗 -->
<!-- 库存提示弹窗 -->
<l-popup show="{{isEnough}}" content-align="center" locked="{{true}}">
<l-popup show="{{isEnough}}" content-align="center" locked="{{true}}">
<view class="popup
_
wrap">
<view class="popup
-
wrap">
<view class="popup
_
title">抱歉,您本单商品有2件库存不足</view>
<view class="popup
-
title">抱歉,您本单商品有2件库存不足</view>
<view class="popup
_
list">
<view class="popup
-
list">
<view class="popup
_
item row align-c" wx:for="{{notEnough}}" wx:key="id">
<view class="popup
-
item row align-c" wx:for="{{notEnough}}" wx:key="id">
<view class="popup
_item_
img">
<view class="popup
-item-
img">
<image mode="widthFix" src="{{item.img}}"></image>
<image mode="widthFix" src="{{item.img}}"></image>
</view>
</view>
<view class="popup
_item_
title">{{item.title}}</view>
<view class="popup
-item-
title">{{item.title}}</view>
</view>
</view>
</view>
</view>
<view class="popup
_back_
cart row con-c align-c" bindtap="handleBackCart">返回购物车</view>
<view class="popup
-back-
cart row con-c align-c" bindtap="handleBackCart">返回购物车</view>
</view>
</view>
<view class="popup
_close_
btn row con-c align-c" bindtap="handleClosePopup">
<view class="popup
-close-
btn row con-c align-c" bindtap="handleClosePopup">
<view class="popup
_
close">
<view class="popup
-
close">
<image mode="widthFix" src="../../../image/icon_close.png"></image>
<image mode="widthFix" src="../../../image/icon_close.png"></image>
</view>
</view>
</view>
</view>
...
...
pages/commodity/shopping-cart/shopping-cart.wxss
View file @
45962e2d
...
@@ -256,15 +256,17 @@
...
@@ -256,15 +256,17 @@
color: #15191F;
color: #15191F;
}
}
.order
_pay_
wrap {
.order
-pay-
wrap {
width: 188rpx;
width: 188rpx;
height: 96rpx;
height: 96rpx;
font-size: 30rpx;
font-size: 30rpx;
color: #fff;
color: #fff;
font-weight: 600;
background-color: #86c5e1;
background-color: #86c5e1;
border-radius: 4rpx;
}
}
.popup
_
wrap {
.popup
-
wrap {
width: 606rpx;
width: 606rpx;
height: 690rpx;
height: 690rpx;
padding: 0 40rpx;
padding: 0 40rpx;
...
@@ -272,7 +274,7 @@
...
@@ -272,7 +274,7 @@
border-radius: 4rpx;
border-radius: 4rpx;
}
}
.popup
_
title {
.popup
-
title {
padding: 56rpx 0;
padding: 56rpx 0;
font-size: 34rpx;
font-size: 34rpx;
font-weight: 600;
font-weight: 600;
...
@@ -281,26 +283,26 @@
...
@@ -281,26 +283,26 @@
border-bottom: 1px solid #e2e7ef;
border-bottom: 1px solid #e2e7ef;
}
}
.popup
_
list {
.popup
-
list {
padding: 26rpx 0;
padding: 26rpx 0;
}
}
.popup
_
item {
.popup
-
item {
padding: 32rpx 0;
padding: 32rpx 0;
}
}
.popup
_item_
img {
.popup
-item-
img {
width: 96rpx;
width: 96rpx;
height: 96rpx;
height: 96rpx;
}
}
.popup
_item_
title {
.popup
-item-
title {
margin-left: 32rpx;
margin-left: 32rpx;
font-size: 30rpx;
font-size: 30rpx;
color: #15191f;
color: #15191f;
}
}
.popup
_back_
cart {
.popup
-back-
cart {
width: 526rpx;
width: 526rpx;
height: 80rpx;
height: 80rpx;
margin-top: 32rpx;
margin-top: 32rpx;
...
...
pages/pay/order-input/order-input.js
View file @
45962e2d
...
@@ -269,7 +269,7 @@ Page({
...
@@ -269,7 +269,7 @@ Page({
winButtonPay
:
false
,
// 立即支付
winButtonPay
:
false
,
// 立即支付
winButtonAppointment
:
true
,
// 确认预约
winButtonAppointment
:
true
,
// 确认预约
})
})
this
.
setEntryTime
()
this
.
setEntryTime
(
this
.
data
.
shoppingCartList
[
0
].
entryId
)
break
break
}
}
...
@@ -389,7 +389,7 @@ Page({
...
@@ -389,7 +389,7 @@ Page({
* @param
* @param
* @returns
* @returns
*/
*/
setEntryTime
:
function
()
{
setEntryTime
:
function
(
funcEntryId
)
{
let
funcItem
=
wx
.
getStorageSync
(
'shoppingCartBuffer'
)[
0
]
let
funcItem
=
wx
.
getStorageSync
(
'shoppingCartBuffer'
)[
0
]
App
.
wxRequest
({
App
.
wxRequest
({
url
:
'/api/v1/activity/getEnrollView'
,
url
:
'/api/v1/activity/getEnrollView'
,
...
@@ -398,7 +398,6 @@ Page({
...
@@ -398,7 +398,6 @@ Page({
},
},
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcResponse
=
response
.
data
console
.
log
(
funcResponse
)
let
funcTimetable
=
funcResponse
.
activityTimes
let
funcTimetable
=
funcResponse
.
activityTimes
let
funcDate
=
[]
let
funcDate
=
[]
...
@@ -406,9 +405,12 @@ Page({
...
@@ -406,9 +405,12 @@ Page({
let
funcTimeList
=
[]
let
funcTimeList
=
[]
let
funcListIndex
=
-
1
let
funcListIndex
=
-
1
let
funcActiveTime
=
''
let
funcActiveTime
=
''
// 生成日期数组 ['YYYY-MM-DD', YYYY-MM-DD', YYYY-MM-DD', ]
// 生成对应日期场次数组 [['hh:mm:ss'], ['hh:mm:ss', 'hh:mm:ss'], ['hh:mm:ss', 'hh:mm:ss', 'hh:mm:ss']]
for
(
let
i
=
0
,
l
=
funcTimetable
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
funcTimetable
.
length
;
i
<
l
;
i
++
)
{
let
funcDateString
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'YYYY-MM-DD'
)
let
funcDateString
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'YYYY-MM-DD'
)
let
funcTimeString
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'hh:mm
:ss
'
)
let
funcTimeString
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'hh:mm'
)
if
(
funcActiveTime
===
funcDateString
)
{
if
(
funcActiveTime
===
funcDateString
)
{
// 渲染数组
// 渲染数组
...
@@ -429,7 +431,7 @@ Page({
...
@@ -429,7 +431,7 @@ Page({
}
}
this
.
setData
({
this
.
setData
({
entryId
:
funcDate
[
0
][
0
].
id
,
entryId
:
func
EntryId
?
funcEntryId
:
func
Date
[
0
][
0
].
id
,
entryDate
:
funcDate
,
entryDate
:
funcDate
,
entrySelection
:
funcDateList
[
0
]
+
' '
+
funcTimeList
[
0
][
0
],
entrySelection
:
funcDateList
[
0
]
+
' '
+
funcTimeList
[
0
][
0
],
entryDateList
:
[
funcDateList
,
funcTimeList
[
0
]],
entryDateList
:
[
funcDateList
,
funcTimeList
[
0
]],
...
@@ -439,6 +441,26 @@ Page({
...
@@ -439,6 +441,26 @@ Page({
quantityMax
:
funcDate
[
0
][
0
].
residue
<
3
?
funcDate
[
0
][
0
].
residue
:
3
,
quantityMax
:
funcDate
[
0
][
0
].
residue
<
3
?
funcDate
[
0
][
0
].
residue
:
3
,
quantityMin
:
1
,
quantityMin
:
1
,
})
})
// 如果存在场次 id 则重新设置场次信息
if
(
funcEntryId
)
{
let
funcDate
=
''
let
funcTimeBegin
=
''
let
funcTimeEnd
=
''
for
(
let
i
=
0
,
l
=
funcTimetable
.
length
;
i
<
l
;
i
++
)
{
if
(
funcEntryId
===
funcTimetable
[
i
].
id
)
{
funcDate
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'MM月DD日'
)
funcTimeBegin
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'hh:mm:ss'
)
funcTimeEnd
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
endTime
).
format
(
'hh:mm:ss'
)
break
}
}
this
.
setData
({
buyContentTime
:
funcDate
+
' '
+
funcTimeBegin
+
' - '
+
funcTimeEnd
})
}
}
}
})
})
},
},
...
@@ -681,7 +703,6 @@ Page({
...
@@ -681,7 +703,6 @@ Page({
* @returns
* @returns
*/
*/
onQuantityAdd
:
function
()
{
onQuantityAdd
:
function
()
{
console
.
log
(
'onQuantityAdd'
,
this
.
data
.
quantityMax
)
// 购买数量最大为 20
// 购买数量最大为 20
if
(
this
.
data
.
quantity
>=
this
.
data
.
quantityMax
)
{
if
(
this
.
data
.
quantity
>=
this
.
data
.
quantityMax
)
{
// 针对不同商品类型订制提示语
// 针对不同商品类型订制提示语
...
@@ -978,6 +999,17 @@ Page({
...
@@ -978,6 +999,17 @@ Page({
return
return
}
}
if
(
/名额不足/
.
test
(
response
.
data
.
msg
))
{
wx
.
lin
.
showToast
({
title
:
response
.
data
.
msg
,
icon
:
'error'
,
})
this
.
setData
({
isPaySubmit
:
false
,
})
return
}
// 库存充足正常下单支付
// 库存充足正常下单支付
let
funcResponse
=
response
.
data
let
funcResponse
=
response
.
data
pagePayId
=
funcResponse
.
orderId
pagePayId
=
funcResponse
.
orderId
...
...
pages/play/movie-detail/movie-detail.js
View file @
45962e2d
...
@@ -121,10 +121,25 @@ Page({
...
@@ -121,10 +121,25 @@ Page({
}
}
})
})
// console.log(showList)
// console.log(showList)
movieInfo
.
priceSpecialText
=
movieInfo
.
ownerPrice
.
toFixed
(
2
)
movieInfo
.
priceText
=
movieInfo
.
visitorPrice
.
toFixed
(
2
)
movieInfo
.
tags
=
movieInfo
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
movieInfo
.
tags
=
movieInfo
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
movieInfo
.
free
=
movieInfo
.
ownerPrice
==
'0'
&&
movieInfo
.
visitorPrice
==
'0'
?
'免费'
:
`¥
${
movieInfo
.
ownerPrice
.
toFixed
(
2
)}
`
movieInfo
.
free
=
movieInfo
.
ownerPrice
==
'0'
&&
movieInfo
.
visitorPrice
==
'0'
?
'免费'
:
`¥
${
movieInfo
.
ownerPrice
.
toFixed
(
2
)}
`
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
movieInfo
.
priceDiscount
)
{
movieInfo
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
movieInfo
.
price
!==
movieInfo
.
ownerPrice
&&
funcUserType
)
{
movieInfo
.
priceType
=
2
}
else
{
movieInfo
.
priceType
=
3
}
}
this
.
setData
({
this
.
setData
({
movieInfo
,
movieInfo
,
showList
,
showList
,
...
@@ -135,9 +150,45 @@ Page({
...
@@ -135,9 +150,45 @@ Page({
},
},
// 跳转到报名页面
// 跳转到报名页面
onReportMovie
:
function
(
event
)
{
onReportMovie
:
function
(
event
)
{
let
id
=
event
.
currentTarget
.
dataset
.
movieid
console
.
log
(
event
.
currentTarget
.
dataset
.
item
.
filmId
)
let
funcMovieInfo
=
{
'id'
:
this
.
data
.
movieInfo
.
activityId
,
// 活动 id
'name'
:
this
.
data
.
movieInfo
.
filmName
,
// 电影名称
'cover'
:
this
.
data
.
movieInfo
.
cover
,
// 电影封面
'entryId'
:
event
.
currentTarget
.
dataset
.
item
.
filmId
,
// 场次 id
'price'
:
this
.
data
.
movieInfo
.
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
this
.
data
.
movieInfo
.
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
this
.
data
.
movieInfo
.
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
this
.
data
.
movieInfo
.
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
this
.
data
.
movieInfo
.
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
this
.
data
.
movieInfo
.
price
),
// 活动价文本格式
'priceType'
:
1
,
'quantity'
:
1
,
'quantityMin'
:
1
,
'quantityMax'
:
3
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcMovieInfo
.
priceDiscount
)
{
funcMovieInfo
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcMovieInfo
.
price
!==
funcMovieInfo
.
priceSpecial
&&
funcUserType
)
{
funcMovieInfo
.
priceType
=
2
}
else
{
funcMovieInfo
.
priceType
=
3
}
}
console
.
log
(
funcMovieInfo
)
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcMovieInfo
])
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/pay/order-input/order-input?type='
+
'7'
+
'&id='
+
id
,
url
:
'/pages/pay/order-input/order-input?type=7'
,
})
})
}
}
})
})
\ No newline at end of file
pages/play/movie-detail/movie-detail.wxml
View file @
45962e2d
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<view class="show-free">
<view class="show-free">
<text>{{movieInfo.free}}</text>
<text>{{movieInfo.free}}</text>
</view>
</view>
<view class="show-btn" bindtap="onReportMovie" data-
movieId="{{item.filmId
}}">
<view class="show-btn" bindtap="onReportMovie" data-
item="{{item
}}">
<text>报名观影</text>
<text>报名观影</text>
</view>
</view>
</view>
</view>
...
...
pages/play/movie/movie.js
View file @
45962e2d
...
@@ -90,8 +90,24 @@ Page({
...
@@ -90,8 +90,24 @@ Page({
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
priceSpecialText
=
v
.
ownerPrice
.
toFixed
(
2
)
v
.
priceText
=
v
.
visitorPrice
.
toFixed
(
2
)
v
.
free
=
v
.
ownerPrice
==
'0'
?
'免费'
:
`¥
${
v
.
ownerPrice
.
toFixed
(
2
)}
`
v
.
free
=
v
.
ownerPrice
==
'0'
?
'免费'
:
`¥
${
v
.
ownerPrice
.
toFixed
(
2
)}
`
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
v
.
priceDiscount
)
{
v
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
v
.
price
!==
v
.
ownerPrice
&&
funcUserType
)
{
v
.
priceType
=
2
}
else
{
v
.
priceType
=
3
}
}
})
})
this
.
setData
({
this
.
setData
({
movieToday
movieToday
...
@@ -124,6 +140,8 @@ Page({
...
@@ -124,6 +140,8 @@ Page({
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
priceSpecialText
=
v
.
ownerPrice
.
toFixed
(
2
)
v
.
priceText
=
v
.
visitorPrice
.
toFixed
(
2
)
v
.
free
=
v
.
ownerPrice
==
'0'
?
'免费'
:
`¥
${
v
.
ownerPrice
.
toFixed
(
2
)}
`
v
.
free
=
v
.
ownerPrice
==
'0'
?
'免费'
:
`¥
${
v
.
ownerPrice
.
toFixed
(
2
)}
`
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
replace
(
/
(
)
+$/
,
''
).
split
(
' '
)
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
replace
(
/
(
)
+$/
,
''
).
split
(
' '
)
})
})
...
@@ -149,6 +167,8 @@ Page({
...
@@ -149,6 +167,8 @@ Page({
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmType
=
v
.
filmType
.
replace
(
/
\/
/g
,
' / '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmDirector
=
v
.
filmDirector
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
filmLead
=
v
.
filmLead
.
replace
(
/
\/
/g
,
' '
)
v
.
priceSpecialText
=
v
.
ownerPrice
.
toFixed
(
2
)
v
.
priceText
=
v
.
visitorPrice
.
toFixed
(
2
)
v
.
free
=
v
.
ownerPrice
==
'0'
?
'免费'
:
`¥
${
v
.
ownerPrice
.
toFixed
(
2
)}
`
v
.
free
=
v
.
ownerPrice
==
'0'
?
'免费'
:
`¥
${
v
.
ownerPrice
.
toFixed
(
2
)}
`
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
v
.
tags
=
v
.
tags
.
replace
(
/
(
)?
热映影片
(
)?
/
,
' '
).
split
(
' '
)
})
})
...
@@ -183,11 +203,47 @@ Page({
...
@@ -183,11 +203,47 @@ Page({
},
},
// 跳转到报名页面
// 跳转到报名页面
onReportMovie
:
function
(
event
)
{
onReportMovie
:
function
(
event
)
{
console
.
log
(
event
)
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
console
.
log
(
funcItem
)
let
funcMovieInfo
=
{
'id'
:
funcItem
.
activityId
,
// 活动 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
,
'quantity'
:
1
,
'quantityMin'
:
1
,
'quantityMax'
:
3
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcMovieInfo
.
priceDiscount
)
{
funcMovieInfo
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcMovieInfo
.
price
!==
funcMovieInfo
.
priceSpecial
&&
funcUserType
)
{
funcMovieInfo
.
priceType
=
2
}
else
{
funcMovieInfo
.
priceType
=
3
}
}
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcMovieInfo
])
let
id
=
event
.
currentTarget
.
dataset
.
movieid
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/pay/order-input/order-input?type=
'
+
'7'
+
'&id='
+
id
,
url
:
'/pages/pay/order-input/order-input?type=
7'
,
})
})
}
}
})
})
\ No newline at end of file
pages/play/movie/movie.wxml
View file @
45962e2d
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
<view class="movie-free">
<view class="movie-free">
<text>{{item.free}}</text>
<text>{{item.free}}</text>
</view>
</view>
<view class="movie-btn" catchtap="onReportMovie" data-
movieId="{{item.activityId
}}">
<view class="movie-btn" catchtap="onReportMovie" data-
item="{{item
}}">
<text>报名观影</text>
<text>报名观影</text>
</view>
</view>
</view>
</view>
...
...
pages/play/service-detail/service-detail.js
View file @
45962e2d
...
@@ -473,56 +473,33 @@ Page({
...
@@ -473,56 +473,33 @@ Page({
},
},
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
.
list
let
funcResponse
=
response
.
data
.
list
let
func
Commodity
List
=
[]
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
activityId
,
// 商品标识
'name'
:
funcResponse
[
i
].
activityId
,
'typeId'
:
7
,
// 商品类别标识
'sidebarId'
:
''
,
'name'
:
funcResponse
[
i
].
filmName
,
'cover'
:
funcResponse
[
i
].
cover
,
// 商品封面
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'describeDetail'
:
''
,
// 商品描述详情,在点击详情时获得数据
'dateBegin'
:
funcResponse
[
i
].
beginDate
,
'dateBegin'
:
funcResponse
[
i
].
beginDate
,
'dateEnd'
:
funcResponse
[
i
].
endDate
,
'dateEnd'
:
funcResponse
[
i
].
endDate
,
'cover'
:
funcResponse
[
i
].
cover
,
'movieDirector'
:
funcResponse
[
i
].
filmDirector
,
'movieDirector'
:
funcResponse
[
i
].
filmDirector
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieName'
:
funcResponse
[
i
].
filmName
,
'movieName'
:
funcResponse
[
i
].
filmName
,
'movieType'
:
funcResponse
[
i
].
filmType
,
'movieType'
:
funcResponse
[
i
].
filmType
,
'movieKeyWord'
:
funcResponse
[
i
].
keyword
,
'movieKeyWord'
:
funcResponse
[
i
].
keyword
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceType'
:
1
,
'tagsId'
:
funcResponse
[
i
].
tagIds
,
'tagsId'
:
funcResponse
[
i
].
tagIds
,
'tags'
:
funcResponse
[
i
].
tags
.
split
(
' '
),
'tags'
:
funcResponse
[
i
].
tags
.
split
(
' '
),
}
}
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
}
}
if
(
funcItem
.
tagsId
.
includes
(
'102'
))
{
if
(
funcItem
.
tagsId
.
includes
(
'102'
))
{
func
Commodity
List
.
push
(
funcItem
)
funcList
.
push
(
funcItem
)
}
}
funcCommodityList
.
push
(
funcItem
)
}
}
this
.
setData
({
this
.
setData
({
detailCommodity
:
func
Commodity
List
detailCommodity
:
funcList
})
})
}
}
})
})
...
@@ -552,18 +529,20 @@ Page({
...
@@ -552,18 +529,20 @@ Page({
},
},
onBuy
:
function
(
event
)
{
onBuy
:
function
(
event
)
{
let
funcCommodityInfo
=
event
.
currentTarget
.
dataset
.
item
let
id
=
event
.
currentTarget
.
dataset
.
id
// 补充必要参数
funcCommodityInfo
.
quantity
=
1
funcCommodityInfo
.
quantityMin
=
1
funcCommodityInfo
.
quantityMax
=
1
funcCommodityInfo
.
isActive
=
true
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcCommodityInfo
])
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/pay/order-input/order-input?type='
+
funcCommodityInfo
.
typeId
url
:
'/pages/play/movie-detail/movie-detail?id='
+
id
,
})
})
// // 补充必要参数
// 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
()
{
...
...
pages/play/service-detail/service-detail.wxml
View file @
45962e2d
<!-- 畅玩 - 商店详情 -->
<!-- 畅玩 - 商店详情 -->
<navigation class="navigation" titleText="{{info.
nam
e}}" color="#ffffff" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<navigation class="navigation" titleText="{{info.
titl
e}}" color="#ffffff" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container" wx:if="{{option.id !== '2'}}">
<view class="container" wx:if="{{option.id !== '2'}}">
<view id="banner" class="banner">
<view id="banner" class="banner">
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
</block>
</block>
<block wx:if="{{detailActivity.length === 0}}">
<block wx:if="{{detailActivity.length === 0}}">
<view class="commodity-card-item-nothing
row
con-c align-c">
<view class="commodity-card-item-nothing
col
con-c align-c">
<text>近期暂无活动安排</text>
<text>近期暂无活动安排</text>
</view>
</view>
</block>
</block>
...
@@ -206,10 +206,10 @@
...
@@ -206,10 +206,10 @@
<view>
<view>
<text>{{item.content}}</text>
<text>{{item.content}}</text>
</view>
</view>
<view class="evaluate-item-content-more">
<
!-- <
view class="evaluate-item-content-more">
<text>... </text>
<text>... </text>
<text>全文</text>
<text>全文</text>
</view>
</view>
-->
</view>
</view>
<view class="evaluate-item-album">
<view class="evaluate-item-album">
...
@@ -297,7 +297,7 @@
...
@@ -297,7 +297,7 @@
</view>
</view>
<view class="commodity-card-list row">
<view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="movie-card-item col">
<view class="movie-card-item col"
data-id="{{item.name}}" bindtap="onBuy"
>
<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>
...
@@ -323,7 +323,7 @@
...
@@ -323,7 +323,7 @@
<text>免费</text>
<text>免费</text>
</view>
</view>
<view>
<view>
<button class="row con-c align-c"
data-item="{{item}}" bindtap="onBuy"
>报名观影</button>
<button class="row con-c align-c">报名观影</button>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/play/service-detail/service-detail.wxss
View file @
45962e2d
...
@@ -160,7 +160,10 @@
...
@@ -160,7 +160,10 @@
}
}
.commodity-title text {
.commodity-title text {
flex-grow: 1;
flex: 1;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
}
.commodity-title image {
.commodity-title image {
...
...
pages/play/service/service.wxss
View file @
45962e2d
...
@@ -143,10 +143,9 @@
...
@@ -143,10 +143,9 @@
line-height: 36rpx;
line-height: 36rpx;
color: #959da9;
color: #959da9;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
.shop-date {
.shop-date {
...
...
project.config.json
View file @
45962e2d
...
@@ -71,20 +71,13 @@
...
@@ -71,20 +71,13 @@
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
"name"
:
"pages/
pay/order-comment/order-comment
"
,
"name"
:
"pages/
commodity/menu-food/menu-food
"
,
"pathName"
:
"pages/
pay/order-comment/order-comment
"
,
"pathName"
:
"pages/
commodity/menu-food/menu-food
"
,
"query"
:
""
,
"query"
:
""
,
"scene"
:
null
"scene"
:
null
},
},
{
{
"id"
:
11
,
"id"
:
-1
,
"name"
:
"pages/play/movie/movie"
,
"pathName"
:
"pages/play/movie/movie"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
12
,
"name"
:
"pages/play/home/home"
,
"name"
:
"pages/play/home/home"
,
"pathName"
:
"pages/play/home/home"
,
"pathName"
:
"pages/play/home/home"
,
"query"
:
""
,
"query"
:
""
,
...
@@ -94,76 +87,7 @@
...
@@ -94,76 +87,7 @@
"id"
:
-1
,
"id"
:
-1
,
"name"
:
"pages/play/service-detail/service-detail"
,
"name"
:
"pages/play/service-detail/service-detail"
,
"pathName"
:
"pages/play/service-detail/service-detail"
,
"pathName"
:
"pages/play/service-detail/service-detail"
,
"query"
:
""
,
"query"
:
"id=1&type=4"
,
"scene"
:
null
},
{
"id"
:
15
,
"name"
:
"pages/play/point-detail/point-detail"
,
"pathName"
:
"pages/play/point-detail/point-detail"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/mine/accumulate/accumulate"
,
"pathName"
:
"pages/mine/accumulate/accumulate"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/mine/home/home"
,
"pathName"
:
"pages/mine/home/home"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/campsite/home/home"
,
"pathName"
:
"pages/campsite/home/home"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
19
,
"name"
:
"pages/pay/order-detail/order-detail"
,
"pathName"
:
"pages/pay/order-detail/order-detail"
,
"query"
:
"id= 38f4a20175f444c899774ce379f94b83"
,
"scene"
:
null
},
{
"id"
:
9
,
"name"
:
"pages/play/service/service"
,
"pathName"
:
"pages/play/service/service"
,
"query"
:
"type=2&title=美食"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/play/activity-detail/activity-detail"
,
"pathName"
:
"pages/play/activity-detail/activity-detail"
,
"query"
:
"id=d1a698e4667645ea9d2920fc8b88c603"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/play/service-detail/service-detail"
,
"pathName"
:
"pages/play/service-detail/service-detail"
,
"query"
:
"id=6&type=5"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/play/activity/activity"
,
"pathName"
:
"pages/play/activity/activity"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/mine/appointment/appointment"
,
"pathName"
:
"pages/mine/appointment/appointment"
,
"scene"
:
null
"scene"
:
null
}
}
]
]
...
...
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