Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-back
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-back
Commits
337b1289
Commit
337b1289
authored
Feb 19, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了支付成功和失败之后的处理
parent
4138b3e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
16 deletions
+26
-16
actioncmd.js
const/actioncmd.js
+6
-0
index.acss
pages/index/index.acss
+1
-12
index.axml
pages/index/index.axml
+3
-3
index.js
pages/index/index.js
+16
-1
No files found.
const/actioncmd.js
View file @
337b1289
...
...
@@ -18,3 +18,9 @@ export const ACTION_GO_SCAN = "ACTION_GO_SCAN";
//获取店铺信息
export
const
ACTION_STORE_INFO
=
"ACTION_STORE_INFO"
;
//支付成功
export
const
ACTION_ON_PAY_SUCCESS
=
"ACTION_ON_PAY_SUCCESS"
;
//支付失败
export
const
ACTION_ON_PAY_FAILED
=
"ACTION_ON_PAY_FAILED"
;
pages/index/index.acss
View file @
337b1289
...
...
@@ -504,7 +504,7 @@
/* 结算页 */
pag
e{
.balanc
e{
display: flex;
flex-direction: column;
width: 100%;
...
...
@@ -522,17 +522,6 @@ page{
box-shadow:0rpx 2rpx 7rpx 0rpx rgba(153,153,153,0.16);
}
.backButton {
color: #333333;
font-size: 19rpx;
line-height: 60rpx;
height: 60rpx;
width: 110rpx;
text-align: center;
/* border: 2px solid red; */
position: relative;
}
.bodyContainer {
display: flex;
flex-direction: row;
...
...
pages/index/index.axml
View file @
337b1289
...
...
@@ -115,14 +115,14 @@
</view>
<view class="contentLine" style="margin-top: 14.5rpx;">
<view class="descText">商家优惠:</view>
<view class="totalCoupon">¥{{totalDisc
t
}}</view>
<view class="totalCoupon">¥{{totalDisc}}</view>
</view>
<view style="position: absolute;display: flex;flex-direction: row;align-items: baseline;bottom:22rpx;left:0rpx;padding-left: 29rpx;">
<view class="descText">应收款:</view>
<view class="moneySign">¥</view>
<view class="payPrice">{{total
Disct
}}</view>
<view class="descText">(共{{
q
uantity}}件)</view>
<view class="payPrice">{{total
Price
}}</view>
<view class="descText">(共{{
totalQ
uantity}}件)</view>
</view>
</view>
...
...
pages/index/index.js
View file @
337b1289
...
...
@@ -6,6 +6,8 @@ import { ACTION_REQUEST_GOOD_INFO } from '../../const/actioncmd'
import
{
ACTION_PRINT_RESULT
}
from
'../../const/actioncmd'
import
{
ACTION_REPRINT
}
from
'../../const/actioncmd'
import
{
ACTION_GO_SCAN
}
from
'../../const/actioncmd'
import
{
ACTION_ON_PAY_SUCCESS
}
from
'../../const/actioncmd'
import
{
ACTION_ON_PAY_FAILED
}
from
'../../const/actioncmd'
Page
({
data
:
{
...
...
@@ -84,6 +86,19 @@ Page({
}
else
if
(
res
.
action
==
ACTION_GO_SCAN
){
//跳转到
context
.
goPage
(
"landscan"
);
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
){
//跳转
this
.
goPage
(
"waitoperate"
)
}
else
if
(
res
.
action
==
ACTION_ON_PAY_SUCCESS
){
setData
({
isPaySuccess
:
true
})
this
.
goPage
(
"payresult"
);
}
else
if
(
res
.
action
==
ACTION_ON_PAY_FAILED
){
setData
({
isPaySuccess
:
false
})
this
.
goPage
(
"payresult"
);
}
else
{
//未知指令
}
...
...
@@ -296,7 +311,7 @@ Page({
this
.
sendGoodInfoToFront
()
},
//跳转到
支付结果页面
//跳转到
结算等待页
goPay
(
e
)
{
var
commonRequest
=
{
action
:
ACTION_GO_BALANCE
,
...
...
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