Parcourir la source

feat:提交修改

jinx il y a 4 ans
Parent
commit
c644d895c9

+ 1 - 1
app.json

@@ -90,7 +90,7 @@
         "pagePath": "pages/store/store",
         "iconPath": "static/images/icon/merchants_normal@2x.png",
         "selectedIconPath": "static/images/icon/merchants_selected@2x.png",
-        "text": "商家"
+        "text": "VR广场"
       },
       {
         "pagePath": "pages/ucenter/index/index",

+ 1 - 0
component/auth/api.js

@@ -10,6 +10,7 @@ export const getSubOpen = () => {
     withSubscriptions: true,
     success: res => {
       let itemSettings = res.subscriptionsSetting
+    
       if (!itemSettings || !itemSettings[tempId] || itemSettings[tempId] === 'reject') {
         wx.showModal({
           title: '温馨提示',

+ 34 - 36
component/roomItem/roomItem.wxml

@@ -1,48 +1,46 @@
 <view class="tj_listItem" data-id="{{room.id}}" data-index="{{index}}" bindtap="gotoWV">
-				<view class="tj_listItemCover">
-					<image mode="aspectFill" class="coverImage"
-						src="{{room.appListPicUrl}}"></image>
-				</view>
-				<view class="tj_listItemMsg">
-					<p class="tj_listItemTitle">
-					{{room.name}}
-					</p>
-					<view class="tj_listItemTip">
-						<view>
-							<text class="tj_listItemTipText">{{room.address}}</text>
-							<!-- <text> | </text> -->
-						</view>
-						<!-- <view>
+	<view class="tj_listItemCover">
+		<image wx:if="{{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">
+			<view>
+				<text class="tj_listItemTipText">{{room.address}}</text>
+				<!-- <text> | </text> -->
+			</view>
+			<!-- <view>
 							<text>唐家湾镇</text>
 							<text> | </text>
 						</view>
 						<view>
 							<text>格力海岸</text>
 						</view> -->
-					</view>
+		</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>
-
+		<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 class="tj_listItemPrice">
-							<text class="unitPrice">平均{{room.averagePrice}}元/平</text>
-							<!-- <text class="totalPrice" wx:if="{{room.type==2}}">{{room.retailPrice}}元/月</text> -->
-							<text class="totalPrice">{{room.retailPrice}}万</text>
+			</view>
+			<view class="tagItem">VR看房</view>
+			<view class="tagItem">随时可看</view>
+		</view>
 
+			<!-- <text class="totalPrice" wx:if="{{room.type==2}}">{{room.retailPrice}}元/月</text> -->
 
-					</view>
-				</view>
-			</view>
+		<!-- <view class="tj_listItemPrice">
+			<text class="unitPrice">平均{{room.averagePrice}}元/平</text>
+			<text class="totalPrice">{{room.retailPrice}}万</text>
+		</view> -->
+	</view>
+</view>

+ 2 - 2
component/roomItem/roomItem.wxss

@@ -29,7 +29,7 @@
 .tj_listItemMsg .tj_listItemTitle {
   font-size: 28rpx;
   color: #333;
-  line-height: 30rpx;
+  line-height: 40rpx;
   font-weight: bold;
   overflow: hidden; 
   text-overflow: ellipsis; 
@@ -42,7 +42,7 @@
   display: flex;
   align-items: center;
   height: 28rpx;
-  margin: 5rpx 0 ;
+  margin: 15rpx 0 10rpx ;
 }
 
 .tj_listItemMsg .tj_listItemTip .tj_listItemTipText {

+ 3 - 2
component/storeItem/storeItem.wxml

@@ -1,8 +1,9 @@
 <!--component/storeItem/storeItem.wxml-->
 <view class="storeBox" data-id="{{storeItem.id}}" data-index="{{index}}" bindtap="gotoWV">
   <view class="storeCover">
-    <image mode="aspectFill"
-      src="{{storeItem.appListPicUrl}}"></image>
+    <image wx:if="{{room.appListPicUrl!=''}}" mode="aspectFill" src="{{storeItem.appListPicUrl}}"></image>
+    <image wx:else mode="aspectFill" class="coverImage" src="../../static/images/icon/pic_bg@2x.png"></image>
+
   </view>
   <view class="storeTitle">
     {{storeItem.name}}

+ 9 - 7
config.js

@@ -6,18 +6,20 @@ const dev = {
   // viewHost: 'http://192.168.0.112:8081',
   // 发现地址
   env: 'pro',
-  viewChildHost: 'https://www.4dkankan.com',
-  viewHost: 'https://www.4dkankan.com'
+  // viewChildHost: 'https://www.4dkankan.com',
+  // viewHost: 'https://www.4dkankan.com'
+  viewChildHost: 'https://zfb.4dkankan.com',
+  viewHost: 'https://zfb.4dkankan.com'
 }
-
+//目前没有区分正式服测试服
 const mal = {
   env: 'pro',
   socketHost: 'wss://shop.4dkankan.com',
-  requestHost: 'https://zhifangbao.4dage.com',
-  viewHost: 'https://www.4dkankan.com',
-  viewChildHost: 'https://www.4dkankan.com'
+  requestHost: 'https://plaza.4dkankan.com',
+  viewChildHost: 'https://zfb.4dkankan.com',
+  viewHost: 'https://zfb.4dkankan.com'
 }
 
 
-export default dev
+export default mal
 // export default mal

+ 9 - 5
pages/index/index.js

@@ -35,27 +35,27 @@ Router({
       },
       {
         type: 4,
-        title: '社区',
+        title: '装修',
         icon: "../../static/images/icon/community@2x.png",
       },
     ],
     type: '',
     middleType: 11,
     // type :-1:所有;0:新房;1:二手房;2:公寓;3:民宿;4:社区
-    // 11:新上房源;12:热门房源;13:热门企业;
+    // 11:热门房源:热门装修;13:热门企业;
     // 21:商家列表;
     // 31:VR场景;32:VR直播间
     middleTabList: [{
         type: 11,
-        title: '新上房源'
+        title: '热门房源'
       },
       {
         type: 12,
-        title: '热门房源'
+        title: '热门装修'
       },
       {
         type: 13,
-        title: '热门企业'
+        title: '热门商家'
       },
     ],
     middleList: {},
@@ -73,6 +73,10 @@ Router({
         type: 2,
         title: '公寓'
       },
+      {
+        type: 4,
+        title: '装修'
+      },
     ],
     roomType: 0,
     roomList: [],

+ 1 - 1
pages/index/index.wxml

@@ -12,7 +12,7 @@
 
 					</view>
 
-					<input disabled="true" placeholder='请输入VR场景名称' data-type="-1" bindtap="toSearch" placeholder-class='none'
+					<input disabled="true" placeholder='请输入直播间名称' data-type="-1" bindtap="toSearch" placeholder-class='none'
 						placeholder-style='color:#b3b3b3;font-size:22rpx;'></input>
 				</view>
 			</view>

+ 2 - 2
pages/index/index.wxss

@@ -343,7 +343,7 @@
 .tj_listItemMsg .tj_listItemTitle {
   font-size: 28rpx;
   color: #333;
-  line-height: 30rpx;
+  line-height: 40rpx;
   font-weight: bold;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -356,7 +356,7 @@
   display: flex;
   align-items: center;
   height: 28rpx;
-  margin: 5rpx 0;
+  margin: 15rpx 0 10rpx;
 }
 
 .tj_listItemMsg .tj_listItemTip text {

+ 1 - 1
pages/searchRoom/searchRoom.js

@@ -26,7 +26,7 @@ Page({
       1: '二手房',
       2: '公寓',
       3: '民宿',
-      4: '社区'
+      4: '装修'
     },
 
   },

+ 1 - 1
pages/searchRoom/searchRoom.wxml

@@ -2,7 +2,7 @@
   <view class="storeContent">
     <view class="storeSearch">
       <image src="../../static/images/icon/search@2x.png"></image>
-      <input focus="true" bindinput="inputChange" value="{{fetcherData.name}}" type="text" placeholder="请输入VR场景名称"
+      <input focus="true" bindinput="inputChange" value="{{fetcherData.name}}" type="text" placeholder="请输入直播间名称"
         placeholder-class="placeholderStyle" />
     </view>
     <view class="searchBtn" bindtap="search">搜索</view>

+ 29 - 5
pages/sence/sence.js

@@ -35,10 +35,18 @@ Page({
       })
       this.searchRoomList()
     } else {
-      wx.showToast({
-        title: '请输入VR场景名称',
-        icon: 'none'
-      })
+      if(this.data.isSearch){
+        this.setData({
+          isSearch: false
+        })
+        this.searchRoomList()
+      }else{
+        wx.showToast({
+          title: '请输入VR场景名称',
+          icon: 'none'
+        })
+      }
+     
 
     }
 
@@ -129,6 +137,22 @@ Page({
     }, 'GET').then((res) => {
       
     });
+     
+  
+  },
+  storeGotoWv(event){
+    let {id,index} = event.detail
+    wx.navigateTo({
+      url: `/pages/webview/index?id=${id}`,
+    })
+    util.request(api.increaseViewCount, {
+      brandId: id
+    }, 'GET').then((res) => {
+        var num =  'roomList['+index+'].pvTotalNum'
+        this.setData({
+          [num]:res.data
+        })
+    });
   },
   /**
    * 生命周期函数--监听页面加载
@@ -146,7 +170,7 @@ Page({
 
     } else {
       wx.setNavigationBarTitle({
-        title: 'VR场景直播间'
+        title: '直播间'
       })
     }
     this.getRoomList()

+ 2 - 1
pages/sence/sence.json

@@ -2,7 +2,8 @@
   "navigationBarTitleText": "VR场景",
   "enablePullDownRefresh": false,
   "usingComponents": {
-    "roomItem": "../../component/roomItem/roomItem"
+    "roomItem": "../../component/roomItem/roomItem",
+    "storeItem": "../../component/storeItem/storeItem"
   }
   
 }

+ 17 - 4
pages/sence/sence.wxml

@@ -4,14 +4,27 @@
   <view class="storeContent">
     <view class="storeSearch">
       <image src="../../static/images/icon/search@2x.png"></image>
-      <input bindinput="inputChange" type="text" placeholder="请输入VR场景名称" placeholder-class="placeholderStyle" />
+      <input wx:if="{{fetcherData.type==31}}" bindinput="inputChange" type="text" placeholder="请输入VR场景名称"
+        placeholder-class="placeholderStyle" />
+      <input wx:else bindinput="inputChange" type="text" placeholder="请输入直播间名称" placeholder-class="placeholderStyle" />
     </view>
-    <view class="searchBtn"  bindtap="search">搜索</view>
+    <view class="searchBtn" bindtap="search">搜索</view>
   </view>
   <view style="height: 84rpx;"></view>
   <view class="resulst" wx:if="{{roomList.length>0}}">
-    <view wx:for="{{roomList}}" wx:key class="house-list">
-      <roomItem room="{{item}}" bindgotoWV="gotoWV"></roomItem>
+
+
+    <view class="storeList" wx:if="{{fetcherData.type==31}}">
+      <view wx:for="{{roomList}}" wx:for-index="index">
+        <storeItem store="{{item}}" index="{{index}}" bindgotoWV="storeGotoWv">
+        </storeItem>
+
+      </view>
+    </view>
+    <view wx:else>
+      <view wx:for="{{roomList}}" wx:key class="house-list">
+        <roomItem room="{{item}}" index="{{index}}" bindgotoWV="gotoWV"></roomItem>
+      </view>
     </view>
   </view>
 

+ 18 - 0
pages/sence/sence.wxss

@@ -48,7 +48,25 @@
   padding: 0rpx 32rpx 10rpx;
   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;

+ 1 - 1
pages/store/store.json

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "商家",
+  "navigationBarTitleText": "VR广场",
   "usingComponents": {
     "storeItem": "../../component/storeItem/storeItem"
   }

+ 1 - 1
pages/ucenter/index/index.js

@@ -79,7 +79,7 @@ Page({
           {
             icon: 'vr_live@2x',
             url: '/pages/sence/sence',
-            name: 'VR场景直播间',
+            name: '直播间',
             type: 32
           }
         ],

+ 38 - 28
socket.js

@@ -37,6 +37,8 @@ let urlToJson = (url = window.location.href) => { // 箭头函数默认传值为
 
 export default {
   joinUrl() {
+    console.log('***************************')
+    console.log(this.data.url)
     let options = {
       API_BASE_URL: api.API_BASE_URL,
       "url": this.data.url,
@@ -64,7 +66,7 @@ export default {
       sponsor = false
     }
 
-    let base = remote.viewHost + '/shop-container/fashilong.html?env='+remote.env+'&sponsor=' + sponsor + '&many=' + this.data.many
+    let base = remote.viewHost + '/shop-container/fashilong.html?env=' + remote.env + '&sponsor=' + sponsor + '&many=' + this.data.many
     // let base = remote.viewHost + '/shop.html'
 
     this.data.reload = false
@@ -89,12 +91,14 @@ export default {
       isIos,
       showComtypesAllTab: false
     })
-    
+
 
     if (this.socketSendMessage) {
       this.pauseVideo = false
       this.joinUrl()
-      this.socketSendMessage('changeOnlineStatus', { status: true  })
+      this.socketSendMessage('changeOnlineStatus', {
+        status: true
+      })
     }
   },
 
@@ -234,18 +238,18 @@ export default {
     // })
 
 
-    
+
     this.role !== 'leader'
     let roomType
     if ((!this.data.canShow && !this.data.join) || (this.data.join && !this.options.join)) {
-        roomType = '1v1'
+      roomType = '1v1'
     }
     return {
       role: this.role || 'leader',
       userId: userInfo.userId,
       roomType,
       avatar: userInfo.avatarUrl,
-      nickname:  userInfo.nickname,
+      nickname: userInfo.nickname,
       voiceStatus: getApp().globalData.voiceProps.noMute ? 0 : 2,
       enableTalk: this.role === 'leader' ? true : undefined,
       roomId: room,
@@ -299,7 +303,9 @@ export default {
       this.socketSendMessage('changeVoiceStatus', {
         status: noMute ? 0 : 2
       })
-      this.socketSendMessage('changeOnlineStatus', { status: true  })
+      this.socketSendMessage('changeOnlineStatus', {
+        status: true
+      })
     })
     socket.on('reconnect_failed', () => this.setData({
       socketStatus: -1
@@ -397,8 +403,8 @@ export default {
   },
 
   getUrl(url, socketOptions, isJoin) {
-    url += '&room_id=' + socketOptions.roomId + '&user_id=' + socketOptions.userId +'origin=fashilong'
-    
+    url += '&room_id=' + socketOptions.roomId + '&user_id=' + socketOptions.userId + '&origin=fashilong'
+
 
     if (isJoin) {
       url += '&role=' + this.role + '&shopping'
@@ -407,7 +413,7 @@ export default {
     }
 
     console.error(url)
-      console.log(isJoin)
+    console.log(isJoin)
     return url
   },
 
@@ -438,7 +444,7 @@ export default {
     if (!data) return;
 
     this.setData({
-      surplus: this.data.peopleCount -  data.roomsPerson.length
+      surplus: this.data.peopleCount - data.roomsPerson.length
     })
     if (!this.isAuthorizeRecord) {
       const voiceStatus = Number(await this.authorizeRecord())
@@ -504,7 +510,7 @@ export default {
       })
       return;
     }
-    
+
     this.role = this.data.canShow ? 'leader' : 'customer'
     let options = await this.getSocketOptions(this.mcode)
 
@@ -517,7 +523,7 @@ export default {
       this.wssSuccess = false
       this.socketStop && this.socketStop()
       this.data.many = !!this.data.canShow
-      
+
       this.setData({
         peopleCount: this.data.many ? manyCount : 5
       })
@@ -534,9 +540,11 @@ export default {
         socketOptions,
       })
       this.joinUrl()
-      
 
-      this.setData({ socketOptions })
+
+      this.setData({
+        socketOptions
+      })
       this.loadConponSuccess = true
       this.readySendCouponCtrl()
     }, 300)
@@ -579,8 +587,8 @@ export default {
 
   async mic() {
     let noMute = getApp().globalData.voiceProps.noMute
-    
-    
+
+
     // noMute true 静音
     // enableTalk false 静音
     // if (!!getApp().globalData.voiceProps.force === !!noMute) 
@@ -636,7 +644,7 @@ export default {
       this.setData({
         sendShare: false
       })
-      
+
       return {
         title: '【好友推荐】一起来云逛吧',
         imageUrl: newPicUrl,
@@ -678,9 +686,9 @@ export default {
 
     console.log(`/pages/shared/shared?img_url=${btoa(img_url)}&shareImg=${btoa(shareImg)}&companyName=${companyName}&vrLink=${btoa(vrLink)}&id=${this.data.id}`);
 
-  wx.navigateTo({
-    url: `/pages/shared/shared?img_url=${btoa(img_url)}&shareImg=${btoa(shareImg)}&companyName=${companyName}&vrLink=${btoa(vrLink)}&id=${this.data.id}`,
-  })
+    wx.navigateTo({
+      url: `/pages/shared/shared?img_url=${btoa(img_url)}&shareImg=${btoa(shareImg)}&companyName=${companyName}&vrLink=${btoa(vrLink)}&id=${this.data.id}`,
+    })
   },
 
 
@@ -869,11 +877,11 @@ export default {
     this.readySendCouponCtrl()
   },
   readySendCouponCtrl() {
-    
+
 
     if (this.wssSuccess && this.loadConponSuccess) {
       this.loadConponSuccess = false
-      
+
       this.socketSendMessage('clientSyncAction', {
         type: 'showCoupon',
         data: this.data.coupons.length > 0
@@ -1016,7 +1024,7 @@ export default {
           sceneNum: res.data.brand.sceneNum,
           canShow: res.data.brand.canShow,
           contractPhone: res.data.brand.contractPhone
-          
+
         })
         if (this.data.many === void 0) {
           this.data.many = !!res.data.brand.canShow
@@ -1024,10 +1032,10 @@ export default {
         this.setData({
           peopleCount: this.data.many ? manyCount : 5,
         })
-      
+
         if (!res.data.brand.canShow) {
           this.role = 'customer'
-        } else if (!this.options.join){
+        } else if (!this.options.join) {
           this.role = 'leader'
         }
         cb(url, urlToJson(url).m, )
@@ -1073,8 +1081,10 @@ export default {
   },
 
   onHide() {
-    this.socketSendMessage('changeOnlineStatus', { status: false  })
-    
+    this.socketSendMessage('changeOnlineStatus', {
+      status: false
+    })
+
     this.pauseVideo = true
     this.joinUrl()
   }

BIN
static/images/icon/community@2x.png


BIN
static/images/icon/merchants_normal@2x.png


BIN
static/images/icon/merchants_selected@2x.png


BIN
static/images/icon/pic_bg@2x.png