ソースを参照

添加问答分享缩略图

luyanan 7 年 前
コミット
38ef69da41
共有2 個のファイルを変更した12 個の追加4 個の削除を含む
  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
		var answerId = self.anid;
14
		var answerId = self.anid;
15
		var flag=0;
15
		var flag=0;
16
		var answerTit=""
16
		var answerTit=""
17
		var oUrl = baseUrl + "/images/logo180.png";
17
		
18
		
18
		var oAjax = function(url, dataS, otype, oFun) {
19
		var oAjax = function(url, dataS, otype, oFun) {
19
				mui.ajax(baseUrl + url, {
20
				mui.ajax(baseUrl + url, {
91
				}, "get", function(res){
92
				}, "get", function(res){
92
					document.getElementById("questTit").innerHTML=res.data.title;
93
					document.getElementById("questTit").innerHTML=res.data.title;
93
					document.getElementById("questTit").setAttribute("data-id",qid);
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
			},
114
			},
105
			moreMes=function(){
115
			moreMes=function(){
106
				document.getElementById("BtnMore").addEventListener("tap", function() {
116
				document.getElementById("BtnMore").addEventListener("tap", function() {
107
					var oUrl = baseUrl + "/images/logo180.png";
108
					plus.nativeUI.showWaiting(); //显示原生等待框
117
					plus.nativeUI.showWaiting(); //显示原生等待框
109
					var webviewShow = plus.webview.create("../html/moreItem.html", 'moreItem.html', {}, {
118
					var webviewShow = plus.webview.create("../html/moreItem.html", 'moreItem.html', {}, {
110
						proid: answerId,
119
						proid: answerId,
254
			document.getElementById("maskBlack").style.display = "none";
263
			document.getElementById("maskBlack").style.display = "none";
255
			var oFen = this.getElementsByTagName("span")[0].innerHTML;
264
			var oFen = this.getElementsByTagName("span")[0].innerHTML;
256
	
265
	
257
			var oUrl = baseUrl + "/images/logo180.png";
258
	
259
			if(oFen == "微信好友") {
266
			if(oFen == "微信好友") {
260
				if(!weixinClient()) {
267
				if(!weixinClient()) {
261
					return;
268
					return;

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

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