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
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/index/index"
,
"pages/poster/poster"
,
"pages/home/home"
,
"pages/poster/poster"
,
"pages/waitoperate/waitoperate"
,
...
...
const/actioncmd.js
View file @
4d5eb0c3
...
...
@@ -30,3 +30,6 @@ export const ACTION_GO_HOME = "ACTION_GO_HOME";
//获取账户信息
export
const
ACTION_GET_ACCOUNT
=
"ACTION_GET_ACCOUNT"
;
//直接收款
export
const
ACTION_DIRECT_PAYMENT
=
"ACTION_DIRECT_PAYMENT"
;
pages/index/index.acss
View file @
4d5eb0c3
/* home样式 */
.homePage {
display: flex;
flex-direction: column;
...
...
@@ -7,8 +6,22 @@
height: 100%;
background: white;
/* 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 {
position: relative;
width: 750rpx;
...
...
@@ -502,6 +515,14 @@
height: 155rpx;
}
/* 自定义键盘 */
.land-keybord{
width: 100%;
height: 100%;
position: absolute;
border: 2px solid red;
}
/* 结算页 */
.balanceTopView {
...
...
pages/index/index.axml
View file @
4d5eb0c3
<view>
<view class="homePage" hidden="{{!pageShow['home']}}">
<view class="topView">
<view class="store">
<image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/>
<text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text>
</view>
<view style="position:absolute;font-size:22rpx;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:rgba(51,51,51,1);line-height:22rpx;left:0rpx;top:19rpx;width:100%;text-align:center;">首页</view>
<view style="display:flex;flex-direction:row-reverse;position:absolute;right:19rpx;top:19rpx;width:auto;background:#ffffff;">
<view style="font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(51,51,51,1);line-height:22rpx;">退出</view>
<image mode="aspectFit" src="/images/icon_exit.png" style="position:relative;width:19rpx;height:19rpx;margin-right:8rpx;margin-top:1rpx;"/>
<view class="{{scene != 0 ? 'homePageFilter' : 'homePage' }}" hidden="{{!pageShow['home']}}">
<view class="homeTopView">
<view class="store">
<image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/>
<text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text>
</view>
<view style="position:absolute;font-size:22rpx;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:rgba(51,51,51,1);line-height:22rpx;left:0rpx;top:19rpx;width:100%;text-align:center;">首页</view>
<view style="display:flex;flex-direction:row-reverse;position:absolute;right:19rpx;top:19rpx;width:auto;background:#ffffff;">
<view style="font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(51,51,51,1);line-height:22rpx;">退出</view>
<image mode="aspectFit" src="/images/icon_exit.png" style="position:relative;width:19rpx;height:19rpx;margin-right:8rpx;margin-top:1rpx;"/>
</view>
</view>
</view
>
<view class="homeBodyView" style="height:100%;
">
<swiper indicator-dots="{{true}}"
>
<swiper-item
>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column
;">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;
">
<view class="homeItemView" onTap="sendGoToCollections"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier.png"/
>
<
text class="homeItemText">收银</text
>
</view
>
<view class="homeItemView" onTap="onHomeCashierImmediatelyClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier_immediately.png"/
>
<
text class="homeItemText">直接收款</text
>
</view
>
<view class="homeItemView" onTap="onHomeExchangeClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_exchange.png"/
>
<
text class="homeItemText">兑换</text
>
</view
>
<view class="homeItemView" onTap="onHomePosterClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_poster.png"/
>
<
text class="homeItemText">海报</text
>
</view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeRefundClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_refund.png"/
>
<
text class="homeItemText">退款</text
>
</view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePrintLastOrderClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_print_last_order.png"/
>
<
text class="homeItemText">打印上一单</text
>
</view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeVerifyClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_verify.png"/
>
<
text class="homeItemText">核验</text
>
</view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePickUpGoodsClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_pick_up_goods.png"/
>
<
text class="homeItemText">提货</text
>
<view class="homeBodyView" style="height:100%;"
>
<swiper indicator-dots="{{true}}
">
<swiper-item
>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;"
>
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start
;">
<view class="homeItemView" onTap="sendGoToCollections
">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier.png"/
>
<text class="homeItemText">收银</text
>
<
/view
>
<view class="homeItemView" onTap="onHomeCashierImmediatelyClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier_immediately.png"/
>
<text class="homeItemText">直接收款</text
>
<
/view
>
<view class="homeItemView" onTap="onHomeExchangeClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_exchange.png"/
>
<text class="homeItemText">兑换</text
>
<
/view
>
<view class="homeItemView" onTap="onHomePosterClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_poster.png"/
>
<text class="homeItemText">海报</text
>
<
/view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeRefundClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_refund.png"/
>
<text class="homeItemText">退款</text
>
<
/view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePrintLastOrderClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_print_last_order.png"/
>
<text class="homeItemText">打印上一单</text
>
<
/view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeVerifyClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_verify.png"/
>
<text class="homeItemText">核验</text
>
<
/view
>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePickUpGoodsClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_pick_up_goods.png"/
>
<text class="homeItemText">提货</text
>
<
/view
>
</view>
</view>
</
view
>
</
swiper-item>
<swiper-item
>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column
;">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;
">
<view class="homeItemView" onTap="onHomeDayCheckClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_day_check.png"/
>
<
text class="homeItemText">日结</text
>
</view
>
<view class="homeItemView" onTap="onHomeAboutAppClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_about_app.png"/
>
<
text class="homeItemText">关于系统</text
>
</view
>
<view class="homeItemView" onTap="onHomeSysSettingClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_sys_setting.png"/
>
<
text class="homeItemText">系统设置</text
>
</view
>
<view class="homeItemView" onTap="onHomeAppSettingClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_app_setting.png"/
>
<
text class="homeItemText">应用设置</text
>
</
swiper-item
>
<
swiper-item>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;"
>
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start
;">
<view class="homeItemView" onTap="onHomeDayCheckClicked
">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_day_check.png"/
>
<text class="homeItemText">日结</text
>
<
/view
>
<view class="homeItemView" onTap="onHomeAboutAppClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_about_app.png"/
>
<text class="homeItemText">关于系统</text
>
<
/view
>
<view class="homeItemView" onTap="onHomeSysSettingClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_sys_setting.png"/
>
<text class="homeItemText">系统设置</text
>
<
/view
>
<view class="homeItemView" onTap="onHomeAppSettingClicked"
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_app_setting.png"/
>
<text class="homeItemText">应用设置</text
>
<
/view
>
</view>
</view>
</
view
>
</swiper
-item
>
</
swiper
>
</
swiper-item
>
</swiper>
</
view
>
</view>
</view>
<!--扫码页-->
...
...
@@ -146,9 +148,6 @@
<button class="cancel-use-coupon" size="default" type="ghost" onTap="couponBack">取消</button>
</view>
</view>
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</view>
<!-- 结算页 -->
<view class="balance" hidden="{{!pageShow['waitoperate']}}">
...
...
@@ -243,4 +242,7 @@
</view>
</view>
</view>
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</view>
\ No newline at end of file
pages/index/index.js
View file @
4d5eb0c3
...
...
@@ -10,6 +10,8 @@ import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd'
import
{
ACTION_ON_PAY_FAILED
}
from
'../../const/actioncmd'
import
{
ACTION_GO_HOME
}
from
'../../const/actioncmd'
import
{
ACTION_GET_ACCOUNT
}
from
'../../const/actioncmd'
import
{
ACTION_DIRECT_PAYMENT
}
from
'../../const/actioncmd'
Page
({
data
:
{
...
...
@@ -126,7 +128,7 @@ Page({
context
.
goPage
(
'landscan'
);
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
)
{
//跳转
context
.
goPage
(
'waitoperate'
);
context
.
goPage
(
'waitoperate'
);
}
else
if
(
res
.
action
==
ACTION_ON_PAY_SUCCESS
)
{
//分转元
...
...
@@ -149,6 +151,11 @@ Page({
context
.
setData
({
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({
});
},
//直接收银
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页面逻辑方法 */
//把所有的商品数据发送到后屏
...
...
@@ -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
();
},
//把手输条码发生到前屏
sendGoodsInfoToFront
(
barcode
)
{
my
.
showLoading
({});
var
commonRequest
=
{
action
:
ACTION_REQUEST_GOOD_INFO
,
...
...
@@ -376,15 +420,19 @@ Page({
my
.
hideLoading
();
my
.
showToast
({
type
:
'fail'
,
content
:
'
发送商品条码到后屏
失败'
,
content
:
'
操作
失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
}
})
},
// 键盘关闭
onKeyBordClose
()
{
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