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
e8b72e3c
authored
Sep 04, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://120.77.182.185/yanl/mini-shimao
parents
97317f00
213d0cf6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
12 deletions
pages/commodity/snacks/snacks.js
pages/commodity/snacks/snacks.wxml
pages/home/home/home.js
pages/home/home/home.wxml
pages/pay/order-detail/order-detail.js
pages/pay/order-detail/order-detail.wxml
project.config.json
pages/commodity/snacks/snacks.js
View file @
e8b72e3c
...
...
@@ -47,6 +47,17 @@ Page({
tab
:
'饮品'
}
],
goodsItem
:
{
goods_id
:
0
,
goods_name
:
'雪碧迷你瓶装300ml'
,
goods_text
:
'可口可乐公司推出的柠檬味汽水,新装出道,即刻酷爽'
,
goods_now_price
:
49.00
,
goods_old_price
:
42.00
,
goods_now_text
:
'业主价'
,
goods_num
:
1
,
checked
:
true
,
img
:
'./image/cola.png'
},
cart
:
[
{
goods_id
:
0
,
...
...
pages/commodity/snacks/snacks.wxml
View file @
e8b72e3c
...
...
@@ -52,7 +52,6 @@
<image src="../../../image/cart.png" mode="widthFix"></image>
</view>
</view>
<navigator url="/pages/orderDetail/index">订单详情</navigator>
</scroll-view>
<!-- 购物车弹窗 -->
<l-popup show="{{showPopup}}" content-align="center" locked="{{true}}">
...
...
pages/home/home/home.js
View file @
e8b72e3c
...
...
@@ -323,4 +323,15 @@ Page({
url
:
'/pages/pay/order-input/order-input?type='
+
event
.
currentTarget
.
dataset
.
index
+
'&passType=1'
})
},
onTest2
:
function
(
event
)
{
wx
.
navigateTo
({
url
:
'/pages/commodity/snacks/snacks'
})
},
onTest3
:
function
(
event
)
{
console
.
log
(
event
)
wx
.
navigateTo
({
url
:
'/pages/pay/order-detail/order-detail?type='
+
event
.
currentTarget
.
dataset
.
index
})
},
})
\ No newline at end of file
pages/home/home/home.wxml
View file @
e8b72e3c
...
...
@@ -86,5 +86,13 @@
<button class="test-button" data-index="{{5}}" bindtap="onTest">餐品</button>
<button class="test-button" data-index="{{6}}" bindtap="onTest">活动</button>
<button class="test-button" data-index="{{7}}" bindtap="onTest">观影</button>
<button class="test-button" bindtap="onTest2">餐品列表</button>
<button class="test-button" data-index="{{0}}" bindtap="onTest3">订单 未使用</button>
<button class="test-button" data-index="{{1}}" bindtap="onTest3">订单 待评价</button>
<button class="test-button" data-index="{{2}}" bindtap="onTest3">订单 已过期</button>
<button class="test-button" data-index="{{3}}" bindtap="onTest3">订单 已取消</button>
<button class="test-button" data-index="{{4}}" bindtap="onTest3">订单 已评价</button>
<button class="test-button" data-index="{{5}}" bindtap="onTest3">订单 待付款</button>
</view>
</view>
\ No newline at end of file
pages/pay/order-detail/order-detail.js
View file @
e8b72e3c
// pages/orderDetail/index.js
Page
({
data
:
{
orderType
:
1
,
// 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
showNotice
:
false
,
isFoodOrder
:
true
,
orderBtnText
:
'去评价'
,
bottom
:
'0rpx'
,
swiperCurrent
:
0
,
showCodePopup
:
false
,
codeUsed
:
false
,
statusTips
:
''
,
// ticketInfo: {
// store: '元养水韵SPA',
...
...
@@ -20,7 +21,7 @@ Page({
// sealImg: './image/seal.png'
// },
ticketInfo
:
{
status
:
3
,
// 0未使用 1待评价 2已过期 3已取消 4已评价 5待付款
status
:
0
,
// 0未使用 1待评价 2已过期 3已取消 4已评价 5待付款
ticketType
:
'food'
,
store
:
'拾光花坊插花分享会'
,
date
:
'8月24日'
,
...
...
@@ -115,7 +116,8 @@ Page({
id
:
1
,
title
:
'《 阿凡达 》电影票'
,
img
:
'./image/QRcode.png'
,
num
:
'2179 7092 0925'
num
:
'2179 7092 0925'
,
codeUsed
:
true
},
{
id
:
2
,
...
...
@@ -125,62 +127,80 @@ Page({
}
]
},
onShow
()
{
onLoad
(
options
)
{
console
.
log
(
options
)
if
(
options
.
type
)
options
.
type
=
Number
(
options
.
type
)
let
statusText
=
''
let
statusTips
=
''
let
ticketInfo
=
this
.
data
.
ticketInfo
let
orderBtnText
=
this
.
data
.
orderBtnText
let
bottom
=
''
if
(
ticketInfo
.
ticketType
===
'active'
)
{
switch
(
ticketInfo
.
status
)
{
switch
(
options
.
type
)
{
case
0
:
ticketInfo
.
status
=
0
bottom
=
'-32rpx'
break
case
1
:
ticketInfo
.
status
=
1
statusText
=
'活动待评价'
,
statusTips
=
'评价本单获得10积分'
orderBtnText
=
'去评价'
break
case
2
:
ticketInfo
.
status
=
2
statusText
=
'活动已结束'
statusTips
=
'有效期2019.09.30 - 2020.12.30'
break
case
3
:
ticketInfo
.
status
=
3
statusText
=
'报名已取消'
statusTips
=
'报名后15分钟内未付款,自动取消报名'
orderBtnText
=
'再次报名'
break
case
4
:
ticketInfo
.
status
=
4
statusText
=
'活动已评价'
break
case
5
:
ticketInfo
.
status
=
5
statusText
=
'报名待付款'
statusTips
=
'请在14:59内付款,否则讲自动取消订单'
orderBtnText
=
'去支付'
break
}
}
else
{
switch
(
ticketInfo
.
status
)
{
console
.
log
(
'food'
)
console
.
log
(
typeof
options
.
type
)
switch
(
options
.
type
)
{
case
0
:
ticketInfo
.
status
=
0
bottom
=
'-32rpx'
break
case
1
:
ticketInfo
.
status
=
1
statusText
=
'订单待评价'
,
orderBtnText
=
'去评价'
break
case
2
:
console
.
log
(
2
)
ticketInfo
.
status
=
2
statusText
=
'订单已过期'
statusTips
=
'有效期2019.09.30 - 2020.12.30'
break
case
3
:
ticketInfo
.
status
=
3
statusText
=
'订单已取消'
statusTips
=
'下单后15分钟内未付款,自动取消订单'
orderBtnText
=
'再次下单'
break
case
4
:
ticketInfo
.
status
=
4
statusText
=
'订单已评价'
break
case
5
:
ticketInfo
.
status
=
5
statusText
=
'订单待付款'
statusTips
=
'请在14:59内付款,否则讲自动取消订单'
orderBtnText
=
'去支付'
...
...
@@ -191,7 +211,8 @@ Page({
statusText
,
orderBtnText
,
statusTips
,
bottom
bottom
,
ticketInfo
})
},
handleQRcode
()
{
...
...
pages/pay/order-detail/order-detail.wxml
View file @
e8b72e3c
...
...
@@ -65,11 +65,11 @@
<image mode="widthFix" src="{{item.img}}"></image>
</view>
<view class="code-num-wrapper row align-c con-a">
<view class="code-num-title {{codeUsed ? 'code-used' : ''}}">券码{{index+1}}:</view>
<view class="code-num {{codeUsed ? 'code-used' : ''}}">{{item.num}}</view>
<view class="num-copy" wx:if="{{!codeUsed}}" bindtap="setClipboard" data-index="{{index}}">复制</view>
<view class="code-num-title {{
item.
codeUsed ? 'code-used' : ''}}">券码{{index+1}}:</view>
<view class="code-num {{
item.
codeUsed ? 'code-used' : ''}}">{{item.num}}</view>
<view class="num-copy" wx:if="{{!
item.
codeUsed}}" bindtap="setClipboard" data-index="{{index}}">复制</view>
</view>
<view class="code-used-seal" wx:if="{{codeUsed}}">
<view class="code-used-seal" wx:if="{{
item.
codeUsed}}">
<image mode="widthFix" src="./image/used.png"></image>
</view>
</view>
...
...
project.config.json
View file @
e8b72e3c
...
...
@@ -119,6 +119,13 @@
},
{
"id"
:
7
,
"name"
:
"pages/commodity/snacks/snacks"
,
"pathName"
:
"pages/commodity/snacks/snacks"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/pay/order-detail/order-detail"
,
"pathName"
:
"pages/pay/order-detail/order-detail"
,
"query"
:
""
,
...
...
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