Browse Source

Merge remote-tracking branch 'origin/dev' into dev

XMTT 7 years ago
parent
commit
7369b2411b

+ 1 - 1
app/css/app.css

1157
.qa-owner .owner-head.useHead{width:32px;height:32px;margin-top:-16px;background-image: url(../images/default-photo.jpg);border-radius: 50%;}
1157
.qa-owner .owner-head.useHead{width:32px;height:32px;margin-top:-16px;background-image: url(../images/default-photo.jpg);border-radius: 50%;}
1158
.qa-owner .owner-info{padding-left:38px;}
1158
.qa-owner .owner-info{padding-left:38px;}
1159
.owner-name{float: left;}
1159
.owner-name{float: left;}
1160
.owner-tit{margin-left:10px;float: left;max-width:70%;color:#888888}
1160
.owner-tit{margin-left:10px;float: left;max-width:60%;color:#888888}
1161
.qa-con{font-size:14px;line-height: 22px;color:#666;}
1161
.qa-con{font-size:14px;line-height: 22px;color:#666;}
1162
.mui-table-view.partLine{background: none;}
1162
.mui-table-view.partLine{background: none;}
1163
.mui-table-view.partLine>.mui-table-view-cell{margin-bottom: 10px;background: #fff;}
1163
.mui-table-view.partLine>.mui-table-view-cell{margin-bottom: 10px;background: #fff;}

+ 1 - 1
app/html/consultlistNew.html

18
</head>
18
</head>
19
<body>
19
<body>
20
    <!-- 主页面内容容器 -->
20
    <!-- 主页面内容容器 -->
21
    <div id="">
21
    <div id="logined">
22
		<div id="zixunpullrefresh" class="mui-content mui-scroll-wrapper" >
22
		<div id="zixunpullrefresh" class="mui-content mui-scroll-wrapper" >
23
		  	<div class="mui-scroll">
23
		  	<div class="mui-scroll">
24
		  		<div class="infocon madiaBlock">
24
		  		<div class="infocon madiaBlock">

+ 1 - 0
app/js/moreItem.js

132
		document.getElementById("corrAnswer").addEventListener('tap',function(){
132
		document.getElementById("corrAnswer").addEventListener('tap',function(){
133
			plus.nativeUI.showWaiting(); //显示原生等待框
133
			plus.nativeUI.showWaiting(); //显示原生等待框
134
			var webviewShow = plus.webview.create("../html/qa-answer-q.html", 'qa-answer-q.html', {}, {
134
			var webviewShow = plus.webview.create("../html/qa-answer-q.html", 'qa-answer-q.html', {}, {
135
				aflag:1,
135
				anid: self.proid,
136
				anid: self.proid,
136
				quid: self.quid,
137
				quid: self.quid,
137
				qutit:self.data.title,
138
				qutit:self.data.title,

+ 57 - 44
app/js/qa-answer-q.js

1
mui.ready(function(){
1
mui.ready(function(){
2
	mui.plusReady(function(){
2
	mui.plusReady(function(){
3
		var self = plus.webview.currentWebview(),
3
		var self = plus.webview.currentWebview(),
4
			anid=self.anid,
5
			quid =self.quid,
4
			aflag=self.aflag,
6
			qutit=self.qutit,
5
			qutit=self.qutit,
7
			qucnt=self.qucnt;
6
			quid =self.quid;
7
			
8
		var userid = plus.storage.getItem('userid'),
8
		var userid = plus.storage.getItem('userid'),
9
			username = plus.storage.getItem('username');
9
			username = plus.storage.getItem('username');
10
		if(qucnt){
11
			document.getElementById("question").value=qucnt
12
		}
13
		document.getElementById("questionTit").innerHTML=qutit
10
		
14
		plus.nativeUI.closeWaiting();
11
		plus.nativeUI.closeWaiting();
15
		self.show("slide-in-right", 150);
12
		self.show("slide-in-right", 150);
16
		
13
		
17
		var con=document.getElementById("question")
18
		document.getElementsByClassName("topsave")[0].addEventListener("tap",function(){
19
			if(con.value.length<10) {
20
				plus.nativeUI.toast("回答不得少于10个字");
21
				return;
22
			}
23
			var typeurl,dataStr={},tip
24
			if(qucnt){
25
				typeurl='/ajax/question/answer/modify'
26
				dataStr={
27
					"id": anid,
28
					"cnt": con.value,
29
					"uid": userid,
30
					"uname": username
31
				}
32
				tip="回答修改成功"
33
			}else{
34
				typeurl='/ajax/question/answer'
35
				dataStr={
36
					"qid": quid,
37
					"cnt": con.value,
38
					"uid": userid,
39
					"uname": username
14
		if(aflag){
15
			var anid=self.anid,
16
				qucnt=self.qucnt;
17
			document.getElementById("questionTit").innerHTML=qutit
18
			document.getElementById("question").value=qucnt
19
			var con=document.getElementById("question")
20
			document.getElementsByClassName("topsave")[0].addEventListener("tap",function(){
21
				if(con.value.length<10) {
22
					plus.nativeUI.toast("回答不得少于10个字");
23
					return;
40
				}
24
				}
41
				tip="回答发布成功"
42
			}
43
			mui.ajax(baseUrl + typeurl, {
44
				data: dataStr,
45
				dataType: 'json',
46
				async: false,
47
				type: 'POST',
48
				success: function(data) {
49
					if(data.success) {
50
						plus.nativeUI.toast(tip, toastStyle);
51
						mui.back();
25
				mui.ajax(baseUrl + '/ajax/question/answer/modify', {
26
					data: {
27
						"id": anid,
28
						"cnt": con.value,
29
						"uid": userid,
30
						"uname": username
31
					},
32
					dataType: 'json',
33
					type: 'POST',
34
					success: function(data) {
35
						if(data.success) {
36
							console.log("xiugai"+JSON.stringify(data))
37
							plus.nativeUI.toast("回答修改成功", toastStyle);
38
							mui.back();
39
						}
52
					}
40
					}
53
				}
41
				})
54
			});
42
			});
55
			
56
		})
43
		}else{
44
			var con=document.getElementById("question")
45
			document.getElementsByClassName("topsave")[0].addEventListener("tap",function(){
46
				if(con.value.length<10) {
47
					plus.nativeUI.toast("回答不得少于10个字");
48
					return;
49
				}
50
				mui.ajax(baseUrl + '/ajax/question/answer', {
51
					data: {
52
						"qid": quid,
53
						"cnt": con.value,
54
						"uid": userid,
55
						"uname": username
56
					},
57
					dataType: 'json',
58
 					type: 'POST',
59
					success: function(data) {
60
						console.log("fabu"+JSON.stringify(data))
61
						if(data.success) {
62
							plus.nativeUI.toast("回答发布成功", toastStyle);
63
							mui.back();
64
						}
65
					}
66
				});
67
			})
68
		}
69
		
57
	})
70
	})
58
})
71
})

+ 1 - 1
app/js/qa-answer-show.js

40
						oattenSpan.style.display="block";
40
						oattenSpan.style.display="block";
41
						ifcollectionAbout($da.uid,oattenSpan, 1,1);
41
						ifcollectionAbout($da.uid,oattenSpan, 1,1);
42
					}else{
42
					}else{
43
						isAgree($da.uid);
44
						flag=1
43
						flag=1
45
					}
44
					}
46
					proinfo($da.uid)
45
					proinfo($da.uid)
148
		if(userid && userid != null && userid != "null") {
147
		if(userid && userid != null && userid != "null") {
149
			module.lWord(answerId, 4);
148
			module.lWord(answerId, 4);
150
			ifcollectionAbout(answerId,oifCollect,9);
149
			ifcollectionAbout(answerId,oifCollect,9);
150
			isAgree(userid);
151
		}
151
		}
152
		document.getElementById("ownerCon").addEventListener('tap', function() {
152
		document.getElementById("ownerCon").addEventListener('tap', function() {
153
			var id = this.getAttribute("data-id");
153
			var id = this.getAttribute("data-id");

+ 1 - 1
app/js/qa-my-wendaTT.js

283
				leaveMsgCount(dataStr.id, $str);
283
				leaveMsgCount(dataStr.id, $str);
284
            },
284
            },
285
			leaveMsgCount=function(id, $str) {
285
			leaveMsgCount=function(id, $str) {
286
				oAjax("/ajax/leavemsg/count", {
286
				oAjaxGet("/ajax/leavemsg/count", {
287
					sid:id,
287
					sid:id,
288
					stype: "4"
288
					stype: "4"
289
				}, "get", function(data) {
289
				}, "get", function(data) {

+ 2 - 0
app/js/qa-question-show.js

54
								dataO = {time: "",id: ""};
54
								dataO = {time: "",id: ""};
55
								document.getElementById("curAnswers").innerHTML = "";
55
								document.getElementById("curAnswers").innerHTML = "";
56
								answerList();
56
								answerList();
57
								getConmain();
57
								if(userid && userid != null && userid != "null") {
58
								if(userid && userid != null && userid != "null") {
58
									anExist();
59
									anExist();
59
								}
60
								}
346
				if(can) {
347
				if(can) {
347
					plus.nativeUI.showWaiting();
348
					plus.nativeUI.showWaiting();
348
					plus.webview.create("../html/qa-answer-q.html", 'qa-answer-q.html', {}, {
349
					plus.webview.create("../html/qa-answer-q.html", 'qa-answer-q.html', {}, {
350
						"aflag":0,
349
						"quid": questionId,
351
						"quid": questionId,
350
						"qutit":document.getElementById("questionTit").innerHTML
352
						"qutit":document.getElementById("questionTit").innerHTML
351
					});
353
					});