Commit caf8e60b by 李伟康

commit 提交

1 parent e8319d2b
......@@ -16,126 +16,143 @@
</view> -->
<view class="wrapper">
<view class="wrapper-content">
<view class="first-tab">
<view
class="tab-item"
v-for="(i, index) in views"
:key="index"
@click="changeIndex(index, 'firstIndex')"
>
<template v-if="views && views[firstIndex] && views[firstIndex].receptionSourceDetailInfoList">
<view class="first-tab">
<view
class="sprite-icon"
:class="[
class="tab-item"
v-for="(i, index) in views"
:key="index"
@click="changeIndex(index, 'firstIndex')"
>
<view
class="sprite-icon"
:class="[
firstIndex == index ? `icon-${firstClass[index]} active` : '',
]"
:style="{ left: firstLeft[index] }"
></view>
<view class="text" :class="[firstIndex == index ? `active` : '']">{{
:style="{ left: firstLeft[index] }"
></view>
<view
class="text"
:class="[firstIndex == index ? `active` : '']"
>{{
i.tabName
}}</view>
</view>
</view>
</view>
<template v-if="madiaId == 2">
<!-- 套餐 无分组 -->
<view class="content" id="content">
<template
v-if="
<template v-if="madiaId == 2">
<!-- 套餐 无分组 -->
<view
class="content"
id="content"
>
<template v-if="
views[firstIndex].noGroupReceptionSourceDetailInfoList.length >
0
"
>
<view
class="product-list"
:key="firstIndex"
:class="direction"
style="height: 1120rpx"
>
">
<view
class="product-item"
v-for="(it, ids) in views[firstIndex]
.noGroupReceptionSourceDetailInfoList"
:key="ids"
@click="goDetail(it)"
class="product-list"
:key="firstIndex"
:class="direction"
style="height: 1120rpx"
>
<view
class="product-item"
v-for="(it, ids) in views[firstIndex]
.noGroupReceptionSourceDetailInfoList"
:key="ids"
@click="goDetail(it)"
>
<image
:src="it.thumbnail"
mode="scaleToFill"
class="product-img"
/>
</view>
</view>
</template>
<template v-else>
<view class="nothing flex">
<image
:src="it.thumbnail"
mode="scaleToFill"
class="product-img"
class="icon"
src="../../assets/images/boutique/nothing.png"
/>
<view>暂无产品内容</view>
</view>
</view>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/boutique/nothing.png"
/>
<view>暂无产品内容</view>
</view>
</template>
</view>
</template>
<template v-else>
<!-- 其他 有分组 -->
<view class="content" id="content">
</template>
</view>
</template>
<template v-else>
<!-- 其他 有分组 -->
<view
class="second-tab"
ref="secondTab"
v-if="views[firstIndex].receptionSourceDetailInfoList.length > 0"
class="content"
id="content"
>
<view
v-for="(item, ind) in views[firstIndex]
class="second-tab"
ref="secondTab"
v-if="views[firstIndex].receptionSourceDetailInfoList.length > 0"
>
<view
v-for="(item, ind) in views[firstIndex]
.receptionSourceDetailInfoList"
:key="ind"
class="tab-item"
:class="[secondIndex == ind ? 'active' : '']"
@click="changeIndex(ind, 'secondIndex')"
>{{ item.tabName }}
:key="ind"
class="tab-item"
:class="[secondIndex == ind ? 'active' : '']"
@click="changeIndex(ind, 'secondIndex')"
>{{ item.tabName }}
</view>
</view>
</view>
<template
v-if="
<template v-if="
views[firstIndex].receptionSourceDetailInfoList.length > 0 &&
views[firstIndex].receptionSourceDetailInfoList[secondIndex]
.receptionSourceDetailInfoList
"
>
<view
class="product-list"
:key="firstIndex + secondIndex"
:class="direction"
:style="{
">
<view
class="product-list"
:key="firstIndex + secondIndex"
:class="direction"
:style="{
height: views[firstIndex].receptionSourceDetailInfoList
? '962rpx'
: '1032rpx',
}"
>
<view
class="product-item"
v-for="(itm, idx) in views[firstIndex]
>
<view
class="product-item"
v-for="(itm, idx) in views[firstIndex]
.receptionSourceDetailInfoList[secondIndex]
.receptionSourceDetailInfoList"
:key="idx"
@click="goDetail(itm)"
>
:key="idx"
@click="goDetail(itm)"
>
<image
:src="itm.thumbnail"
mode="scaleToFill"
class="product-img"
/>
</view>
</view>
</template>
<template v-else>
<view class="nothing flex">
<image
:src="itm.thumbnail"
mode="scaleToFill"
class="product-img"
class="icon"
src="../../assets/images/boutique/nothing.png"
/>
<view>暂无产品内容</view>
</view>
</view>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/boutique/nothing.png"
/>
<view>暂无产品内容</view>
</view>
</template>
</template>
</view>
</template>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/boutique/nothing.png"
/>
<view>暂无产品内容</view>
</view>
</template>
</view>
......@@ -177,10 +194,10 @@ export default {
},
},
watch: {
show(val) {
show (val) {
if (val) this.imgKey = Date.now()
},
watchStatus() {
watchStatus () {
console.log(111)
this.firstIndex = 0
this.secondIndex = 0
......@@ -188,7 +205,7 @@ export default {
}
},
methods: {
changeIndex(index, name) {
changeIndex (index, name) {
if (this[name] == index) return // 点击同一个
this.direction = ''
console.log(index, name, this[name])
......@@ -209,7 +226,7 @@ export default {
const data = await uni.$api.boutiqueApi.findSoureList({})
console.log(data)
},
goDetail(data) {
goDetail (data) {
console.log(data)
uni.navigateTo({
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!