Commit 06e8f4b8 by 展昭

update

parent 898ee81e
Showing with 9 additions and 8 deletions
...@@ -29,18 +29,18 @@ FastClick.prototype.focus = function (targetElement) { ...@@ -29,18 +29,18 @@ FastClick.prototype.focus = function (targetElement) {
} }
}; };
Vue.prototype.setPageNavState = function () { Vue.prototype.setPageNavState = function (params = { headerColor, isShowClose, isShowBack, isCloseLeft, isShowTitle, isShowNav, isCloseWebView }) {
try { try {
initJsBridge(() => { initJsBridge(() => {
window.WebViewJavascriptBridge.callHandler( window.WebViewJavascriptBridge.callHandler(
"setPageNavState", "setPageNavState",
{ {
isShowClose: false, isShowClose: params.isShowClose ? params.isShowClose : false,
isShowBack: false, isShowBack: params.isShowBack ? params.isShowBack : false,
isCloseLeft: false, isCloseLeft: params.isCloseLeft ? params.isCloseLeft : false,
isShowTitle: false, isShowTitle: params.isShowTitle ? params.isShowTitle : false,
isShowNav: false, isShowNav: params.isShowNav ? params.isShowNav : false,
isCloseWebView: false isCloseWebView: params.isCloseWebView ? params.isCloseWebView : false
}, },
function (response) { function (response) {
console.log("setPageNavState来自 ios/android的回传数据: ", response); console.log("setPageNavState来自 ios/android的回传数据: ", response);
...@@ -66,7 +66,7 @@ Vue.prototype.setPageNavState = function () { ...@@ -66,7 +66,7 @@ Vue.prototype.setPageNavState = function () {
window.WebViewJavascriptBridge.callHandler( window.WebViewJavascriptBridge.callHandler(
"setBarColor", "setBarColor",
{ "barColor": "#0978e7" }, { "barColor": params.headerColor?param.headerColor:"#0978e7" },
function (response) { function (response) {
console.log("main setBarColor的回传数据:", response); console.log("main setBarColor的回传数据:", response);
} }
......
...@@ -234,6 +234,7 @@ export default { ...@@ -234,6 +234,7 @@ export default {
"loadPayUrl" "loadPayUrl"
]), ]),
toPay() { toPay() {
this.setPageNavState({headerColor='#fff',isShowClose=true,isShowBack=true,isCloseLeft=true,isShowTitle=true,isShowNav=true,isCloseWebView=true,})
const failUrl = encodeURIComponent( const failUrl = encodeURIComponent(
"https://pay.qinqinxiaobao.com/callback/fail" "https://pay.qinqinxiaobao.com/callback/fail"
); );
......
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 sign in to comment