Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-front
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-front
Commits
0c9d686c
Commit
0c9d686c
authored
Feb 13, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付bugfix&支付背景&数据存储
parent
c2b59d6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
10 deletions
+31
-10
balance.acss
pages/balance/balance.acss
+2
-0
balance.js
pages/balance/balance.js
+20
-2
scan.js
pages/scan/scan.js
+9
-8
No files found.
pages/balance/balance.acss
View file @
0c9d686c
...
...
@@ -6,6 +6,8 @@ page{
height: 100%;
align-items: center;
box-sizing: border-box;
background: url(/images/bg_balance.png) no-repeat fixed top;
background-size:100% 504rpx;
}
.goodsRemind{
...
...
pages/balance/balance.js
View file @
0c9d686c
...
...
@@ -32,6 +32,23 @@ Page({
})
}
//商品数据
let
context
=
this
;
my
.
getStorage
({
key
:
'goods'
,
success
:
function
(
res
)
{
console
.
log
(
"商品信息 ===》 "
+
JSON
.
stringify
(
res
));
context
.
setData
({
list
:
res
.
data
})
},
fail
:
function
(
res
)
{
console
.
log
(
"商品信息 ===》 "
+
JSON
.
stringify
(
res
));
}
});
},
...
...
@@ -89,6 +106,7 @@ Page({
return
;
}
if
(
res
.
resultCode
==
1
){
//成功
console
.
log
(
"支付回调成功,跳转 "
);
// if(data.isCashierClosed == true){
...
...
@@ -195,7 +213,7 @@ Page({
console
.
log
(
"支付回调成功,跳转 "
);
// if(data.isCashierClosed == true){
my
.
ix
.
offCashierEventReceive
();
saveData
(
this
.
data
.
list
,
res
);
this
.
saveData
(
this
.
data
.
list
,
res
);
my
.
redirectTo
({
url
:
'/pages/paysuccess/paysuccess?orderPrice='
+
this
.
data
.
totalPrice
+
"&couponPrice="
+
this
.
data
.
couponPrice
+
"&payPrice="
+
this
.
data
.
payPrice
+
"&totalCount="
+
this
.
data
.
totalCount
,
});
...
...
@@ -205,7 +223,7 @@ Page({
my
.
ix
.
offCashierEventReceive
();
my
.
showToast
({
type
:
'fail'
,
content
:
res
.
data
,
content
:
res
.
message
,
duration
:
2000
});
}
...
...
pages/scan/scan.js
View file @
0c9d686c
...
...
@@ -36,11 +36,6 @@ Page({
var
scanGoodRequest
=
api
.
createCommonRequest
();
scanGoodRequest
.
goodsId
=
barcode
;
//管理员需要额外传一个storeid 但是目前这个设备是没有
// let storeId = getApp().globalData.localAccountInfo.storeId
// let actType = getApp().globalData.localAccountInfo.actType
// if (storeId != null && actType == 1) {
// scanGoodRequest = storeId
// }
console
.
log
(
"扫商品的请求 ==>"
+
JSON
.
stringify
(
scanGoodRequest
));
my
.
request
({
url
:
getApp
().
globalData
.
BASE_URL
+
API_SCAN
,
...
...
@@ -144,9 +139,15 @@ Page({
//跳转结算页面
goBalance
()
{
my
.
navigateTo
({
url
:
"/pages/balance/balance?totalPrice=0.01"
+
"&totalQuantity="
+
this
.
data
.
totalQuantity
+
"&totalDisc="
+
this
.
data
.
totalDisc
,
// url: "/pages/balance/balance?totalPrice=" + this.data.totalPrice+"&totalQuantity="+this.data.totalQuantity+"&totalDisc="+this.data.totalDisc,
url
:
"/pages/balance/balance?totalPrice="
+
this
.
data
.
totalPrice
+
"&totalQuantity="
+
this
.
data
.
totalQuantity
+
"&totalDisc="
+
this
.
data
.
totalDisc
,
});
// 存商品信息数据
my
.
setStorage
({
key
:
'goods'
,
data
:
this
.
data
.
goods
,
success
:
function
()
{
console
.
log
(
"商品数据写入成功"
);
}
});
},
...
...
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