finishdetail.js
963 字节
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
50
51
52
var oid=GetQueryString("oid");
console.log(oid);
new Vue({
el:'#finishdetail',
filters:{
stoptype:function(type){
return type=='1'?'自提':type=='2'?'堂食':""
},
payment:function(pay){
return pay=='1'?'余额支付':pay=='2'?'微信支付':""
}
},
data:{
orderinfo:[],
ordergood:[]
},
created: function() {
this.details();
},
methods: {
//获取信息
details: function() {
var that = this;
var url = '/UserCenter/orderDetail'
var params = {
oid:oid
}
ajaxsend(url, params, function(res) {
/*console.log(JSON.stringify(res))*/
console.log(res);
var data=res.data;
console.log(data)
that.orderinfo=data.order_info;
that.ordergood=data.order_goods;
console.log(that.orderinfo);
console.log(that.ordergood);
})
},
},
//再来一单
again:function(){
window.event.stopPropagation();
window.location.href = '/index.php?g=&m=template&a=index';
}
})