订单列表页面
This commit is contained in:
parent
22e26ccbc5
commit
af044d1e4e
@ -54,6 +54,9 @@ Page({
|
|||||||
venuesProjectId : self.data.selectVenuesProject,
|
venuesProjectId : self.data.selectVenuesProject,
|
||||||
bookingItemList : self.data.mySelectItem
|
bookingItemList : self.data.mySelectItem
|
||||||
}
|
}
|
||||||
|
wx.showLoading({
|
||||||
|
title: '请稍等',
|
||||||
|
});
|
||||||
app.restAjax.post(app.restAjax.path('{venueUrl}/app/booking/savebookinginfo',[app.venueUrl]), param, {headers : {token:self.data.token}}, function(code,data){
|
app.restAjax.post(app.restAjax.path('{venueUrl}/app/booking/savebookinginfo',[app.venueUrl]), param, {headers : {token:self.data.token}}, function(code,data){
|
||||||
if(code == 200){
|
if(code == 200){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
@ -67,6 +70,8 @@ Page({
|
|||||||
}
|
}
|
||||||
},function(code,data){
|
},function(code,data){
|
||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
|
},function(){
|
||||||
|
wx.hideLoading();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -283,7 +288,6 @@ Page({
|
|||||||
if(!self.checkPhoneNumber()){
|
if(!self.checkPhoneNumber()){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.log('go');
|
|
||||||
app.restAjax.get(app.restAjax.path('{venueUrl}/api/sms/getverificationcode/' + self.data.phoneNumber, [app.venueUrl]), {}, null,
|
app.restAjax.get(app.restAjax.path('{venueUrl}/api/sms/getverificationcode/' + self.data.phoneNumber, [app.venueUrl]), {}, null,
|
||||||
function (code, data) {
|
function (code, data) {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
@ -309,7 +313,6 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
function (code, data) {
|
function (code, data) {
|
||||||
console.log(data)
|
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: data.msg,
|
title: data.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
@ -104,6 +104,14 @@ Page({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 跳转到我的预订列表
|
||||||
|
*/
|
||||||
|
toMyOrder: function() {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '../order/order',
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转到我的志愿团队页面
|
* 跳转到我的志愿团队页面
|
||||||
*/
|
*/
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="main-title">常用功能</view>
|
<view class="main-title">常用功能</view>
|
||||||
<view class="main-container">
|
<view class="main-container">
|
||||||
|
<view class="main-box" bindtap="toMyOrder">
|
||||||
|
<image src="../../images/my-sign.png"></image>
|
||||||
|
<view class="title">我的预订</view>
|
||||||
|
</view>
|
||||||
<view class="main-box">
|
<view class="main-box">
|
||||||
<image src="../../images/my-sign.png"></image>
|
<image src="../../images/my-sign.png"></image>
|
||||||
<view class="title">我的报名</view>
|
<view class="title">我的报名</view>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
var app = getApp();
|
||||||
// pages/order/order.js
|
// pages/order/order.js
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -5,14 +6,52 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
venueUrl : app.venueUrl,
|
||||||
|
imgRoute : '/route/file/downloadfile/true/',
|
||||||
|
token: '',
|
||||||
|
orderList:[],
|
||||||
|
page: 1,
|
||||||
|
rows: 10,
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
//查询订单列表
|
||||||
|
listOrderList: function() {
|
||||||
|
var self = this;
|
||||||
|
app.dialog.loading('请稍等');
|
||||||
|
app.restAjax.get(app.restAjax.path('{venueUrl}/app/booking/listpagemyticket', [app.venueUrl]),
|
||||||
|
{page: self.data.page,rows: self.data.rows}, {headers:{token : self.data.token}},
|
||||||
|
function (code, data) {
|
||||||
|
data.rows.forEach(element => {
|
||||||
|
element.venuePanorama = element.venuePanorama.split(',')[0]
|
||||||
|
});
|
||||||
|
self.setData({
|
||||||
|
orderList: data.rows,
|
||||||
|
page: data.page,
|
||||||
|
total: data.total
|
||||||
|
});
|
||||||
|
console.log(self.data.orderList);
|
||||||
|
},
|
||||||
|
function (code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
},function(){
|
||||||
|
wx.hideLoading();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'token',
|
||||||
|
success: (result) => {
|
||||||
|
this.setData({
|
||||||
|
token : result.data
|
||||||
|
})
|
||||||
|
this.listOrderList();
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,30 +1,17 @@
|
|||||||
<view class="order">
|
<view class="order">
|
||||||
<view class="order-box">
|
<view class="order-box" wx:for="{{orderList}}" wx:key="inedx">
|
||||||
<view class="order-img">
|
<view class="order-img">
|
||||||
<image src="../../images/center-bg.png"></image>
|
<image src="{{venueUrl}}{{imgRoute}}{{item.venuePanorama}}"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<view class="venue-project">
|
<view class="venue-project">
|
||||||
<view class="venue">场馆场馆场馆场馆</view>
|
<view class="venue">{{item.venuesName}}</view>
|
||||||
<view class="project">篮球</view>
|
<view class="project">{{item.projectName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-text">订单编号:01010101</view>
|
<view class="order-text">订单编号:{{item.serial}}</view>
|
||||||
<view class="order-text">下单时间:2020-01-01</view>
|
<view class="order-text">下单时间:{{item.gmtCreate}}</view>
|
||||||
<view class="price">¥15元</view>
|
<view class="price" wx:if="{{item.price == '0' || item.price == ''}}">¥15元</view>
|
||||||
</view>
|
<view class="price" wx:else>¥{{item.price}}元</view>
|
||||||
</view>
|
|
||||||
<view class="order-box">
|
|
||||||
<view class="order-img">
|
|
||||||
<image src="../../images/center-bg.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="order-info">
|
|
||||||
<view class="venue-project">
|
|
||||||
<view class="venue">场馆场馆场馆场馆</view>
|
|
||||||
<view class="project">篮球</view>
|
|
||||||
</view>
|
|
||||||
<view class="order-text">订单编号:01010101</view>
|
|
||||||
<view class="order-text">下单时间:2020-01-01</view>
|
|
||||||
<view class="price">¥15元</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
Loading…
Reference in New Issue
Block a user