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
51dde346
authored
Sep 18, 2020
by
zqm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
MM - 订单详情底部按钮,印章
parent
dfb4d546
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
153 additions
and
64 deletions
app.js
pages/mine/order/order.js
pages/mine/order/order.wxml
pages/mine/order/order.wxss
pages/pay/coupon-detail/coupon-detail.js
pages/pay/order-detail/order-detail.js
pages/pay/order-detail/order-detail.wxml
pages/pay/order-detail/order-detail.wxss
app.js
View file @
51dde346
...
@@ -13,6 +13,7 @@ App({
...
@@ -13,6 +13,7 @@ App({
},
},
globalData
:
{
globalData
:
{
test
:
'999'
,
appImageBase
:
'../../../image/'
,
appImageBase
:
'../../../image/'
,
appResourcesBase
:
'https://sm-web.meiqicloud.com/userfiles/appResourcesS2/'
,
appResourcesBase
:
'https://sm-web.meiqicloud.com/userfiles/appResourcesS2/'
,
shopId
:
iEnvironmental
.
shopId
,
shopId
:
iEnvironmental
.
shopId
,
...
...
pages/mine/order/order.js
View file @
51dde346
...
@@ -25,7 +25,7 @@ Page({
...
@@ -25,7 +25,7 @@ Page({
'name'
:
'待使用'
'name'
:
'待使用'
},
},
{
{
'value'
:
'-1, 4'
,
'value'
:
`-1','4`
,
'name'
:
'取消/过期'
'name'
:
'取消/过期'
},
},
],
],
...
...
pages/mine/order/order.wxml
View file @
51dde346
...
@@ -69,13 +69,12 @@
...
@@ -69,13 +69,12 @@
<text class="name">{{item.commodity[0].name}}</text>
<text class="name">{{item.commodity[0].name}}</text>
<text class="total">{{'x ' + item.total}}</text>
<text class="total">{{'x ' + item.total}}</text>
</view>
</view>
<!-- 商品数量样式二 -->
<!-- 商品数量样式二 -->
<view class="order-list-item-service row con-b align-c" wx:if="{{item.commodity.length >= 2}}">
<view class="order-list-item-service row con-b align-c" wx:if="{{item.commodity.length >= 2}}">
<block wx:for="{{item.commodity}}" wx:for-index="commodityIndex" wx:for-item="commodityItem" wx:key="commodityIndex">
<block wx:for="{{item.commodity}}" wx:for-index="commodityIndex" wx:for-item="commodityItem" wx:key="commodityIndex">
<image class="cover" src="{{commodityItem.cover}}"></image>
<image class="cover" src="{{commodityItem.cover}}"></image>
</block>
</block>
<text class="total">{{'共 ' + item.
total
+ ' 件'}}</text>
<text class="total">{{'共 ' + item.
commodity.length
+ ' 件'}}</text>
</view>
</view>
<view class="order-list-item-operation row con-b align-c">
<view class="order-list-item-operation row con-b align-c">
...
...
pages/mine/order/order.wxss
View file @
51dde346
...
@@ -86,7 +86,7 @@ page {
...
@@ -86,7 +86,7 @@ page {
.container-order {
.container-order {
/* margin-top: 170rpx; */
/* margin-top: 170rpx; */
margin
-top: 288rpx;
padding
-top: 288rpx;
}
}
...
...
pages/pay/coupon-detail/coupon-detail.js
View file @
51dde346
const
App
=
getApp
()
const
App
=
getApp
()
Page
({
Page
({
data
:
{
data
:
{
orderType
:
1
,
// 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
orderType
:
1
,
// 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
couponInfo
:
null
,
couponInfo
:
null
,
// {
// {
// type: '套票',
// type: '套票',
...
@@ -88,18 +88,18 @@ Page({
...
@@ -88,18 +88,18 @@ Page({
submitOperation
()
{
submitOperation
()
{
let
that
=
this
let
that
=
this
wx
.
lin
.
showDialog
({
wx
.
lin
.
showDialog
({
type
:
"confirm"
,
type
:
"confirm"
,
title
:
""
,
title
:
""
,
content
:
"是否确认核销券码"
,
content
:
"是否确认核销券码"
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
)
console
.
log
(
'用户点击确定'
)
that
.
doVolume
()
that
.
doVolume
()
}
else
if
(
res
.
cancel
)
{
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
console
.
log
(
'用户点击取消'
)
}
}
}
}
})
})
},
},
doVolume
()
{
doVolume
()
{
...
@@ -116,24 +116,24 @@ Page({
...
@@ -116,24 +116,24 @@ Page({
data
:
{
data
:
{
volumeId
:
that
.
data
.
couponDetail
.
volumeId
,
volumeId
:
that
.
data
.
couponDetail
.
volumeId
,
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
data
.
code
*
1
==
200
)
{
if
(
res
.
data
.
code
*
1
==
200
)
{
wx
.
lin
.
showToast
({
wx
.
lin
.
showToast
({
image
:
'/image/success.png'
,
image
:
'/image/success.png'
,
title
:
'核销成功'
,
title
:
'核销成功'
,
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
wx
.
navigateBack
()
wx
.
navigateBack
()
},
2000
);
},
2000
);
}
else
{
}
else
{
wx
.
lin
.
showToast
({
wx
.
lin
.
showToast
({
image
:
'/image/error.png'
,
image
:
'/image/error.png'
,
title
:
res
.
data
.
msg
,
title
:
res
.
data
.
msg
,
})
})
}
}
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
wx
.
lin
.
showToast
({
wx
.
lin
.
showToast
({
image
:
'/image/error.png'
,
image
:
'/image/error.png'
,
title
:
err
.
msg
,
title
:
err
.
msg
,
...
...
pages/pay/order-detail/order-detail.js
View file @
51dde346
...
@@ -2,12 +2,14 @@ let App = getApp()
...
@@ -2,12 +2,14 @@ let App = getApp()
Page
({
Page
({
data
:
{
data
:
{
winToastText
:
'操作成功'
,
winToast
:
false
,
isDoing
:
false
,
showNotice
:
false
,
showNotice
:
false
,
swiperCurrent
:
0
,
swiperCurrent
:
0
,
showCodePopup
:
false
,
showCodePopup
:
false
,
imageBase
:
App
.
globalData
.
appImageBase
,
imageBase
:
App
.
globalData
.
appImageBase
,
resourcesBase
:
App
.
globalData
.
appResourcesBase
,
resourcesBase
:
App
.
globalData
.
appResourcesBase
,
shopInfo
:
{},
shopInfo
:
{},
orderType
:
1
,
// 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
orderType
:
1
,
// 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
...
@@ -18,49 +20,17 @@ Page({
...
@@ -18,49 +20,17 @@ Page({
isFromUse
:
false
,
isFromUse
:
false
,
winCode
:
false
,
winCode
:
false
,
residuePayTime
:
""
,
//剩余支付时间
residuePayTime
:
""
,
//剩余支付时间
sealImgs
:
[{
type
:
1
,
codeList
:
[],
url
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
}],
sealSrc
:
''
,
sealTest
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
shopConfig
:
App
.
globalData
.
shopId
,
sealBig
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-1.png'
,
imgBasehost
:
App
.
globalData
.
appResourcesBase
seals
:
{
seal1
:
{
passSrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
willPaySrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
},
seal1
:
{
passSrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
willPaySrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
},
seal1
:
{
passSrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
willPaySrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
},
},
codeList
:
[{
id
:
0
,
title
:
'《 阿凡达 》电影票'
,
img
:
'./image/QRcode.png'
,
num
:
'2179 7092 0925'
},
{
id
:
1
,
title
:
'《 阿凡达 》电影票'
,
img
:
'./image/QRcode.png'
,
num
:
'2179 7092 0925'
},
{
id
:
2
,
title
:
'《 阿凡达 》电影票'
,
img
:
'./image/QRcode.png'
,
num
:
'2179 7092 0925'
}
]
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
console
.
log
(
App
.
globalData
.
shopId
,
'App.globalData.shopId----------------'
);
let
funcOrderInfo
=
this
.
data
.
orderInfo
let
funcOrderInfo
=
this
.
data
.
orderInfo
funcOrderInfo
.
id
=
options
.
id
funcOrderInfo
.
id
=
options
.
id
this
.
setData
({
this
.
setData
({
...
@@ -74,7 +44,107 @@ Page({
...
@@ -74,7 +44,107 @@ Page({
success
:
(
result
)
=>
{
success
:
(
result
)
=>
{
this
.
queryOrderDetail
()
this
.
queryOrderDetail
()
},
},
})
},
// 再次下单
onOrderAgain
:
function
(
event
)
{
let
commodityType
=
this
.
data
.
orderInfo
.
commodityType
let
shopAppId
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
?
wx
.
getStorageSync
(
'shopInfoBuffer'
).
appId
:
""
wx
.
navigateTo
({
url
:
`/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=
${
shopAppId
}
&commodityType=
${
commodityType
}
`
,
})
},
// 去支付
onOrderPay
:
function
(
event
)
{
// 数据校验不通过
let
that
=
this
let
wxRequest
=
this
.
data
.
orderInfo
.
wxRequest
// 待支付返回的wx支付参数
if
(
wxRequest
)
{
wx
.
requestPayment
({
timeStamp
:
wxRequest
.
timeStamp
,
nonceStr
:
wxRequest
.
nonceStr
,
package
:
wxRequest
.
package
,
signType
:
wxRequest
.
signType
,
paySign
:
wxRequest
.
paySign
,
success
(
res
)
{
// let state = `orderInfo.state`
// that.setData({
// [state]: 2,
// })
that
.
queryOrderDetail
()
},
fail
(
res
)
{}
})
}
},
// 去评价
onOrderEvaluate
:
function
(
event
)
{
let
item
=
JSON
.
stringify
(
this
.
data
.
orderInfo
)
wx
.
navigateTo
({
url
:
`/pages/pay/order-comment/order-comment?orderItem=
${
item
}
`
,
})
},
// 删除订单&取消订单
onDelOrCancelOrder
:
function
(
event
)
{
// wx.lin.showDialog({
// type: "confirm",
// title: "",
// content: "是否确认核销券码",
// success: (res) => {
// if (res.confirm) {
// console.log('用户点击确定')
// that.doVolume()
// } else if (res.cancel) {
// console.log('用户点击取消')
// }
// }
// })
let
type
=
event
.
currentTarget
.
dataset
.
type
let
that
=
this
wx
.
showLoading
({
title
:
'处理中'
,
mask
:
true
})
this
.
setData
({
isDoing
:
true
,
})
App
.
wxRequest
({
url
:
'/api/v1/order/cancelOrder'
,
data
:
{
'orderId'
:
this
.
data
.
orderInfo
.
id
,
'type'
:
type
,
},
success
:
(
response
)
=>
{
wx
.
hideLoading
()
let
winToastText
=
type
==
1
?
'订单删除成功'
:
'订单取消成功'
that
.
setData
({
isDoing
:
false
,
winToast
:
true
,
winToastText
:
winToastText
})
setTimeout
(
function
()
{
if
(
type
==
1
)
{
// 删除操作
wx
.
redirectTo
({
url
:
'/pages/mine/order/order'
,
})
}
else
{
// 取消操作
let
state
=
`orderInfo.state`
that
.
setData
({
isDoing
:
false
,
[
state
]:
-
1
})
}
},
2000
)
}
})
})
},
},
// 使用须知
// 使用须知
...
@@ -148,8 +218,22 @@ Page({
...
@@ -148,8 +218,22 @@ Page({
'tipTimeSubmit'
:
funcResponse
.
createDate
,
'tipTimeSubmit'
:
funcResponse
.
createDate
,
'tipTimePay'
:
App
.
modular
.
miment
(
funcResponse
.
paymentTime
).
format
(
'YYYY-MM-DD hh:mm:ss'
),
'tipTimePay'
:
App
.
modular
.
miment
(
funcResponse
.
paymentTime
).
format
(
'YYYY-MM-DD hh:mm:ss'
),
'tipIntegral'
:
funcResponse
.
integral
,
'tipIntegral'
:
funcResponse
.
integral
,
'officeName'
:
funcResponse
.
officeName
'officeName'
:
funcResponse
.
officeName
,
'wxRequest'
:
funcResponse
.
wxRequest
}
}
// 设置印章
let
shopName
=
funcResponse
.
officeName
;
let
shopFilter
=
this
.
data
.
shopConfig
.
filter
(
item
=>
{
return
item
.
name
==
(
shopName
)
}
)
funcOrderInfo
.
shopInfo
=
shopFilter
[
0
]
console
.
log
(
shopFilter
[
0
],
'-----------shopFilter[0]------'
);
// 添加订单商品列表
// 添加订单商品列表
let
funcCommodity
=
funcResponse
.
smOrderDetails
let
funcCommodity
=
funcResponse
.
smOrderDetails
...
@@ -158,7 +242,7 @@ Page({
...
@@ -158,7 +242,7 @@ Page({
'cover'
:
funcCommodity
[
i
].
imgUrl
,
'cover'
:
funcCommodity
[
i
].
imgUrl
,
'name'
:
funcCommodity
[
i
].
name
,
// 名称
'name'
:
funcCommodity
[
i
].
name
,
// 名称
'quantity'
:
funcCommodity
[
i
].
number
,
// 数量
'quantity'
:
funcCommodity
[
i
].
number
,
// 数量
'amount'
:
funcCommodity
[
i
].
totalPrices
,
// 总价
'amount'
:
funcCommodity
[
i
].
unitPrice
,
// 总价
'state'
:
Number
(
funcCommodity
[
i
].
status
),
// 状态
'state'
:
Number
(
funcCommodity
[
i
].
status
),
// 状态
'codeId'
:
funcCommodity
[
i
].
volumeId
,
// 券码
'codeId'
:
funcCommodity
[
i
].
volumeId
,
// 券码
}
}
...
@@ -207,16 +291,21 @@ Page({
...
@@ -207,16 +291,21 @@ Page({
})
})
},
},
// 弹出单张二维码
// 弹出单张二维码
onCouponCode
:
function
(
event
)
{
onCouponCode
:
function
(
event
)
{
let
funcOrderInfo
=
event
.
currentTarget
.
dataset
.
item
let
funcOrderInfo
=
event
.
currentTarget
.
dataset
.
item
wx
.
showLoading
({
title
:
'加载中'
,
})
App
.
wxRequest
({
App
.
wxRequest
({
url
:
'/api/v1/volume/getVolume'
,
url
:
'/api/v1/volume/getVolume'
,
data
:
{
data
:
{
'volumeId'
:
funcOrderInfo
.
codeId
'volumeId'
:
funcOrderInfo
.
codeId
},
},
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
wx
.
hideLoading
({
success
:
(
res
)
=>
{},
})
let
funcResponse
=
response
.
data
let
funcResponse
=
response
.
data
let
funcCodeInfo
=
{
let
funcCodeInfo
=
{
'codeNo'
:
funcResponse
.
serialNumber
,
'codeNo'
:
funcResponse
.
serialNumber
,
...
...
pages/pay/order-detail/order-detail.wxml
View file @
51dde346
This diff is collapsed.
Click to expand it.
pages/pay/order-detail/order-detail.wxss
View file @
51dde346
...
@@ -791,7 +791,7 @@
...
@@ -791,7 +791,7 @@
}
}
.footer-btn {
.footer-btn {
padding: 32rpx 20rpx
0
;
padding: 32rpx 20rpx;
border-top: 1px solid #E2E7EF;
border-top: 1px solid #E2E7EF;
}
}
...
...
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