gemercheung 3 năm trước cách đây
mục cha
commit
1c6e30e49b

+ 4 - 0
component/slider-left/index.js

@@ -25,6 +25,10 @@ exports.default = Component({
       type: Number,
       value: 90
     },
+    butText:{
+      type: String,
+      value: '关闭房间'
+    },
     // 菜单是否打开了,true表示打开,false表示关闭
     open: {
       type: Boolean,

+ 1 - 1
component/slider-left/index.wxml

@@ -16,6 +16,6 @@
     <view
       bind:tap="handleDelete"
       style="width:{{ openWidth }}px"
-      class='handle-delete'>关闭房间</view>
+      class='handle-delete'>{{butText}}</view>
   </view>
 </movable-area>

+ 1 - 0
config/api.js

@@ -130,6 +130,7 @@ module.exports = {
     createOrUpdate: API_BASE_URL + 'liveRoom/createOrUpdate',
     listRooms: API_BASE_URL + 'liveRoom/listRooms',
     deleteRoom: API_BASE_URL + 'liveRoom/delete',
+    // exitRoom: API_BASE_URL + 'liveRoom/exit',
     getAssistants: API_BASE_URL + 'liveRoom/getAssistants',
     
     // 预设房间管理

+ 3 - 1
pages/roomManger/roomManger.wxml

@@ -22,7 +22,8 @@
 
 
   </view>
-  <view class="addRoom" wx:if="{{canShow}}" bindtap="addRoom">+
+  <view class="addRoom" wx:if="{{canShow}}" bindtap="addRoom">
+      <image class="addImg" src="../../static/images/add.png"></image>
   </view>
   <view class="result" wx:if="{{roomList.length > 0}}">
 
@@ -44,6 +45,7 @@
         </view> <view class='slider-handle'>{{todoItem.text}}</view>-->
         <swider-left class="swider-item moveView " wx:for="{{roomList}}" wx:for-item="item" wx:key="item.businessId"
         open="{{item.isOpen}}"
+        butText="{{fetcherData.state == 102?'删除房间':'关闭房间'}}"
         data-id="{{item.businessId}}"
         bind:sliderLeftStart="handleSliderLeftStart"
         bind:change="handleChange"

+ 6 - 1
pages/roomManger/roomManger.wxss

@@ -107,8 +107,13 @@
   font-size: 80rpx;
   color: #fff;
   z-index:10;
+  content:'\002B';
+}
+.addImg{
+  width: 60rpx;
+  height: 60rpx;
+  margin:20rpx;
 }
-
 .storeList {
   width: 100%;
   /* padding: 0 32rpx; */

BIN
static/images/add.png