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
4d5eb0c3
Commit
4d5eb0c3
authored
Feb 21, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Plain Diff
合并远程代码,解决冲突,自测;
parents
a0181d1d
ac55c441
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
153 additions
and
78 deletions
+153
-78
app.json
app.json
+1
-0
actioncmd.js
const/actioncmd.js
+3
-0
index.acss
pages/index/index.acss
+22
-1
index.axml
pages/index/index.axml
+74
-72
index.js
pages/index/index.js
+53
-5
No files found.
app.json
View file @
4d5eb0c3
{
{
"pages"
:
[
"pages"
:
[
"pages/index/index"
,
"pages/index/index"
,
"pages/poster/poster"
,
"pages/home/home"
,
"pages/home/home"
,
"pages/poster/poster"
,
"pages/poster/poster"
,
"pages/waitoperate/waitoperate"
,
"pages/waitoperate/waitoperate"
,
...
...
const/actioncmd.js
View file @
4d5eb0c3
...
@@ -30,3 +30,6 @@ export const ACTION_GO_HOME = "ACTION_GO_HOME";
...
@@ -30,3 +30,6 @@ export const ACTION_GO_HOME = "ACTION_GO_HOME";
//获取账户信息
//获取账户信息
export
const
ACTION_GET_ACCOUNT
=
"ACTION_GET_ACCOUNT"
;
export
const
ACTION_GET_ACCOUNT
=
"ACTION_GET_ACCOUNT"
;
//直接收款
export
const
ACTION_DIRECT_PAYMENT
=
"ACTION_DIRECT_PAYMENT"
;
pages/index/index.acss
View file @
4d5eb0c3
/* home样式 */
/* home样式 */
.homePage {
.homePage {
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
...
@@ -7,8 +6,22 @@
...
@@ -7,8 +6,22 @@
height: 100%;
height: 100%;
background: white;
background: white;
/* border: 2px solid red; */
/* border: 2px solid red; */
position: absolute
}
/* home样式 */
.homePageFilter {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
background: #F3F7F9;
filter: blur(3px);
position: absolute;
}
}
.homeTopView {
.homeTopView {
position: relative;
position: relative;
width: 750rpx;
width: 750rpx;
...
@@ -502,6 +515,14 @@
...
@@ -502,6 +515,14 @@
height: 155rpx;
height: 155rpx;
}
}
/* 自定义键盘 */
.land-keybord{
width: 100%;
height: 100%;
position: absolute;
border: 2px solid red;
}
/* 结算页 */
/* 结算页 */
.balanceTopView {
.balanceTopView {
...
...
pages/index/index.axml
View file @
4d5eb0c3
This diff is collapsed.
Click to expand it.
pages/index/index.js
View file @
4d5eb0c3
...
@@ -10,6 +10,8 @@ import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd'
...
@@ -10,6 +10,8 @@ import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd'
import
{
ACTION_ON_PAY_FAILED
}
from
'../../const/actioncmd'
import
{
ACTION_ON_PAY_FAILED
}
from
'../../const/actioncmd'
import
{
ACTION_GO_HOME
}
from
'../../const/actioncmd'
import
{
ACTION_GO_HOME
}
from
'../../const/actioncmd'
import
{
ACTION_GET_ACCOUNT
}
from
'../../const/actioncmd'
import
{
ACTION_GET_ACCOUNT
}
from
'../../const/actioncmd'
import
{
ACTION_DIRECT_PAYMENT
}
from
'../../const/actioncmd'
Page
({
Page
({
data
:
{
data
:
{
...
@@ -126,7 +128,7 @@ Page({
...
@@ -126,7 +128,7 @@ Page({
context
.
goPage
(
'landscan'
);
context
.
goPage
(
'landscan'
);
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
)
{
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
)
{
//跳转
//跳转
context
.
goPage
(
'waitoperate'
);
context
.
goPage
(
'waitoperate'
);
}
else
if
(
res
.
action
==
ACTION_ON_PAY_SUCCESS
)
{
}
else
if
(
res
.
action
==
ACTION_ON_PAY_SUCCESS
)
{
//分转元
//分转元
...
@@ -149,6 +151,11 @@ Page({
...
@@ -149,6 +151,11 @@ Page({
context
.
setData
({
context
.
setData
({
storeName
:
res
.
data
.
storeName
storeName
:
res
.
data
.
storeName
});
});
}
else
if
(
res
.
action
==
ACTION_DIRECT_PAYMENT
){
if
(
res
.
data
!=
null
){
context
.
setData
({
totalPrice
:
res
.
data
})
}
context
.
goPage
(
'waitoperate'
);
}
}
}
}
});
});
...
@@ -331,6 +338,36 @@ Page({
...
@@ -331,6 +338,36 @@ Page({
});
});
},
},
//直接收银
directPayment
(
e
)
{
this
.
setData
({
scene
:
3
})
},
//发生直接收银事件
sendPaymentToFront
(
payment
)
{
var
commonRequest
=
{
action
:
ACTION_DIRECT_PAYMENT
,
data
:
payment
};
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
commonRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"发送直接收款事件到前屏小程序 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
console
.
log
(
"发送收款事件到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
showToast
({
type
:
'fail'
,
content
:
'操作失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
},
});
},
/**landscan页面逻辑方法 */
/**landscan页面逻辑方法 */
//把所有的商品数据发送到后屏
//把所有的商品数据发送到后屏
...
@@ -356,10 +393,17 @@ Page({
...
@@ -356,10 +393,17 @@ Page({
//键盘完成
//键盘完成
onKeyBordFinished
(
barcode
)
{
onKeyBordFinished
(
result
)
{
if
(
this
.
data
.
scene
==
3
){
this
.
sendPaymentToFront
(
result
)
}
else
if
(
this
.
data
.
scene
==
1
){
this
.
sendGoodsInfoToFront
(
result
)
}
this
.
onKeyBordClose
();
this
.
onKeyBordClose
();
},
//把手输条码发生到前屏
sendGoodsInfoToFront
(
barcode
)
{
my
.
showLoading
({});
my
.
showLoading
({});
var
commonRequest
=
{
var
commonRequest
=
{
action
:
ACTION_REQUEST_GOOD_INFO
,
action
:
ACTION_REQUEST_GOOD_INFO
,
...
@@ -376,15 +420,19 @@ Page({
...
@@ -376,15 +420,19 @@ Page({
my
.
hideLoading
();
my
.
hideLoading
();
my
.
showToast
({
my
.
showToast
({
type
:
'fail'
,
type
:
'fail'
,
content
:
'
发送商品条码到后屏
失败'
,
content
:
'
操作
失败'
,
duration
:
3000
,
duration
:
3000
,
success
:
()
=>
{
success
:
()
=>
{
},
},
});
});
}
}
})
})
},
},
// 键盘关闭
// 键盘关闭
onKeyBordClose
()
{
onKeyBordClose
()
{
this
.
setData
({
scene
:
0
})
this
.
setData
({
scene
:
0
})
...
...
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