浏览代码

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

XMTT 7 年之前
父节点
当前提交
7369b2411b
共有 7 个文件被更改,包括 64 次插入48 次删除
  1. 1 1
      app/css/app.css
  2. 1 1
      app/html/consultlistNew.html
  3. 1 0
      app/js/moreItem.js
  4. 57 44
      app/js/qa-answer-q.js
  5. 1 1
      app/js/qa-answer-show.js
  6. 1 1
      app/js/qa-my-wendaTT.js
  7. 2 0
      app/js/qa-question-show.js

+ 1 - 1
app/css/app.css

@ -1157,7 +1157,7 @@ ul.tagList>li .h2Font{color: #666; -webkit-user-select:text;}
1157 1157
.qa-owner .owner-head.useHead{width:32px;height:32px;margin-top:-16px;background-image: url(../images/default-photo.jpg);border-radius: 50%;}
1158 1158
.qa-owner .owner-info{padding-left:38px;}
1159 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 1161
.qa-con{font-size:14px;line-height: 22px;color:#666;}
1162 1162
.mui-table-view.partLine{background: none;}
1163 1163
.mui-table-view.partLine>.mui-table-view-cell{margin-bottom: 10px;background: #fff;}

+ 1 - 1
app/html/consultlistNew.html

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

+ 1 - 0
app/js/moreItem.js

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

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

@ -1,58 +1,71 @@
1 1
mui.ready(function(){
2 2
	mui.plusReady(function(){
3 3
		var self = plus.webview.currentWebview(),
4
			anid=self.anid,
5
			quid =self.quid,
4
			aflag=self.aflag,
6 5
			qutit=self.qutit,
7
			qucnt=self.qucnt;
6
			quid =self.quid;
7
			
8 8
		var userid = plus.storage.getItem('userid'),
9 9
			username = plus.storage.getItem('username');
10
		if(qucnt){
11
			document.getElementById("question").value=qucnt
12
		}
13
		document.getElementById("questionTit").innerHTML=qutit
10
		
14 11
		plus.nativeUI.closeWaiting();
15 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,7 +40,6 @@ mui.ready(function() {
40 40
						oattenSpan.style.display="block";
41 41
						ifcollectionAbout($da.uid,oattenSpan, 1,1);
42 42
					}else{
43
						isAgree($da.uid);
44 43
						flag=1
45 44
					}
46 45
					proinfo($da.uid)
@ -148,6 +147,7 @@ mui.ready(function() {
148 147
		if(userid && userid != null && userid != "null") {
149 148
			module.lWord(answerId, 4);
150 149
			ifcollectionAbout(answerId,oifCollect,9);
150
			isAgree(userid);
151 151
		}
152 152
		document.getElementById("ownerCon").addEventListener('tap', function() {
153 153
			var id = this.getAttribute("data-id");

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

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

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

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