Commit df4af4c4 authored by pengguangpu's avatar pengguangpu

支付成功页添加返回按钮监听;

parent 51b678c9
{
"pages": [
"pages/paysuccess/paysuccess",
"pages/login/login",
"pages/paysuccess/paysuccess",
"pages/home/home",
"pages/balance/balance",
"pages/scan/scan"
......
......@@ -82,3 +82,6 @@ export const ACTION_VERIFY_FAILED = "ACTION_VERIFY_FAILED";
//退出事件
export const ACTION_QUIT = "ACTION_QUIT";
//支付成功页点击返回按钮
export const ACTION_PAYSUCCESS_PAGE_BACK = "ACTION_PAYSUCCESS_PAGE_BACK";
\ No newline at end of file
import { ACTION_PRINT_RESULT } from '../../const/actioncmd'
import { ACTION_REPRINT } from '../../const/actioncmd'
import { ACTION_GO_HOME } from '../../const/actioncmd'
import { ACTION_PAYSUCCESS_PAGE_BACK } from '../../const/actioncmd'
Page({
//回退到上一个页面
events: {
onBack(e) {
console.log('onBack触发');
my.ix.sendBuddyMessage({
// 填入目标小程序的 AppID
target: getApp().globalData.backScreenAppId,
data: {
action: ACTION_PAYSUCCESS_PAGE_BACK,
data: null
},
success: (res) => {
e.preventDefault();
},
fail: (res) => {
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
}
});
}
},
data: {
orderPriceYuan: "--.--",
orderPriceFen: 0,
......
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