2 Ревизии d9a324af37 ... d7c1a444b1

Автор SHA1 Съобщение Дата
  juney d7c1a444b1 Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view преди 2 години
  juney c6b327f254 모바일 PUSH 적용 преди 2 години
променени са 2 файла, в които са добавени 19 реда и са изтрити 5 реда
  1. 12 5
      src/main/webapp/mobile/js/app/main.js
  2. 7 0
      src/main/webapp/mobile/js/config.js

+ 12 - 5
src/main/webapp/mobile/js/app/main.js

@@ -29,11 +29,18 @@ function clickNotify(nticeNo) {
29 29
  
30 30
 var mobMainObj = {
31 31
 	init: function () {
32
-		this.ui();
33
-		this.action();
34
-		this.notice.init();
35
-		// this.count.init();
36
-		// this.chart.init();
32
+		var PushURL = urlParams.PushURL;
33
+		if(PushURL) {
34
+			const id = PushURL.substring(PushURL.lastIndexOf('/') + 1, PushURL.length).replace(".html", "");
35
+			const href = MOBILE_CONTEXTPATH + PushURL;
36
+			_this.loadPage(id, href);
37
+		} else {
38
+			this.ui();
39
+			this.action();
40
+			this.notice.init();
41
+			// this.count.init();
42
+			// this.chart.init();
43
+		}
37 44
 		
38 45
 	},
39 46
 	ui: function() { 

+ 7 - 0
src/main/webapp/mobile/js/config.js

@@ -915,6 +915,13 @@ let CommonObj = {
915 915
 	isApp: (/oqpo_android|oqpo_ios/).test(navigator.userAgent.toLowerCase())
916 916
 };
917 917
 
918
+var urlParams = location.search.split(/[?&]/).slice(1).map(function(paramPair) {
919
+	return paramPair.split(/=(.+)?/).slice(0, 2);
920
+}).reduce(function(obj, pairArray) {
921
+	obj[pairArray[0]] = pairArray[1];
922
+	return obj;
923
+}, {});
924
+
918 925
 function itp_fn_date_format(date, type) {
919 926
 	let month = date.getMonth() + 1;
920 927
 	let day = date.getDate();