Browse Source

bug 修复

lilei 4 years ago
parent
commit
23a29534b2
3 changed files with 7 additions and 4 deletions
  1. 2 2
      App.vue
  2. 4 1
      pages/cart/cart.vue
  3. 1 1
      pages/goods/goodsDetail.vue

+ 2 - 2
App.vue

@@ -1,6 +1,6 @@
 <script>
-	// const uat_URL = 'https://lese.test.sxzxyj.net/gc-shop/' // 预发布
-	const uat_URL = 'http://192.168.16.104:8302/gc-shop/' // 本地
+	const uat_URL = 'https://lese.test.sxzxyj.net/gc-shop/' // 预发布
+	// const uat_URL = 'http://192.168.16.104:8302/gc-shop/' // 本地
 	const pro_URL = 'https://lese.sxzxyj.net/gc-shop/'  // 生产
 	const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url

+ 4 - 1
pages/cart/cart.vue

@@ -44,7 +44,10 @@
 						</view>
 						<view class="goods-info">
 							<view class="goods-imgs">
-								<view v-if="good.goods.inventoryQty==0" class="goods-staus">已售罄</view>
+								<view v-if="good.goods.inventoryQty==0||good.goods.state == 0" class="goods-staus">
+									<text v-if="good.goods.inventoryQty==0">已售罄</text>
+									<text v-if="good.goods.state == 0">已下架</text>
+								</view>
 								<u-image border-radius="12" width="158rpx" height="140rpx" :src="good.goods.homeImage"></u-image>
 							</view>
 							<view class="goods-text">

+ 1 - 1
pages/goods/goodsDetail.vue

@@ -44,7 +44,7 @@
 			</view>
 		</view>
 		<!-- 底部浮动按钮 -->
-		<view class="bottom-btns" v-if="goodContent">
+		<view class="bottom-btns" v-if="goodContent&&goodContent.inventoryQty > 0&&goodContent.state==1">
 			<view><u-button :custom-style="addCartButton" type="warning" @click="addCart">加入购物车</u-button></view>
 			<view><u-button :custom-style="toOrderButton" type="error" @click="toOrder()">立即下单</u-button></view>
 		</view>