|
@@ -11,34 +11,27 @@ Page({
|
|
|
navbarData: {
|
|
|
name: '历史记录'
|
|
|
},
|
|
|
+ activeName: 0,
|
|
|
list: [
|
|
|
{
|
|
|
- create_time: '2021-01-01',
|
|
|
- type: '早餐',
|
|
|
- status: '0',
|
|
|
- children: [
|
|
|
- { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' },
|
|
|
- { title: '香辣肉絲' }, { title: '香辣肉絲' },
|
|
|
- ]
|
|
|
+ date: '2021-02-01'
|
|
|
},
|
|
|
{
|
|
|
- create_time: '2021-01-01',
|
|
|
- type: '早餐',
|
|
|
- status: '0',
|
|
|
- children: [
|
|
|
- { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' },
|
|
|
- ]
|
|
|
+ date: '2021-02-01'
|
|
|
},
|
|
|
{
|
|
|
- create_time: '2021-01-01',
|
|
|
- type: '早餐',
|
|
|
- status: '0',
|
|
|
- children: [
|
|
|
- { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' }, { title: '香辣肉絲' },
|
|
|
- ]
|
|
|
+ date: '2021-02-01'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ date: '2021-02-01'
|
|
|
},
|
|
|
]
|
|
|
},
|
|
|
+ onChange(event) {
|
|
|
+ console.log(event);
|
|
|
+ console.log(event.detail);
|
|
|
+ this.setData({ activeName: Number(event.detail) });
|
|
|
+ },
|
|
|
// 返回
|
|
|
back: function () {
|
|
|
wx.switchTab({
|
|
@@ -49,7 +42,24 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
- console.log(options.id);
|
|
|
+ if (!options.openid) {
|
|
|
+ wx.request({
|
|
|
+ url: `${app.globalData.publicUrl}/api/st/dining/order?openid=${'oDiAy5JAhb2ReM-LwmqbTCx5OteA'}`,
|
|
|
+ method: "get",
|
|
|
+ header: { 'x-tenant': app.globalData.tenant },
|
|
|
+ data: {},
|
|
|
+ success: res => {
|
|
|
+ console.log(res);
|
|
|
+ },
|
|
|
+ error: err => {
|
|
|
+ wx.showToast({
|
|
|
+ title: err.msg,
|
|
|
+ icon: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
/**
|