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,14 +310,14 @@ Page({ ...@@ -309,14 +310,14 @@ 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 = {
...@@ -813,7 +828,7 @@ Page({ ...@@ -813,7 +828,7 @@ Page({
target: getApp().globalData.frontScreenAppId, target: getApp().globalData.frontScreenAppId,
data: commonRequest, data: commonRequest,
success: (res) => { success: (res) => {
context.goPage('waitoperate'); context.goPage('waitoperate');
console.log("通知前屏跳转到结算页面 成功 ===》" + JSON.stringify(res)); console.log("通知前屏跳转到结算页面 成功 ===》" + JSON.stringify(res));
}, },
fail: (res) => { fail: (res) => {
...@@ -895,12 +910,12 @@ Page({ ...@@ -895,12 +910,12 @@ Page({
convertCouponClose(e) { convertCouponClose(e) {
this.setData({ convertCouponState: 0 }) this.setData({ convertCouponState: 0 })
var request = {}; var request = {};
request.convertCouponState = 0; request.convertCouponState = 0;
this.sendConvertCouponToFront(request) this.sendConvertCouponToFront(request)
}, },
//发送优惠券到前屏 //发送优惠券到前屏
sendDiscCouponToFront(res) { sendDiscCouponToFront(res) {
let context = this; let context = this;
my.ix.sendBuddyMessage({ my.ix.sendBuddyMessage({
...@@ -939,14 +954,14 @@ Page({ ...@@ -939,14 +954,14 @@ Page({
//用券返回 //用券返回
couponBack(e) { couponBack(e) {
this.setData({ discCouponState: 0 }) this.setData({ discCouponState: 0 })
this.sendDiscCouponToFront(0) this.sendDiscCouponToFront(0)
}, },
//使用券 //使用券
useCoupon(e) { useCoupon(e) {
this.setData({ discCouponState: 1 }) this.setData({ discCouponState: 1 })
var request = {}; var request = {};
request.discCouponState = 1; request.discCouponState = 1;
request.discCouponPrice = this.data.discCouponPrice request.discCouponPrice = this.data.discCouponPrice
this.sendDiscCouponToFront(request) this.sendDiscCouponToFront(request)
}, },
...@@ -1138,7 +1153,7 @@ Page({ ...@@ -1138,7 +1153,7 @@ Page({
//回首页 //回首页
this.goPage('home'); this.goPage('home');
}, },
//打印标识位 //打印标识位
onPrintEnabledSwitch(e) { onPrintEnabledSwitch(e) {
this.setData({ this.setData({
......
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