最近在開(kāi)發(fā)時(shí)遇到個(gè)問(wèn)題(微信公眾號(hào)),有三個(gè)頁(yè)面,分別為商品詳情頁(yè),訂單確認(rèn)頁(yè)(支付頁(yè)面),支付成功頁(yè)面,在訂單確認(rèn)頁(yè)面監(jiān)聽(tīng),如下: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;">請(qǐng)盡快完成支付</p>', function (isTrue) { if (!isTrue) { window.history.go(-1); } else { history.pushState({page: 'state1'}, 'state', '#state1'); } }, {close: "暫時(shí)離開(kāi)", ok: "繼續(xù)支付", CloseColor: "#666", OkColor: "#fff", OkBackgroundColor: "#d93e09"}); }}現(xiàn)在的問(wèn)題是在支付成功頁(yè)面點(diǎn)擊微信返回按鈕時(shí)需要跳轉(zhuǎn)到詳情頁(yè)面,同時(shí)需要點(diǎn)擊此時(shí)的商品詳情頁(yè)的返回按鈕時(shí)需要回到初始進(jìn)入詳情頁(yè)的那個(gè)頁(yè)面。這個(gè)需求該怎么實(shí)現(xiàn)呢?各位大神!
關(guān)于操作瀏覽器歷史記錄所出現(xiàn)的問(wèn)題,求解?
Qyouu
2018-12-22 14:11:17