Commit df4af4c4 authored by pengguangpu's avatar pengguangpu

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

parent 51b678c9
{ {
"pages": [ "pages": [
"pages/paysuccess/paysuccess",
"pages/login/login", "pages/login/login",
"pages/paysuccess/paysuccess",
"pages/home/home", "pages/home/home",
"pages/balance/balance", "pages/balance/balance",
"pages/scan/scan" "pages/scan/scan"
......
...@@ -81,4 +81,7 @@ export const ACTION_VERIFY_SUCCESS = "ACTION_VERIFY_SUCCESS"; ...@@ -81,4 +81,7 @@ export const ACTION_VERIFY_SUCCESS = "ACTION_VERIFY_SUCCESS";
export const ACTION_VERIFY_FAILED = "ACTION_VERIFY_FAILED"; export const ACTION_VERIFY_FAILED = "ACTION_VERIFY_FAILED";
//退出事件 //退出事件
export const ACTION_QUIT = "ACTION_QUIT"; export const ACTION_QUIT = "ACTION_QUIT";
\ No newline at end of file
//支付成功页点击返回按钮
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_PRINT_RESULT } from '../../const/actioncmd'
import { ACTION_REPRINT } from '../../const/actioncmd' import { ACTION_REPRINT } from '../../const/actioncmd'
import { ACTION_GO_HOME } from '../../const/actioncmd' import { ACTION_GO_HOME } from '../../const/actioncmd'
import { ACTION_PAYSUCCESS_PAGE_BACK } from '../../const/actioncmd'
Page({ 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: { data: {
orderPriceYuan: "--.--", orderPriceYuan: "--.--",
orderPriceFen: 0, 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