cordova inappbrowser插件

时间:2018-03-27 13:36:11

标签: android cordova plugins inappbrowser

我有一个Vue Js应用程序,我正在使用Cordova将其包装到Android应用程序中。

该应用包含2个页面,landing page包含项目,details page显示有关项目的详细信息。当您点击landing page上的某个项目时,会出现details page

button上有一个details page,点击它时会转到另一个componentcomponent mounted()上显示inappbrowser使用Cordova的inappbrowser插件从手机的本地存储中获取html内容。

问题是,在details page显示内容后,如果我按下手机的后退按钮,它会将我重定向到inappbrowser,然后再次按下手机的后退按钮,它将我重定向到landing page!而不是details page。如果我再次按它,​​它会将我重定向到innappbrowser,然后如果我再次按下后退按钮,它将显示component等等......

此处是mounted()的代码,在innappbrowser事件中,它显示<template> <div> <h1>Loading >></h1> </div> </template> <script> import Vue from 'vue' export default { mounted() { Vue.cordova.on("deviceReady", () => { var ref = window.open('file:///storage/emulated/0/tin/story.html', '_self'); }); } } </script> <style> </style>

hardwareback=no

我尝试将inappbrowser添加到inappbrowser的选项中,但它没有用。

按下后退按钮时,如何从堆栈历史记录中删除 C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-g++.exe -c -Wall --ansi -std=c++11 -DVERSION='"0.9.0.manual_20180327_150647.30458ef1"' -DUSE_RASPICAM -DUSE_I2C -IC:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/usr/include -IC:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/usr/local/include -o objects/projectfile.o projectfile.cpp In file included from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\bits\gthr-default.h:35:0, from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\bits\gthr.h:148, from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\ext\atomicity.h:35, from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\memory:73, from projectfile.cpp:7: c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\ext\concurrence.h:122:34: error: '__PTHREAD_SPINS' was not declared in this scope __gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT; ^ c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\ext\concurrence.h:177:44: error: '__PTHREAD_SPINS' was not declared in this scope __gthread_recursive_mutex_t _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT; ^ c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\mutex:63:31: error: '__PTHREAD_SPINS' was not declared in this scope __native_type _M_mutex = __GTHREAD_MUTEX_INIT; ^ c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\mutex:92:31: error: '__PTHREAD_SPINS' was not declared in this scope __native_type _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT;

0 个答案:

没有答案