getTimeAreaList: function (effectTime) {
const self = this;
const orderInfo = app.globalData.orderInfo;
const orderType = app.globalData.orderType;
wx.request({
url: app.globalData.url + "getTimeAreaList",
method: 'GET',
data: {
deptId: orderInfo.deptId,
vaccineType: orderInfo.vaccineType,
effectTime: effectTime,
orderType: orderType
},
header: {
'Content-Type': 'application/json'
},
success: function (res) {
if (res.data.success) {
let am_time_area = [];
let pm_time_area = [];
const list = res.data.data;
for (var i in list) {
list[i].startTime = util.getHHMM(list[i].startTime);
list[i].endTime = util.getHHMM(list[i].endTime);
if (list[i].timeAreaType === "0") {
am_time_area.push(list[i]);
} else {
pm_time_area.push(list[i]);
}
}
self.setData({
am_time_area: am_time_area,
pm_time_area: pm_time_area
})
}
}
});
},
<view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}">view>
<view animation="{{animationData}}" class="commodity_attr_box" wx:if="{{showModalStatus}}">
<view class='nav'>
<view class='default' bindtap='selectAm'>view>
<view class='{{showAmList?"active":"default"}}' bindtap='selectAm'>上午view>
<view class='default' bindtap='selectAm'>view>
<view class='default' bindtap='selectPm'>view>
<view class='{{!showAmList?"active":"default"}}' bindtap='selectPm'>下午view>
<view class='default' bindtap='selectPm'>view>
view>
<view class='time-area-list' hidden='{{!showAmList}}'>
<view class='time-area {{item.quantity>item.occupyQuantity?"":"time-area-full"}} {{item.appointConfigId === activeTimeArea.appointConfigId?"time-area-active":""}}' wx:for="{{am_time_area}}" wx:for-item="item" bindtap='selectTimeArea' data-time-area="{{item}}">
<view class='order-time'>{{item.startTime+"-"+item.endTime}}view>
<view class='order-num'>剩余
<text class='order-count'>{{item.quantity-item.occupyQuantity>=0?item.quantity-item.occupyQuantity:0}}text> 人view>
view>
view>
<view class='time-area-list' hidden='{{showAmList}}'>
<view class='time-area {{item.quantity>item.occupyQuantity?"":"time-area-full"}} {{item.appointConfigId === activeTimeArea.appointConfigId?"time-area-active":""}}' wx:for="{{pm_time_area}}" wx:for-item="item" bindtap='selectTimeArea' data-time-area="{{item}}">
<view class='order-time'>{{item.startTime+"-"+item.endTime}}view>
<view class='order-num'>剩余
<text class='order-count'>{{item.quantity-item.occupyQuantity>=0?item.quantity-item.occupyQuantity:0}}text> 人view>
view>
view>
<view class='confirm' bindtap='confirm'>确认view>
view>
你好,调试下线上小程序看看:
1. 使用wx.setEnableDebug(Object object)开启调试开关 https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/wx.setEnableDebug.html
2. 在正式版打开调试还有一种方法,就是先在开发版或体验版打开调试,再切到正式版就能看到vConsole。