takedetails.js
853 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*获取*/
//$(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=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);
})
}
}
})
//});