Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
b9408f48
Commit
b9408f48
authored
Oct 12, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f589bd63
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2111 additions
and
1731 deletions
+2111
-1731
index.vue
pages/card/index/index.vue
+39
-38
index.vue
pages/coupon/index/index.vue
+199
-167
orderList.vue
pages/guidecar/orderList.vue
+350
-340
jz_MyOrder.vue
pages/jiuzhai/jz_MyOrder.vue
+419
-345
jz_SureOrder.vue
pages/jiuzhai/jz_SureOrder.vue
+889
-672
integral-detail.vue
pages/user-center/integral-detail/integral-detail.vue
+215
-169
No files found.
pages/card/index/index.vue
View file @
b9408f48
...
...
@@ -6,9 +6,9 @@
:current=
"current"
@
change=
"change"
:active-color=
"mainColor"
bar-height=
'4'
bar-height=
"4"
height=
"100"
:show-bar=
"showBar"
></u-tabs>
<u-empty
v-if=
"g.length == 0"
text=
"暂无相关卡券"
mode=
"order"
></u-empty>
<view
...
...
@@ -39,38 +39,37 @@
>
没有更多卡券了
</u-divider
>
</scroll-view>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx
;
"
>
加载中...
</Text>
<Text
style=
"color: #fff; margin-top: 10rpx"
>
加载中...
</Text>
</view>
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'goback'
></auth>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"goback"
></auth>
</view>
</
template
>
<
script
>
import
error
from
'../../../components/error/error.vue'
;
import
error
from
"../../../components/error/error.vue"
;
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
components
:
{
error
,
auth
auth
,
},
data
()
{
return
{
pageTitle
:
"我的卡券"
,
current
:
0
,
showAuth
:
false
,
list
:
[
{
name
:
"未使用"
},
{
name
:
"已使用"
},
{
name
:
"已过期"
},
],
list
:
[{
name
:
"未使用"
},
{
name
:
"已使用"
},
{
name
:
"已过期"
}],
mainColor
:
""
,
contentHeight
:
0
,
page
:
1
,
...
...
@@ -81,7 +80,8 @@ export default {
item
:
""
,
index
:
0
,
isover
:
false
,
u
:{},
u
:
{},
showBar
:
true
,
};
},
created
()
{
...
...
@@ -91,13 +91,16 @@ export default {
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
}
else
{
this
.
loading
=
true
;
this
.
init
();
}
// #ifdef MP-ALIPAY
this
.
showBar
=
false
;
// #endif
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
...
...
@@ -116,7 +119,6 @@ export default {
},
methods
:
{
change
(
index
)
{
this
.
current
=
index
;
this
.
page
=
1
;
this
.
g
=
[];
...
...
@@ -142,8 +144,8 @@ export default {
this
.
loading
=
true
;
this
.
init
();
},
goback
()
{
uni
.
navigateBack
()
goback
()
{
uni
.
navigateBack
();
},
},
};
...
...
@@ -171,5 +173,4 @@ export default {
margin-left
:
-100
rpx
;
z-index
:
999
;
}
</
style
>
pages/coupon/index/index.vue
View file @
b9408f48
...
...
@@ -6,6 +6,7 @@
:current=
"msg.UseState"
@
change=
"change"
:active-color=
"mainColor"
:show-bar=
"showBar"
height=
"100"
></u-tabs>
<u-empty
v-if=
"g.length == 0"
text=
"暂无相关优惠券"
mode=
"coupon"
></u-empty>
...
...
@@ -28,32 +29,53 @@
>
<view
class=
"couponList"
>
<view
class=
"item"
v-for=
"(x, i) in g"
:key=
"i"
@
click=
"godetails(x)"
>
<view
:class=
"msg.UseState==0? 'ticket':
'ticket2'"
>
<view
:class=
"msg.UseState == 0 ? 'ticket' :
'ticket2'"
>
<view
class=
"miane"
>
<view
class=
"money"
>
<!--
<text
style=
"font-size: 44px;"
>
{{
x
.
sub_price
.
toString
().
split
(
'.'
)[
0
]
}}
</text>
<text
v-if=
"x.coupon.type==1"
>
折
</text>
-->
<text
class=
"small"
v-if=
"x.CouponType==1"
>
¥
</text>
<Text
style=
'font-size: 44px;'
>
{{
Number
(
x
.
DiscountsPrice
)
}}
</Text>
<Text
class=
"small"
>
{{
x
.
CouponType
==
2
?
'折'
:
""
}}
</Text>
<text
class=
"small"
v-if=
"x.CouponType == 1"
>
¥
</text>
<Text
style=
"font-size: 44px"
>
{{
Number
(
x
.
DiscountsPrice
)
}}
</Text>
<Text
class=
"small"
>
{{
x
.
CouponType
==
2
?
"折"
:
""
}}
</Text>
</view>
<view
class=
"tiaojian"
>
满
{{
Number
(
x
.
MinConsumePrice
)
}}
元可用
</view>
<view
class=
"tiaojian"
>
满
{{
Number
(
x
.
MinConsumePrice
)
}}
元可用
</view
>
</view>
<view
style=
'width: 10px;height: 10px;border-radius: 5px;background: #f3f4f6;position: absolute;right: -5px;top:-5px'
></view>
<view
style=
'width: 10px;height: 10px;border-radius: 5px;background: #f3f4f6;position: absolute;right: -5px;bottom:-5px'
></view>
<view
style=
"
width: 10px;
height: 10px;
border-radius: 5px;
background: #f3f4f6;
position: absolute;
right: -5px;
top: -5px;
"
></view>
<view
style=
"
width: 10px;
height: 10px;
border-radius: 5px;
background: #f3f4f6;
position: absolute;
right: -5px;
bottom: -5px;
"
></view>
</view>
<view
class=
"detail"
>
<view
class=
"coupond"
>
<view
class=
"name"
>
{{
x
.
Name
}}
</view>
<view
class=
"date"
>
{{
x
.
StartDate
+
"-"
+
x
.
EndDate
}}
</view>
<view
class=
"name"
>
{{
x
.
Name
}}
</view>
<view
class=
"date"
>
{{
x
.
StartDate
+
"-"
+
x
.
EndDate
}}
</view>
<Text
class=
"rule"
v-if=
'x.UseTypeStr==1'
>
限商品类别
</Text>
<Text
class=
"rule"
v-if=
'x.UseTypeStr==2'
>
限商品
</Text>
<Text
class=
"rule"
v-if=
'x.UseTypeStr==3'
>
全场通用
</Text>
<Text
class=
"rule"
v-if=
'x.UseTypeStr==4'
>
当面付
</Text>
<Text
class=
"rule"
v-if=
"x.UseTypeStr == 1"
>
限商品类别
</Text>
<Text
class=
"rule"
v-if=
"x.UseTypeStr == 2"
>
限商品
</Text>
<Text
class=
"rule"
v-if=
"x.UseTypeStr == 3"
>
全场通用
</Text>
<Text
class=
"rule"
v-if=
"x.UseTypeStr == 4"
>
当面付
</Text>
</view>
</view>
</view>
...
...
@@ -69,17 +91,34 @@
/>
</scroll-view>
</view>
<view
style=
"width: 100%;height: 50px;background: #FFFFFF;display: flex;align-items: center;justify-content: center;position: absolute;left: 0;bottom: 0;"
@
click=
"goUrl"
>
<view
style=
"
width: 100%;
height: 50px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
left: 0;
bottom: 0;
"
@
click=
"goUrl"
>
<Text>
去领券
</Text>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx
;
"
>
加载中...
</Text>
<Text
style=
"color: #fff; margin-top: 10rpx"
>
加载中...
</Text>
</view>
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
...
...
@@ -87,25 +126,21 @@
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
components
:
{
auth
auth
,
},
data
()
{
return
{
pageTitle
:
"我的优惠券"
,
showAuth
:
false
,
U
:{},
list
:
[
{
name
:
"未使用"
},
{
name
:
"已使用"
},
{
name
:
"已过期"
},
],
showAuth
:
false
,
U
:
{},
list
:
[{
name
:
"未使用"
},
{
name
:
"已使用"
},
{
name
:
"已过期"
}],
mainColor
:
""
,
contentHeight
:
0
,
msg
:
{
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
UseState
:
0
pageSize
:
10
,
UseState
:
0
,
},
page_count
:
1
,
g
:
[],
...
...
@@ -116,11 +151,15 @@ export default {
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
showBar
:
true
,
};
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
// #ifdef MP-ALIPAY
this
.
showBar
=
false
;
// #endif
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
...
...
@@ -142,16 +181,15 @@ export default {
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
}
else
{
this
.
init
();
}
},
methods
:
{
change
(
index
)
{
this
.
msg
.
UseState
=
index
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
...
...
@@ -159,16 +197,13 @@ export default {
this
.
init
();
},
init
()
{
this
.
request2
(
{
url
:
'/api/AppletUser/GetMemberCouponPageList'
,
data
:
this
.
msg
url
:
"/api/AppletUser/GetMemberCouponPageList"
,
data
:
this
.
msg
,
},
res
=>
{
if
(
res
.
resultCode
==
1
){
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
loading
=
false
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
...
...
@@ -186,7 +221,6 @@ export default {
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
...
...
@@ -196,22 +230,24 @@ export default {
this
.
init
();
},
//关闭登录窗口
gbAuth
()
{
uni
.
navigateBack
()
gbAuth
()
{
uni
.
navigateBack
();
},
godetails
(
item
)
{
if
(
this
.
msg
.
UseState
==
0
)
{
godetails
(
item
)
{
if
(
this
.
msg
.
UseState
==
0
)
{
uni
.
navigateTo
({
url
:
"/pages/coupon/details/details?item="
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&type=1'
url
:
"/pages/coupon/details/details?item="
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
"&type=1"
,
});
}
},
goUrl
()
{
goUrl
()
{
uni
.
navigateTo
({
url
:
"/pages/coupon/list/list"
url
:
"/pages/coupon/list/list"
,
});
}
},
},
};
</
script
>
...
...
@@ -239,21 +275,21 @@ export default {
margin-left
:
-100
rpx
;
z-index
:
999
;
}
.couponStyle
.couponList
{
.couponStyle
.couponList
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.couponStyle
.couponitem
{
width
:
94%
;
.couponStyle
.couponitem
{
width
:
94%
;
display
:
flex
;
align-items
:
center
;
height
:
180
rpx
;
background
:
#F2EBE
4
;
background
:
#f2ebe
4
;
margin-top
:
20
rpx
;
}
.couponStyle
.couponitem
.couponitem_l
{
.couponStyle
.couponitem
.couponitem_l
{
width
:
180
rpx
;
height
:
180
rpx
;
display
:
flex
;
...
...
@@ -262,9 +298,8 @@ export default {
justify-content
:
space-around
;
padding
:
20
rpx
;
color
:
#fff
;
}
.couponStyle
.couponitem
.couponitem_r
{
.couponStyle
.couponitem
.couponitem_r
{
width
:
calc
(
100vw
-
220
rpx
);
height
:
180
rpx
;
display
:
flex
;
...
...
@@ -297,7 +332,7 @@ export default {
}
.couponStyle
.item
.ticket2
{
position
:
relative
;
background
:
#C3C3C
3
;
background
:
#c3c3c
3
;
width
:
125px
;
height
:
100px
;
display
:
flex
;
...
...
@@ -326,10 +361,9 @@ export default {
background
:
#fff
;
padding
:
10px
;
display
:
flex
;
}
.couponStyle
.item
.detail
.coupond
{
flex
:
1
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-around
;
...
...
@@ -340,19 +374,17 @@ export default {
color
:
#000
;
}
.couponStyle
.item
.detail
.coupond
.date
{
font-family
:
'23'
;
font-family
:
"23"
;
margin-top
:
5px
;
font-size
:
12px
;
color
:
#777
;
}
.couponStyle
.item
.detail
.coupond
.rule
{
.couponStyle
.item
.detail
.coupond
.rule
{
font-size
:
12px
;
color
:
#777
;
margin-top
:
5
px
;
color
:
#777
;
margin-top
:
5
px
;
}
.couponStyle
.item
.detail
.chosen
{
width
:
20px
;
}
</
style
>
pages/guidecar/orderList.vue
View file @
b9408f48
<
style
>
.order_Content
{
.order_Content
{
width
:
100%
;
}
}
.order_Inner
{
.order_Inner
{
width
:
100%
;
padding
:
20px
;
margin-bottom
:
10px
;
background-color
:
#fff
;
}
}
.order_NContent
{
.order_NContent
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
13px
;
color
:
#121212
;
}
}
.order_Status
{
color
:
#FF
4048
;
.order_Status
{
color
:
#ff
4048
;
color
:
12px
;
}
}
.order_Car
{
.order_Car
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
15px
;
}
}
.order_Price
{
.order_Price
{
color
:
#121212
;
font-size
:
15px
;
}
}
.order_carImg
image
{
.order_carImg
image
{
width
:
200
rpx
;
height
:
130
rpx
;
}
}
.order_middle
{
.order_middle
{
font-size
:
13px
;
color
:
#121212
;
width
:
53%
;
}
}
.order_carName
{
.order_carName
{
font-size
:
15px
;
font-weight
:
bold
;
margin-bottom
:
5px
;
...
...
@@ -54,12 +54,12 @@
text-overflow
:
ellipsis
;
font-weight
:
bold
;
width
:
100%
;
}
}
.order_guidIndfo
{
.order_guidIndfo
{
width
:
100%
;
height
:
45px
;
background-color
:
#FAF8F
9
;
background-color
:
#faf8f
9
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
...
...
@@ -69,21 +69,21 @@
margin-top
:
15px
;
border-radius
:
7px
;
font-weight
:
bold
;
}
}
.order_BtnList
{
.order_BtnList
{
margin-top
:
20px
;
position
:
relative
;
height
:
30px
;
}
}
.order_Btn_inner
{
.order_Btn_inner
{
width
:
70%
;
position
:
absolute
;
right
:
0
;
}
}
.order_Btn_Com
{
.order_Btn_Com
{
padding
:
5px
10px
;
border
:
1px
solid
#888888
;
border-radius
:
14px
;
...
...
@@ -91,17 +91,17 @@
font-size
:
12px
;
float
:
right
;
margin-right
:
15px
;
}
}
.order_Btn_inner
.order_Btn_Com
:first-child
{
.order_Btn_inner
.order_Btn_Com
:first-child
{
margin-right
:
0
;
}
}
</
style
>
<
template
>
<view
class=
"quick-box"
style=
"height:100vh;"
>
<view
class=
"guid-head"
>
<u-tabs
name=
"Name"
:list=
"headData"
:is-scroll=
"true"
:current=
"current"
:font-size=
"28"
height=
"100"
:active-color=
"mainColor"
@
change=
"getChild"
></u-tabs>
:active-color=
"mainColor"
@
change=
"getChild"
:show-bar=
"showBar"
></u-tabs>
</view>
<u-empty
v-if=
"dataList.length==0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<scroll-view
v-else
:scroll-y=
"true"
style=
"background-color: #f0f4f7;"
:enable-back-to-top=
"true"
:enable-flex=
"true"
...
...
@@ -183,13 +183,13 @@
</view>
</
template
>
<
script
>
import
payCom
from
'@/components/pay/pay'
;
import
auth
from
"@/components/auth/index"
;
import
tabbar
from
"@/components/tabbar/index"
;
export
default
{
import
payCom
from
"@/components/pay/pay"
;
import
auth
from
"@/components/auth/index"
;
import
tabbar
from
"@/components/tabbar/index"
;
export
default
{
components
:
{
auth
,
payCom
payCom
,
},
data
()
{
return
{
...
...
@@ -201,11 +201,11 @@
pageIndex
:
1
,
pageSize
:
5
,
OrderId
:
0
,
StartTime
:
''
,
EndTime
:
''
,
StartTime
:
""
,
EndTime
:
""
,
OrderStatus
:
0
,
OrderNo
:
''
,
OrderType
:
11
//默认写死
OrderNo
:
""
,
OrderType
:
11
,
//默认写死
},
scrollHeight
:
0
,
pageCount
:
1
,
...
...
@@ -224,26 +224,31 @@
Cancelmsg
:
{
OrderId
:
0
,
Type
:
1
,
Remark
:
''
,
Remark
:
""
,
},
payInfo
:
{
OpenId
:
''
,
OrderId
:
''
,
OpenId
:
""
,
OrderId
:
""
,
OrderPayType
:
1
,
GoodsName
:
''
GoodsName
:
""
,
},
payBtn
:
false
,
payExit
:
false
,
showBar
:
true
,
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
// #ifdef MP-ALIPAY
this
.
showBar
=
false
;
// #endif
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
...
...
@@ -259,7 +264,7 @@
onLoad
(
option
)
{
this
.
current
=
option
.
status
||
0
;
this
.
getHeadList
();
this
.
payInfo
.
OpenId
=
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
;
this
.
payInfo
.
OpenId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
},
methods
:
{
...
...
@@ -275,7 +280,8 @@
},
//获取头部数据
getHeadList
()
{
this
.
request2
({
this
.
request2
(
{
url
:
"/api/AppletGCOrder/GuidCarOrderStatusEnumList"
,
data
:
this
.
msg
,
},
...
...
@@ -284,9 +290,9 @@
this
.
headData
=
res
.
data
;
var
obj
=
{
Id
:
0
,
Name
:
'全部'
}
this
.
headData
.
unshift
(
obj
)
Name
:
"全部"
,
};
this
.
headData
.
unshift
(
obj
);
this
.
msg
.
OrderStatus
=
this
.
headData
[
this
.
current
].
Id
;
this
.
getContent
();
}
...
...
@@ -305,9 +311,10 @@
this
.
dataList
=
[];
}
uni
.
showLoading
({
title
:
'加载中'
title
:
"加载中"
,
});
this
.
request2
({
this
.
request2
(
{
url
:
"/api/AppletGCOrder/GetAppletGoodsGuidecarOrderPageList"
,
data
:
this
.
msg
,
},
...
...
@@ -341,37 +348,37 @@
//取消订单
cancel
(
e
,
index
)
{
this
.
showModal
=
true
;
this
.
Cancelmsg
.
Remark
=
''
,
this
.
index
=
index
;
(
this
.
Cancelmsg
.
Remark
=
""
),
(
this
.
index
=
index
);
this
.
subItem
=
e
;
this
.
Cancelmsg
.
OrderId
=
e
.
OrderId
;
this
.
Cancelmsg
.
Type
=
e
.
OrderStatus
==
1
?
1
:
2
;
},
//确认订单
confirm
()
{
let
that
=
this
let
that
=
this
;
// that.showModal = false;
if
(
that
.
Cancelmsg
.
Type
==
2
&&
that
.
Cancelmsg
.
Remark
==
''
)
{
if
(
that
.
Cancelmsg
.
Type
==
2
&&
that
.
Cancelmsg
.
Remark
==
""
)
{
uni
.
showToast
({
title
:
'备注不能为空'
,
icon
:
'none'
})
return
title
:
"备注不能为空"
,
icon
:
"none"
,
});
return
;
}
uni
.
requestSubscribeMessage
({
tmplIds
:
that
.
dataList
[
0
].
template_message_list
,
complete
(
res
)
{
that
.
request2
({
url
:
'/api/AppletOrder/CancelAppletGoodsOrderInfo'
,
data
:
that
.
Cancelmsg
that
.
request2
(
{
url
:
"/api/AppletOrder/CancelAppletGoodsOrderInfo"
,
data
:
that
.
Cancelmsg
,
},
(
res
)
=>
{
that
.
showModal
=
false
;
if
(
that
.
Cancelmsg
.
Type
==
1
)
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
icon
:
"none"
,
});
that
.
dataList
.
splice
(
that
.
index
,
1
);
}
else
{
uni
.
showToast
({
...
...
@@ -386,8 +393,8 @@
}
}
);
}
})
},
});
},
//再次购买
buy
(
y
)
{
...
...
@@ -402,7 +409,7 @@
AddressId
:
0
,
};
y
.
DetailList
.
forEach
((
x
)
=>
{
ShoppingCartIdList
.
push
(
x
.
Id
)
ShoppingCartIdList
.
push
(
x
.
Id
);
let
g
=
{
GoodsId
:
x
.
GoodsId
,
Number
:
x
.
Number
,
...
...
@@ -412,8 +419,11 @@
});
forms
=
good
;
uni
.
navigateTo
({
url
:
'/pages/order-submit/order-submit?formData='
+
encodeURIComponent
(
JSON
.
stringify
(
forms
))
+
'&IsFormShoppingCart=2&ShoppingCartIdList='
+
JSON
.
stringify
(
ShoppingCartIdList
)
url
:
"/pages/order-submit/order-submit?formData="
+
encodeURIComponent
(
JSON
.
stringify
(
forms
))
+
"&IsFormShoppingCart=2&ShoppingCartIdList="
+
JSON
.
stringify
(
ShoppingCartIdList
),
});
},
payment
(
e
)
{
...
...
@@ -421,7 +431,7 @@
this
.
payInfo
.
GoodsName
=
e
.
DetailList
[
0
].
GoodsName
.
slice
(
0
,
10
);
this
.
payInfo
.
PaymentWay
=
e
.
PaymentWay
;
this
.
payInfo
.
total_price
=
e
.
Income
;
this
.
payBtn
=
true
this
.
payBtn
=
true
;
},
exitPay
()
{
this
.
payExit
=
false
;
...
...
@@ -433,9 +443,9 @@
//跳转到详情
goDetail
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/guidecar/orderDetail?OrderId='
+
item
.
OrderId
})
}
url
:
"/pages/guidecar/orderDetail?OrderId="
+
item
.
OrderId
,
});
},
};
},
};
</
script
>
pages/jiuzhai/jz_MyOrder.vue
View file @
b9408f48
<
style
>
.jz_MyOrder
{
.jz_MyOrder
{
height
:
100vh
;
background-color
:
#ECF1F4
;
background-color
:
#ecf1f4
;
}
}
.jz_OrderList
{
.jz_OrderList
{
width
:
100%
;
min-height
:
334
rpx
;
background-color
:
#fff
;
...
...
@@ -13,58 +12,58 @@
padding
:
30px
;
margin-bottom
:
15px
;
position
:
relative
;
}
}
.jz_OrderList
:first-child
{
.jz_OrderList
:first-child
{
border-top-left-radius
:
0
;
border-top-right-radius
:
0
;
}
}
.jz_OrderTop
{
.jz_OrderTop
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
padding-bottom
:
27
rpx
;
border-bottom
:
1px
solid
#E6E6E
6
;
}
border-bottom
:
1px
solid
#e6e6e
6
;
}
.jz_Oleft
{
.jz_Oleft
{
color
:
#111111
;
font-size
:
32
rpx
;
font-weight
:
bold
;
width
:
70%
;
height
:
24px
;
overflow
:
hidden
;
}
}
.jz-Oright
{
.jz-Oright
{
color
:
#111111
;
font-size
:
24
rpx
;
position
:
absolute
;
right
:
0
;
}
}
.jz_MyOrder_img
{
.jz_MyOrder_img
{
width
:
100
rpx
;
height
:
100
rpx
;
margin-top
:
20px
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
}
}
.jz_MyOrder_img
img
{
.jz_MyOrder_img
img
{
width
:
100%
;
height
:
100%
;
}
}
.jz_XiaDan
{
.jz_XiaDan
{
margin-left
:
25
rpx
;
color
:
#333333
;
font-size
:
24
rpx
;
margin-top
:
20px
;
}
}
.jz_Zailai
{
.jz_Zailai
{
background-color
:
#111111
;
border-radius
:
16px
;
width
:
150
rpx
;
...
...
@@ -73,54 +72,117 @@
color
:
#fff
;
line-height
:
60
rpx
;
font-size
:
24
rpx
;
}
}
.isShowAll
{
.isShowAll
{
height
:
auto
;
}
.jz_BtnContent
{
margin-top
:
15px
;
right
:
40
rpx
;
bottom
:
20
rpx
;
display
:
flex
;
}
.jz_BtnContent
{
margin-top
:
15px
;
right
:
40
rpx
;
bottom
:
20
rpx
;
display
:
flex
;
justify-content
:
flex-end
;
}
}
</
style
>
<
template
>
<view
class=
"jz_MyOrder"
>
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
:active-color=
"mainColor"
@
change=
"change"
bar-height=
'4'
height=
"100"
></u-tabs>
<u-empty
v-if=
"dataList.length==0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
:active-color=
"mainColor"
:show-bar=
"showBar"
@
change=
"change"
bar-height=
"4"
height=
"100"
></u-tabs>
<u-empty
v-if=
"dataList.length == 0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<template
v-else
>
<view
class=
"jz_MyOrderMain"
style=
"height: calc(100vh - 44px);overflow: hidden;"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<view
class=
"jz_OrderList"
v-for=
"(item,index) in dataList"
:key=
"index"
@
click=
"goOrderDetail(item)"
>
<view
class=
"jz_MyOrderMain"
style=
"height: calc(100vh - 44px); overflow: hidden"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }"
>
<view
class=
"jz_OrderList"
v-for=
"(item, index) in dataList"
:key=
"index"
@
click=
"goOrderDetail(item)"
>
<view
class=
"jz_OrderTop"
>
<view
class=
"jz_Oleft"
:class=
"
{'isShowAll':!item.isShowHalf
}">
{{
item
.
title
}}
<view
class=
"jz_Oleft"
:class=
"
{ isShowAll: !item.isShowHalf
}">
{{
item
.
title
}}
</view>
<view
style=
"margin-left:10px;"
>
<u-icon
name=
"arrow-down"
@
click
.
native
.
stop=
"getShow(item)"
v-if=
"item.isShowHalf"
color=
"#2979ff"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-up"
@
click
.
native
.
stop=
"getShow(item)"
v-else
color=
"#2979ff"
size=
"28"
></u-icon>
<view
style=
"margin-left: 10px"
>
<u-icon
name=
"arrow-down"
@
click
.
native
.
stop=
"getShow(item)"
v-if=
"item.isShowHalf"
color=
"#2979ff"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-up"
@
click
.
native
.
stop=
"getShow(item)"
v-else
color=
"#2979ff"
size=
"28"
></u-icon>
</view>
<view
class=
"jz-Oright"
>
{{
item
.
orderStateName
==
'占位'
?
'待付款'
:
item
.
orderStateName
}}
{{
item
.
orderStateName
==
"占位"
?
"待付款"
:
item
.
orderStateName
}}
</view>
</view>
<view
style=
"display:flex;
"
>
<view
style=
"display: flex
"
>
<view
class=
"jz_MyOrder_img"
>
<img
mode=
'aspectFill'
:src=
"getFirstImg(item.imgCover)"
alt=
""
/>
<img
mode=
"aspectFill"
:src=
"getFirstImg(item.imgCover)"
alt=
""
/>
</view>
<view
class=
"jz_XiaDan"
>
<view>
下单时间:
{{
item
.
createDate
}}
</view>
<view
style=
"margin-top:22rpx;"
>
付款总额:¥
{{
item
.
preferPrice
}}
</view>
<view>
下单时间:
{{
item
.
createDate
}}
</view>
<view
style=
"margin-top: 22rpx"
>
付款总额:¥
{{
item
.
preferPrice
}}
</view
>
</view>
</view>
<view
v-if=
"item.isApplyForCancel==1"
style=
"color:red;font-size:24rpx;margin-left:122rpx;"
>
订单取消,正在确认中!
</view>
<view
v-if=
"item.isApplyForCancel == 1"
style=
"color: red; font-size: 24rpx; margin-left: 122rpx"
>
订单取消,正在确认中!
</view
>
<view
class=
"jz_BtnContent"
>
<view
class=
"jz_Zailai"
style=
"margin-right:10rpx;"
@
click=
"gojz_List"
>
再来一单
</view>
<view
v-if=
"item.orderState==2"
class=
"jz_Zailai"
style=
"width:110rpx;margin-right:10rpx;"
@
click=
"goZhifu(item)"
>
付款
</view>
<view
v-if=
"item.isApplyForCancel!=1"
class=
"jz_Zailai"
style=
"width:110rpx;"
@
click=
"goCancel(item)"
>
取消
</view>
<view
class=
"jz_Zailai"
style=
"margin-right: 10rpx"
@
click=
"gojz_List"
>
再来一单
</view
>
<view
v-if=
"item.orderState == 2"
class=
"jz_Zailai"
style=
"width: 110rpx; margin-right: 10rpx"
@
click=
"goZhifu(item)"
>
付款
</view
>
<view
v-if=
"item.isApplyForCancel != 1"
class=
"jz_Zailai"
style=
"width: 110rpx"
@
click=
"goCancel(item)"
>
取消
</view
>
</view>
</view>
</scroll-view>
...
...
@@ -129,33 +191,36 @@
</view>
</template>
<
script
>
export
default
{
components
:
{
},
export
default
{
components
:
{},
data
()
{
return
{
pageTitle
:
'线路订单'
,
pageTitle
:
"线路订单"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
MiniAppUserId
:
0
,
orderState
:
-
1
orderState
:
-
1
,
},
mainColor
:
""
,
list
:
[{
name
:
'全部'
,
Id
:
-
1
},
{
name
:
'待付款'
,
Id
:
2
},
{
name
:
'已完成'
,
Id
:
1
},{
name
:
'已取消'
,
Id
:
4
}],
list
:
[
{
name
:
"全部"
,
Id
:
-
1
,
},
{
name
:
"待付款"
,
Id
:
2
,
},
{
name
:
"已完成"
,
Id
:
1
,
},
{
name
:
"已取消"
,
Id
:
4
,
},
],
current
:
0
,
dataList
:
[],
page_count
:
0
,
...
...
@@ -165,10 +230,14 @@
nomore
:
"没有更多了"
,
},
status
:
"加载中"
,
price
:
0
price
:
0
,
showBar
:
true
,
};
},
created
()
{
// #ifdef MP-ALIPAY
this
.
showBar
=
false
;
// #endif
this
.
getOrderInfo
();
},
onLoad
(
option
)
{
...
...
@@ -177,8 +246,9 @@
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
...
...
@@ -187,13 +257,12 @@
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
methods
:
{
goOrderDetail
(
item
)
{
console
.
log
(
item
)
goOrderDetail
(
item
)
{
console
.
log
(
item
);
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/jz_SureOrder?orderId="
+
item
.
orderId
url
:
"/pages/jiuzhai/jz_SureOrder?orderId="
+
item
.
orderId
,
});
},
change
(
i
)
{
...
...
@@ -215,7 +284,7 @@
//跳转
gojz_List
()
{
uni
.
navigateTo
({
url
:
"/pages/jiuzhai/jz_Line"
url
:
"/pages/jiuzhai/jz_Line"
,
});
},
lower
(
e
)
{
...
...
@@ -227,39 +296,38 @@
this
.
status
=
"nomore"
;
}
},
research
()
{
this
.
msg
.
pageIndex
=
1
;
research
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getOrderInfo
(
1
);
},
getOrderInfo
(
type
)
{
uni
.
showLoading
({
title
:
'加载中'
,
icon
:
'none'
})
if
(
type
==
1
)
{
this
.
dataList
=
[];
title
:
"加载中"
,
icon
:
"none"
,
});
if
(
type
==
1
)
{
this
.
dataList
=
[];
}
this
.
userInfo
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
this
.
msg
.
MiniAppUserId
=
this
.
userInfo
.
UserId
this
.
apipost
(
"sellorder_post_GetMiniAppTravelOrderList"
,
this
.
msg
,
res
=>
{
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
msg
.
MiniAppUserId
=
this
.
userInfo
.
UserId
;
this
.
apipost
(
"sellorder_post_GetMiniAppTravelOrderList"
,
this
.
msg
,
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据'
);
if
(
type
==
1
)
{
console
.
log
(
res
,
"数据"
);
if
(
type
==
1
)
{
this
.
dataList
=
res
.
data
.
pageData
;
}
else
{
}
else
{
this
.
dataList
=
this
.
dataList
.
concat
(
res
.
data
.
pageData
);
}
this
.
dataList
.
forEach
(
x
=>
{
this
.
dataList
.
forEach
((
x
)
=>
{
x
.
isShowHalf
=
true
;
})
});
this
.
page_count
=
res
.
data
.
pageCount
;
}
else
{
}
},
null
...
...
@@ -268,40 +336,43 @@
//取消订单
goCancel
(
item
)
{
//未付款-调用后台取消
if
((
item
.
paymentTime
==
null
||
item
.
paymentTime
==
''
)
&&
item
.
orderState
==
2
)
{
if
(
(
item
.
paymentTime
==
null
||
item
.
paymentTime
==
""
)
&&
item
.
orderState
==
2
)
{
this
.
apipost
(
"sellorder_post_B2BRemoveOrder"
,
{
ID
:
item
.
orderId
"sellorder_post_B2BRemoveOrder"
,
{
ID
:
item
.
orderId
,
},
res
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
})
title
:
"操作成功"
,
icon
:
"success"
,
});
this
.
research
();
}
},
err
=>
{}
(
err
)
=>
{}
);
}
else
{
let
msg
=
{
OrderId
:
item
.
orderId
,
UserId
:
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
}
}
else
{
let
msg
=
{
OrderId
:
item
.
orderId
,
UserId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
,
};
//已付款取消申请
this
.
apipost
(
"sellorder_post_AppletUserCancelOrder"
,
msg
,
res
=>
{
this
.
apipost
(
"sellorder_post_AppletUserCancelOrder"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
})
title
:
"操作成功"
,
icon
:
"success"
,
});
this
.
research
();
}
else
{
}
},
null
...
...
@@ -309,55 +380,58 @@
}
},
//付款
goZhifu
(
item
)
{
console
.
log
(
item
,
'item'
);
let
url
=
'/api/WeChatPay/GetTravlePayInfo'
goZhifu
(
item
)
{
console
.
log
(
item
,
"item"
);
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
item
.
title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
price
=
item
.
preferPrice
;
this
.
request2
({
this
.
request2
(
{
url
:
url
,
data
:
{
OrderId
:
item
.
orderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
,
}
OrderId
:
item
.
orderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
res
=>
{
},
(
res
)
=>
{
let
orderInfo
=
JSON
.
parse
(
res
.
data
);
this
.
goPay
(
orderInfo
)
this
.
goPay
(
orderInfo
);
}
);
},
goPay
(
orderInfo
)
{
let
that
=
this
;
goPay
(
orderInfo
)
{
let
that
=
this
;
uni
.
requestPayment
({
provider
:
'wxpay'
,
provider
:
"wxpay"
,
timeStamp
:
orderInfo
.
timeStamp
,
nonceStr
:
orderInfo
.
nonceStr
,
package
:
orderInfo
.
package
,
signType
:
orderInfo
.
signType
,
paySign
:
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
'success'
,
res
);
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
})
title
:
"支付成功"
,
});
//todo
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/paysuccess?PreferPrice='
+
that
.
price
+
'&isFrom=1'
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
that
.
price
+
"&isFrom=1"
,
});
},
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
,
err
);
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
})
}
title
:
"支付失败"
,
});
}
}
};
},
});
},
},
};
</
script
>
pages/jiuzhai/jz_SureOrder.vue
View file @
b9408f48
<
style
>
.jz_SureOrder
{
.jz_SureOrder
{
position
:
relative
;
}
.jz_SureTop
{
}
.jz_SureTop
{
width
:
100%
;
box-shadow
:
0px
2px
15px
0px
rgba
(
76
,
76
,
76
,
0.13
);
background-color
:
#fff
;
border-bottom-left-radius
:
60
rpx
;
border-bottom-right-radius
:
60
rpx
;
padding
:
40
rpx
;
}
.jz_SureDfk
{
color
:
#111111
;
font-size
:
40
rpx
;
}
.jz_SureDfk
{
color
:
#111111
;
font-size
:
40
rpx
;
font-weight
:
bold
;
margin-left
:
26
rpx
;
}
.jz_SureContent
{
width
:
90%
;
margin
:
auto
;
margin-left
:
26
rpx
;
}
.jz_SureContent
{
width
:
90%
;
margin
:
auto
;
min-height
:
100px
;
}
.jz_SureCommodity
{
padding
:
30
rpx
0
;
}
.jz_SureCommodity
{
padding
:
30
rpx
0
;
display
:
flex
;
border-bottom
:
1px
solid
#E6E6E
6
;
}
.jzSureMoney
{
color
:
#333333
;
border-bottom
:
1px
solid
#e6e6e
6
;
}
.jzSureMoney
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
20
rpx
;
}
.jz_SuOrder_img
{
font-size
:
20
rpx
;
}
.jz_SuOrder_img
{
width
:
100
rpx
;
height
:
100
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
flex-shrink
:
0
;
}
.jz_SuOrder_img
img
{
width
:
100%
;
height
:
100%
;
}
.jz_OrderNum
{
color
:
#8F8F
90
;
font-size
:
24
rpx
;
margin-right
:
50
rpx
;
}
.jz_GoodName
{
color
:
#333333
;
font-size
:
28
rpx
;
width
:
70%
;
margin-left
:
15px
;
font-weight
:
bold
;
}
.jz_OrderBold
{
color
:
#08090E
;
font-weight
:
bold
;
}
.jz_PayDiv
{
}
.jz_SuOrder_img
img
{
width
:
100%
;
height
:
100%
;
}
.jz_OrderNum
{
color
:
#8f8f
90
;
font-size
:
24
rpx
;
margin-right
:
50
rpx
;
}
.jz_GoodName
{
color
:
#333333
;
font-size
:
28
rpx
;
width
:
70%
;
margin-left
:
15px
;
font-weight
:
bold
;
}
.jz_OrderBold
{
color
:
#08090e
;
font-weight
:
bold
;
}
.jz_PayDiv
{
position
:
absolute
;
width
:
90%
;
margin
:
auto
;
bottom
:
30
rpx
;
display
:
flex
;
width
:
90%
;
margin
:
auto
;
bottom
:
30
rpx
;
display
:
flex
;
justify-content
:
space-between
;
}
.jz_CancleBtn
{
width
:
310
rpx
;
height
:
80
rpx
;
border
:
1px
solid
#111111
;
}
.jz_CancleBtn
{
width
:
310
rpx
;
height
:
80
rpx
;
border
:
1px
solid
#111111
;
border-radius
:
16
rpx
;
color
:
#111111
;
color
:
#111111
;
font-weight
:
bold
;
text-align
:
center
;
line-height
:
80
rpx
;
font-size
:
28
rpx
;
}
}
.jz_Reserve
{
.jz_Reserve
{
padding-bottom
:
120
rpx
;
}
.jz_ReserTop
{
}
.jz_ReserTop
{
width
:
100%
;
min-height
:
300
rpx
;
box-shadow
:
0px
2px
15px
0px
rgba
(
76
,
76
,
76
,
0.13
);
...
...
@@ -89,52 +89,52 @@
border-bottom-left-radius
:
60
rpx
;
border-bottom-right-radius
:
60
rpx
;
padding
:
40
rpx
;
}
}
.jz_ReserTitle
{
.jz_ReserTitle
{
color
:
#111111
;
font-weight
:
600
;
font-size
:
36
rpx
;
}
}
.jz_ReserIn
{
.jz_ReserIn
{
color
:
#111
;
font-size
:
24
rpx
;
font-weight
:
500
;
}
}
.jz_ReseQue
{
color
:
#DFBE6E
;
.jz_ReseQue
{
color
:
#dfbe6e
;
font-size
:
24
rpx
;
padding-top
:
30
rpx
;
border-top
:
1px
solid
#E7E7E
7
;
border-top
:
1px
solid
#e7e7e
7
;
margin-top
:
20px
;
}
}
.jz_ReseQue
img
{
.jz_ReseQue
img
{
width
:
16px
;
height
:
14px
;
position
:
relative
;
top
:
2px
;
margin-right
:
5px
;
}
}
.jz_ReseOrder
{
.jz_ReseOrder
{
padding
:
40
rpx
;
}
}
.jz_ReDix
{
.jz_ReDix
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
10px
;
}
}
.jz_RedixTitle
{
.jz_RedixTitle
{
width
:
90px
;
flex-shrink
:
0
;
}
}
/* .jz_OrderDiv {
/* .jz_OrderDiv {
position: fixed;
width: 90%;
height: 100rpx;
...
...
@@ -150,7 +150,7 @@
border-radius: 16px;
z-index: 999;
} */
.jz_orderbox
{
.jz_orderbox
{
position
:
fixed
;
background-color
:
#fff
;
bottom
:
0
;
...
...
@@ -162,24 +162,23 @@
box-shadow
:
0px
0
rpx
50
rpx
0px
rgba
(
76
,
76
,
76
,
0.13
);
z-index
:
99
;
justify-content
:
flex-end
;
padding
:
20
rpx
30
rpx
;
}
.jz_OrderDiv
{
width
:
90%
;
height
:
100
rpx
;
padding
:
20
rpx
30
rpx
;
}
.jz_OrderDiv
{
width
:
90%
;
height
:
100
rpx
;
background-color
:
#fff
;
margin
:
auto
;
padding
:
20
rpx
;
margin
:
auto
;
padding
:
20
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
box-shadow
:
0px
10
rpx
30
rpx
0px
rgba
(
36
,
36
,
36
,
0.2
);
border-radius
:
16px
;
z-index
:
999
;
}
z-index
:
999
;
}
.jz_OrderReNow
{
.jz_OrderReNow
{
width
:
150
rpx
;
height
:
80
rpx
;
background-color
:
#111111
;
...
...
@@ -189,95 +188,95 @@
font-weight
:
600
;
font-size
:
28
rpx
;
border-radius
:
16
rpx
;
}
.jz_form
{
}
.jz_form
{
margin-top
:
60
rpx
;
padding
:
0
45
rpx
;
}
.jz_form
.form-items
{
padding
:
0
45
rpx
;
}
.jz_form
.form-items
{
margin-bottom
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
padding-bottom
:
30
rpx
;
border-bottom
:
1px
solid
#f5f5f5
;
border-bottom
:
1px
solid
#f5f5f5
;
font-size
:
28px
;
font-weight
:
500
;
}
.jz_form
.form-items
:last-child
{
}
.jz_form
.form-items
:last-child
{
border-bottom
:
none
;
}
.jz_form
.form-items
.label
{
}
.jz_form
.form-items
.label
{
font-size
:
28
rpx
;
font-weight
:
600
;
margin-right
:
60
rpx
;
flex-shrink
:
0
;
}
.jz_form
.form-items
.val
{
flex
:
1
;
}
.jz_ReserTop
.o-timer
{
}
.jz_form
.form-items
.val
{
flex
:
1
;
}
.jz_ReserTop
.o-timer
{
height
:
100
rpx
;
background
:
#ECF1F
4
;
background
:
#ecf1f
4
;
border-radius
:
20
rpx
;
padding
:
0
40
rpx
;
margin-bottom
:
30
rpx
;
}
.jz_ReserTop
.o-timer
.time-item
{
}
.jz_ReserTop
.o-timer
.time-item
{
font-size
:
32
rpx
;
font-weight
:
800
;
}
/* .jz_ReserTop .o-timer .time-item:last-child{
}
/* .jz_ReserTop .o-timer .time-item:last-child{
text-align: right;
} */
.jz_ReserTop
.o-timer
.time-split
{
.jz_ReserTop
.o-timer
.time-split
{
font-size
:
24
rpx
;
font-weight
:
400
;
text-align
:
center
;
margin
:
0
20
rpx
;
}
.jz_ReserTop
.o-timer
.update
{
margin
:
0
20
rpx
;
}
.jz_ReserTop
.o-timer
.update
{
font-size
:
24
rpx
;
font-weight
:
400
;
text-align
:
right
;
color
:
#000
;
color
:
#000
;
display
:
flex
;
align-items
:
center
;
}
.jz_Reserve
.flex
{
}
.jz_Reserve
.flex
{
display
:
flex
;
align-items
:
center
;
}
.jz_Reserve
.big-title
{
}
.jz_Reserve
.big-title
{
position
:
relative
;
}
}
.jz_Reserve
.big-title
::before
{
.jz_Reserve
.big-title
::before
{
display
:
block
;
width
:
71
rpx
;
height
:
12
rpx
;
background
:
#DFBE6E
;
background
:
#dfbe6e
;
border-radius
:
4
rpx
;
content
:
' '
;
content
:
" "
;
position
:
absolute
;
left
:
0
;
bottom
:
6
rpx
;
z-index
:
1
;
}
.jz_Reserve
.big-title
text
{
}
.jz_Reserve
.big-title
text
{
font-size
:
34
rpx
;
font-weight
:
bold
;
color
:
#1F1F1F
;
color
:
#1f1f1f
;
position
:
relative
;
z-index
:
2
;
}
.jz_Reserve
.empty-block
{
}
.jz_Reserve
.empty-block
{
height
:
20
rpx
;
background
:
#ECF1F
4
;
}
.jz_form
.form-items
.val
text
{
border
:
none
;
background
:
#ecf1f
4
;
}
.jz_form
.form-items
.val
text
{
border
:
none
;
padding
:
0
;
margin
:
0
;
outline
:
none
;
...
...
@@ -286,71 +285,122 @@
font-size
:
28
rpx
;
font-weight
:
500
;
width
:
100%
;
}
.jz_Reserve
.grey
{
color
:
#6E6E6E
!important
}
.jz_Reserve
.f12
{
font-size
:
24
rpx
!important
;
}
.jz_Reserve
.f11
{
font-size
:
22
rpx
!important
;
}
.jz_Reserve
.f14
{
font-size
:
28
rpx
!important
;
}
.jz_Reserve
.regular
{
}
.jz_Reserve
.grey
{
color
:
#6e6e6e
!important
;
}
.jz_Reserve
.f12
{
font-size
:
24
rpx
!important
;
}
.jz_Reserve
.f11
{
font-size
:
22
rpx
!important
;
}
.jz_Reserve
.f14
{
font-size
:
28
rpx
!important
;
}
.jz_Reserve
.regular
{
font-weight
:
500
!important
;
}
.jz_Reserve
.sheshi
{
}
.jz_Reserve
.sheshi
{
margin-top
:
50
rpx
;
}
.jz_Reserve
.sheshi
.she-title
{
}
.jz_Reserve
.sheshi
.she-title
{
font-size
:
28
rpx
;
font-weight
:
800
;
}
.jz_Reserve
.sheshi
.she-content
{
}
.jz_Reserve
.sheshi
.she-content
{
margin-top
:
24
rpx
;
}
.jz_Reserve
.sheshi
.she-content
text
{
}
.jz_Reserve
.sheshi
.she-content
text
{
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#4A4A4A
;
color
:
#4a4a4a
;
line-height
:
40
rpx
;
margin-right
:
24
rpx
;
}
.jz_Reserve
.jz_SureVal
{
}
.jz_Reserve
.jz_SureVal
{
flex
:
1
;
font-size
:
28
rpx
;
font-weight
:
500
;
width
:
100%
;
}
}
</
style
>
<
template
>
<view
class=
"jz_Reserve"
v-if=
"orderData"
>
<view
class=
"jz_ReserTop"
>
<view
class=
"flex"
style=
"margin-bottom: 30rpx;"
>
<u-icon
customPrefix=
"iconfont"
name=
"icondaizhifu-"
size=
"52"
color=
"#DFBE6E"
v-if=
"orderStatus.code==0"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconquxiao"
size=
"52"
color=
"#f26c6c"
v-if=
"orderStatus.code==-1"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconshenhezhong"
size=
"52"
color=
"#86d9a5"
v-if=
"orderStatus.code==-2"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconzhengchang"
size=
"52"
color=
"#111"
v-if=
"orderStatus.code==1"
></u-icon>
<text
style=
"margin-left: 26rpx;font-size: 40rpx;font-weight: 600;color:#111;"
>
{{
orderStatus
.
text
}}
<view
class=
"flex"
style=
"margin-bottom: 30rpx"
>
<u-icon
customPrefix=
"iconfont"
name=
"icondaizhifu-"
size=
"52"
color=
"#DFBE6E"
v-if=
"orderStatus.code == 0"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconquxiao"
size=
"52"
color=
"#f26c6c"
v-if=
"orderStatus.code == -1"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconshenhezhong"
size=
"52"
color=
"#86d9a5"
v-if=
"orderStatus.code == -2"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconzhengchang"
size=
"52"
color=
"#111"
v-if=
"orderStatus.code == 1"
></u-icon>
<text
style=
"
margin-left: 26rpx;
font-size: 40rpx;
font-weight: 600;
color: #111;
"
>
{{
orderStatus
.
text
}}
</text>
</view>
<view
style=
"margin-bottom: 30rpx;"
v-if=
"orderData.model.RejectRemark&&orderData.model.RejectRemark!=''"
>
<u-alert-tips
type=
"error"
title=
"订单取消失败"
:description=
"orderData.model.RejectRemark"
></u-alert-tips>
<view
style=
"margin-bottom: 30rpx"
v-if=
"
orderData.model.RejectRemark && orderData.model.RejectRemark != ''
"
>
<u-alert-tips
type=
"error"
title=
"订单取消失败"
:description=
"orderData.model.RejectRemark"
></u-alert-tips>
</view>
<view
class=
"o-timer flex"
>
<view
class=
"time-item"
>
{{
getDate
(
orderData
.
model
.
StartDate
)
}}
{{
getWeek
(
orderData
.
model
.
StartDate
)
}}
</view>
<view
class=
"time-item"
>
{{
getDate
(
orderData
.
model
.
StartDate
)
}}
{{
getWeek
(
orderData
.
model
.
StartDate
)
}}
</view
>
<view
class=
"time-split"
>
<view>
{{
orderData
.
model
.
DayNum
}}
天
</view>
</view>
<view
class=
"time-item"
style=
"font-size: 26rpx;font-weight: 500;flex:1;"
>
<text
v-if=
"orderData.model.ManNum>0"
>
{{
orderData
.
model
.
ManNum
}}
成人
</text>
<text
v-if=
"orderData.model.ChirdNum>0"
>
{{
orderData
.
model
.
ChirdNum
}}
儿童
</text>
<text
v-if=
"orderData.model.BabyNum>0"
>
{{
orderData
.
model
.
BabyNum
}}
婴儿
</text>
<view>
{{
orderData
.
model
.
DayNum
}}
天
</view>
</view>
<view
class=
"time-item"
style=
"font-size: 26rpx; font-weight: 500; flex: 1"
>
<text
v-if=
"orderData.model.ManNum > 0"
>
{{
orderData
.
model
.
ManNum
}}
成人
</text
>
<text
v-if=
"orderData.model.ChirdNum > 0"
>
{{
orderData
.
model
.
ChirdNum
}}
儿童
</text
>
<text
v-if=
"orderData.model.BabyNum > 0"
>
{{
orderData
.
model
.
BabyNum
}}
婴儿
</text
>
</view>
<view
class=
"update"
>
<!--
<text
style=
"margin-right: 8rpx;"
>
修改
</text>
...
...
@@ -358,17 +408,19 @@
</view>
</view>
<view
class=
"jz_ReserTitle"
>
{{
orderData
.
model
.
Title
}}
{{
orderData
.
model
.
Title
}}
</view>
<view
class=
"jz_ReserIn"
style=
"margin:
33rpx 0 18rpx 0"
>
<view
class=
"jz_ReserIn"
style=
"margin:
33rpx 0 18rpx 0"
>
<!--
{{
currentPriceInfo
.
startCityName
}}
出发
{{
currentPriceInfo
.
startDate
}}
-->
{{
orderData
.
model
.
LtName
}}
{{
orderData
.
model
.
LtName
}}
</view>
<view
class=
"big-title"
v-if=
"orderData.model.StartCityName"
>
<text>
{{
orderData
.
model
.
StartCityName
}}
出发
</text>
<text>
{{
orderData
.
model
.
StartCityName
}}
出发
</text>
</view>
<view
class=
"jz_ReseQue"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png"
/>
即时确认:本产品付款后可快速确认,放心期待您的旅行
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png"
/>
即时确认:本产品付款后可快速确认,放心期待您的旅行
</view>
</view>
...
...
@@ -376,119 +428,181 @@
<view
class=
"form-items"
>
<view
class=
"label"
>
订单编号
</view>
<view
class=
"jz_SureVal"
>
{{
orderData
.
model
.
OrderId
}}
{{
orderData
.
model
.
OrderId
}}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
下单日期
</view>
<view
class=
"jz_SureVal"
>
{{
orderData
.
model
.
CreateDate
.
replace
(
'T'
,
' '
)
}}
{{
orderData
.
model
.
CreateDate
.
replace
(
"T"
,
" "
)
}}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
下单日期
</view>
<view
class=
"jz_SureVal"
>
{{
orderData
.
model
.
CreateDate
.
replace
(
'T'
,
' '
)
}}
{{
orderData
.
model
.
CreateDate
.
replace
(
"T"
,
" "
)
}}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
游客姓名
</view>
<view
class=
"jz_SureVal"
>
{{
orderData
.
model
.
ContactName
}}
{{
orderData
.
model
.
ContactName
}}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
联系电话
</view>
<view
class=
"jz_SureVal"
>
{{
orderData
.
model
.
ContactMobile
}}
{{
orderData
.
model
.
ContactMobile
}}
</view>
</view>
</view>
<view
class=
"empty-block"
></view>
<view
style=
"padding:
50rpx 40rpx"
>
<view
style=
"padding:
50rpx 40rpx"
>
<view
class=
"big-title"
>
<text>
费用明细
</text>
</view>
<view
class=
"jz_form"
style=
"margin:40rpx 0;padding: 0;
"
>
<view
class=
"jz_form"
style=
"margin: 40rpx 0; padding: 0
"
>
<view
class=
"form-items"
>
<view
class=
"label"
>
在线支付
</view>
<view
class=
"val f14 regular"
style=
"text-align: right;"
>
<text
style=
"margin-right: 30rpx;"
>
{{
orderData
.
model
.
GuestNum
}}
人
</text>
<text
class=
"red"
>
¥
{{
orderData
.
model
.
PreferPrice
}}
</text>
</view>
</view>
<view
class=
"form-items"
style=
"border-bottom: none;"
>
<view
class=
"label"
>
明细
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom:40rpx;"
:key=
"index"
>
<view
style=
"flex:1"
>
<text
style=
"margin-right: 30rpx;"
>
成人
</text>
</view>
<view
style=
"text-align: right;"
>
{{
orderData
.
model
.
ManNum
}}
人 × ¥
{{
orderData
.
model
.
Unit_Price
}}
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom:40rpx;"
:key=
"index"
v-if=
"orderData.model.ChirdNeedBedNum>0"
>
<view
style=
"flex:1"
>
<text
style=
"margin-right: 30rpx;"
>
儿童(占床)
</text>
</view>
<view
style=
"text-align: right;"
>
{{
orderData
.
model
.
ChirdNeedBedNum
}}
人 × ¥
{{
(
orderData
.
model
.
Unit_Price
+
(
orderData
.
modelPrice
.
ChildNeedPrice
?
orderData
.
modelPrice
.
ChildNeedPrice
:
0
))
}}
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom:40rpx;"
:key=
"index"
v-if=
"orderData.model.ChirdNum-orderData.model.ChirdNeedBedNum>0"
>
<view
style=
"flex:1"
>
<text
style=
"margin-right: 30rpx;"
>
儿童(不占床)
</text>
</view>
<view
style=
"text-align: right;"
>
{{
orderData
.
model
.
ChirdNum
-
orderData
.
model
.
ChirdNeedBedNum
}}
人 × ¥
{{
(
orderData
.
model
.
Unit_Price
-
(
orderData
.
modelPrice
.
ChildNoNeedPrice
?
orderData
.
modelPrice
.
ChildNoNeedPrice
:
0
))
}}
</view>
<view
class=
"label"
>
在线支付
</view>
<view
class=
"val f14 regular"
style=
"text-align: right"
>
<text
style=
"margin-right: 30rpx"
>
{{
orderData
.
model
.
GuestNum
}}
人
</text
>
<text
class=
"red"
>
¥
{{
orderData
.
model
.
PreferPrice
}}
</text>
</view>
</view>
<view
class=
"form-items"
style=
"border-bottom: none"
>
<view
class=
"label"
>
明细
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
成人
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderData
.
model
.
ManNum
}}
人 × ¥
{{
orderData
.
model
.
Unit_Price
}}
</view
>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
v-if=
"orderData.model.ChirdNeedBedNum > 0"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
儿童(占床)
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderData
.
model
.
ChirdNeedBedNum
}}
人 × ¥
{{
orderData
.
model
.
Unit_Price
+
(
orderData
.
modelPrice
.
ChildNeedPrice
?
orderData
.
modelPrice
.
ChildNeedPrice
:
0
)
}}
</view
>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
v-if=
"orderData.model.ChirdNum - orderData.model.ChirdNeedBedNum > 0"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
儿童(不占床)
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderData
.
model
.
ChirdNum
-
orderData
.
model
.
ChirdNeedBedNum
}}
人
× ¥
{{
orderData
.
model
.
Unit_Price
-
(
orderData
.
modelPrice
.
ChildNoNeedPrice
?
orderData
.
modelPrice
.
ChildNoNeedPrice
:
0
)
}}
</view
>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
v-if=
"orderData.model.BabyNum > 0"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
婴儿
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderData
.
model
.
BabyNum
}}
人 × ¥
{{
orderData
.
modelPrice
.
BabyPrice
?
orderData
.
modelPrice
.
BabyPrice
:
0
}}
</view
>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
v-if=
"
orderData.model.ChirdNum > 0 &&
orderData.modelPrice.BabyChargePrice &&
orderData.modelPrice.BabyChargePrice > 0
"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
儿童(附加费)
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderData
.
model
.
ChirdNum
}}
人 × ¥
{{
orderData
.
modelPrice
.
BabyChargePrice
}}
</view
>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom:40rpx;"
:key=
"index"
v-if=
"orderData.model.BabyNum>0"
>
<view
style=
"flex:1"
>
<text
style=
"margin-right: 30rpx;"
>
婴儿
</text>
</view>
<view
style=
"text-align: right;"
>
{{
orderData
.
model
.
BabyNum
}}
人 × ¥
{{
orderData
.
modelPrice
.
BabyPrice
?
orderData
.
modelPrice
.
BabyPrice
:
0
}}
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom:40rpx;"
:key=
"index"
v-if=
"orderData.model.ChirdNum>0&&orderData.modelPrice.BabyChargePrice&&orderData.modelPrice.BabyChargePrice>0"
>
<view
style=
"flex:1"
>
<text
style=
"margin-right: 30rpx;"
>
儿童(附加费)
</text>
</view>
<view
style=
"text-align: right;"
>
{{
orderData
.
model
.
ChirdNum
}}
人 × ¥
{{
orderData
.
modelPrice
.
BabyChargePrice
}}
</view>
</view>
</view>
</view>
<view
class=
"empty-block"
></view>
<view
style=
"padding:50rpx 40rpx"
v-if=
"Refund>0&&orderStatus.code==-1"
>
<view
style=
"padding: 50rpx 40rpx"
v-if=
"Refund > 0 && orderStatus.code == -1"
>
<view
class=
"big-title"
>
<text>
取消订单
</text>
</view>
<view
class=
"jz_form"
style=
"margin:40rpx 0;padding: 0;
"
>
<view
class=
"jz_form"
style=
"margin: 40rpx 0; padding: 0
"
>
<view
class=
"form-items"
>
<view
class=
"label"
>
已退款总额
</view>
<view
class=
"val f14 regular"
style=
"text-align: right;"
>
<text
style=
"margin-right: 30rpx;"
>
{{
orderData
.
model
.
GuestNum
}}
人
</text
>
<text
class=
"red"
>
¥
{{
orderData
.
model
.
PreferPrice
}}
</text>
<view
class=
"label"
>
已退款总额
</view
>
<view
class=
"val f14 regular"
style=
"text-align: right"
>
<text
style=
"margin-right: 30rpx"
>
{{
orderData
.
model
.
GuestNum
}}
人
</text
>
<text
class=
"red"
>
¥
{{
orderData
.
model
.
PreferPrice
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"jz_orderbox flex"
>
<view
style=
"display:flex;"
>
<view
class=
"jz_OrderReNow"
@
click=
"goCancel"
style=
"background: #FFF;color:#111;border:1px solid #111;"
>
<view
style=
"display: flex"
>
<view
class=
"jz_OrderReNow"
@
click=
"goCancel"
style=
"background: #fff; color: #111; border: 1px solid #111"
>
<text
v-if=
"!submitCancel"
>
取消
</text>
<u-loading
v-if=
"submitCancel"
size=
"32"
color=
"#111"
></u-loading>
</view>
</view>
<view
style=
"display:flex;margin-left:30rpx;"
>
<view
style=
"display: flex; margin-left: 30rpx"
>
<!-- #ifdef MP-WEIXIN -->
<view
class=
"jz_OrderReNow"
@
click=
"goFukuan"
>
<text
v-if=
"!submit"
>
立即支付
</text>
<u-loading
v-if=
"submit"
size=
"32"
color=
"#f5f5f5"
></u-loading>
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view
class=
"jz_OrderReNow"
@
click=
"goZhifuAli"
>
<text
v-if=
"!submit"
>
立即支付
</text>
<u-loading
v-if=
"submit"
size=
"32"
color=
"#f5f5f5"
></u-loading>
</view>
<!-- #endif -->
</view>
</view>
</view>
...
...
@@ -498,76 +612,72 @@
</
script
>
<
script
>
export
default
{
components
:
{
},
export
default
{
components
:
{},
data
()
{
return
{
pageTitle
:
'订单详情'
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
MiniAppUserId
:
0
pageTitle
:
"订单详情"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
MiniAppUserId
:
0
,
},
orderData
:
null
,
orderStatus
:
{},
submit
:
false
,
submitCancel
:
false
orderData
:
null
,
orderStatus
:
{},
submit
:
false
,
submitCancel
:
false
,
};
},
created
()
{
},
created
()
{},
onLoad
(
option
)
{
if
(
option
.
orderData
)
{
this
.
orderData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
orderData
))
}
else
if
(
option
.
orderId
)
{
if
(
option
.
orderData
)
{
this
.
orderData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
orderData
));
}
else
if
(
option
.
orderId
)
{
this
.
initOrderInfo
(
option
.
orderId
);
}
},
methods
:
{
goCancel
(){
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
goCancel
()
{
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
//未付款-调用后台取消
if
(
this
.
orderData
.
model
.
OrderState
==
2
)
{
if
(
this
.
orderData
.
model
.
OrderState
==
2
)
{
this
.
apipost
(
"sellorder_post_B2BRemoveOrder"
,
{
ID
:
this
.
orderData
.
model
.
OrderId
"sellorder_post_B2BRemoveOrder"
,
{
ID
:
this
.
orderData
.
model
.
OrderId
,
},
res
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
})
title
:
"操作成功"
,
icon
:
"success"
,
});
uni
.
navigateTo
({
url
:
"/pages/jiuzhai/jz_MyOrder"
url
:
"/pages/jiuzhai/jz_MyOrder"
,
});
}
},
err
=>
{}
(
err
)
=>
{}
);
}
else
{
let
msg
=
{
OrderId
:
this
.
orderData
.
model
.
OrderId
,
UserId
:
uni
.
getStorageSync
(
'mall_UserInfo'
).
UserId
}
}
else
{
let
msg
=
{
OrderId
:
this
.
orderData
.
model
.
OrderId
,
UserId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
,
};
//已付款取消申请
this
.
apipost
(
"sellorder_post_AppletUserCancelOrder"
,
msg
,
res
=>
{
this
.
apipost
(
"sellorder_post_AppletUserCancelOrder"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
})
title
:
"操作成功"
,
icon
:
"success"
,
});
uni
.
navigateTo
({
url
:
"/pages/jiuzhai/jz_MyOrder"
url
:
"/pages/jiuzhai/jz_MyOrder"
,
});
}
else
{
}
},
null
...
...
@@ -576,125 +686,232 @@
},
getWeek
(
date
)
{
var
weekArray
=
new
Array
(
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
);
var
week
=
weekArray
[
new
Date
(
date
).
getDay
()];
//注意此处必须是先new一个Date
return
'周'
+
week
;
var
week
=
weekArray
[
new
Date
(
date
).
getDay
()];
//注意此处必须是先new一个Date
return
"周"
+
week
;
},
getDate
(
date
)
{
if
(
date
)
{
let
arr
=
date
.
split
(
'-'
);
return
arr
[
1
]
+
'月'
+
arr
[
2
]
+
'日'
getDate
(
date
)
{
if
(
date
)
{
let
arr
=
date
.
split
(
"-"
);
return
arr
[
1
]
+
"月"
+
arr
[
2
]
+
"日"
;
}
},
initOrderInfo
(
orderId
){
let
msg
=
{
ID
:
orderId
}
this
.
apipost
(
"sellorder_post_GetOrderEntity"
,
msg
,
res
=>
{
initOrderInfo
(
orderId
)
{
let
msg
=
{
ID
:
orderId
,
};
this
.
apipost
(
"sellorder_post_GetOrderEntity"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderData
=
res
.
data
this
.
formatStatus
(
this
.
orderData
.
model
.
OrderState
,
this
.
orderData
.
model
.
IsChargeLossOrders
,
this
.
orderData
.
model
.
IsApplyForCancel
)
this
.
orderData
=
res
.
data
;
this
.
formatStatus
(
this
.
orderData
.
model
.
OrderState
,
this
.
orderData
.
model
.
IsChargeLossOrders
,
this
.
orderData
.
model
.
IsApplyForCancel
);
}
else
{
this
.
orderData
=
{
result
:
-
1
}
this
.
orderData
=
{
result
:
-
1
,
};
}
console
.
log
(
res
)
console
.
log
(
res
);
},
e
=>
{
}
(
e
)
=>
{}
);
},
formatStatus
(
status
,
loss
,
isCancel
)
{
loss
=
loss
?
loss
:
-
1
;
formatStatus
(
status
,
loss
,
isCancel
)
{
loss
=
loss
?
loss
:
-
1
;
//1、已申请;!=1未申请
if
(
loss
==
1
||
status
==
4
)
{
this
.
orderStatus
.
code
=-
1
this
.
orderStatus
.
text
=
'已取消'
}
else
if
(
status
==
2
&&
isCancel
!=
1
)
{
this
.
orderStatus
.
code
=
0
this
.
orderStatus
.
text
=
'待付款'
}
else
if
(
status
==
2
&&
isCancel
==
1
)
{
this
.
orderStatus
.
code
=-
2
this
.
orderStatus
.
text
=
'审核中'
}
else
if
(
status
==
1
)
{
this
.
orderStatus
.
code
=
1
this
.
orderStatus
.
text
=
'正常'
if
(
loss
==
1
||
status
==
4
)
{
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
}
else
if
(
status
==
2
&&
isCancel
!=
1
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"待付款"
;
}
else
if
(
status
==
2
&&
isCancel
==
1
)
{
this
.
orderStatus
.
code
=
-
2
;
this
.
orderStatus
.
text
=
"审核中"
;
}
else
if
(
status
==
1
)
{
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
text
=
"正常"
;
}
},
goFukuan
(){
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
// #ifdef MP-WEIXIN
goFukuan
()
{
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
var
that
=
this
;
var
tempObj
=
uni
.
getStorageSync
(
'basedata'
).
mall
.
wechatmessage
;
var
tempObj
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
wechatmessage
;
var
tmplIds
=
[];
if
(
tempObj
&&
tempObj
.
length
>
0
)
{
tempObj
.
forEach
(
x
=>
{
if
(
x
.
Name
==
'下单成功提醒'
||
x
.
Name
==
'订单取消提醒'
)
{
tmplIds
.
push
(
x
.
MessageId
)
if
(
tempObj
&&
tempObj
.
length
>
0
)
{
tempObj
.
forEach
((
x
)
=>
{
if
(
x
.
Name
==
"下单成功提醒"
||
x
.
Name
==
"订单取消提醒"
)
{
tmplIds
.
push
(
x
.
MessageId
);
}
})
});
}
uni
.
requestSubscribeMessage
({
tmplIds
:
tmplIds
,
complete
(
res
)
{
that
.
goZhifu
();
}
})
},
});
},
//支付
goZhifu
()
{
this
.
submit
=
true
let
url
=
'/api/WeChatPay/GetTravlePayInfo'
goZhifu
()
{
this
.
submit
=
true
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
this
.
orderData
.
model
.
Title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
)
this
.
request2
({
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
request2
(
{
url
:
url
,
data
:
{
OrderId
:
this
.
orderData
.
model
.
OrderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
,
}
OrderId
:
this
.
orderData
.
model
.
OrderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
},
res
=>
{
(
res
)
=>
{
let
orderInfo
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
orderInfo
)
this
.
goPay
(
orderInfo
)
console
.
log
(
orderInfo
);
this
.
goPay
(
orderInfo
);
}
);
},
goPay
(
orderInfo
)
{
let
that
=
this
;
goPay
(
orderInfo
)
{
let
that
=
this
;
uni
.
requestPayment
({
provider
:
'wxpay'
,
provider
:
"wxpay"
,
timeStamp
:
orderInfo
.
timeStamp
,
nonceStr
:
orderInfo
.
nonceStr
,
package
:
orderInfo
.
package
,
signType
:
orderInfo
.
signType
,
paySign
:
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
'success'
,
res
);
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
})
that
.
submit
=
false
title
:
"支付成功"
,
});
that
.
submit
=
false
;
//todo
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
)
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
,
err
);
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
'none'
})
that
.
submit
=
false
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
)
}
icon
:
"none"
,
});
that
.
submit
=
false
;
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
});
},
// #endif
// #ifdef MP-ALIPAY
// goFukuanAli() {
// if (this.submit || this.submitCancel) return;
// var that = this;
// var tempObj = uni.getStorageSync("basedata").mall.wechatmessage;
// var tmplIds = [];
// if (tempObj && tempObj.length > 0) {
// tempObj.forEach((x) => {
// if (x.Name == "下单成功提醒" || x.Name == "订单取消提醒") {
// tmplIds.push(x.MessageId);
// }
// });
// }
// uni.requestSubscribeMessage({
// tmplIds: tmplIds,
// complete(res) {
// that.goZhifu();
// },
// });
// },
//支付
goZhifuAli
()
{
this
.
submit
=
true
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
this
.
orderData
.
model
.
Title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
request2
(
{
url
:
url
,
data
:
{
OrderId
:
this
.
orderData
.
model
.
OrderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
2
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
},
(
res
)
=>
{
let
orderInfo
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
orderInfo
);
if
(
res
.
data
)
{
this
.
goPayAli
(
res
.
data
);
}
else
{
uni
.
showToast
({
title
:
"获取交易号失败"
,
duration
:
2000
,
});
}
}
};
);
},
goPayAli
(
orderInfo
)
{
let
that
=
this
;
my
.
tradePay
({
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
,
});
that
.
submit
=
false
;
//todo
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
that
.
submit
=
false
;
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
});
return
;
uni
.
requestPayment
({
provider
:
"wxpay"
,
timeStamp
:
orderInfo
.
timeStamp
,
nonceStr
:
orderInfo
.
nonceStr
,
package
:
orderInfo
.
package
,
signType
:
orderInfo
.
signType
,
paySign
:
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
,
});
that
.
submit
=
false
;
//todo
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
that
.
submit
=
false
;
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
});
},
// #endif
},
};
</
script
>
pages/user-center/integral-detail/integral-detail.vue
View file @
b9408f48
<
template
>
<view
class=
"integralDStyle"
:style=
"
{ height: contentHeight }">
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
"mainColor"
height=
"100"
></u-tabs>
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
"mainColor"
height=
"100"
:show-bar=
"showBar"
></u-tabs>
<u-empty
v-if=
"g.length == 0"
text=
"暂无积分明细"
mode=
"list"
></u-empty>
<view
v-if=
"g.length > 0"
style=
"height: calc(100vh - 50px);width: calc(100vw);overflow: hidden; "
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<view
v-if=
"g.length > 0"
style=
"height: calc(100vh - 50px); width: calc(100vw); overflow: hidden"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }"
>
<view
class=
"interDList"
v-for=
"(x, i) in g"
:key=
"i"
>
<Text>
{{
x
.
Description
}}
</Text>
<view
style=
"display: flex;align-items: center;justify-content: space-between;width: 100%;margin-top: 5px;"
>
<Text
:style=
"
{color:x.Type==1?mainColor:secondary}">
{{
x
.
Type
==
1
?
'+'
:
'-'
}}{{
x
.
Integral
}}
积分
</Text>
<Text
style=
'font-size: 12px; color: #B5B5B5;'
>
时间:
{{
x
.
CreateDate
}}
</Text>
<Text>
{{
x
.
Description
}}
</Text>
<view
style=
"
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
margin-top: 5px;
"
>
<Text
:style=
"
{ color: x.Type == 1 ? mainColor : secondary }"
>
{{
x
.
Type
==
1
?
"+"
:
"-"
}}{{
x
.
Integral
}}
积分
</Text
>
<Text
style=
"font-size: 12px; color: #b5b5b5"
>
时间:
{{
x
.
CreateDate
}}
</Text
>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx;
"
>
加载中...
</Text>
<Text
style=
"color: #fff; margin-top: 10rpx
"
>
加载中...
</Text>
</view>
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
components
:
{
auth
auth
,
},
data
()
{
return
{
pageTitle
:
"积分明细"
,
current
:
0
,
list
:
[{
name
:
"收入"
list
:
[
{
name
:
"收入"
,
},
{
name
:
"支出"
name
:
"支出"
,
},
],
showAuth
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
Type
:
0
Type
:
0
,
},
mainColor
:
""
,
secondary
:
''
,
secondary
:
""
,
contentHeight
:
0
,
page
:
1
,
page_count
:
1
,
...
...
@@ -62,19 +103,23 @@
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
showBar
:
true
,
};
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
// #ifdef MP-ALIPAY
this
.
showBar
=
false
;
// #endif
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
...
...
@@ -89,7 +134,7 @@
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
...
...
@@ -106,12 +151,13 @@
},
init
()
{
this
.
loading
=
true
;
this
.
msg
.
Type
=
this
.
current
+
1
this
.
request2
({
url
:
'/api/AppletUser/GetMemberIntegralPageList'
,
data
:
this
.
msg
this
.
msg
.
Type
=
this
.
current
+
1
;
this
.
request2
(
{
url
:
"/api/AppletUser/GetMemberIntegralPageList"
,
data
:
this
.
msg
,
},
res
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
loading
=
false
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
...
...
@@ -138,19 +184,19 @@
},
//关闭登录窗口
gbAuth
()
{
uni
.
navigateBack
()
}
uni
.
navigateBack
();
},
};
},
};
</
script
>
<
style
>
.integralDStyle
{
.integralDStyle
{
width
:
100%
;
height
:
100%
;
background
:
#f3f4f6
;
}
}
.integralDStyle
.loading
{
.integralDStyle
.loading
{
width
:
200
rpx
;
height
:
200
rpx
;
background
:
#000000
;
...
...
@@ -165,14 +211,14 @@
top
:
30%
;
margin-left
:
-100
rpx
;
z-index
:
999
;
}
}
.integralDStyle
.interDList
{
.integralDStyle
.interDList
{
width
:
100%
;
padding
:
20px
15px
;
display
:
flex
;
flex-direction
:
column
;
background
:
#fff
;
border-top
:
1px
solid
#f5f5f5
;
}
}
</
style
>
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