浏览代码

Merge branch 'dev' of
http://121.42.53.174:3000/bulomakaka/ekexiu.app.git into dev

luyanan 7 年之前
父节点
当前提交
4cb0ed1505

+ 1 - 1
app/html/updateProfile.html

@ -21,7 +21,7 @@
21 21
		<script>
22 22
			function autoGrow(oField) {
23 23
				document.getElementById("tt").style.width=oField.scrollWidth+"px";
24
				document.getElementById("tt").value=oField.value.substr(0,500);
24
				document.getElementById("tt").value=oField.value;
25 25
				oField.style.height=document.getElementById("tt").scrollHeight+"px";
26 26
			}
27 27
		</script>

+ 5 - 1
app/js/articleShow.js

@ -727,13 +727,17 @@ mui.plusReady(function() {
727 727
		var length = trim(this.value);
728 728
		if(length) {
729 729
			document.getElementsByClassName("mui-btn")[0].removeAttribute("disabled");
730
			this.value=this.value.substr(0,200);
730
			
731 731
		} else {
732 732
			document.getElementsByClassName("mui-btn")[0].setAttribute("disabled", "true")
733 733
		}
734 734
		
735 735
	})
736 736
	document.getElementsByClassName("mui-btn")[0].addEventListener("tap", function() {
737
		if(document.getElementById("textInputThis").value.length>200) {
738
				plus.nativeUI.toast("留言不得超过200个字", toastStyle);
739
				return;
740
			}
737 741
		mui.ajax(baseUrl + "/ajax/leaveWord", {
738 742
			data: {
739 743
				"articleId": plus.webview.currentWebview().articleId,

+ 4 - 1
app/js/index.js

@ -8,6 +8,9 @@ mui.plusReady(function() {
8 8
	plus.nativeUI.showWaiting();
9 9
	checkVersion();
10 10
})
11
document.addEventListener("resume", function(){
12
	checkVersion();
13
}, false)
11 14
document.getElementById("demandP").addEventListener("tap", function() {
12 15
	var userid = plus.storage.getItem('userid');
13 16
	if(userid == null) {
@ -383,4 +386,4 @@ function datalistEach(datalist) {
383 386
		table.appendChild(li, table.firstChild);
384 387

385 388
	});
386
}
389
}

+ 5 - 2
app/js/paperShow.js

@ -771,12 +771,15 @@ document.getElementById("textInputThis").addEventListener("input", function() {
771 771
		var length = trim(this.value);
772 772
		if(length) {
773 773
			document.getElementsByClassName("mui-btn")[0].removeAttribute("disabled");
774
			this.value=this.value.substr(0,200);
775 774
		} else {
776 775
			document.getElementsByClassName("mui-btn")[0].setAttribute("disabled", "true")
777 776
		}
778 777
	})
779 778
document.getElementsByClassName("mui-btn")[0].addEventListener("tap", function() {
779
	if(document.getElementById("textInputThis").value.length>200) {
780
				plus.nativeUI.toast("留言不得超过200个字", toastStyle);
781
				return;
782
			}
780 783
		mui.ajax(baseUrl + "/ajax/leaveWord/paper", {
781 784
			data: {
782 785
				"paperId": paperId,
@ -917,4 +920,4 @@ mui('.commentBlock').on('tap', '.useHead,.h1Font', function() {
917 920
				"patentId": id
918 921
			});
919 922
		})
920
});
923
});

+ 4 - 1
app/js/patentShow.js

@ -747,12 +747,15 @@ document.getElementById("textInputThis").addEventListener("input", function() {
747 747
		var length = trim(this.value);
748 748
		if(length) {
749 749
			document.getElementsByClassName("mui-btn")[0].removeAttribute("disabled");
750
			this.value=this.value.substr(0,200);
751 750
		} else {
752 751
			document.getElementsByClassName("mui-btn")[0].setAttribute("disabled", "true")
753 752
		}
754 753
	})
755 754
document.getElementsByClassName("mui-btn")[0].addEventListener("tap", function() {
755
	if(document.getElementById("textInputThis").value.length>200) {
756
				plus.nativeUI.toast("留言不得超过200个字", toastStyle);
757
				return;
758
			}
756 759
		mui.ajax(baseUrl + "/ajax/leaveWord/patent", {
757 760
			data: {
758 761
				"patentId": patentId,

+ 60 - 0
app/js/public/base.js

@ -373,3 +373,63 @@ function cancelCollectionAbout(watchObject,sel, num,flag) {
373 373
	});
374 374

375 375
}
376
function checkVersion(){
377
		mui.plusReady(function(){
378
			if(!plus.webview.currentWebview()) return;
379
			// 获取本地应用资源版本号
380
		    plus.runtime.getProperty(plus.runtime.appid,function(inf){
381
			    wgtVer=inf.version;
382
			    console.log("当前应用版本:"+wgtVer);
383
			    mui.ajax(baseUrl + "/data/manager/version.json", {
384
					dataType: 'json', //数据格式类型
385
					type: 'GET', //http请求类型
386
					timeout: 10000, //超时设置
387
					async: false,
388
					success: function(data) {
389
						if (data.version > wgtVer) {
390
							var btn = ["立即更新", "取消更新"];
391
							mui.confirm("新版本上线了,为了不影响您的正常使用,赶快更新吧", "提示", btn, function(e) {
392
								if(e.index == 0) {
393
									if(mui.os.ios) {
394
										plus.runtime.openURL('https://itunes.apple.com/cn/app/ke-xiu-da-jian-qi-ye-yu-zhuan/id1197110983?l=en&mt=8');
395
										return;
396
									}
397
								try {
398
									     plus.nativeUI.showWaiting("检测更新...");
399
									     //var d="http://192.168.3.233/download/app1.0.6.apk";
400
										 plus.downloader.createDownload( data.wgt, {filename:"_doc/update/"}, function(d,status){
401
									        if ( status == 200 ) { 
402
									            plus.runtime.install(d.filename, {}, function() {
403
													console.log("安装新版本文件成功!");
404
													/*plus.nativeUI.alert("应用资源更新完成,程序需要立即重启", function() {
405
														plus.runtime.restart();
406
													});*/
407
												}, function(e) {
408
													console.log("安装新版文件失败[" + e.code + "]:" + e.message);
409
													plus.nativeUI.toast("安装新版文件失败[" + e.code + "]:" + e.message);
410
												});
411
									            
412
									        } else {
413
									            console.log("下载新版本失败!");
414
									            plus.nativeUI.toast("下载新版本失败!");
415
									        }
416
							       			plus.nativeUI.closeWaiting();
417
							    		}).start();
418
						    		} catch (e) {
419
										console.log(e.message);
420
									}	
421
								}
422
							});
423
						}else{
424
							//plus.nativeUI.toast("您使用的是最新版本,请放心使用!", toastStyle);
425
						}
426
					},
427
					error: function() {
428
						plus.nativeUI.toast("服务器链接超时", toastStyle);
429
						return;
430
					}
431
				});
432
			});
433
		})
434
	}
435


+ 4 - 0
app/js/setup.js

@ -107,6 +107,10 @@ mui.ready(function() {
107 107
							var btn = ["确定更新", "取消更新"];
108 108
							mui.confirm("检测到新版本,是否更新?", "提示", btn, function(e) {
109 109
								if(e.index == 0) {
110
									if(mui.os.ios) {
111
										plus.runtime.openURL('https://itunes.apple.com/cn/app/ke-xiu-da-jian-qi-ye-yu-zhuan/id1197110983?l=en&mt=8');
112
										return;
113
									}
110 114
								try {
111 115
									     plus.nativeUI.showWaiting("检测更新...");
112 116
									     //var d="http://192.168.3.233/download/app1.0.6.apk";

+ 3 - 3
app/js/updateJob.js

@ -10,10 +10,10 @@ mui.ready(function() {
10 10
				var arr = [];
11 11
				for(var i = 0; i < obj.data.length; i++) {
12 12
					if(obj.flag == 1) {
13
						var str = '<li class="mui-table-view-cell listitem" data-o="'+i+'">'
13
						var str = '<li class="mui-table-view-cell listitemExit" data-o="'+i+'">'
14 14
						var name = obj.data[i].name;
15 15
					} else {
16
						var str = '<li class="mui-table-view-cell listitem" data-o="'+i+'">'
16
						var str = '<li class="mui-table-view-cell listitemExit" data-o="'+i+'">'
17 17
						var name = obj.data[i].company;
18 18
					}
19 19
					oarr[i]=obj.data[i];
@ -23,7 +23,7 @@ mui.ready(function() {
23 23
					}else{
24 24
						odescp = obj.data[i].title
25 25
					}
26
					var os = '<div class="h4Tit listtit2" style="margin-right:40px;">' + name + '<span class="updatebox mui-clearfix" style="top:0;margin-right:-40px;"><em></em>修改</span></div>' +
26
					var os = '<div class="listtit2" style="margin-right:40px;">' + name + '<span class="updatebox mui-clearfix" style="top:5px;"><em></em>修改</span></div>' +
27 27
						 ' <p class="listtit3">'+odescp+'</p>'+
28 28
						' <p class="listtit3">' + timeT({
29 29
							startMonth: obj.data[i].startMonth,

+ 0 - 2
app/js/updateProfile.js

@ -15,8 +15,6 @@ mui.ready(function() {
15 15
				document.getElementById("fontAdd").innerHTML = web.descp.length;
16 16
			}
17 17
			document.getElementById("title").addEventListener("input", function() {
18
				
19
					this.value = this.value.substring(0, 500);
20 18
					document.getElementById("fontAdd").innerHTML = this.value.length;
21 19
			})
22 20
		}

+ 2 - 2
app/js/updateProject.js

@ -11,7 +11,7 @@ mui.ready(function() {
11 11
				var arr = [];
12 12
				for(var i = 0; i < obj.data.length; i++) {
13 13
					if(obj.flag == 1) {
14
						var str = '<li class="mui-table-view-cell listitem" data-o="'+i+'">'
14
						var str = '<li class="mui-table-view-cell listitemExit" data-o="'+i+'">'
15 15
						var name = obj.data[i].name;
16 16
					} else {
17 17
						var str = '<li class="mui-table-view-cell listitem" style="margin-right:40px;"data-o="'+i+'">'
@ -22,7 +22,7 @@ mui.ready(function() {
22 22
					if(obj.data[i].descp) {
23 23
						odescp = obj.data[i].descp
24 24
					}
25
					var os = '<div class="h4Tit listtit2" style="margin-right:40px;">' + name + '<span class="updatebox mui-clearfix" style="top:0;margin-right:-40px;"><em></em>修改</span></div>' +
25
					var os = '<div class="listtit2" style="margin-right:40px;">' + name + '<span class="updatebox mui-clearfix" style="top:5px;"><em></em>修改</span></div>' +
26 26
						' <p class="listtit3">' + timeT({
27 27
							startMonth: obj.data[i].startMonth,
28 28
							stopMonth: obj.data[i].stopMonth