完善小程序订单功能
This commit is contained in:
@ -219,7 +219,6 @@
|
||||
return {
|
||||
orderId: 0,
|
||||
venueId: 0,
|
||||
roomId: 0,
|
||||
typeId: 1, // 网球场1 篮球场2
|
||||
billPopup: false,
|
||||
showPrice: true,
|
||||
@ -252,11 +251,11 @@
|
||||
},
|
||||
|
||||
onLoad(args) {
|
||||
this.orderId = args.orderId || 0;
|
||||
this.venueId = args.venueId || 0;
|
||||
this.roomId = args.roomId || 0;
|
||||
this.typeId = args.typeId || 1;
|
||||
this.basketballDate = args.date || null;
|
||||
console.log("🚀 ~ args:", args)
|
||||
this.orderId = args.orderId || 0; // 订单ID
|
||||
this.venueId = args.venueId || 0; // 场馆ID
|
||||
this.typeId = args.typeId || 1; // 网球场1 篮球场2
|
||||
this.basketballDate = args.date || null; // 篮球场预约时间
|
||||
console.log("🚀 ~ this.date:", this.date)
|
||||
this.getData();
|
||||
},
|
||||
@ -316,22 +315,23 @@
|
||||
}
|
||||
)
|
||||
|
||||
// 获取场馆包间详情
|
||||
self._post(
|
||||
'ground.ground/groundRoomDetails',
|
||||
{
|
||||
app_id: self.getAppId(),
|
||||
id: self.roomId, // 场馆包间ID
|
||||
},
|
||||
function(res) {
|
||||
console.log("🚀 ~ res:", res)
|
||||
if (res.code) {
|
||||
self.room = res.data.lists;
|
||||
// 篮球场-获取场馆包间详情
|
||||
if (self.roomId) {
|
||||
self._post(
|
||||
'ground.ground/groundRoomDetails',
|
||||
{
|
||||
app_id: self.getAppId(),
|
||||
id: self.roomId, // 场馆包间ID
|
||||
},
|
||||
function(res) {
|
||||
if (res.code) {
|
||||
self.room = res.data.lists;
|
||||
}
|
||||
self.loadding = false;
|
||||
}
|
||||
|
||||
self.loadding = false;
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// 获取订单详情
|
||||
self._post(
|
||||
@ -341,7 +341,6 @@
|
||||
order_id: self.orderId, // 场馆包间ID
|
||||
},
|
||||
function(res) {
|
||||
console.log("🚀 ~ res:", res)
|
||||
if (res.code) {
|
||||
self.order = res.data.lists;
|
||||
self.countSelectedTime = self.order.hours
|
||||
@ -366,7 +365,7 @@
|
||||
'ground.ground/countPrice',
|
||||
{
|
||||
app_id: self.getAppId(),
|
||||
room_id: self.roomId,
|
||||
room_id: self.venueId,
|
||||
nums: self.countSelectedTime,
|
||||
type_id: self.typeId,
|
||||
pay_type: self.payType
|
||||
|
||||
@ -304,8 +304,8 @@ export default {
|
||||
{
|
||||
app_id: self.getAppId(),
|
||||
id: self.id,
|
||||
latitude: uni.getStorageSync('latitude') || '',
|
||||
longitude: uni.getStorageSync('longitude') || '',
|
||||
latitude: uni.getStorageSync('latitude') || 0,
|
||||
longitude: uni.getStorageSync('longitude') || 0,
|
||||
},
|
||||
function (res) {
|
||||
if (res.code) {
|
||||
|
||||
Reference in New Issue
Block a user