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
54036739
Commit
54036739
authored
Feb 19, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Plain Diff
合并代码;解决冲突;
parents
d9b2155b
337b1289
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
31 deletions
+55
-31
actioncmd.js
const/actioncmd.js
+6
-0
index.acss
pages/index/index.acss
+1
-24
index.axml
pages/index/index.axml
+4
-4
index.js
pages/index/index.js
+44
-3
No files found.
const/actioncmd.js
View file @
54036739
...
...
@@ -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 @
54036739
/* 公共样式 */
.topView {
position: relative;
...
...
@@ -504,15 +502,6 @@
/* 结算页 */
/* page{
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
box-sizing: border-box;
align-items: center;
} */
.topView{
position: relative;
width: 768rpx;
...
...
@@ -522,17 +511,6 @@
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;
...
...
@@ -619,5 +597,4 @@
font-weight:400;
color:rgba(0,0,0,0.65);
line-height:27rpx;
}
}
\ No newline at end of file
pages/index/index.axml
View file @
54036739
...
...
@@ -14,7 +14,7 @@
</view>
<view class="homeBodyView">
<!-- 还需要加一层swiper -->
<view class="homeGridItem" onTap="
c
ollections">
<view class="homeGridItem" onTap="
sendGoToC
ollections">
<image mode="aspectFit" src="/images/collections.png" class="homeItemImage"/>
<view class="homeItemText">收银</view>
</view>
...
...
@@ -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 @
54036739
...
...
@@ -5,13 +5,16 @@ import { ACTION_GO_BALANCE } from '../../const/actioncmd'
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
:
{
//页面控制相关参数
pageShow
:
{
"home"
:
fals
e
,
"landscan"
:
tru
e
,
"home"
:
tru
e
,
"landscan"
:
fals
e
,
"waitoperate"
:
false
,
"payresult"
:
false
},
...
...
@@ -111,6 +114,24 @@ Page({
})
}
}
else
if
(
res
.
action
==
ACTION
)
{
}
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
{
//未知指令
}
}
...
...
@@ -172,6 +193,26 @@ Page({
this
.
goPage
(
'home'
);
},
//跳转到收银页面
sendGoToCollections
()
{
var
commonRequest
=
{
action
:
ACTION_GO_SCAN
,
data
:
null
};
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
commonRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"发送收银事件到前屏小程序 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
console
.
log
(
"发送收银事件到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
//发送失败重试
// context.sendGoToCollections();
}
});
},
/**landscan页面逻辑方法 */
//把所有的商品数据发送到后屏
...
...
@@ -311,7 +352,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