Selaa lähdekoodia

需求样式修改及聊天修正

jack 7 vuotta sitten
vanhempi
commit
cf04f275a1
2 muutettua tiedostoa jossa 52 lisäystä ja 29 poistoa
  1. 2 2
      app/html/demandPublish.html
  2. 50 27
      app/html/weChat.html

+ 2 - 2
app/html/demandPublish.html

@ -63,7 +63,7 @@
63 63
		    </div>
64 64
		    <div class="mui-input-group mainbox">
65 65
	 		    <div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="showCityPicker">
66
					<span class="mui-pull-left">所在城市</span><span class="requiredThis"> *</span>
66
					<span class="mui-pull-left" style="margin-right:4px;">所在城市</span><span class="requiredThis"> *</span>
67 67
				    <span class="rightword" id="cityResult">请选择所在城市</span>
68 68
				</div>
69 69
			</div>
@ -81,7 +81,7 @@
81 81
		    </div>
82 82
		    <div class="mui-input-group mainbox">
83 83
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id='showYearPicker' data-options='{"type":"date"}'>
84
    				<span class="mui-pull-left">需求有效期</span><span class="requiredThis"> *</span>
84
    				<span class="mui-pull-left" style="margin-right:4px;">需求有效期</span><span class="requiredThis"> *</span>
85 85
				    <span class="rightword" id="yearResult">请选择需求的截止日期</span>
86 86
    			</div>
87 87
		    </div>

+ 50 - 27
app/html/weChat.html

@ -416,7 +416,7 @@
416 416
						hold: true, //默认为false,不监听
417 417
						release: true //默认为false,不监听
418 418
					},
419
					beforeback:function() {
419
					beforeback: function() {
420 420
						var web3 = plus.webview.getWebviewById("consultlistNew.html");
421 421
						mui.fire(web3, "newId");
422 422
						return true;
@ -426,8 +426,8 @@
426 426
				//$.plusReady=function(fn){fn();};
427 427
				$.plusReady(function() {
428 428
					if($.os.ios) {
429
						 toNum();
430
				}
429
						toNum();
430
					}
431 431
					plus.webview.currentWebview().setStyle({
432 432
						softinputMode: "adjustResize"
433 433
					});
@ -444,10 +444,51 @@
444 444
								professorId: professorId
445 445
							}
446 446
						})
447
					})
448
					var userid = plus.storage.getItem('userid');
447
					});
449 448
					var url1 = baseUrl + '/images/head/' + professorId + '_l.jpg';
450
					var url2 = baseUrl + '/images/head/' + userid + '_l.jpg';
449
					var url2 = baseUrl + '/images/head/' + plus.storage.getItem('userid') + '_l.jpg';
450
					pr1()
451
					function pr1() {
452
						$.ajax(baseUrl + "/ajax/professor/baseInfo/" + plus.storage.getItem('userid'), {
453
							dataType: 'json',
454
							type: 'GET',
455
							timeout: 10000,
456
							success: function(data) {
457
								if(data.success && data.data) {
458
									var $info=data.data;
459
									if($info.hasHeadImage != 1) {
460
										url2=baseUrl + "/images/default-photo.jpg";
461
									}
462
									pr2();
463
								}
464
							},
465
							error: function() {
466
								plus.nativeUI.toast("服务器链接超时", toastStyle);
467
							}
468
						});
469
					}
470
					function pr2() {
471
						$.ajax(baseUrl + "/ajax/professor/baseInfo/" + professorId, {
472
							dataType: 'json',
473
							type: 'GET',
474
							timeout: 10000,
475
							success: function(data) {
476
								if(data.success && data.data) {
477
									var $info=data.data;
478
									document.getElementById("chatName").innerHTML = data.data.name;
479
									if($info.hasHeadImage != 1) {
480
										url1=baseUrl + "/images/default-photo.jpg";
481
									}
482
									messageList();
483
								}
484
							},
485
							error: function() {
486
								plus.nativeUI.toast("服务器链接超时", toastStyle);
487
							}
488
						});
489
					}
490
					var userid = plus.storage.getItem('userid');
491
					
451 492
					var showKeyboard = function() {
452 493
						if($.os.ios) {
453 494
							var webView = plus.webview.currentWebview().nativeInstanceObject();
@ -473,26 +514,8 @@
473 514
					})
474 515

475 516
					var record = []; //消息数组
476
					messageList();
477
					pe();
478
					
479 517
					
480 518

481
					function pe() {
482
						mui.ajax(baseUrl + '/ajax/professor/baseInfo/' + professorId, {
483
							"type": "get",
484
							"async": true,
485
							"success": function(data) {
486
								if(data.success && data.data) {
487
									document.getElementById("chatName").innerHTML = data.data.name;
488
								}
489
							},
490
							"error": function() {
491
								plus.nativeUI.toast("服务器链接超时", toastStyle);
492
							}
493
						});
494
					}
495

496 519
					function messageList() {
497 520
						$.ajax(baseUrl + '/ajax/webMsg/cnt/load', {
498 521
							data: {
@ -631,9 +654,9 @@
631 654
							timeGe: time1
632 655
						})
633 656
						bindMsgList();
634
//						if($.os.ios) {
635
//						 toNum();
636
//						}
657
						//						if($.os.ios) {
658
						//						 toNum();
659
						//						}
637 660
					})
638 661
					var toRobot = function(info) {
639 662
						var apiUrl = 'http://www.tuling123.com/openapi/api';