Commit caf8e60b by 李伟康

commit 提交

1 parent e8319d2b
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
</view> --> </view> -->
<view class="wrapper"> <view class="wrapper">
<view class="wrapper-content"> <view class="wrapper-content">
<template v-if="views && views[firstIndex] && views[firstIndex].receptionSourceDetailInfoList">
<view class="first-tab"> <view class="first-tab">
<view <view
class="tab-item" class="tab-item"
...@@ -30,20 +32,24 @@ ...@@ -30,20 +32,24 @@
]" ]"
:style="{ left: firstLeft[index] }" :style="{ left: firstLeft[index] }"
></view> ></view>
<view class="text" :class="[firstIndex == index ? `active` : '']">{{ <view
class="text"
:class="[firstIndex == index ? `active` : '']"
>{{
i.tabName i.tabName
}}</view> }}</view>
</view> </view>
</view> </view>
<template v-if="madiaId == 2"> <template v-if="madiaId == 2">
<!-- 套餐 无分组 --> <!-- 套餐 无分组 -->
<view class="content" id="content"> <view
<template class="content"
v-if=" id="content"
>
<template v-if="
views[firstIndex].noGroupReceptionSourceDetailInfoList.length > views[firstIndex].noGroupReceptionSourceDetailInfoList.length >
0 0
" ">
>
<view <view
class="product-list" class="product-list"
:key="firstIndex" :key="firstIndex"
...@@ -78,7 +84,10 @@ ...@@ -78,7 +84,10 @@
</template> </template>
<template v-else> <template v-else>
<!-- 其他 有分组 --> <!-- 其他 有分组 -->
<view class="content" id="content"> <view
class="content"
id="content"
>
<view <view
class="second-tab" class="second-tab"
ref="secondTab" ref="secondTab"
...@@ -94,13 +103,11 @@ ...@@ -94,13 +103,11 @@
>{{ item.tabName }} >{{ item.tabName }}
</view> </view>
</view> </view>
<template <template v-if="
v-if="
views[firstIndex].receptionSourceDetailInfoList.length > 0 && views[firstIndex].receptionSourceDetailInfoList.length > 0 &&
views[firstIndex].receptionSourceDetailInfoList[secondIndex] views[firstIndex].receptionSourceDetailInfoList[secondIndex]
.receptionSourceDetailInfoList .receptionSourceDetailInfoList
" ">
>
<view <view
class="product-list" class="product-list"
:key="firstIndex + secondIndex" :key="firstIndex + secondIndex"
...@@ -138,6 +145,16 @@ ...@@ -138,6 +145,16 @@
</template> </template>
</view> </view>
</template> </template>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/boutique/nothing.png"
/>
<view>暂无产品内容</view>
</view>
</template>
</view> </view>
</view> </view>
<image <image
...@@ -177,10 +194,10 @@ export default { ...@@ -177,10 +194,10 @@ export default {
}, },
}, },
watch: { watch: {
show(val) { show (val) {
if (val) this.imgKey = Date.now() if (val) this.imgKey = Date.now()
}, },
watchStatus() { watchStatus () {
console.log(111) console.log(111)
this.firstIndex = 0 this.firstIndex = 0
this.secondIndex = 0 this.secondIndex = 0
...@@ -188,7 +205,7 @@ export default { ...@@ -188,7 +205,7 @@ export default {
} }
}, },
methods: { methods: {
changeIndex(index, name) { changeIndex (index, name) {
if (this[name] == index) return // 点击同一个 if (this[name] == index) return // 点击同一个
this.direction = '' this.direction = ''
console.log(index, name, this[name]) console.log(index, name, this[name])
...@@ -209,7 +226,7 @@ export default { ...@@ -209,7 +226,7 @@ export default {
const data = await uni.$api.boutiqueApi.findSoureList({}) const data = await uni.$api.boutiqueApi.findSoureList({})
console.log(data) console.log(data)
}, },
goDetail(data) { goDetail (data) {
console.log(data) console.log(data)
uni.navigateTo({ uni.navigateTo({
url: `/pages/boutique/productDetail?detailUrl=${data.detailUrl}` url: `/pages/boutique/productDetail?detailUrl=${data.detailUrl}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!