Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
c7b4de75
Commit
c7b4de75
authored
Jun 04, 2020
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善支付结果页面
parent
f77050b6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
156 additions
and
14 deletions
+156
-14
pages.json
pages.json
+3
-0
order-submit.vue
pages/order-submit/order-submit.vue
+21
-14
pay-success.vue
pages/order-submit/pay-success.vue
+130
-0
order-detail.vue
pages/order/order-detail.vue
+2
-0
pay-success.png
static/images/icon/pay-success.png
+0
-0
No files found.
pages.json
View file @
c7b4de75
...
...
@@ -3,6 +3,9 @@
"^u-(.*)"
:
"uview-ui/components/u-$1/u-$1.vue"
},
"pages"
:
[{
"path"
:
"pages/order-submit/pay-success"
},
{
"path"
:
"pages/order/after-sale/refunds-list"
},
{
...
...
pages/order-submit/order-submit.vue
View file @
c7b4de75
...
...
@@ -329,21 +329,28 @@ export default {
},
(
res
)
=>
{
console
.
log
(
res
.
data
);
uni
.
showModal
({
title
:
"下单提醒"
,
content
:
"订单已经创建成功,等待后端实现支付调用,是否前往订单列表"
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
that
.
isLeave
=
true
;
uni
.
navigateTo
({
url
:
"/pages/order/index"
,
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
"用户点击取消"
);
}
},
//TODO 未实现 支付 开始调起支付
uni
.
navigateTo
({
url
:
'/pages/order-submit/pay-success'
});
// uni.showModal({
// title: "下单提醒",
// content:
// "订单已经创建成功,等待后端实现支付调用,是否前往订单列表",
// success: function (res) {
// if (res.confirm) {
// that.isLeave = true;
// uni.navigateTo({
// url: "/pages/order/index",
// });
// } else if (res.cancel) {
// console.log("用户点击取消");
// }
// },
// });
}
);
}
...
...
pages/order-submit/pay-success.vue
0 → 100644
View file @
c7b4de75
<
template
>
<view
class=
"paySuccess"
>
<view
style=
"background: #fff;"
>
<view
class=
"img-box"
>
<img
src=
"/static/images/icon/pay-success.png"
class=
"img"
/>
</view>
<view
class=
"title"
>
订单支付成功
</view>
<view
class=
"price"
>
实付 ¥119.00
</view>
<view
class=
"btn-box"
>
<u-button
style=
"display: inline-block;"
shape=
"circle"
:custom-style=
"customStyle"
@
click=
"goHome"
>
返回首页
</u-button
>
<u-button
shape=
"circle"
style=
"margin-left: 60rpx; display: inline-block;"
:custom-style=
"themCustomStyle"
@
click
.
stop=
"redictToOrders"
>
查看订单
</u-button
>
</view>
</view>
<u-divider
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"transparent"
>
<view
style=
"display: flex;"
>
<u-icon
name=
"like"
size=
"20px"
:color=
"mainColor"
></u-icon>
<text
style=
"margin-left: 5px;"
>
为你推荐
</text>
</view>
</u-divider>
<view
style=
"padding: 12px;"
v-if=
"recommend.length > 0"
>
<goodlist
:list=
"recommend"
></goodlist>
</view>
</view>
</
template
>
<
script
>
import
goodlist
from
"@/components/goods/list"
;
export
default
{
components
:
{
goodlist
,
},
data
()
{
return
{
customStyle
:
{
marginLeft
:
"20px"
,
padding
:
"0 30rpx"
,
},
themCustomStyle
:
{
marginLeft
:
"20px"
,
padding
:
"0 30rpx"
,
},
mainColor
:
""
,
recommend
:
[],
};
},
onLoad
(
option
)
{
uni
.
setNavigationBarTitle
({
title
:
"支付成功"
,
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
themCustomStyle
.
color
=
this
.
mainColor
;
this
.
themCustomStyle
.
borderColor
=
this
.
mainColor
;
this
.
initRecommend
();
},
methods
:
{
initRecommend
()
{
this
.
request
(
{
url
:
""
,
data
:
{
r
:
"api/goods/new-recommend"
,
goods_id
:
0
,
type
:
"goods"
,
},
},
(
res
)
=>
{
this
.
recommend
=
res
.
data
.
list
;
}
);
},
redictToOrders
()
{
uni
.
redirectTo
({
url
:
"/pages/order/index/index"
,
});
},
goHome
()
{
uni
.
redirectTo
({
url
:
"/pages/index/index"
,
});
},
},
};
</
script
>
<
style
>
.paySuccess
{
min-height
:
100vh
;
padding-bottom
:
40
rpx
;
background
:
#f5f5f5
;
}
.paySuccess
.img-box
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.paySuccess
.img-box
.img
{
width
:
256
rpx
;
height
:
256
rpx
;
padding
:
60
rpx
0
0
0
;
}
.paySuccess
.title
{
padding
:
40
rpx
0
20
rpx
0
;
font-size
:
32
rpx
;
color
:
#000
;
font-weight
:
600
;
text-align
:
center
;
}
.paySuccess
.price
{
font-size
:
30
rpx
;
color
:
gray
;
padding-bottom
:
60
rpx
;
text-align
:
center
;
}
.paySuccess
.btn-box
{
padding-bottom
:
60
rpx
;
text-align
:
center
;
}
</
style
>
pages/order/order-detail.vue
View file @
c7b4de75
...
...
@@ -273,9 +273,11 @@
<
script
>
import
afterSale
from
"@/components/userorder/after-sale"
;
import
goodlist
from
"@/components/goods/list"
export
default
{
components
:
{
afterSale
,
goodlist
},
data
()
{
return
{
...
...
static/images/icon/pay-success.png
0 → 100644
View file @
c7b4de75
2.81 KB
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