Ver Código Fonte

添加问答分享缩略图

luyanan 7 anos atrás
pai
commit
38ef69da41
2 arquivos alterados com 12 adições e 4 exclusões
  1. 10 3
      app/js/qa-answer-show.js
  2. 2 1
      app/js/qa-question-show.js

+ 10 - 3
app/js/qa-answer-show.js

@ -14,6 +14,7 @@ mui.ready(function() {
14 14
		var answerId = self.anid;
15 15
		var flag=0;
16 16
		var answerTit=""
17
		var oUrl = baseUrl + "/images/logo180.png";
17 18
		
18 19
		var oAjax = function(url, dataS, otype, oFun) {
19 20
				mui.ajax(baseUrl + url, {
@ -91,6 +92,15 @@ mui.ready(function() {
91 92
				}, "get", function(res){
92 93
					document.getElementById("questTit").innerHTML=res.data.title;
93 94
					document.getElementById("questTit").setAttribute("data-id",qid);
95
					if(res.data.img) {
96
						var subs = new Array();
97
						if(res.data.img.indexOf(',')) {
98
							subs =res.data.img.split(',');
99
						} else {
100
							subs[0] = res.data.img;
101
						}
102
						oUrl=baseUrl + "/data/question"+subs[0].replace(/.jpg/,"_s.jpg");
103
					}
94 104
				});
95 105
				
96 106
			},
@ -104,7 +114,6 @@ mui.ready(function() {
104 114
			},
105 115
			moreMes=function(){
106 116
				document.getElementById("BtnMore").addEventListener("tap", function() {
107
					var oUrl = baseUrl + "/images/logo180.png";
108 117
					plus.nativeUI.showWaiting(); //显示原生等待框
109 118
					var webviewShow = plus.webview.create("../html/moreItem.html", 'moreItem.html', {}, {
110 119
						proid: answerId,
@ -254,8 +263,6 @@ mui.ready(function() {
254 263
			document.getElementById("maskBlack").style.display = "none";
255 264
			var oFen = this.getElementsByTagName("span")[0].innerHTML;
256 265
	
257
			var oUrl = baseUrl + "/images/logo180.png";
258
	
259 266
			if(oFen == "微信好友") {
260 267
				if(!weixinClient()) {
261 268
					return;

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

@ -15,6 +15,7 @@ mui.ready(function() {
15 15
			id: "",
16 16
			score:""
17 17
		};
18
	var oUrl = baseUrl + "/images/logo180.png";
18 19
	var userid, questionId ,pkey=[],byway;
19 20
	mui.plusReady(function() {
20 21
		userid = plus.storage.getItem('userid');
@ -99,6 +100,7 @@ mui.ready(function() {
99 100
						} else {
100 101
							subs[0] = $da.img;
101 102
						}
103
						oUrl=baseUrl + "/data/question"+subs[0].replace(/.jpg/,"_s.jpg");
102 104
						var pstr = ""
103 105
						if(subs.length > 0) {
104 106
							for(var i = 0; i < subs.length; i++) {
@ -290,7 +292,6 @@ mui.ready(function() {
290 292
			},
291 293
			moreMes=function(){
292 294
				document.getElementById("BtnMore").addEventListener("tap", function() {
293
					var oUrl = baseUrl + "/images/logo180.png";
294 295
					plus.nativeUI.showWaiting(); //显示原生等待框
295 296
					var webviewShow = plus.webview.create("../html/moreItem.html", 'moreItem.html', {}, {
296 297
						proid: questionId,