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
b5f4c19a
Commit
b5f4c19a
authored
Feb 26, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加发送系统设置事件
parent
69110abc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
27 deletions
+48
-27
actioncmd.js
const/actioncmd.js
+3
-0
index.acss
pages/index/index.acss
+4
-1
index.js
pages/index/index.js
+41
-26
No files found.
const/actioncmd.js
View file @
b5f4c19a
...
...
@@ -61,6 +61,9 @@ export const ACTION_SEND_SEL_AD = "ACTION_SEND_SEL_AD";
//使用优惠券
export
const
ACTION_USE_COUPON
=
"ACTION_USE_COUPON"
;
//系统设置
export
const
ACTION_SYSTEM_SETTING
=
"ACTION_SYSTEM_SETTING"
;
const
FLOW_IDLE
=
"idle"
;
const
FLOW_COLLECTIONS
=
"collections"
;
//收款
const
FLOW_REFUND
=
"refund"
;
//退款
...
...
pages/index/index.acss
View file @
b5f4c19a
...
...
@@ -1062,6 +1062,7 @@
/**
海报页面样式
*/
.posterPage {
display: flex;
flex-direction: column;
...
...
@@ -1158,9 +1159,11 @@
align-content: center;
}
.posterSelected image{
.posterSelected image
{
border-radius: 5rpx;
border: 0rpx solid white;
}
/* 关于系统 */
.about-system-top {
...
...
pages/index/index.js
View file @
b5f4c19a
var
api
=
require
(
"../../utils/api.js"
);
import
{
ACTION_USE_COUPON
,
ACTION_GOODS
,
ACTION_MEMBER
,
ACTION_GO_BALANCE
,
ACTION_REQUEST_GOOD_INFO
,
ACTION_PRINT_RESULT
,
ACTION_REPRINT
,
ACTION_GO_SCAN
,
ACTION_ON_PAY_SUCCESS
,
ACTION_ON_PAY_FAILED
,
ACTION_GO_HOME
,
ACTION_GET_ACCOUNT
,
ACTION_DIRECT_PAYMENT
,
ACTION_CONVERT_COUPON
,
ACTION_LOGIN_OK
,
ACTION_REFUND
,
ACTION_REFUND_SUCCESS
,
ACTION_REFUND_FAILED
,
ACTION_USE_COUPON
,
ACTION_GOODS
,
ACTION_MEMBER
,
ACTION_GO_BALANCE
,
ACTION_REQUEST_GOOD_INFO
,
ACTION_PRINT_RESULT
,
ACTION_REPRINT
,
ACTION_GO_SCAN
,
ACTION_ON_PAY_SUCCESS
,
ACTION_ON_PAY_FAILED
,
ACTION_GO_HOME
,
ACTION_GET_ACCOUNT
,
ACTION_DIRECT_PAYMENT
,
ACTION_CONVERT_COUPON
,
ACTION_LOGIN_OK
,
ACTION_REFUND
,
ACTION_REFUND_SUCCESS
,
ACTION_REFUND_FAILED
,
ACTION_PRINT_LAST_ORDER
,
ACTION_GET_CUR_AD
,
ACTION_SEND_SEL_AD
,
}
from
'../../const/actioncmd'
ACTION_SYSTEM_SETTING
,
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
}
from
'../../const/actioncmd'
...
...
@@ -51,7 +52,7 @@ Page({
//优惠券 0关闭 录入券弹窗 1等待录入 2.录入中 3.录入成功 4.录入失败
discCouponState
:
0
,
discCouponMsg
:
"录入失败!无效的优惠券码"
,
discCouponPrice
:
0
,
discCouponPrice
:
0
,
//兑换券 0关闭兑换券弹窗 1等待兑换 2.兑换中 3.兑换成功 4.兑换失败
convertCouponState
:
0
,
...
...
@@ -309,13 +310,13 @@ Page({
});
//跳转广告页面
context
.
goPage
(
'poster'
);
}
else
if
(
res
.
action
==
ACTION_USE_COUPON
)
{
}
else
if
(
res
.
action
==
ACTION_USE_COUPON
)
{
//优惠券
let
coupon
=
res
.
data
context
.
setData
({
discCouponState
:
coupon
.
discCouponState
,
discCouponMsg
:
coupon
.
discCouponMsg
,
discCouponPrice
:
coupon
.
discCouponPrice
discCouponState
:
coupon
.
discCouponState
,
discCouponMsg
:
coupon
.
discCouponMsg
,
discCouponPrice
:
coupon
.
discCouponPrice
})
}
...
...
@@ -483,6 +484,20 @@ Page({
* 系统设置
*/
onHomeSysSettingClicked
()
{
my
.
ix
.
sendBuddyMessage
({
// 填入目标小程序的 AppID
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
action
:
ACTION_SYSTEM_SETTING
,
data
:
null
},
success
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
},
fail
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
}
});
},
/**
...
...
@@ -546,9 +561,9 @@ Page({
totalDisc
:
0.00
,
goods
:
[
],
discCouponState
:
0
,
discCouponMsg
:
""
,
discCouponPrice
:
0
,
discCouponState
:
0
,
discCouponMsg
:
""
,
discCouponPrice
:
0
,
})
var
commonRequest
=
{
...
...
@@ -900,7 +915,7 @@ Page({
},
//发送优惠券到前屏
//发送优惠券到前屏
sendDiscCouponToFront
(
res
)
{
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
...
...
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