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
757ec9df
Commit
757ec9df
authored
Feb 25, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加会员的内容
parent
0b64fbbe
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
7 deletions
+68
-7
actioncmd.js
const/actioncmd.js
+3
-0
index.acss
pages/index/index.acss
+10
-0
index.axml
pages/index/index.axml
+4
-3
index.js
pages/index/index.js
+51
-4
No files found.
const/actioncmd.js
View file @
757ec9df
...
...
@@ -16,6 +16,9 @@ export const ACTION_REQUEST_GOOD_INFO = "ACTION_REQUEST_GOOD_INFO";
//去扫码页面
export
const
ACTION_GO_SCAN
=
"ACTION_GO_SCAN"
;
//会员登录
export
const
ACTION_MEMBER
=
"ACTION_MEMBER"
;
//获取店铺信息
export
const
ACTION_STORE_INFO
=
"ACTION_STORE_INFO"
;
...
...
pages/index/index.acss
View file @
757ec9df
...
...
@@ -222,6 +222,16 @@
font-size: 19rpx
}
.land-scan-member {
margin-left: 19rpx;
text-align: left;
font-size: 19rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(51, 51, 51, 1);
line-height: 21rpx;
}
/* 顶部收银字体样式 */
.cashier-text {
...
...
pages/index/index.axml
View file @
757ec9df
...
...
@@ -6,10 +6,10 @@
<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="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}}">
...
...
@@ -118,7 +118,8 @@
<view hidden="{{!pageShow['landscan']}}">
<view class="{{scene != 0 ? 'pfilter' : 'pageland' }}">
<view class="land-scan-top">
<button class="land-scan-top-member-login" size="default" type="ghost">会员登陆</button>
<button class="land-scan-top-member-login" size="default" type="ghost" catchTap="onMemberTap" a:if="{{memberPhoneShown == ''}}">会员登录</button>
<view class="land-scan-member" hidden="{{memberPhoneShown == ''}}">会员,{{memberPhoneShown}}</view>
<text class="cashier-text">收银</text>
<view onTap="goHome">
<image class="go-home-icon" mode="aspectFit" src="/images/icon_home.png"/>
...
...
pages/index/index.js
View file @
757ec9df
var
api
=
require
(
"../../utils/api.js"
);
import
{
API_SCAN
}
from
'../../const/apiurl'
import
{
ACTION_GOODS
}
from
'../../const/actioncmd'
import
{
ACTION_MEMBER
}
from
'../../const/actioncmd'
import
{
ACTION_GO_BALANCE
}
from
'../../const/actioncmd'
import
{
ACTION_REQUEST_GOOD_INFO
}
from
'../../const/actioncmd'
import
{
ACTION_PRINT_RESULT
}
from
'../../const/actioncmd'
...
...
@@ -62,6 +63,9 @@ Page({
totalDisc
:
0.00
,
goods
:
[
],
memberPhone
:
''
,
memberPhoneShown
:
''
,
//打印上一单页面
printLastOrderPrintStatusHint
:
"正在打印上一单..."
,
//是否打印成功
...
...
@@ -288,10 +292,8 @@ Page({
},
success
:
(
res
)
=>
{
context
.
goPage
(
'home'
);
context
.
setData
({
flowType
:
FLOW_IDLE
,
operateContext
:
{},
//重新初始化
})
context
.
reinitData
();
console
.
log
(
"通知前屏回到首页 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
...
...
@@ -300,6 +302,16 @@ Page({
});
},
//重置部分必须重置的内容
reinitData
()
{
this
.
setData
({
flowType
:
FLOW_IDLE
,
operateContext
:
{},
//重新初始化
memberPhone
:
''
,
memberPhoneShown
:
''
,
})
},
onShareAppMessage
()
{
// 返回自定义分享信息
return
{
...
...
@@ -556,6 +568,11 @@ Page({
this
.
sendPaymentToFront
(
result
)
}
else
if
(
this
.
data
.
scene
==
1
)
{
this
.
sendGoodsInfoToFront
(
result
)
}
else
if
(
this
.
data
.
scene
==
2
)
{
if
(
result
.
length
!=
11
){
return
;
//键盘不给消失
}
this
.
sendMemberLogin
(
result
);
}
else
if
(
this
.
data
.
scene
==
4
)
{
this
.
sendRefund
(
result
);
}
...
...
@@ -601,6 +618,10 @@ Page({
this
.
setData
({
scene
:
1
})
},
onMemberTap
()
{
this
.
setData
({
scene
:
2
})
},
//清空商品信息
clearGood
(
e
)
{
this
.
setData
({
goods
:
[]
})
...
...
@@ -676,6 +697,32 @@ Page({
this
.
sendGoodInfoToFront
()
},
sendMemberLogin
(
result
)
{
this
.
setData
({
memberPhone
:
result
})
var
phoneShown
=
this
.
data
.
memberPhone
.
substr
(
0
,
3
)
+
"****"
+
this
.
data
.
memberPhone
.
substr
(
7
);
this
.
setData
({
memberPhoneShown
:
phoneShown
})
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
action
:
ACTION_MEMBER
,
data
:
result
},
success
:
(
res
)
=>
{
console
.
log
(
"通知前屏会员登录 成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
console
.
log
(
"通知前屏会员登录 失败 ===》 "
+
JSON
.
stringify
(
res
));
}
})
},
//跳转到结算等待页
goPay
(
e
)
{
//购物车不能为空
...
...
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