最近在開發(fā)時遇到個問題(微信公眾號),有三個頁面,分別為商品詳情頁,訂單確認頁(支付頁面),支付成功頁面,在訂單確認頁面監(jiān)聽,如下:history.pushState(null, null, '#');window.onpopstate = function (event) { if(orderId == '') { new TipAlert({content:"<div></div>"}).confirm('<h3 style="font-size:0.176rem;margin-top:0.088rem;margin-bottom:0.029rem;font-weight:bold;">確定要放棄付款嗎?</h3><p style="font-size:0.129rem;">你的訂單在30分鐘內(nèi)未支付將被取消</p><p style="font-size:0.129rem;">請盡快完成支付</p>', function (isTrue) { if (!isTrue) { window.history.go(-1); } else { history.pushState({page: 'state1'}, 'state', '#state1'); } }, {close: "暫時離開", ok: "繼續(xù)支付", CloseColor: "#666", OkColor: "#fff", OkBackgroundColor: "#d93e09"}); }}現(xiàn)在的問題是在支付成功頁面點擊微信返回按鈕時需要跳轉(zhuǎn)到詳情頁面,同時需要點擊此時的商品詳情頁的返回按鈕時需要回到初始進入詳情頁的那個頁面。這個需求該怎么實現(xiàn)呢?各位大神!
關(guān)于操作瀏覽器歷史記錄所出現(xiàn)的問題,求解?
Qyouu
2018-12-22 14:11:17