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
a9610d6d
Commit
a9610d6d
authored
Feb 27, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加打印配置判断;
parent
bbc82c5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
10 deletions
+33
-10
index.axml
pages/index/index.axml
+8
-6
index.js
pages/index/index.js
+25
-4
No files found.
pages/index/index.axml
View file @
a9610d6d
...
@@ -267,23 +267,25 @@
...
@@ -267,23 +267,25 @@
<image mode="aspectFit" style="position:absolute;width:277rpx;height:196rpx;" src="/images/bg_paper.png"/>
<image mode="aspectFit" style="position:absolute;width:277rpx;height:196rpx;" src="/images/bg_paper.png"/>
<view style="position: absolute;top:88rpx;text-align: center;align-items: center;width:277rpx;">
<view style="position: absolute;top:88rpx;text-align: center;align-items: center;width:277rpx;">
<block a:if="{{isPrintSuccess}}">
<block a:if="{{isPrintSuccess}}">
<text>
提示顾客带好小票
</text>
<text>
{{payResultPrintSuccessHint}}
</text>
</block>
</block>
<block a:else>
<block a:else>
<view hidden="{{isPrinting}}">
<block a:if="{{printEnabled}}">
<button type="ghost" style="margin:0 auto;font-size:28rpx;height:40rpx;border-radius:20rpx;border-color:#FF7F19;color:#FF7F19;width:166rpx;line-height:40rpx;text-align:center;font-size:24rpx;" onTap="onReprint">重新打印</button>
<view hidden="{{isPrinting}}">
</view>
<button type="ghost" style="margin:0 auto;font-size:28rpx;height:40rpx;border-radius:20rpx;border-color:#FF7F19;color:#FF7F19;width:166rpx;line-height:40rpx;text-align:center;font-size:24rpx;" onTap="onReprint">重新打印</button>
</view>
</block>
</block>
</block>
</view>
</view>
</view>
</view>
<view hidden="{{isPrinting}}">
<view hidden="{{isPrinting}}">
<button type="primary" style="height:60rpx;margin-top:8rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;line-height:60rpx;text-align:center;font-size:24rpx;" size="mini" hover-class="loginButtonHover" onTap="onNextPayFromPayResult">继续
付
款</button>
<button type="primary" style="height:60rpx;margin-top:8rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;line-height:60rpx;text-align:center;font-size:24rpx;" size="mini" hover-class="loginButtonHover" onTap="onNextPayFromPayResult">继续
收
款</button>
</view>
</view>
</block>
</block>
<block a:else>
<block a:else>
<text style="font-size:26rpx;color:#333333;font-weight:bold;margin-top:35rpx;">请重新支付...</text>
<text style="font-size:26rpx;color:#333333;font-weight:bold;margin-top:35rpx;">请重新支付...</text>
<image mode="aspectFit" style="width:166rpx;height:143rpx;margin-top:39rpx;" src="/images/img_scan_guide.png"/>
<image mode="aspectFit" style="width:166rpx;height:143rpx;margin-top:39rpx;" src="/images/img_scan_guide.png"/>
<button type="primary" style="height:60rpx;margin-top:32rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;
" hover-class="loginButtonHover" onTap="">重新付
款</button>
<button type="primary" style="height:60rpx;margin-top:32rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;
text-align:center;font-size:24rpx;line-height:60rpx;" hover-class="loginButtonHover" onTap="payResultPayRetry">重新收
款</button>
</block>
</block>
</view>
</view>
</view>
</view>
...
...
pages/index/index.js
View file @
a9610d6d
...
@@ -18,7 +18,7 @@ Page({
...
@@ -18,7 +18,7 @@ Page({
//页面控制相关参数
//页面控制相关参数
//吐司显示
//吐司显示
isShowToast
:
false
,
isShowToast
:
false
,
toastText
:
"------"
,
toastText
:
"------"
,
pageShow
:
{
pageShow
:
{
"home"
:
true
,
"home"
:
true
,
"landscan"
:
false
,
"landscan"
:
false
,
...
@@ -31,7 +31,7 @@ Page({
...
@@ -31,7 +31,7 @@ Page({
"appsetting"
:
false
,
"appsetting"
:
false
,
},
},
// 前屏是否完成登录
// 前屏是否完成登录
isFrontScreenLoginOK
:
fals
e
,
isFrontScreenLoginOK
:
tru
e
,
flowType
:
""
,
//流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
flowType
:
""
,
//流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
/**账号信息 */
/**账号信息 */
...
@@ -48,9 +48,10 @@ Page({
...
@@ -48,9 +48,10 @@ Page({
isPaySuccess
:
true
,
isPaySuccess
:
true
,
payPriceYuan
:
"--.--"
,
payPriceYuan
:
"--.--"
,
printResult
:
"正在打印小票..."
,
printResult
:
"正在打印小票..."
,
isPrinting
:
tru
e
,
isPrinting
:
fals
e
,
isPrintSuccess
:
false
,
isPrintSuccess
:
false
,
payPriceFen
:
0
,
payPriceFen
:
0
,
payResultPrintSuccessHint
:
"提示顾客带好小票"
,
/**商品扫码页相关参数 */
/**商品扫码页相关参数 */
//优惠券 0关闭 录入券弹窗 1等待录入 2.录入中 3.录入成功 4.录入失败
//优惠券 0关闭 录入券弹窗 1等待录入 2.录入中 3.录入成功 4.录入失败
...
@@ -123,7 +124,7 @@ Page({
...
@@ -123,7 +124,7 @@ Page({
let
context
=
this
;
let
context
=
this
;
context
.
setData
({
context
.
setData
({
isShowToast
:
true
,
isShowToast
:
true
,
toastText
:
text
toastText
:
text
});
});
setTimeout
(
setTimeout
(
function
()
{
function
()
{
...
@@ -249,6 +250,21 @@ Page({
...
@@ -249,6 +250,21 @@ Page({
payPriceFen
:
res
.
data
.
tradeAmount
,
payPriceFen
:
res
.
data
.
tradeAmount
,
payPriceYuan
:
miyapay
.
fen2Yuan
(
res
.
data
.
tradeAmount
)
+
""
,
payPriceYuan
:
miyapay
.
fen2Yuan
(
res
.
data
.
tradeAmount
)
+
""
,
});
});
if
(
context
.
data
.
printEnabled
==
false
)
{
//不打印小票
context
.
setData
({
printResult
:
"打印机关闭"
,
payResultPrintSuccessHint
:
"如需打印请设置打印机"
,
isPrinting
:
false
});
}
else
{
//不打印小票
context
.
setData
({
printResult
:
"正在打印小票..."
,
payResultPrintSuccessHint
:
"提示顾客拿好小票"
,
isPrinting
:
true
});
}
context
.
goPage
(
'payresult'
);
context
.
goPage
(
'payresult'
);
}
else
if
(
res
.
action
==
ACTION_ON_PAY_FAILED
)
{
}
else
if
(
res
.
action
==
ACTION_ON_PAY_FAILED
)
{
...
@@ -604,6 +620,11 @@ Page({
...
@@ -604,6 +620,11 @@ Page({
},
},
/**payresult页面逻辑方法 */
/**payresult页面逻辑方法 */
//重新收款
payResultPayRetry
()
{
//跳转至结算页
this
.
goPage
(
'waitoperate'
);
},
onReprint
()
{
onReprint
()
{
if
(
this
.
data
.
printEnabled
!=
true
)
{
if
(
this
.
data
.
printEnabled
!=
true
)
{
return
;
return
;
...
...
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