LIPENGTAO1313 6 years ago
parent
commit
cca02caca4
1 changed files with 17 additions and 0 deletions
  1. 17 0
      js/productShow.js

+ 17 - 0
js/productShow.js

@ -287,6 +287,23 @@ $(document).ready(function() {
287 287
			}
288 288
		})
289 289
	}
290
	function ajaxRequist(url, obj, type, fn) {
291
		$.ajax({
292
			url: url,
293
			data: obj,
294
			dataType: 'json', //服务器返回json格式数据
295
			type: type, //支持'GET'和'POST'
296
			traditional: true,
297
			success: function(data) {
298
				if(data.success) {
299
					fn(data)
300
				}
301
			},
302
			error: function(xhr, type, errorThrown) {
303
				$.MsgBox.Alert('提示', '服务器请求失败');
304
			}
305
		});
306
	}
290 307
	function unauthUser($res) {
291 308
	var osting=""
292 309
	for(var i = 0; i < $res.length; i++) {