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
b52c5598
authored
Dec 31, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
我的订单,我的预约问题修改。
parent
cfa619c6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
86 deletions
pages/mine/appointment-detail/appointment-detail.js
pages/mine/appointment-detail/appointment-detail.wxml
pages/mine/appointment/appointment.js
pages/mine/order/order.js
pages/mine/order/order.wxml
pages/mine/order/order.wxss
pages/pay/order-input/order-input.js
pages/play/movie-detail/movie-detail.js
pages/play/movie/movie.js
pages/mine/appointment-detail/appointment-detail.js
View file @
b52c5598
...
...
@@ -27,6 +27,8 @@ Page({
userInfo
:
{},
goodsList
:
[],
couponCodeList
:
[],
couponCodeSelectionIndex
:
0
,
viewCouponCode
:
false
,
winInstructions
:
false
,
},
...
...
@@ -89,6 +91,7 @@ Page({
'viewButton'
:
[],
}
if
(
funcOrderInfo
.
state
===
3
&&
funcOrderInfo
.
goodsType
===
-
3
)
funcOrderInfo
.
state
=
6
this
.
setActivityDetailView
(
funcOrderInfo
)
console
.
log
(
funcOrderInfo
)
...
...
@@ -116,7 +119,7 @@ Page({
'couponName'
:
''
,
'couponNumber'
:
''
,
'couponQrCode'
:
''
,
'couponState'
:
funcGoodsListBuffer
[
i
].
status
,
'couponState'
:
Number
(
funcGoodsListBuffer
[
i
].
status
)
,
})
}
...
...
@@ -349,7 +352,7 @@ Page({
},
// 一键扫码
onCouponCodeScan
:
function
(
e
vent
)
{
onCouponCodeScan
:
function
(
funcE
vent
)
{
App
.
ui
.
showToast
({
iconType
:
'loading'
,
title
:
'加载中'
})
App
.
request
({
url
:
'v1/order/getVolumesByOrderId'
,
...
...
@@ -375,6 +378,16 @@ Page({
}
}
let
funcItem
=
funcEvent
.
currentTarget
.
dataset
.
item
if
(
funcItem
)
{
for
(
let
i
=
0
,
l
=
funcList
.
length
;
i
<
l
;
i
++
)
{
if
(
funcItem
.
couponId
===
funcList
[
i
].
couponId
)
{
this
.
setData
({
couponCodeSelectionIndex
:
i
})
break
}
}
}
this
.
setData
({
winCouponCode
:
true
,
couponCodeList
:
funcList
...
...
@@ -396,51 +409,6 @@ Page({
})
},
// 弹出单张二维码
onCouponCode
:
function
(
event
)
{
let
funcOrderInfo
=
event
.
currentTarget
.
dataset
.
item
App
.
ui
.
showToast
({
'iconType'
:
'loading'
,
'title'
:
'加载中'
,
'duration'
:
60000
})
App
.
request
({
url
:
'v1/volume/getVolume'
,
params
:
{
'volumeId'
:
funcOrderInfo
.
codeId
},
})
.
then
((
response
)
=>
{
App
.
ui
.
hideToast
()
let
funcResponse
=
response
.
data
let
funcCodeInfo
=
{
'codeNo'
:
funcResponse
.
serialNumber
,
'codeName'
:
funcResponse
.
name
,
'codeBase64'
:
funcResponse
.
qrcode
,
}
this
.
setData
({
codeInfo
:
funcCodeInfo
,
winCode
:
true
,
})
})
},
// 多二维码 复制券码
setClipboard
:
function
(
event
)
{
const
code
=
event
.
currentTarget
.
dataset
.
code
wx
.
setClipboardData
({
data
:
code
,
})
},
// 单个二维码 复制券码
onCodeCopy
:
function
()
{
wx
.
setClipboardData
({
data
:
this
.
data
.
codeInfo
.
codeNo
,
})
},
onCodeClose
:
function
()
{
this
.
setData
({
winCode
:
false
,
...
...
pages/mine/appointment-detail/appointment-detail.wxml
View file @
b52c5598
...
...
@@ -259,9 +259,8 @@
<text>{{item.priceTotal}}</text>
</view>
</view>
<view class="commodity-item-operation" wx:if="{{item.couponQrCodeId}}">
<!-- 状态(0已过期1带使用2已使用) -->
<button wx:if="{{item.couponState === 1}}" class="row cc ac" data-item="{{item}}" bindtap="onCouponCode">查看券码</button>
<view class="commodity-item-operation" wx:if="{{item.couponId}}">
<button wx:if="{{item.couponState === 1}}" class="row cc ac" data-item="{{item}}" bindtap="onCouponCodeScan">查看券码</button>
<button wx:if="{{item.couponState === 0}}" disabled class="row cc ac btn-disabled">已过期</button>
<button wx:if="{{item.couponState === 2}}" disabled class="row cc ac btn-disabled">已使用</button>
</view>
...
...
pages/mine/appointment/appointment.js
View file @
b52c5598
...
...
@@ -98,11 +98,9 @@ Page({
'viewStateInvalid'
:
''
,
'viewButton'
:
[],
}
this
.
setActivityItemView
(
funcItem
)
console
.
log
(
funcItem
)
// 俱乐部活动没有评价,直接设置为已评价状态。
// if (funcItem.status === 3 && funcItem.belongType === 2) funcItem.status = 6
if
(
funcItem
.
orderStatus
===
3
&&
funcItem
.
belongType
===
2
)
funcItem
.
orderStatus
=
6
this
.
setActivityItemView
(
funcItem
)
funcList
.
push
(
funcItem
)
}
...
...
@@ -305,7 +303,7 @@ Page({
onToActivityDetail
:
function
(
funcEvent
)
{
let
funcItem
=
funcEvent
.
currentTarget
.
dataset
.
item
if
(
funcItem
.
belongType
===
2
)
{
if
(
funcItem
.
belongType
===
-
3
)
{
wx
.
navigateTo
({
url
:
'/pages/club/home/home'
})
}
else
{
wx
.
navigateTo
({
url
:
'/pages/play/activity/activity'
})
...
...
pages/mine/order/order.js
View file @
b52c5598
...
...
@@ -434,7 +434,7 @@ Page({
* @param
* @returns
*/
do
Cancel
:
function
(
event
)
{
do
Delete
:
function
(
event
)
{
App
.
ui
.
showDialog
({
type
:
'confirm'
,
title
:
'是否确认删除订单?'
,
...
...
pages/mine/order/order.wxml
View file @
b52c5598
...
...
@@ -14,7 +14,7 @@
<!-- 订单状态选择 -->
<view class="order-type-selection column" wx:if="{{winOrderType}}" bindtap="onOrderType">
<view>
<view
style="{{'margin:' + cssCategoryHeight + 'px 0 0 0;'}}"
>
<view class="order-type-row row cb ac">
<block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view wx:if="{{index < 3}}" class="order-type-item row cc ac {{orderTypeActive === index ? 'order-type-item-active' : ''}}" data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection">
...
...
@@ -93,12 +93,12 @@
</view>
<view class="row ac">
<block wx:for="{{item.viewButton}}" wx:for-item="itemButton" wx:for-index="indexButton" wx:key="indexButton">
<button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-item="{{item}}"
data-type="0"
catchtap="doCancel">取消订单</button>
<button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="doCancel">取消订单</button>
<button wx:if="{{itemButton.buttonId === 2}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button>
<button wx:if="{{itemButton.buttonId === 3}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-item="{{item}}"
data-type="1" catchtap="doCancel
">删除订单</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-item="{{item}}"
catchtap="doDelete
">删除订单</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderAgain">再次订单</button>
</block>
</view>
...
...
pages/mine/order/order.wxss
View file @
b52c5598
/* 订单分类 */
.order-category {
z-index:
5
;
z-index:
6
;
position: fixed;
top: 0;
left: 0;
...
...
@@ -37,9 +37,9 @@
/* 订单类型选择 */
.order-type-selection {
z-index:
6
;
z-index:
5
;
position: fixed;
top:
176rpx
;
top:
0
;
left: 0;
width: 100%;
height: 100%;
...
...
pages/pay/order-input/order-input.js
View file @
b52c5598
...
...
@@ -96,7 +96,6 @@ Page({
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
)
if
(
options
.
type
)
options
.
type
=
Number
(
options
.
type
)
logicData
.
option
=
options
...
...
@@ -347,7 +346,6 @@ Page({
funcPriceUnit
=
funcShoppingCart
[
i
].
priceFinal
if
(
funcShoppingCart
[
i
].
isActive
)
funcPayAmount
=
funcPayAmount
+
funcShoppingCart
[
i
].
priceUnit
*
funcShoppingCart
[
i
].
quantity
console
.
log
(
funcPayAmount
)
}
this
.
setData
({
...
...
@@ -399,7 +397,6 @@ Page({
* @returns
*/
setEntryTime
:
function
(
funcEntryId
)
{
console
.
log
(
funcEntryId
)
let
funcItem
=
wx
.
getStorageSync
(
'shoppingCartBuffer'
)[
0
]
App
.
request
({
url
:
'v1/activity/getEnrollView'
,
...
...
@@ -482,17 +479,18 @@ Page({
let
funcTimeBegin
=
''
let
funcTimeEnd
=
''
console
.
log
(
'funcTimetable'
)
console
.
log
(
funcTimetable
)
console
.
log
(
'funcEntryId'
,
funcEntryId
)
for
(
let
i
=
0
,
l
=
funcTimetable
.
length
;
i
<
l
;
i
++
)
{
if
(
funcEntryId
===
funcTimetable
[
i
].
id
)
{
console
.
log
(
'funcTimetable[i]'
,
funcTimetable
[
i
])
funcDateBegin
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'MM月DD日'
)
funcTimeBegin
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
beginTime
).
format
(
'hh:mm'
)
funcTimeEnd
=
App
.
modular
.
miment
(
funcTimetable
[
i
].
endTime
).
format
(
'hh:mm'
)
this
.
setData
({
quantityTipNumber
:
funcTimetable
[
i
].
residue
,
buyContentTime
:
funcDateBegin
+
' '
+
funcTimeBegin
+
' - '
+
funcTimeEnd
buyContentTime
:
funcDateBegin
+
' '
+
funcTimeBegin
+
' - '
+
funcTimeEnd
,
quantityMax
:
funcTimetable
[
i
].
residue
<
3
?
funcTimetable
[
i
].
residue
:
3
,
})
break
}
...
...
@@ -754,6 +752,9 @@ Page({
* @returns
*/
onQuantityAdd
:
function
()
{
console
.
log
(
'this.data.quantity'
,
this
.
data
.
quantity
)
console
.
log
(
'this.data.quantityMin'
,
this
.
data
.
quantityMin
)
// 购买数量最大为 20
if
(
this
.
data
.
quantity
>=
this
.
data
.
quantityMax
)
{
// 针对不同商品类型订制提示语
...
...
@@ -994,7 +995,6 @@ Page({
this
.
queryPayStatus
(
pagePayId
)
})
.
catch
((
response
)
=>
{
console
.
log
(
response
)
if
(
/商品不存在/
.
test
(
response
.
message
))
{
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[])
App
.
ui
.
showToast
({
...
...
pages/play/movie-detail/movie-detail.js
View file @
b52c5598
...
...
@@ -27,7 +27,6 @@ Page({
// 选择标签页日期
onSelectionStatus
:
function
(
event
)
{
console
.
log
(
event
.
currentTarget
.
dataset
.
type
)
this
.
setData
({
statusActive
:
Number
(
event
.
currentTarget
.
dataset
.
type
)
})
...
...
@@ -53,7 +52,6 @@ Page({
})
.
then
((
response
)
=>
{
let
movieInfo
=
response
.
data
console
.
log
(
movieInfo
)
let
showList
=
{}
let
statusList
=
[]
let
day
=
2
...
...
@@ -65,7 +63,6 @@ Page({
}
timeList
=
timeList
.
sort
((
a
,
b
)
=>
a
-
b
)
timeList
=
timeList
.
map
(
v
=>
App
.
modular
.
miment
(
v
).
format
(
'YYYY-MM-DD'
))
// console.log(timeList)
timeList
.
forEach
(
key
=>
{
let
tempItem
=
{}
if
(
key
===
App
.
modular
.
miment
().
format
(
'YYYY-MM-DD'
)
&&
movieInfo
.
today
.
length
>
0
)
{
...
...
@@ -96,11 +93,9 @@ Page({
}
})
movieInfo
.
priceSpecialText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
ownerPrice
),
// 业主价文本格式
movieInfo
.
priceText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
visitorPrice
),
movieInfo
.
tags
=
movieInfo
.
tags
movieInfo
.
priceSpecialText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
ownerPrice
)
movieInfo
.
priceText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
visitorPrice
)
movieInfo
.
tags
=
movieInfo
.
tags
.
split
(
' '
)
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
...
...
@@ -157,8 +152,6 @@ Page({
funcMovieInfo
.
priceType
=
3
}
}
console
.
log
(
funcMovieInfo
)
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcMovieInfo
])
wx
.
navigateTo
({
url
:
'/pages/pay/order-input/order-input?type=7'
,
...
...
pages/play/movie/movie.js
View file @
b52c5598
...
...
@@ -72,7 +72,6 @@ Page({
this
.
setData
({
allHitMovie
:
funcAllHitMovie
})
console
.
log
(
this
.
data
.
allHitMovie
)
},
/**
...
...
@@ -130,8 +129,6 @@ Page({
let
funcData
=
response
.
data
.
list
let
funcList
=
this
.
movieDataFormat
(
funcData
)
App
.
ui
.
hideToast
()
console
.
log
(
'queryMovieThisWeek'
)
console
.
log
(
JSON
.
stringify
(
funcList
))
let
funcAllHitMovie
=
this
.
data
.
allHitMovie
funcAllHitMovie
[
0
].
list
=
funcList
...
...
@@ -158,8 +155,6 @@ Page({
}).
then
((
response
)
=>
{
let
funcData
=
response
.
data
.
list
let
funcList
=
this
.
movieDataFormat
(
funcData
)
console
.
log
(
'queryMovieNextWeek'
)
console
.
log
(
JSON
.
stringify
(
funcList
))
let
funcAllHitMovie
=
this
.
data
.
allHitMovie
funcAllHitMovie
[
1
].
list
=
funcList
this
.
setData
({
...
...
@@ -185,8 +180,6 @@ Page({
}).
then
((
response
)
=>
{
let
funcData
=
response
.
data
.
list
let
funcList
=
this
.
movieDataFormat
(
funcData
)
console
.
log
(
'queryMovieSpecial'
)
console
.
log
(
JSON
.
stringify
(
funcList
))
let
funcAllHitMovie
=
this
.
data
.
allHitMovie
for
(
let
i
=
0
,
l
=
funcList
.
length
;
i
<
l
;
i
++
)
{
if
(
funcList
[
i
].
tagId
.
includes
(
'110'
))
funcAllHitMovie
[
2
].
list
.
push
(
funcList
[
i
])
...
...
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