Bladeren bron

消息推送

qukaidi 4 jaren geleden
bovenliggende
commit
ec86323710
4 gewijzigde bestanden met toevoegingen van 18 en 14 verwijderingen
  1. 0 1
      config.xml
  2. 1 1
      luntai/index.html
  3. 6 6
      luntai/login.html
  4. 11 6
      script/vue_plugins.js

+ 0 - 1
config.xml

@@ -19,7 +19,6 @@
 	<preference name="statusBarAppearance" value="true"/>
 	<permission name="readPhoneState"/>
 	<permission name="camera"/>
-	<permission name="notification"/>
 	<permission name="record"/>
 	<permission name="location"/>
 	<permission name="fileSystem"/>

+ 1 - 1
luntai/index.html

@@ -233,7 +233,7 @@
 						//
 						// }, false);
 					}
-					this.ifHasPrme('notification')
+					// this.ifHasPrme('notification')
 				},
 				//  跳转页面
 				setMainid1: function () {

+ 6 - 6
luntai/login.html

@@ -121,7 +121,7 @@
 			methods: {
 				init: function () {
 					this.getcheckVersion()
-					this.ifHasPrme('notification')
+					// this.ifHasPrme('notification')
 				},
 				//  检查更新
 				getcheckVersion: function () {
@@ -153,11 +153,11 @@
 						this.showToast("验证码不能为空");
 						return;
 					}
-					if(this.version!=parseFloat(api.appVersion)){
-						_this.getNewVersionUrl(function () {
-						});
-						return;
-					}
+					// if(this.version!=parseFloat(api.appVersion)){
+					// 	_this.getNewVersionUrl(function () {
+					// 	});
+					// 	return;
+					// }
 					var data = {
 						mobile: this.userCode,
 						mobileCode: this.userPassword,

+ 11 - 6
script/vue_plugins.js

@@ -128,18 +128,23 @@ Vue.prototype.configListen = function(ajpush) {
         });
         api.addEventListener({
             name: 'appintent'
-        }, function(ret, err) {
+    }, function (ret, err) {
             if (ret && ret.appParam.ajpush) {
-                if(ret.appParam.extra.env == 4 || ret.appParam.extra.env == '4'){ // 消息中心
+            if (ret.appParam.ajpush.extra.env == 4 || ret.appParam.ajpush.extra.env == '4') { // 消息中心
                     api.openWin({
-                        name : 'msg',
-                        url : '../luntai/msg.html',
+                    name: 'msg',
+                    url: '../luntai/msgDetails.html',
                         pageParam : {
-                            id : ret.appParam.extra.id
+                        sendUserId: ret.appParam.ajpush.extra.sendUserId
                         }
                     });
             }
-
+            if (ret.appParam.ajpush.extra.env == 5 || ret.appParam.ajpush.extra.env == '5') { // 消息中心
+                api.openWin({
+                    name: 'msg',
+                    url: '../luntai/msgDetails.html',
+                });
+            }
             }
         })
     }