feat(index): 样式调整

This commit is contained in:
woody 2025-10-31 09:16:23 +08:00
parent 03af5fd69a
commit 7fba675e7f
2 changed files with 24 additions and 11 deletions

View File

@ -605,8 +605,17 @@ export default {
}) })
}) })
} else { } else {
if (item.specialArea == 30) { if (item.specialArea === 3) {
this.goAreaUrl() uni.navigateTo({
url:
'/pages/specialArea/drawer-list?label=' +
item.specialAreaName +
'&specialArea=' +
item.specialArea +
'&children=' +
JSON.stringify(this.zoneList[tapx].children) +
'&diff=1',
})
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: url:

View File

@ -244,12 +244,12 @@
<!-- 一级分类 --> <!-- 一级分类 -->
<view <view
class="drawer-first-level" class="drawer-first-level"
:class="{ active: oneId == item.pkId }" :class="{ active: currentCategory == item.pkId }"
> >
<view class="drawer-menu-text" @click="selectFirstLevel(item)">{{ <view class="drawer-menu-text" @click="selectFirstLevel(item)">{{
truncateText(item.classifyName, 12) truncateText(item.classifyName, 12)
}}</view> }}</view>
<!-- <view <view
v-if="item.children && item.children.length > 0" v-if="item.children && item.children.length > 0"
class="drawer-expand-icon" class="drawer-expand-icon"
:class="{ expanded: expandedMenus.includes(item.pkId) }" :class="{ expanded: expandedMenus.includes(item.pkId) }"
@ -258,9 +258,9 @@
<u-icon <u-icon
name="arrow-right" name="arrow-right"
size="16" size="16"
:color="oneId == item.pkId ? '#fff' : '#666'" :color="currentCategory === item.pkId ? '#fff' : '#666'"
></u-icon> ></u-icon>
</view> --> </view>
</view> </view>
<view <view
@ -272,7 +272,7 @@
v-for="subItem in item.children" v-for="subItem in item.children"
:key="subItem.pkId" :key="subItem.pkId"
class="drawer-second-level" class="drawer-second-level"
:class="{ active: twoId == subItem.pkId }" :class="{ active: currentCategory === subItem.pkId }"
@click="selectSecondLevel(subItem)" @click="selectSecondLevel(subItem)"
> >
<view class="drawer-sub-menu-text">{{ <view class="drawer-sub-menu-text">{{
@ -338,6 +338,7 @@ export default {
waresName: '', waresName: '',
expandedMenus: [], // ID expandedMenus: [], // ID
showCategoryDrawer: false, // showCategoryDrawer: false, //
currentCategory: '',
} }
}, },
onLoad(options) { onLoad(options) {
@ -444,7 +445,7 @@ export default {
const children = item.children const children = item.children
if (children && children.length > 0) { if (children && children.length > 0) {
item.children = [ item.children = [
{ classifyName: '全部', pkId: item.pkId }, // { classifyName: '', pkId: item.pkId },
...children, ...children,
] ]
} }
@ -460,7 +461,8 @@ export default {
if (this.oneList[0]) { if (this.oneList[0]) {
this.oneId = this.oneList[0].pkId this.oneId = this.oneList[0].pkId
this.twoId = this.oneList[0].pkId this.twoId = this.oneList[0].pkId
this.getAllGoods(this.oneList[0].pkId) this.currentCategory = this.oneId
this.getAllGoods(this.currentCategory)
} }
} }
}) })
@ -474,7 +476,8 @@ export default {
selectFirstLevel(item) { selectFirstLevel(item) {
this.oneId = item.pkId this.oneId = item.pkId
this.twoId = item.pkId this.twoId = item.pkId
this.getAllGoods(item.pkId) this.currentCategory = item.pkId
this.getAllGoods(this.currentCategory)
}, },
// //
toggleExpand(pkId) { toggleExpand(pkId) {
@ -492,7 +495,8 @@ export default {
// //
selectSecondLevel(item) { selectSecondLevel(item) {
this.twoId = item.pkId this.twoId = item.pkId
this.getAllGoods1(item.pkId) this.currentCategory = item.pkId
this.getAllGoods1(this.currentCategory)
// //
}, },
// //