Browse Source

Merge branch 'master' of http://git.jihengcc.cn/liubaiyan/qjd-user-uniapp

zhaoxw 4 năm trước cách đây
mục cha
commit
60f558d264
2 tập tin đã thay đổi với 29 bổ sung16 xóa
  1. 14 11
      pagesGood/pickVideo.vue
  2. 15 5
      pagesGood/shopDetails.vue

+ 14 - 11
pagesGood/pickVideo.vue

@@ -165,18 +165,21 @@
 				const TRTC_EVENT = this.trtcComponent.EVENT;
 				this.timestamp = []; // 初始化事件订阅
 				this.trtcComponent.on(TRTC_EVENT.LOCAL_JOIN, event => {
-					var userId=this.trtcComponent.getRemoteUserList()[0].userID;
-					NET.request(API.getMerchantsMainInfo + userId, {}, 'GET').then(res => {
-						this.setData({
-							head_img:res.data.merchantImg,
-							title:res.data.merchantNickname
-						})
-					}).catch(error => {
-						this.$refs.uTips.show({
-							title: '获取个人信息失败',
-							type: 'warning',
+					if(this.trtcComponent.getRemoteUserList().length>0){
+						var userId=this.trtcComponent.getRemoteUserList()[0].userID;
+						NET.request(API.getMerchantsMainInfo + userId, {}, 'GET').then(res => {
+							this.setData({
+								head_img:res.data.merchantImg,
+								title:res.data.merchantNickname
+							})
+						}).catch(error => {
+							this.$refs.uTips.show({
+								title: '获取个人信息失败',
+								type: 'warning',
+							})
 						})
-					})
+					}
+					
 					console.log('* room LOCAL_JOIN', event); // 进房成功,触发该事件后可以对本地视频和音频进行设置
 
 					if (this.options.localVideo === true || this.options.template === '1v1') {

+ 15 - 5
pagesGood/shopDetails.vue

@@ -19,8 +19,8 @@
 			<u-tabs :list="tabList" :is-scroll="false" :current="tabIndex" @change="changeTabs" font-size="30" active-color="#52A63A"
 			 inactive-color="#666666" :bold="false" height="90" bar-width="80"></u-tabs>
 		</view>
-		<view class="shop-sort" v-show="!tabIndex">
-			<u-dropdown active-color="#52A63A">
+		<view class="shop-sort" :class="dropShow ? 'visibility-drop' : 'hidden-drop'" v-show="!tabIndex">
+			<u-dropdown active-color="#52A63A" @close="dropShow = false" @open="dropShow = true">
 				<u-dropdown-item v-model="goodSort" title="新品" :options="options1" @change="changeSort()"></u-dropdown-item>
 				<u-dropdown-item v-model="goodSort" title="价格" :options="options2" @change="changeSort()"></u-dropdown-item>
 				<u-dropdown-item v-model="goodSort" title="销量" :options="options3" @change="changeSort()"></u-dropdown-item>
@@ -109,6 +109,7 @@
 						value: 5
 					}
 				],
+				dropShow: false,
 				pageIndex1: 1,
 				isOver1: false,
 				allGoodsList: [],
@@ -334,12 +335,21 @@
 			float: left;
 			background-color: #FFFFFF;
 
+			/deep/.u-dropdown__content__mask {
+				visibility: hidden;
+			}
+		}
+
+		.visibility-drop {
 			/deep/.u-dropdown__content {
-				z-index: 100!important;
+				z-index: 100 !important;
 				min-height: 106px;
 			}
-			/deep/.u-dropdown__content__mask {
-				visibility: hidden;
+		}
+
+		.hidden-drop {
+			/deep/.u-dropdown__content {
+				display: none;
 			}
 		}