Commit b5f4c19a authored by gaodapeng's avatar gaodapeng

增加发送系统设置事件

parent 69110abc
...@@ -61,6 +61,9 @@ export const ACTION_SEND_SEL_AD = "ACTION_SEND_SEL_AD"; ...@@ -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_USE_COUPON = "ACTION_USE_COUPON";
//系统设置
export const ACTION_SYSTEM_SETTING = "ACTION_SYSTEM_SETTING";
const FLOW_IDLE = "idle"; const FLOW_IDLE = "idle";
const FLOW_COLLECTIONS = "collections";//收款 const FLOW_COLLECTIONS = "collections";//收款
const FLOW_REFUND = "refund";//退款 const FLOW_REFUND = "refund";//退款
......
...@@ -1062,6 +1062,7 @@ ...@@ -1062,6 +1062,7 @@
/** /**
海报页面样式 海报页面样式
*/ */
.posterPage { .posterPage {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -1158,9 +1159,11 @@ ...@@ -1158,9 +1159,11 @@
align-content: center; align-content: center;
} }
.posterSelected image{ .posterSelected image {
border-radius: 5rpx; border-radius: 5rpx;
border: 0rpx solid white; border: 0rpx solid white;
}
/* 关于系统 */ /* 关于系统 */
.about-system-top { .about-system-top {
......
var api = require("../../utils/api.js"); var api = require("../../utils/api.js");
import { import {
ACTION_USE_COUPON,ACTION_GOODS,ACTION_MEMBER, ACTION_USE_COUPON, ACTION_GOODS, ACTION_MEMBER,
ACTION_GO_BALANCE,ACTION_REQUEST_GOOD_INFO,ACTION_PRINT_RESULT, ACTION_GO_BALANCE, ACTION_REQUEST_GOOD_INFO, ACTION_PRINT_RESULT,
ACTION_REPRINT,ACTION_GO_SCAN,ACTION_ON_PAY_SUCCESS, ACTION_REPRINT, ACTION_GO_SCAN, ACTION_ON_PAY_SUCCESS,
ACTION_ON_PAY_FAILED,ACTION_GO_HOME,ACTION_GET_ACCOUNT, ACTION_ON_PAY_FAILED, ACTION_GO_HOME, ACTION_GET_ACCOUNT,
ACTION_DIRECT_PAYMENT,ACTION_CONVERT_COUPON,ACTION_LOGIN_OK, ACTION_DIRECT_PAYMENT, ACTION_CONVERT_COUPON, ACTION_LOGIN_OK,
ACTION_REFUND,ACTION_REFUND_SUCCESS,ACTION_REFUND_FAILED, ACTION_REFUND, ACTION_REFUND_SUCCESS, ACTION_REFUND_FAILED,
ACTION_PRINT_LAST_ORDER, ACTION_GET_CUR_AD, ACTION_SEND_SEL_AD, 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' import { FLOW_IDLE, FLOW_COLLECTIONS, FLOW_REFUND, FLOW_DIRECT_PAYMENT } from '../../const/actioncmd'
...@@ -51,7 +52,7 @@ Page({ ...@@ -51,7 +52,7 @@ Page({
//优惠券 0关闭 录入券弹窗 1等待录入 2.录入中 3.录入成功 4.录入失败 //优惠券 0关闭 录入券弹窗 1等待录入 2.录入中 3.录入成功 4.录入失败
discCouponState: 0, discCouponState: 0,
discCouponMsg: "录入失败!无效的优惠券码", discCouponMsg: "录入失败!无效的优惠券码",
discCouponPrice : 0, discCouponPrice: 0,
//兑换券 0关闭兑换券弹窗 1等待兑换 2.兑换中 3.兑换成功 4.兑换失败 //兑换券 0关闭兑换券弹窗 1等待兑换 2.兑换中 3.兑换成功 4.兑换失败
convertCouponState: 0, convertCouponState: 0,
...@@ -309,13 +310,13 @@ Page({ ...@@ -309,13 +310,13 @@ Page({
}); });
//跳转广告页面 //跳转广告页面
context.goPage('poster'); context.goPage('poster');
}else if(res.action == ACTION_USE_COUPON){ } else if (res.action == ACTION_USE_COUPON) {
//优惠券 //优惠券
let coupon = res.data let coupon = res.data
context.setData({ context.setData({
discCouponState:coupon.discCouponState, discCouponState: coupon.discCouponState,
discCouponMsg:coupon.discCouponMsg, discCouponMsg: coupon.discCouponMsg,
discCouponPrice:coupon.discCouponPrice discCouponPrice: coupon.discCouponPrice
}) })
} }
...@@ -483,6 +484,20 @@ Page({ ...@@ -483,6 +484,20 @@ Page({
* 系统设置 * 系统设置
*/ */
onHomeSysSettingClicked() { 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({ ...@@ -546,9 +561,9 @@ Page({
totalDisc: 0.00, totalDisc: 0.00,
goods: [ goods: [
], ],
discCouponState:0, discCouponState: 0,
discCouponMsg:"", discCouponMsg: "",
discCouponPrice:0, discCouponPrice: 0,
}) })
var commonRequest = { var commonRequest = {
...@@ -900,7 +915,7 @@ Page({ ...@@ -900,7 +915,7 @@ Page({
}, },
//发送优惠券到前屏 //发送优惠券到前屏
sendDiscCouponToFront(res) { sendDiscCouponToFront(res) {
let context = this; let context = this;
my.ix.sendBuddyMessage({ my.ix.sendBuddyMessage({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment