大理需求:绑定银行卡时银行卡号和身份证号去空格,60s之后重复发,注意:安卓版本使用的是platforms/android目录下代码,不能覆盖,里面做了特殊代码修改
diff --git a/www/js/main.js b/www/js/main.js
index 90977da..4d55357 100644
--- a/www/js/main.js
+++ b/www/js/main.js
@@ -99,6 +99,11 @@
})
})*/
});
+ $("#doorBtn").click(function(){
+ app.checkBefore(function() {
+ showRet(DOOR_URl);
+ })
+ })
$('#usersec').click(function() {
app.checkBefore(function() {
app.checkOther(function() {
@@ -107,6 +112,13 @@
})
});
this.initData();
+ this.backBtn();
+ },
+ backBtn: function(){
+ document.addEventListener("backbutton", function(e){
+ e.preventDefault();
+ navigator.app.exitApp();
+ }, false);
},
initTab: function() {
$("#maincontent").css("top", $("#maintop").height())
@@ -319,3 +331,47 @@
}
};
app.initialize();
+
+function showRet(url) {
+ if(isEmpty(url)){
+ return;
+ }
+ var userid = window.localStorage.getItem("userid");
+ //if (url.indexOf("yy.dlsmk.cn")>=0) {
+ if(url.indexOf("?")>0){
+ url=url+'&userid='+userid;
+ }else{
+ url=url+'?userid='+userid;
+ }
+ //}
+ console.log(url)
+ var inAppBrowserRef = cordova.ThemeableBrowser.open(url, '_blank', {
+ statusbar: {
+ color: '#03a9f4ff'
+ },
+ toolbar: {
+ height: 44,
+ color: '#03a9f4ff'
+ },
+ title: {
+ color: '#ffffffff',
+ showPageTitle: true
+ },
+ backButton: {
+ image: 'back.png',
+ imagePressed: 'back.png',
+ align: 'left',
+ event: 'backPressed'
+ },
+ closeButton: {
+ image: 'close.png',
+ imagePressed: 'close.png',
+ align: 'left',
+ event: 'closePressed'
+ },
+ backButtonCanClose: true
+ }).addEventListener('closePressed', function(params){
+ inAppBrowserRef.close();
+ //window.location = "main.html"
+ });
+ }