0、知识点
- 提交订单 Api 接口
- .提交订单成功跳转到成功页面
1、提交订单 Api 接口
- 请求方式:post
- 地址:域名/api/doPay
- 实际地址:http://a.itying.com/api/doPay
- 传递参数说明:
- 参数 说明 备注
Order.vue
- 订单支付代码
doPay(){
var that=this;
var uid=storage.get('roomid');
var api=this.api+'api/doPay';
this.$http.post(api,{
uid,
total_price:that.list.total_price,
order_id:that.list.order_id,
return_url:'http://localhost:8080/#/success'
}).then((response)=>{
console.log(response);
location.href=response.body.result.data;
},(err)=>{
console.log(err);
})
}