mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-08-08 17:32:41 +08:00
描述:预约服务添加免费服务
This commit is contained in:
parent
c14c711f74
commit
1e94ed36c6
@ -41,14 +41,25 @@ Page({
|
||||
if (!(_this.data.serviceList && _this.data.serviceList.length > 0)) {
|
||||
// 查询服务列表
|
||||
getMeetingRoomServiceAndEquipmentRq(_this.data.meetingRoomId).then(res => {
|
||||
let serviceList = res.data.roomFServe.map(item => {
|
||||
let incrementServiceList = res.data.roomFServe.map(item => {
|
||||
return {
|
||||
serveId: item.id,
|
||||
serveName: item.serveName,
|
||||
isSelect: false,
|
||||
num: '',
|
||||
type: 'increment'
|
||||
}
|
||||
})
|
||||
let freeServiceList = res.data.roomFreeServe.map(item => {
|
||||
return {
|
||||
serveId: item.id,
|
||||
serveName: item.serveName,
|
||||
isSelect: false,
|
||||
num: '',
|
||||
type: 'free'
|
||||
}
|
||||
})
|
||||
let serviceList = incrementServiceList.concat(freeServiceList)
|
||||
_this.setData({
|
||||
serviceList
|
||||
})
|
||||
|
@ -1,10 +1,22 @@
|
||||
<view class="containerView public">
|
||||
|
||||
<!-- 免费服务 -->
|
||||
<view class="serviceView">
|
||||
<view class="leftLineTitle">免费服务</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="serviceItem" wx:if="{{item.type == 'free'}}" wx:for="{{serviceList}}" wx:key="*this">
|
||||
<van-checkbox value="{{ item.isSelect }}" data-id="{{item.serveId}}" shape="square" bind:tap="checkBoxClick"></van-checkbox>
|
||||
<view class="name" data-id="{{item.serveId}}" bind:tap="checkBoxClick">{{item.serveName}}</view>
|
||||
<van-field style="width: 10rpx; visibility: hidden;" data-id="{{item.serveId}}" value="{{ item.num }}" type="number" clearable placeholder="请输入人数" border="{{ false }}" bind:change="inputChange" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 增值服务 -->
|
||||
<view class="serviceView">
|
||||
<view class="leftLineTitle">增值服务</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="serviceItem" wx:for="{{serviceList}}" wx:key="*this">
|
||||
<view class="serviceItem" wx:if="{{item.type == 'increment'}}" wx:for="{{serviceList}}" wx:key="*this">
|
||||
<van-checkbox value="{{ item.isSelect }}" data-id="{{item.serveId}}" shape="square" bind:tap="checkBoxClick"></van-checkbox>
|
||||
<view class="name" data-id="{{item.serveId}}" bind:tap="checkBoxClick">{{item.serveName}}</view>
|
||||
<van-field style="width: 10rpx; visibility: hidden;" data-id="{{item.serveId}}" value="{{ item.num }}" type="number" clearable placeholder="请输入人数" border="{{ false }}" bind:change="inputChange" />
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
.serviceView {
|
||||
margin-top: 40rpx;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.serviceView .leftLineTitle {
|
||||
|
Loading…
x
Reference in New Issue
Block a user