فهرست منبع

积分兑换详情页可能出现首次进入不显示问题

yfape 2 سال پیش
والد
کامیت
d8a946da52
3فایلهای تغییر یافته به همراه28 افزوده شده و 21 حذف شده
  1. 7 2
      pages/goods/goods-detail/index.vue
  2. 18 16
      pages/index/active-detail/index.vue
  3. 3 3
      setting.js

+ 7 - 2
pages/goods/goods-detail/index.vue

xqd xqd
@@ -390,7 +390,7 @@
 			},
 			//视频自动播放
 			openVideoPlay() {
-				this.videoContext.play()
+				this.videoContext && this.videoContext.play()
 			},
 			// 获取商品详情
 			getProductDetail(product_id, init = false) {
@@ -432,9 +432,14 @@
 						this.video_url = res.data.video_url
 						//视频自动播放
 						new Promise((resolve,reject)=>{
-							this.openVideoPlay()
+							try{
+								this.openVideoPlay()
+							}catch(err){
+								reject(false)
+							}
 							resolve(true)
 						}) 
+						
 					}else{
 						uni.showToast({
 							icon: 'error',

+ 18 - 16
pages/index/active-detail/index.vue

xqd xqd
@@ -70,15 +70,15 @@
 			</view>
 
 			<!-- 地区分类 -->
-			<view class="tab_area" v-if="isActive==0">
-				<view class="areaTitle" v-for="(item,index) in areaList" :key="index"
-					@click="checkedArea(index,item.id)">
-					<view class="areaTitle-item" :class="{'active-area':isActiveArea === index}">
-						<view>
-							{{item.name}}
-						</view>
+			<view class="tab_area" v-if="isActive==0">
+					<view class="areaTitle" v-for="(item,index) in areaList" :key="index"
+						@click="checkedArea(index,item.id)">
+						<view class="areaTitle-item" :class="{'active-area':isActiveArea === index}">
+							<view>
+								{{item.name}}
+							</view>
+						</view>
 					</view>
-				</view>
 			</view>
 		</view>
 
@@ -565,14 +565,16 @@
 
 
 	//地区切换
-	.tab_area {
-		margin-top: 48rpx;
-		width: 100%;
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
-		font-family: PingFang-SC-Heavy, PingFang-SC;
-		overflow-x: scroll;
+	.tab_area {
+		margin-top: 48rpx;
+		width: 100%;
+		display: flex;
+		font-family: PingFang-SC-Heavy, PingFang-SC;
+		overflow-x: scroll;
+		
+		> view{
+			min-width: 160rpx;
+		}
 	}
 
 	.area_nav .areaTitle {

+ 3 - 3
setting.js

xqd
@@ -1,10 +1,10 @@
 /**
  * Created by JianJia.Zhou<jianjia.zhou> on 2022/3/18.
  */
-const IS_DEV = process.env.NODE_ENV === 'development'
+const IS_DEV = process.env.NODE_ENV === 'development1'
 
-const URL = 'https://t9.9026.com'
-// const URL = 'https://ihg.9026.com'
+// const URL = 'https://t9.9026.com'
+const URL = 'https://ihg.9026.com'
 
 	
 module.exports = {