lilei %!s(int64=4) %!d(string=hai) anos
pai
achega
628db623fb
Modificáronse 3 ficheiros con 8 adicións e 4 borrados
  1. 5 1
      pages/goods/goods.vue
  2. 1 1
      pages/goods/goodsDetail.vue
  3. 2 2
      pages/goods/index.vue

+ 5 - 1
pages/goods/goods.vue

@@ -19,6 +19,7 @@
 			return {
 				clsId: '',
 				goldLimit:0,
+				goodsName: '',
 				pageNo: 1,
 				pageSize: 10,
 				goodsList:[],
@@ -27,9 +28,12 @@
 			};
 		},
 		onLoad(opts) {
-			console.log(opts)
+			this.goodsName = opts.name
 			this.clsId = opts.goodsTypeNo
 			this.goldLimit = opts.goldLimit
+			uni.setNavigationBarTitle({
+				title: this.goodsName
+			})
 			this.getGoods()
 		},
 		// 下拉刷新

+ 1 - 1
pages/goods/goodsDetail.vue

@@ -4,7 +4,7 @@
 			<!-- 商品信息 -->
 			<view class="goods-head">
 				<view class="goods-imgs">
-					<view class="goods-staus" v-if="goodContent.inventoryQty == 0"></view>
+					<view class="goods-staus" v-if="goodContent.inventoryQty == 0 || goodContent.delFlage == 0 || goodContent.state == 0"></view>
 					<u-swiper height="340" :border-radius="15" mode="number" indicator-pos="bottomRight" :list="imageList"></u-swiper>
 				</view>
 				<view class="goods-name">

+ 2 - 2
pages/goods/index.vue

@@ -6,7 +6,7 @@
 		</view>
 		<!-- 商品 -->
 		<view class="goods">
-			<view v-for="(item,index) in goodsList" :key="item.type.id" v-if="goodsList.length&&item.list.length">
+			<view v-for="(item,index) in goodsList" :key="index" v-if="goodsList.length&&item.list.length">
 				<u-section :title="item.type.name" font-size="35" line-color="#01c9b2" sub-title="更多" @click="toGoods(item.type)"></u-section>
 				<view class="goods-list">
 					<uni-coods :list="item.list"></uni-coods>
@@ -94,7 +94,7 @@
 			// 更多商品
 			toGoods(item){
 				uni.navigateTo({
-					url:"/pages/goods/goods?goodsTypeNo="+ item.goodsTypeNo + "&goldLimit="+ item.goldLimit
+					url:"/pages/goods/goods?goodsTypeNo="+ item.goodsTypeNo + "&goldLimit="+ item.goldLimit + "&name=" + item.name
 				})
 			},
 			// 查询商品