Commit dfdf1a77 authored by jiangjiantao's avatar jiangjiantao

回退页面

parent e3989226
...@@ -63,3 +63,6 @@ export const ACTION_SEND_SEL_AD = "ACTION_SEND_SEL_AD"; ...@@ -63,3 +63,6 @@ export const ACTION_SEND_SEL_AD = "ACTION_SEND_SEL_AD";
//系统设置 //系统设置
export const ACTION_SYSTEM_SETTING = "ACTION_SYSTEM_SETTING"; export const ACTION_SYSTEM_SETTING = "ACTION_SYSTEM_SETTING";
//结算页面back到扫商品页面
export const ACTION_BALANCE_BACK_GOODS = "ACTION_BALANCE_BACK_GOODS";
...@@ -3,6 +3,7 @@ var payUtils = require("../../utils/payUtils.js"); ...@@ -3,6 +3,7 @@ var payUtils = require("../../utils/payUtils.js");
import { ACTION_GO_SCAN, ACTION_GO_HOME } from '../../const/actioncmd' import { ACTION_GO_SCAN, ACTION_GO_HOME } from '../../const/actioncmd'
import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd' import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd'
import { ACTION_ON_PAY_FAILED } from '../../const/actioncmd' import { ACTION_ON_PAY_FAILED } from '../../const/actioncmd'
import { ACTION_BALANCE_BACK_GOODS } from '../../const/actioncmd'
Page({ Page({
data: { data: {
...@@ -16,6 +17,24 @@ Page({ ...@@ -16,6 +17,24 @@ Page({
isPaying: false, isPaying: false,
}, },
//回退到上一个页面
onBack(e) {
my.ix.sendBuddyMessage({
// 填入目标小程序的 AppID
target: getApp().globalData.backScreenAppId,
data: {
action: ACTION_BALANCE_BACK_GOODS,
data: null
},
success: (res) => {
e.preventDefault();
},
fail: (res) => {
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
}
});
},
onReady() { onReady() {
if (my.canIUse('hideBackHome')) { if (my.canIUse('hideBackHome')) {
my.hideBackHome(); my.hideBackHome();
......
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