Commit 76f7e5d2 authored by Jennie Shi's avatar Jennie Shi

修复iOS打不开https问题

parent 2a8f9201
......@@ -11,6 +11,7 @@
<access origin="*" />
<access launch-external="yes" origin="mailto:*" />
<access launch-external="yes" origin="tel:*" />
<access launch-external="yes" origin="https://sign-pub.qsign.com.cn/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="mailto:*" />
......@@ -23,6 +24,7 @@
<allow-navigation href="http://180.104.121.66:8088/*" />
<allow-navigation href="https://docs.jiguang.cn/*" />
<allow-navigation href="https://www.rongcloud.cn/*" />
<allow-navigation href="https://sign-pub.qsign.com.cn/*" />
<access launch-external="yes" origin="tel:*" />
<access launch-external="yes" origin="sms:*" />
<preference name="ScrollEnabled" value="false" />
......
......@@ -4,12 +4,12 @@ module.exports = {
CONFIG_ENV: JSON.stringify(process.env.CONFIG_ENV),
debug: true,
isMobilePlatform: true,
loginPath: '"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_UAT&apiName="',
rootPath: '"http://180.104.121.66:8088/r/api"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_UAT&apiName=file_view&"',
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
loginPath: '"http://www.xcmgfs.com:8087/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://www.xcmgfs.com:8087/r/api/interface?sysName=XCMG_PROD&apiName="',
rootPath: '"http://www.xcmgfs.com:8087/r/api"',
filePath: '"http://www.xcmgfs.com:8087/r/api/app/fileViewSvc?sysName=XCMG_PROD&apiName=file_view&"',
ocrPath:'"http://www.xcmgfs.com:8087/r/api"',
fileUploadSvcPath:'"http://www.xcmgfs.com:8087/r/api/app/fileUploadSvc?sysName=XCMG_PROD&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"2.3.3"'
}
......@@ -3064,9 +3064,9 @@
}
},
"cordova-plugin-inappbrowser": {
"version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-2.0.2.tgz",
"integrity": "sha1-pEj8vpdMprQpiL00VRCdkj1sl2k=",
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-4.0.0.tgz",
"integrity": "sha1-CB4SWz7OBeMN0A5fk5YWCSaDKio=",
"dev": true
},
"core-js": {
......
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
max_jobs: 1
shallow_clone: true
init:
- git config --global core.autocrlf true
image:
- Visual Studio 2017
environment:
nodejs_version: "4"
matrix:
- PLATFORM: windows-10-store
JUST_BUILD: --justBuild
install:
- npm cache clean -f
- node --version
- npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git
- npm install -g cordova
build: off
test_script:
- cordova-paramedic --config pr\%PLATFORM% --plugin . %JUST_BUILD%
root: true
extends: semistandard
rules:
indent:
- error
- 4
camelcase: off
padded-blocks: off
operator-linebreak: off
no-throw-literal: off
\ No newline at end of file
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
is intended as a quick reference, for complete details please see our Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Platforms affected
### What does this PR do?
### What testing has been done on this change?
### Checklist
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [ ] Added automated test coverage as appropriate for this change.
#If ignorance is bliss, then somebody knock the smile off my face
*.csproj.user
*.suo
*.cache
Thumbs.db
*.DS_Store
*.bak
*.cache
*.log
*.swp
*.user
node_modules
sudo: false
addons:
jwt:
secure: TZ88IEvAw1bsWPWxvDzXdpi2NK0i3PN4hG15+vDpIt6wXGVPknjxuXWJeLj7TqBpAIvP7XDfS8ZvHVPLe7fe8oOchZPLuiDw9VVIk6cnHjE6wpoavdGc/1mDJ3Bi4PDcHwRUr5ng5spYQqqlTwcECkH/q7iPgudiFM6rlOlGRyA=
env:
global:
- SAUCE_USERNAME=snay
- TRAVIS_NODE_VERSION="4.2"
matrix:
include:
- env: PLATFORM=browser-chrome
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=browser-firefox
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=browser-safari
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=browser-edge
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=ios-9.3
os: osx
osx_image: xcode7.3
language: node_js
node_js: '4.2'
- env: PLATFORM=ios-10.0
os: osx
osx_image: xcode7.3
language: node_js
node_js: '4.2'
- env: PLATFORM=android-4.4
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- env: PLATFORM=android-5.1
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- env: PLATFORM=android-6.0
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- env: PLATFORM=android-7.0
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
before_install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm
&& git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm
install $TRAVIS_NODE_VERSION
- node --version
- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26;
fi
- git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic
&& npm install && popd
- npm install -g cordova
install:
- npm install
script:
- npm test
- node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce
--buildName travis-plugin-inappbrowser-$TRAVIS_JOB_NUMBER
......@@ -25,40 +25,13 @@ Anyone can contribute to Cordova. And we need your contributions.
There are multiple ways to contribute: report bugs, improve the docs, and
contribute code.
For instructions on this, start with the
[contribution overview](http://cordova.apache.org/contribute/).
The details are explained there, but the important items are:
- Sign and submit an Apache ICLA (Contributor License Agreement).
- Have a Jira issue open that corresponds to your contribution.
- Check for Github issues that corresponds to your contribution and link or create them if necessary.
- Run the tests so your patch doesn't break existing functionality.
We look forward to your contributions!
The notes on [Commit Workflow](https://github.com/apache/cordova-coho/blob/master/docs/committer-workflow.md#commit-workflow) can be helpful even if you are not a committer.
## Running plugin tests
* clone and install [cordova-plugin-test-framework](https://github.com/apache/cordova-plugin-test-framework)
```
git clone git@github.com:apache/cordova-plugin-test-framework.git
```
* edit ```cordova-plugin-test-framework/www/assets/index.html``` and add the following line
```
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com http://cordova.apache.org http://google.co.uk https://google.co.uk 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
```
* create test project
```
cordova create plugintest
cd plugintest
cordova platform add android
cordova plugin add ../cordova-plugin-inappbrowser
cordova plugin add ../cordova-plugin-inappbrowser/tests
cordova plugin add ../cordova-plugin-test-framework
```
* edit ```config.xml``` and replace ```<content src="index.html" />``` with ```<content src="cdvtests/index.html" />```
* run application
```
cordova run
```
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"_from": "cordova-plugin-inappbrowser@2.0.2",
"_id": "cordova-plugin-inappbrowser@2.0.2",
"_from": "cordova-plugin-inappbrowser@4.0.0",
"_id": "cordova-plugin-inappbrowser@4.0.0",
"_inBundle": false,
"_integrity": "sha1-pEj8vpdMprQpiL00VRCdkj1sl2k=",
"_integrity": "sha1-CB4SWz7OBeMN0A5fk5YWCSaDKio=",
"_location": "/cordova-plugin-inappbrowser",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "cordova-plugin-inappbrowser@2.0.2",
"raw": "cordova-plugin-inappbrowser@4.0.0",
"name": "cordova-plugin-inappbrowser",
"escapedName": "cordova-plugin-inappbrowser",
"rawSpec": "2.0.2",
"rawSpec": "4.0.0",
"saveSpec": null,
"fetchSpec": "2.0.2"
"fetchSpec": "4.0.0"
},
"_requiredBy": [
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-2.0.2.tgz",
"_shasum": "a448fcbe974ca6b42988bd3455109d923d6c9769",
"_spec": "cordova-plugin-inappbrowser@2.0.2",
"_resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-4.0.0.tgz",
"_shasum": "081e125b3ece05e30dd00e5f9396160926832a2a",
"_spec": "cordova-plugin-inappbrowser@4.0.0",
"_where": "/Users/jeshi/Documents/徐工/hls-xcmg-vue-app",
"author": {
"name": "Apache Software Foundation"
},
"bugs": {
"url": "https://issues.apache.org/jira/browse/CB"
"url": "https://github.com/apache/cordova-plugin-inappbrowser/issues"
},
"bundleDependencies": false,
"cordova": {
......@@ -40,7 +40,7 @@
"windows"
]
},
"deprecated": "deprecated",
"deprecated": false,
"description": "Cordova InAppBrowser Plugin",
"devDependencies": {
"eslint": "^4.0.0",
......@@ -56,7 +56,11 @@
"0.2.3": {
"cordova": ">=3.1.0"
},
"3.0.0": {
"4.0.0": {
"cordova": ">=3.1.0",
"cordova-ios": ">=4.0.0"
},
"5.0.0": {
"cordova": ">100"
}
}
......@@ -86,5 +90,5 @@
"test": "npm run eslint"
},
"types": "./types/index.d.ts",
"version": "2.0.2"
"version": "4.0.0"
}
......@@ -20,24 +20,24 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-inappbrowser"
version="2.0.2">
version="4.0.0">
<name>InAppBrowser</name>
<description>Cordova InAppBrowser Plugin</description>
<license>Apache 2.0</license>
<keywords>cordova,in,app,browser,inappbrowser</keywords>
<repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git</repo>
<issue>https://issues.apache.org/jira/browse/CB/component/12320641</issue>
<repo>https://github.com/apache/cordova-plugin-inappbrowser</repo>
<issue>https://github.com/apache/cordova-plugin-inappbrowser/issues</issue>
<engines>
<engine name="cordova" version=">=3.1.0" /><!-- Needs cordova/urlutil -->
<engine name="cordova-ios" version=">=4.0.0" />
</engines>
<!-- android -->
<platform name="android">
<js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="InAppBrowser">
......@@ -49,7 +49,7 @@
<source-file src="src/android/InAppBrowserDialog.java" target-dir="src/org/apache/cordova/inappbrowser" />
<source-file src="src/android/InAppChromeClient.java" target-dir="src/org/apache/cordova/inappbrowser" />
<!-- drawable src/android/resources -->
<!-- drawable src/android/resources -->
<resource-file src="src/android/res/drawable-hdpi/ic_action_next_item.png" target="res/drawable-hdpi/ic_action_next_item.png" />
<resource-file src="src/android/res/drawable-mdpi/ic_action_next_item.png" target="res/drawable-mdpi/ic_action_next_item.png" />
<resource-file src="src/android/res/drawable-xhdpi/ic_action_next_item.png" target="res/drawable-xhdpi/ic_action_next_item.png" />
......@@ -71,16 +71,21 @@
<platform name="ios">
<js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module>
<config-file target="config.xml" parent="/*">
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
<param name="ios-package" value="CDVWKInAppBrowser" />
<param name="onload" value="true" />
</feature>
</config-file>
<header-file src="src/ios/CDVInAppBrowser.h" />
<source-file src="src/ios/CDVInAppBrowser.m" />
<header-file src="src/ios/CDVInAppBrowserOptions.h" />
<source-file src="src/ios/CDVInAppBrowserOptions.m" />
<header-file src="src/ios/CDVInAppBrowserNavigationController.h" />
<source-file src="src/ios/CDVInAppBrowserNavigationController.m" />
<header-file src="src/ios/CDVWKInAppBrowser.h" />
<source-file src="src/ios/CDVWKInAppBrowser.m" />
<header-file src="src/ios/CDVWKInAppBrowserUIDelegate.h" />
<source-file src="src/ios/CDVWKInAppBrowserUIDelegate.m" />
<framework src="CoreGraphics.framework" />
</platform>
......@@ -89,7 +94,6 @@
<platform name="osx">
<js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module>
<config-file target="config.xml" parent="/*">
<feature name="InAppBrowser">
......@@ -101,11 +105,10 @@
<source-file src="src/osx/CDVInAppBrowser.m" />
</platform>
<!-- windows universal apps (Windows 8.1, Windows Phone 8.1, Windows 8.0) -->
<!-- windows -->
<platform name="windows">
<js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module>
<js-module src="src/windows/InAppBrowserProxy.js" name="InAppBrowserProxy">
<runs />
......@@ -117,7 +120,6 @@
<platform name="browser">
<js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module>
<js-module src="src/browser/InAppBrowserProxy.js" name="InAppBrowserProxy">
<runs />
......
......@@ -104,7 +104,7 @@ public class InAppChromeClient extends WebChromeClient {
if(defaultValue.startsWith("gap-iab://")) {
PluginResult scriptResult;
String scriptCallbackId = defaultValue.substring(10);
if (scriptCallbackId.startsWith("InAppBrowser")) {
if (scriptCallbackId.matches("^InAppBrowser[0-9]{1,10}$")) {
if(message == null || message.length() == 0) {
scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray());
} else {
......@@ -118,9 +118,14 @@ public class InAppChromeClient extends WebChromeClient {
result.confirm("");
return true;
}
else {
// Anything else that doesn't look like InAppBrowser0123456789 should end up here
LOG.w(LOG_TAG, "InAppBrowser callback called with invalid callbackId : "+ scriptCallbackId);
result.cancel();
return true;
}
}
else
{
else {
// Anything else with a gap: prefix should get this message
LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue);
result.cancel();
......
<!DOCTYPE html>
<!--
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
......@@ -9,7 +7,7 @@
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
......@@ -17,29 +15,13 @@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
#import <Cordova/CDVScreenOrientationDelegate.h>
-->
@interface CDVInAppBrowserNavigationController : UINavigationController
<html>
<head>
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
<title>Cordova Mobile Spec</title>
@property (nonatomic, weak) id <CDVScreenOrientationDelegate> orientationDelegate;
</head>
<body>
<video width=100% height=100% id="player">
<source src="http://m.comptoir-info.com/app/beta/sample.mp4">
<meta property="og:video:secure_url" content="http://m.comptoir-info.com/app/beta/sample.mp4">
<meta property="og:video:type" content="video/mp4">
</video>
<div>
<button onclick="document.getElementById('player').play()"> play </button>
<button onclick="document.getElementById('player').pause()"> pause </button>
</div>
<script>
document.getElementById('player').play();
</script>
</body>
</html>
@end
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
#import "CDVInAppBrowserNavigationController.h"
@implementation CDVInAppBrowserNavigationController : UINavigationController
- (void) dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion {
if ( self.presentedViewController) {
[super dismissViewControllerAnimated:flag completion:completion];
}
}
- (void) viewDidLoad {
[super viewDidLoad];
}
- (CGRect) invertFrameIfNeeded:(CGRect)rect {
if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
CGFloat temp = rect.size.width;
rect.size.width = rect.size.height;
rect.size.height = temp;
}
rect.origin = CGPointZero;
return rect;
}
#pragma mark CDVScreenOrientationDelegate
- (BOOL)shouldAutorotate
{
if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) {
return [self.orientationDelegate shouldAutorotate];
}
return YES;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) {
return [self.orientationDelegate supportedInterfaceOrientations];
}
return 1 << UIInterfaceOrientationPortrait;
}
@end
env:
jasmine: true
\ No newline at end of file
{
"name": "cordova-plugin-inappbrowser-tests",
"version": "1.7.1-dev",
"description": "",
"cordova": {
"id": "cordova-plugin-inappbrowser-tests",
"platforms": []
},
"keywords": [
"ecosystem:cordova"
],
"author": "",
"license": "Apache 2.0"
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -140,7 +140,6 @@ export default {
this.$refs.scroll.scrollToTop()
},
changePage (e) {
debugger
this.$router.push({
name: 'ConfirmDetail',
query: {
......
This diff is collapsed.
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