takedetails.js 810 字节

/*获取*/
//$(document).ready(function(){
/* 在地址栏获取参数 */

var spotid=GetQueryString("id");
console.log(spotid)
			
new Vue({
	el: '#spotdetail',
	data: {
		//详细地址
		spotdetail: {
			photo: "",
			spot_detail_address: "",
		},
		
	},
	created: function() {
		this.details();	
	},

	methods: {
		//获取信息
		details: function() {
			var that = this;			
			var url = '/Spot/detail'
			var params = {
				id: spotid,				
			}
			ajaxsend(url, params, function(res) {
				/*console.log(JSON.stringify(res))*/
				console.log(res);
				var data=res.data;
				that.spotdetail.spot_detail_address=data.spot_detail_address;
				var photo=data.photo;
				 photo=JSON.stringify(photo);
				that.spotdetail.photo=photo;
				console.log(that.spotdetail.photo);
			})
		},
		
		
	},

})

//});