Ver código fonte

预设房间

gemercheung 3 anos atrás
pai
commit
d3ffa9c758

+ 20 - 16
app.wxss

@@ -1,36 +1,39 @@
 /**app.wxss**/
-page{
+page {
   /* padding-bottom: 80rpx; */
 }
 
 .container {
   box-sizing: border-box;
   background-color: #f4f4f4;
-  font-family: PingFangSC-Light,helvetica,'Heiti SC';
-} 
+  font-family: PingFangSC-Light, helvetica, 'Heiti SC';
+}
 
 
-.isIPx{
-  bottom:64rpx!important;
+.isIPx {
+  bottom: 64rpx !important;
 }
 
-.isIPxBottom{
-  padding-bottom:64rpx!important;
+.isIPxBottom {
+  padding-bottom: 64rpx !important;
 }
 
 
-.buttomPart{
-  bottom: 80rpx!important;
+.buttomPart {
+  bottom: 80rpx !important;
 }
 
-view,text,navigator{
+view,
+text,
+navigator {
   box-sizing: border-box;
-  padding:0;
-  margin:0;
+  padding: 0;
+  margin: 0;
 }
 
-view,text{
-  font-family: PingFangSC-Light,helvetica,'Heiti SC';
+view,
+text {
+  font-family: PingFangSC-Light, helvetica, 'Heiti SC';
   /* font-size: 29rpx; */
   color: #131D34;
 }
@@ -42,6 +45,7 @@ button::after {
 .display-none {
   display: none !important;
 }
+
 ::-webkit-scrollbar {
   width: 5px;
   background-color: #f5f5f5;
@@ -51,10 +55,10 @@ button::after {
   background-color: #999;
 }
 
-.theme-font{
+.theme-font {
   color: #0075DC;
 }
 
-.theme-background{
+.theme-background {
   background-color: #0075DC;
 }

+ 47 - 0
component/partyItem/partyItem.js

@@ -0,0 +1,47 @@
+// components/house-item/house-item.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    room: Object
+  },
+  options: {
+    addGlobalClass: true,
+  },
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    gotoWV(e) {
+      let {
+        id,
+        index,
+        roomid
+      } = e.currentTarget.dataset
+      console.log(id)
+      let data = {
+        id: id,
+        index: index,
+        roomId: roomid,
+      }
+      this.triggerEvent('gotoWV', data)
+
+    }
+    // toDetail () {
+    //   getApp().autoSubcrebe && getApp().autoSubcrebe()
+    //   getApp().globalData.lastHouse = this.properties.house
+    //   console.log(this.properties.house)
+    //   wx.navigateTo({
+    //     url: `/pages/detail/detail?house_id=${this.properties.house.house_id}`
+    //   })
+    // }
+  }
+})

+ 3 - 0
component/partyItem/partyItem.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 36 - 0
component/partyItem/partyItem.wxml

@@ -0,0 +1,36 @@
+<view class="tj_listItem" data-id="{{room.brandId}}" data-roomId="{{room.businessId}}" data-index="{{index}}" bindtap="gotoWV">
+  <view class="tj_listItemCover">
+    <image wx:if="{{ room.appListPicUrl && room.appListPicUrl!=''}}" mode="aspectFill" class="coverImage" src="{{room.appListPicUrl}}"></image>
+    <image wx:else mode="aspectFill" class="coverImage" src="../../static/images/icon/pic_bg@2x.png"></image>
+  </view>
+  <view class="tj_listItemMsg">
+    <p class="tj_listItemTitle">
+      {{room.name}}
+    </p>
+    <view class="tj_listItemTip">
+      <text class="tj_listItemTipText"><text class="label">开播时间</text> {{room.businessId}} {{room.effectiveStartTime}} - {{room.effectiveEndTime}}</text>
+    </view>
+
+
+    <!-- <view class="tj_listItemTag">
+			<view class="tagVr">
+				<view class="tagItemIcon">
+					<image class="tagItemIconImage" mode="heightFix" src="../../static/images/icon/vrIcon.png"></image>
+				</view>
+				<view class="tip">
+					房源
+				</view>
+
+			</view>
+			<view class="tagItem">VR看房</view>
+			<view class="tagItem">随时可看</view>
+		</view> -->
+
+    <!-- <text class="totalPrice" wx:if="{{room.type==2}}">{{room.retailPrice}}元/月</text> -->
+
+    <!-- <view class="tj_listItemPrice">
+			<text class="unitPrice">平均{{room.averagePrice}}元/平</text>
+			<text class="totalPrice">{{room.retailPrice}}万</text>
+		</view> -->
+  </view>
+</view>

+ 138 - 0
component/partyItem/partyItem.wxss

@@ -0,0 +1,138 @@
+/* component/roomItem/roomItem.wxss */
+.tj_listItem {
+  display: flex;
+  align-items: flex-start;
+  justify-content: flex-start;
+  padding: 20rpx 0;
+  border-bottom: 2rpx solid #EDEDED;
+  background: #fff;
+}
+
+
+.tj_listItem .tj_listItemCover {
+  /* width: 210rpx;
+  height: 210rpx; */
+  width:  160rpx;
+  height:  160rpx;
+  border-radius: 8px;
+  overflow: hidden;
+}
+
+.tj_listItem .tj_listItemCover .coverImage {
+  /* width: 210rpx;
+  height: 210rpx; */
+  width: 160rpx;
+  height:  160rpx;
+}
+
+.tj_listItemMsg {
+  width: 456rpx;
+  margin-left: 20rpx;
+  /* padding-top: 10rpx;
+  box-sizing: border-box; */
+}
+
+.tj_listItemMsg .tj_listItemTitle {
+  font-size: 28rpx;
+  color: #333;
+  line-height: 40rpx;
+  font-weight: bold;
+  overflow: hidden; 
+  text-overflow: ellipsis; 
+  display: -webkit-box;
+  -webkit-line-clamp: 2; 
+  -webkit-box-orient: vertical;
+}
+
+.tj_listItemMsg .tj_listItemTip {
+  display: flex;
+  align-items: center;
+  height: 28rpx;
+  margin: 10rpx 0 10rpx ;
+ 
+}
+
+.tj_listItemMsg .tj_listItemTip .tj_listItemTipText {
+  font-size: 24rpx;
+  color: #666;
+  overflow: hidden; 
+  text-overflow: ellipsis; 
+  display: -webkit-box;
+  -webkit-line-clamp: 1; 
+  -webkit-box-orient: vertical;
+}
+
+.tj_listItemMsg .tj_listItemTag {
+  display: flex;
+  align-items: center;
+  margin: 14rpx 0 24rpx 0;
+}
+
+.tj_listItemMsg .tj_listItemTag .tagItem {
+  font-size: 20rpx;
+  color: #0075DC;
+  padding: 2rpx 8rpx;
+  background: rgba(0, 117, 220, 0.2);
+  border-radius: 4rpx;
+  margin-right: 8rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 4rpx;
+}
+
+.tj_listItemMsg .tj_listItemTag .tagVr {
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-right: 8rpx;
+  width: 104rpx;
+  height: 32rpx;
+  border: 1px solid #0075DC;
+  box-sizing: border-box;
+  border-radius: 4rpx;
+}
+
+.tj_listItemMsg .tj_listItemTag .tagVr .tagItemIcon {
+  background: #0075DC;
+  width: 52rpx;
+  height: 32rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.tj_listItemMsg .tj_listItemTag .tagVr .tagItemIcon .tagItemIconImage {
+  width: 28rpx;
+  height: 18rpx;
+}
+
+.tj_listItemMsg .tj_listItemTag .tagVr .tip {
+  width: 52rpx;
+  height: 32rpx;
+  color: #0075DC;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  /* padding: 2rpx 8rpx; */
+  background: rgba(0, 117, 220, 0.2);
+  font-size: 20rpx;
+}
+
+.tj_listItemMsg .tj_listItemPrice {
+  display: flex;
+  align-items: center;
+  height: 28rpx;
+  justify-content: space-between;
+}
+
+.tj_listItemMsg .tj_listItemPrice .unitPrice {
+  font-size: 20rpx;
+  color: #666;
+}
+.tj_listItemMsg .tj_listItemPrice  .totalPrice{
+  font-size: 28rpx;
+  color: #0075DC;
+  font-weight: bold;
+}

+ 1 - 1
component/roomItem/roomItem.wxml

@@ -1,4 +1,4 @@
-<view class="tj_listItem" data-id="{{room.id}}" data-index="{{index}}" bindtap="gotoWV">
+<view class="tj_listItem" data-id="{{room.id || room.businessId}}" data-index="{{index}}" bindtap="gotoWV">
 	<view class="tj_listItemCover">
 		<image wx:if="{{ room.appListPicUrl && room.appListPicUrl!=''}}" mode="aspectFill" class="coverImage" src="{{room.appListPicUrl}}"></image>
 		<image wx:else mode="aspectFill" class="coverImage" src="../../static/images/icon/pic_bg@2x.png"></image>

+ 123 - 122
config/api.js

@@ -8,125 +8,126 @@ const API_BASE_URL = remote.requestHost + '/api/';
 
 
 module.exports = {
-  API_BASE_URL,
-  RoomList: API_BASE_URL + 'liveShow/getRoomList', //获取直播间列表
-
-  IndexTypeList: API_BASE_URL + 'brand/brandTypeList', //店铺类型列表
-  IndexList: API_BASE_URL + 'brand/list', //首页商铺列表
-  IndexUrlNewGoods: API_BASE_URL + 'index/newGoods', //新品首发
-  IndexUrlHotGoods: API_BASE_URL + 'index/hotGoods', //热卖商品
-  IndexUrlTopic: API_BASE_URL + 'index/topic', //专题精选
-  IndexUrlBrand: API_BASE_URL + 'index/brand', //品牌制造商
-  IndexUrlCategory: API_BASE_URL + 'index/category', //首页底部的分类及商品列表
-  IndexUrlBanner: API_BASE_URL + 'index/banner', //首页banner
-  IndexUrlChannel: API_BASE_URL + 'index/channel', //banner下的分类
-  CatalogList: API_BASE_URL + 'catalog/index', //分类目录全部分类数据接口
-  CatalogCurrent: API_BASE_URL + 'catalog/current', //分类目录当前分类数据接口
-
-  AuthLoginByWeixin: API_BASE_URL + 'auth/login_by_weixin', //微信登录
-  decryptedPhoneNum: API_BASE_URL + 'auth/decryptedPhoneNum', //获取微信手机号
-
-  SueneCategory: API_BASE_URL + 'goods/getCategoryByScene', //获得分类数据
-
-  GoodsNumCount: API_BASE_URL + 'goods/goodsNumOfBrand', //统计商品总数
-  GoodsCount: API_BASE_URL + 'goods/count', //统计商品总数
-  GoodsList: API_BASE_URL + 'goods/list', //获得商品列表
-  GoodsCategory: API_BASE_URL + 'goods/category', //获得分类数据
-  GoodsDetail: API_BASE_URL + 'goods/detail', //获得商品的详情
-  GoodsHot: API_BASE_URL + 'goods/hot', //人气推荐
-  GoodsRelated: API_BASE_URL + 'goods/related', //商品详情页的关联商品(大家都在看)
-
-  CoupuonInfo: API_BASE_URL + 'coupon/getCouponById', //获取优惠券详情
-  BrandCouponList: API_BASE_URL + 'coupon/getListByBrand', //获取商家的优惠券
-  UNBrandCouponList: API_BASE_URL + 'coupon/getListUnAuth', //未登录获取商家的优惠券
-  CouponUsedList: API_BASE_URL + 'coupon/list', //优惠券可使用列表
-  CouponNoUsedList: API_BASE_URL + 'coupon/getInvalidCoupons', //优惠券不可使用列表
-  CouponExchange: API_BASE_URL + 'coupon/exchange', //领取优惠券
-  // GoodsList: API_BASE_URL + 'goods/list',  //获得商品列表
-  // GoodsCategory: API_BASE_URL + 'goods/category',  //获得分类数据
-  // GoodsDetail: API_BASE_URL + 'goods/detail',  //获得商品的详情
-  // GoodsHot: API_BASE_URL + 'goods/hot',  //人气推荐
-  // GoodsRelated: API_BASE_URL + 'goods/related',  //商品详情页的关联商品(大家都在看)
-
-  BrandList: API_BASE_URL + 'brand/list', //品牌列表
-  BrandDetail: API_BASE_URL + 'brand/detail', //品牌详情
-  BrandDetailByScene: API_BASE_URL + 'brand/getByScene', //品牌详情
-
-  CartList: API_BASE_URL + 'cart/index', //获取购物车的数据
-  CartAdd: API_BASE_URL + 'cart/add', // 添加商品到购物车
-  BuyAdd: API_BASE_URL + 'buy/add', // 直接购买    
-  CartUpdate: API_BASE_URL + 'cart/update', // 更新购物车的商品
-  CartDelete: API_BASE_URL + 'cart/delete', // 删除购物车的商品
-  CartChecked: API_BASE_URL + 'cart/checked', // 选择或取消选择商品
-  CartGoodsCount: API_BASE_URL + 'cart/goodscount', // 获取购物车商品件数
-  CartCheckout: API_BASE_URL + 'cart/checkout', // 下单前信息确认
-
-  OrderCount: API_BASE_URL + 'order/index', // 获取订单数量
-  OrderSubmit: API_BASE_URL + 'order/submit', // 提交订单
-  PayPrepayId: API_BASE_URL + 'pay/prepay', //获取微信统一下单prepay_id
-
-  CollectList: API_BASE_URL + 'collect/list', //收藏列表
-  CollectAddOrDelete: API_BASE_URL + 'collect/addordelete', //添加或取消收藏
-
-  CommentList: API_BASE_URL + 'comment/list', //评论列表
-  CommentCount: API_BASE_URL + 'comment/count', //评论总数
-  CommentPost: API_BASE_URL + 'comment/post', //发表评论
-
-  TopicList: API_BASE_URL + 'topic/list', //专题列表
-  TopicDetail: API_BASE_URL + 'topic/detail', //专题详情
-  TopicRelated: API_BASE_URL + 'topic/related', //相关专题
-
-  SearchIndex: API_BASE_URL + 'search/index', //搜索页面数据
-  SearchHelper: API_BASE_URL + 'search/helper', //搜索帮助
-  SearchClearHistory: API_BASE_URL + 'search/clearhistory', //搜索帮助
-
-  AddressList: API_BASE_URL + 'address/list', //收货地址列表
-  AddressDetail: API_BASE_URL + 'address/detail', //收货地址详情
-  AddressSave: API_BASE_URL + 'address/save', //保存收货地址
-  AddressDelete: API_BASE_URL + 'address/delete', //删除收货地址
-
-  RegionList: API_BASE_URL + 'region/list', //获取区域列表
-
-  OrderList: API_BASE_URL + 'order/list', //订单列表
-  OrderDetail: API_BASE_URL + 'order/detail', //订单详情
-  OrderCancel: API_BASE_URL + 'order/cancelOrder', //取消订单
-  OrderConfirm: API_BASE_URL + 'order/confirmOrder', //确认收货
-
-  FootprintList: API_BASE_URL + 'footprint/list', //足迹列表
-  FootprintDelete: API_BASE_URL + 'footprint/delete', //删除足迹
-
-  HomeBanner: API_BASE_URL + 'slideShow/getSlideList', //首页轮播
-  UploadFile: API_BASE_URL + 'upload/upload', //上传文件
-  UserInfo: API_BASE_URL + 'user/getUerInfo', //获取用户信息
-  UpdateUserInfo: API_BASE_URL + 'user/updateUerInfo', //修改用户信息
-  FeedbackAdd: API_BASE_URL + 'feedback/save', //添加反馈
-  SmsCode: API_BASE_URL + 'user/smscode', //发送短信
-  BindMobile: API_BASE_URL + 'user/bindMobile', //绑定手机
-  Login: API_BASE_URL + 'auth/login', //账号登录
-  Register: API_BASE_URL + 'auth/register', //注册
-  CouponList: API_BASE_URL + 'coupon/list', // 优惠券列表
-  GoodsCouponList: API_BASE_URL + 'coupon/listByGoods', // 商品优惠券列表   
-  OrderQuery: API_BASE_URL + 'pay/query', //微信查询订单状态
-
-  HelpTypeList: API_BASE_URL + 'helpissue/typeList', //查看帮助类型列表
-  HelpIssueList: API_BASE_URL + 'helpissue/issueList', //查看问题列表
-
-  LogisticsDetail: API_BASE_URL + 'logistics/detail', //查看物流详情
-
-  // 统计相关
-  SceneReport: API_BASE_URL + '../app/census/getSceneCensus',
-  GetAdminBrands: API_BASE_URL + 'user/getAdminBrands',
-  AddTalkCount: API_BASE_URL + '../app/census/addGoodsQueryNum',
-  AddGoodsViewCount: API_BASE_URL + 'goods/logDetail',
-
-
-  //统计商家访问次数
-  increaseViewCount: API_BASE_URL + 'brand/increaseViewCount',
-
-  //获取小程序码
-  generateMicroAppCode: API_BASE_URL + 'wechat/generateMicroAppCode',
-
-  // 预设房间管理
-  enterRoom: API_BASE_URL + 'liveRoom/enter',
-  exitRoom: API_BASE_URL + 'liveRoom/exit'
-};
+    API_BASE_URL,
+    RoomList: API_BASE_URL + 'liveShow/getRoomList', //获取直播间列表
+
+    IndexTypeList: API_BASE_URL + 'brand/brandTypeList', //店铺类型列表
+    IndexList: API_BASE_URL + 'brand/list', //首页商铺列表
+    IndexUrlNewGoods: API_BASE_URL + 'index/newGoods', //新品首发
+    IndexUrlHotGoods: API_BASE_URL + 'index/hotGoods', //热卖商品
+    IndexUrlTopic: API_BASE_URL + 'index/topic', //专题精选
+    IndexUrlBrand: API_BASE_URL + 'index/brand', //品牌制造商
+    IndexUrlCategory: API_BASE_URL + 'index/category', //首页底部的分类及商品列表
+    IndexUrlBanner: API_BASE_URL + 'index/banner', //首页banner
+    IndexUrlChannel: API_BASE_URL + 'index/channel', //banner下的分类
+    CatalogList: API_BASE_URL + 'catalog/index',  //分类目录全部分类数据接口
+    CatalogCurrent: API_BASE_URL + 'catalog/current',  //分类目录当前分类数据接口
+
+    AuthLoginByWeixin: API_BASE_URL + 'auth/login_by_weixin', //微信登录
+    decryptedPhoneNum: API_BASE_URL + 'auth/decryptedPhoneNum', //获取微信手机号
+
+    SueneCategory: API_BASE_URL + 'goods/getCategoryByScene',  //获得分类数据
+    
+    GoodsNumCount: API_BASE_URL + 'goods/goodsNumOfBrand',  //统计商品总数
+    GoodsCount: API_BASE_URL + 'goods/count',  //统计商品总数
+    GoodsList: API_BASE_URL + 'goods/list',  //获得商品列表
+    GoodsCategory: API_BASE_URL + 'goods/category',  //获得分类数据
+    GoodsDetail: API_BASE_URL + 'goods/detail',  //获得商品的详情
+    GoodsHot: API_BASE_URL + 'goods/hot',  //人气推荐
+    GoodsRelated: API_BASE_URL + 'goods/related',  //商品详情页的关联商品(大家都在看)
+
+    CoupuonInfo: API_BASE_URL + 'coupon/getCouponById', //获取优惠券详情
+    BrandCouponList: API_BASE_URL + 'coupon/getListByBrand', //获取商家的优惠券
+    UNBrandCouponList: API_BASE_URL + 'coupon/getListUnAuth', //未登录获取商家的优惠券
+    CouponUsedList: API_BASE_URL + 'coupon/list',  //优惠券可使用列表
+    CouponNoUsedList: API_BASE_URL + 'coupon/getInvalidCoupons',  //优惠券不可使用列表
+    CouponExchange: API_BASE_URL +  'coupon/exchange', //领取优惠券
+    // GoodsList: API_BASE_URL + 'goods/list',  //获得商品列表
+    // GoodsCategory: API_BASE_URL + 'goods/category',  //获得分类数据
+    // GoodsDetail: API_BASE_URL + 'goods/detail',  //获得商品的详情
+    // GoodsHot: API_BASE_URL + 'goods/hot',  //人气推荐
+    // GoodsRelated: API_BASE_URL + 'goods/related',  //商品详情页的关联商品(大家都在看)
+
+    BrandList: API_BASE_URL + 'brand/list',  //品牌列表
+    BrandDetail: API_BASE_URL + 'brand/detail',  //品牌详情
+    BrandDetailByScene: API_BASE_URL + 'brand/getByScene',  //品牌详情
+
+    CartList: API_BASE_URL + 'cart/index', //获取购物车的数据
+    CartAdd: API_BASE_URL + 'cart/add', // 添加商品到购物车
+    BuyAdd: API_BASE_URL + 'buy/add', // 直接购买    
+    CartUpdate: API_BASE_URL + 'cart/update', // 更新购物车的商品
+    CartDelete: API_BASE_URL + 'cart/delete', // 删除购物车的商品
+    CartChecked: API_BASE_URL + 'cart/checked', // 选择或取消选择商品
+    CartGoodsCount: API_BASE_URL + 'cart/goodscount', // 获取购物车商品件数
+    CartCheckout: API_BASE_URL + 'cart/checkout', // 下单前信息确认
+
+    OrderCount: API_BASE_URL + 'order/index', // 获取订单数量
+    OrderSubmit: API_BASE_URL + 'order/submit', // 提交订单
+    PayPrepayId: API_BASE_URL + 'pay/prepay', //获取微信统一下单prepay_id
+
+    CollectList: API_BASE_URL + 'collect/list',  //收藏列表
+    CollectAddOrDelete: API_BASE_URL + 'collect/addordelete',  //添加或取消收藏
+
+    CommentList: API_BASE_URL + 'comment/list',  //评论列表
+    CommentCount: API_BASE_URL + 'comment/count',  //评论总数
+    CommentPost: API_BASE_URL + 'comment/post',   //发表评论
+
+    TopicList: API_BASE_URL + 'topic/list',  //专题列表
+    TopicDetail: API_BASE_URL + 'topic/detail',  //专题详情
+    TopicRelated: API_BASE_URL + 'topic/related',  //相关专题
+
+    SearchIndex: API_BASE_URL + 'search/index',  //搜索页面数据
+    SearchHelper: API_BASE_URL + 'search/helper',  //搜索帮助
+    SearchClearHistory: API_BASE_URL + 'search/clearhistory',  //搜索帮助
+
+    AddressList: API_BASE_URL + 'address/list',  //收货地址列表
+    AddressDetail: API_BASE_URL + 'address/detail',  //收货地址详情
+    AddressSave: API_BASE_URL + 'address/save',  //保存收货地址
+    AddressDelete: API_BASE_URL + 'address/delete',  //删除收货地址
+
+    RegionList: API_BASE_URL + 'region/list',  //获取区域列表
+
+    OrderList: API_BASE_URL + 'order/list',  //订单列表
+    OrderDetail: API_BASE_URL + 'order/detail',  //订单详情
+    OrderCancel: API_BASE_URL + 'order/cancelOrder',  //取消订单
+    OrderConfirm: API_BASE_URL + 'order/confirmOrder',  //确认收货
+
+    FootprintList: API_BASE_URL + 'footprint/list',  //足迹列表
+    FootprintDelete: API_BASE_URL + 'footprint/delete',  //删除足迹
+
+    HomeBanner: API_BASE_URL + 'slideShow/getSlideList', //首页轮播
+    UploadFile: API_BASE_URL + 'upload/upload', //上传文件
+    UserInfo: API_BASE_URL + 'user/getUerInfo', //获取用户信息
+    UpdateUserInfo: API_BASE_URL + 'user/updateUerInfo', //修改用户信息
+    FeedbackAdd: API_BASE_URL + 'feedback/save', //添加反馈
+    SmsCode: API_BASE_URL + 'user/smscode', //发送短信
+    BindMobile: API_BASE_URL + 'user/bindMobile', //绑定手机
+    Login: API_BASE_URL + 'auth/login', //账号登录
+    Register: API_BASE_URL + 'auth/register', //注册
+    CouponList: API_BASE_URL + 'coupon/list', // 优惠券列表
+    GoodsCouponList: API_BASE_URL + 'coupon/listByGoods', // 商品优惠券列表   
+    OrderQuery: API_BASE_URL + 'pay/query',//微信查询订单状态
+
+    HelpTypeList: API_BASE_URL + 'helpissue/typeList', //查看帮助类型列表
+    HelpIssueList: API_BASE_URL + 'helpissue/issueList', //查看问题列表
+
+    LogisticsDetail: API_BASE_URL + 'logistics/detail', //查看物流详情
+
+    // 统计相关
+    SceneReport: API_BASE_URL + '../app/census/getSceneCensus',
+    GetAdminBrands: API_BASE_URL + 'user/getAdminBrands',
+    AddTalkCount: API_BASE_URL + '../app/census/addGoodsQueryNum',
+    AddGoodsViewCount: API_BASE_URL + 'goods/logDetail',
+ 
+
+    //统计商家访问次数
+    increaseViewCount: API_BASE_URL + 'brand/increaseViewCount',
+    
+    //获取小程序码
+    generateMicroAppCode: API_BASE_URL + 'wechat/generateMicroAppCode',
+
+    // 预设房间管理
+    roomChatList: API_BASE_URL + 'liveRoom/list',
+    enterRoom: API_BASE_URL + 'liveRoom/enter',
+    exitRoom: API_BASE_URL + 'liveRoom/exit'
+};

+ 188 - 10
pages/roomManger/roomManger.js

@@ -1,66 +1,244 @@
-// pages/roomManger/roomManger.js
+// pages/roomManger/roomManger
+var util = require('./../../utils/util.js');
+var api = require('./../../config/api.js');
+const app = getApp()
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    roomList: [],
+    hasData: true,
+    loading: false,
+    isSearch: false,
+    fetcherData: {
+      type: 32,
+      address: '',
+      page: 1,
+      size: 20,
+      name: '',
+      state: ''
+    }
+  },
+  inputChange(e) {
+    this.setData({
+      'fetcherData.name': e.detail.value,
+    });
+  },
+  search() {
+    if (this.data.fetcherData.name != '') {
+      wx.showLoading({
+        title: '加载中...',
+      });
+      this.setData({
+        isSearch: true
+      })
+      this.searchRoomList()
+    } else {
+      if (this.data.isSearch) {
+        this.setData({
+          isSearch: false
+        })
+        this.searchRoomList()
+      } else {
+        // wx.showToast({
+        //   title: '请输入VR场景名称',
+        //   icon: 'none'
+        // })
+        wx.showLoading({
+          title: '加载中...',
+        });
+        this.setData({
+          isSearch: true
+        })
+        this.searchRoomList()
+      }
+
+
+    }
+
+  },
+  async getRoomList() {
+
+    if (this.data.hasData) {
+      if (!this.data.loading) {
+
+        this.setData({
+          loading: true
+        })
+        wx.showLoading({
+          title: '加载中...',
+        })
+        try {
+          const res = await util.request(api.roomChatList, this.data.fetcherData, 'post', 'application/json')
+          console.log('roomData', res);
+          // debugger
+          if (res.code === 200) {
+            if (res.data.list.length != 0) {
+              this.setData({
+                roomList: this.data.roomList.concat(res.data.list),
+                'fetcherData.page': this.data.fetcherData.page + 1
+              })
+
+            } else {
+              this.setData({
+                hasData: false
+              })
+            }
+          }
+          this.setData({
+            loading: false
+          })
+
+        } catch (error) {
+          this.setData({
+            hasData: false
+          })
+        }
+      }
+
+    } else {
+      console.log('没有更多数据')
+    }
+
+  },
+  reloadData() {
+    this.setData({
+      hasData: true
+    }, () => {
+      this.getRoomList()
+    })
+  },
+  searchRoomList() {
+    if (!this.data.loading) {
+      this.setData({
+        loading: false
+      })
+      this.setData({
+        'fetcherData.page': 1,
+        'fetcherData.size': 100,
+      })
+      util.request(api.roomChatList, this.data.fetcherData).then((res) => {
+        this.setData({
+          loading: false
+        })
+        wx.hideLoading()
+        if (res.errno === 0) {
+          this.setData({
+            roomList: res.data.data,
+          })
+
+        }
+      }).catch(err => {
+        this.setData({
+          loading: false
+        })
+      });
+    }
 
   },
+  gotoWV: function (event) {
+    let {
+      id,
+      roomId
+    } = event.detail
+    const type = this.data.fetcherData.type || 33
+    wx.navigateTo({
+      url: `/pages/webview/index?id=${id}&type=${type}&roomId=${roomId}`,
+    })
+
+
+    util.request(api.increaseViewCount, {
+      brandId: id,
+      type: type
+    }, 'GET').then((res) => {
 
+    });
+
+  },
+  // storeGotoWv(event) {
+  //   let {
+  //     id,
+  //     roomId,
+  //     index
+  //   } = event.detail
+  //   debugger;
+  //   wx.navigateTo({
+  //     url: `/pages/webview/index?id=${id}&type=${this.data.fetcherData.type}&roomId=${roomId}`,
+  //   })
+
+  //   util.request(api.increaseViewCount, {
+  //     brandId: id,
+  //     type: this.data.fetcherData.type
+  //   }, 'GET').then((res) => {
+  //     var num = 'roomList[' + index + '].pvTotalNum'
+  //     this.setData({
+  //       [num]: res.data
+  //     })
+  //   });
+  // },
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad(options) {
+  onLoad: function (options) {
+    getApp().checkNetStatu();
+    console.log(options)
+    this.setData({
+      'fetcherData.type': options.type
+    })
+    this.getRoomList()
 
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
-  onReady() {
+  onReady: function () {
 
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow() {
+  onShow: function () {
 
   },
 
   /**
    * 生命周期函数--监听页面隐藏
    */
-  onHide() {
+  onHide: function () {
 
   },
 
   /**
    * 生命周期函数--监听页面卸载
    */
-  onUnload() {
+  onUnload: function () {
 
   },
 
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */
-  onPullDownRefresh() {
+  onPullDownRefresh: function () {
 
   },
 
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom() {
-
+  onReachBottom: function () {
+    if (!this.data.isSearch) {
+      this.getRoomList()
+    }
   },
 
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage() {
+  onShareAppMessage: function () {
 
   }
 })

+ 5 - 1
pages/roomManger/roomManger.json

@@ -1,3 +1,7 @@
 {
-  "usingComponents": {}
+  "navigationBarTitleText": "我的房间",
+  "enablePullDownRefresh": false,
+  "usingComponents": {
+    "partyItem": "../../component/partyItem/partyItem"
+  }
 }

+ 32 - 1
pages/roomManger/roomManger.wxml

@@ -1,6 +1,37 @@
-<!--pages/roomManger/roomManger.wxml-->
 <view>
+  <!-- <lip-sync /> -->
+  <auth bindlogin="reloadData" />
 
+  <view class="storeContent">
+    <view class="tab-header">
+      <view class="un-start">
+        <text>待开始</text>
+      </view>
+      <view class="has-start"> <text>已开始</text></view>
+    </view>
+    <view class="search-container">
+      <view class="storeSearch">
+        <image src="../../static/images/icon/search@2x.png"></image>
+        <input wx:if="{{fetcherData.type==31}}" bindconfirm="search" bindinput="inputChange" type="text" placeholder="请输入VR场景名称" placeholder-class="placeholderStyle" />
+        <input wx:else bindconfirm="search" bindinput="inputChange" type="text" placeholder="请输入场景名称" placeholder-class="placeholderStyle" />
+      </view>
+      <view class="searchBtn" bindtap="search">搜索</view>
+    </view>
 
 
+  </view>
+  <view style="height: 84rpx;"></view>
+  <view class="result" wx:if="{{roomList.length > 0}}">
+
+    <view>
+      <view wx:for="{{roomList}}" wx:key class="house-list">
+        <partyItem room="{{item}}" index="{{index}}" bindgotoWV="gotoWV"></partyItem>
+      </view>
+    </view>
+  </view>
+
+  <view class="unbrand" wx:else>
+    <image src="/static/images/img_nodata@2x.png"></image>
+    <view class="text">暂无相关数据</view>
+  </view>
 </view>

+ 122 - 1
pages/roomManger/roomManger.wxss

@@ -1 +1,122 @@
-/* pages/roomManger/roomManger.wxss */
+/* miniprogram/pages/tab/tab.wxss */
+/* pages/searchRoom/searchRoom.wxss */
+.storeContent {
+  width: 100%;
+  /* padding: 0  10rpx; */
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: fixed;
+  flex-direction: column;
+  top: 0;
+  left: 0;
+  background: #fff;
+  z-index: 100;
+  padding-bottom: 10rpx;
+}
+
+.tab-header {
+  width: 100%;
+  height: 80rpx;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+
+.un-start,
+.has-start {
+  width: 50%;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+
+.storeSearch {
+  width: 614rpx;
+  height: 64rpx;
+  background: #F6F6F6;
+  border-radius: 32rpx;
+  display: flex;
+  align-items: center;
+  justify-content: flex-start;
+  padding: 0 32rpx;
+  box-sizing: border-box;
+  margin: 10rpx auto 0;
+  position: relative;
+}
+
+.storeSearch image {
+  width: 24rpx;
+  height: 24rpx;
+}
+
+.storeSearch input {
+  font-size: 24rpx;
+  color: #333;
+  margin-left: 4rpx;
+  width: 80%;
+}
+
+.storeSearch .placeholderStyle {
+  font-size: 24rpx;
+  color: #B2B2B2;
+}
+.search-container{
+  display: flex;
+  width: 100%;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+  padding: 0 32rpx;
+}
+.searchBtn {
+  color: #0075DC;
+  font-size: 28rpx;
+  width: 60rpx;
+}
+
+.result {
+  margin-top: 80rpx;
+  padding: 0rpx 32rpx 10rpx 32rpx;
+  box-sizing: border-box;
+}
+
+.storeList {
+  width: 100%;
+  /* padding: 0 32rpx; */
+  box-sizing: border-box;
+  /* display: flex;
+  align-items: center;
+  justify-content: center; */
+  margin-top: 20rpx;
+}
+
+.storeList>view {
+  overflow: hidden;
+  width: 334rpx;
+  float: left;
+}
+
+.storeList>view:nth-of-type(odd) {
+  margin-right: 18rpx;
+}
+
+.unbrand {
+  margin-top: 180rpx;
+  text-align: center;
+}
+
+.unbrand image {
+  display: inline-block;
+  width: 250rpx;
+  height: 274rpx;
+}
+
+.unbrand .text {
+  color: #666C7D;
+  font-size: 30rpx;
+  margin-top: 40rpx;
+}

+ 7 - 6
pages/webview/index.js

@@ -37,16 +37,17 @@ Page({
       const scene = decodeURIComponent(options.scene)
 
       let arr = scene.split('_')
-      this.options.id = arr[0]
-      this.options.type = arr[1]
+      this.options.id = options.id
+      this.options.type = options.type
       this.options.join = "true"
-      this.options.roomId = arr[3]
+      this.options.roomId = options.roomId
       this.options.many = "true"
     }
+    // debugger
     console.log(this.options)
     getApp().checkNetStatu();
 
-
+    
     // setTimeout(() => this.login(), 3000)
     this.setData({
       type: options.type || this.options.type,
@@ -113,7 +114,7 @@ Page({
   // },
   async init() {
     let options = this.options
-    console.log('webview-option',options)
+    console.log('webview-option', options)
 
     let {
       url: base,
@@ -238,7 +239,7 @@ Page({
         }
       }
       this.token = wx.getStorageSync('token')
-      
+
       if (this.socketStop) {
         this.socketStop()
         this.setData({

+ 21 - 10
socket.js

@@ -246,15 +246,26 @@ export default {
 
   async getSocketOptions(sceneId, roomId) {
     //TODO
-    console.log('this.options.id', this.options.id)
-
-    // const res = await util.request(api.enterRoom, {
-    //   brandId: this.options.id
-    // })
-    // debugger;
+    // console.log('this.options.id', this.options.id)
+    debugger;
+    const res = await util.request(api.enterRoom, {
+      businessId: roomId
+    }, 'POST', 'application/json')
+  
+    if (res.code !== 200) {
+      wx.showModal({
+        content: res.error,
+        cancelColor: 'cancelColor',
+        complete: () => {
+          wx.navigateTo({
+            url: '/pages/roomManger/roomManger',
+          })
+        }
+      })
+      return
+    }
 
-    // let room = roomId || (Number(Date.now().toString().slice(4)) + parseInt((Math.random() * 1000)))
-    let room = '147852'
+    const capacities = res.capacities  // 房间限制人数
     let userInfo = await this.getUserInfo()
 
     // console.log('---', userInfo)
@@ -288,10 +299,10 @@ export default {
       nickname: userInfo.nickname,
       voiceStatus: getApp().globalData.voiceProps.noMute ? 0 : 2,
       enableTalk: this.role === 'leader' ? true : undefined,
-      roomId: room,
+      roomId: roomId,
       sceneNumber: sceneId,
       onlineStatus: true,
-      userLimitNum: this.data.peopleCount
+      userLimitNum: capacities
     }
   },
 

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
utils/day.js