This commit is contained in:
曹辉 2023-01-29 15:47:31 +08:00
parent 6398f99919
commit 20383f0709
4 changed files with 22 additions and 10 deletions

View File

@ -2,7 +2,7 @@
<view class="app">
<view class="" v-if='GoodsCategorychildrenlist.length>1'>
<top-tabbar :tabIndex="tabIndex" :tabBars="GoodsCategorychildrenlist" @toggleToptab="toggleTab"
selectedBottomColor="#30c58d" selectedTextColor="#343434" textColor="#7d7e80" bgColor="#ffffff">
selectedBottomColor="#D43953" selectedTextColor="#D43953" textColor="#7d7e80" bgColor="#ffffff">
</top-tabbar>
</view>
<view class="inputs">
@ -100,7 +100,7 @@
toggleTab(index) {
if (index == 1111111111111) {
uni.navigateTo({
url: `/pages/classification/classification?goodsCategoryId=${this.GoodsCategorychildrenid}`
url: `/pages/classification/classification?goodsCategoryId=${this.goodsCategoryId}&index=${this.tabIndex}&GoodsCategorychildrenid=${this.GoodsCategorychildrenid}`
})
} else if (index == 0) {
this.GoodsCategorychildrenid = this.goodsCategoryId
@ -143,7 +143,7 @@
//
goodsListinfo() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)

View File

@ -163,7 +163,6 @@
methods: {
//
lookrate(item) {
console.log(item)
this.rateimgtitle.img = item.itemPictureUrl
this.rateimgtitle.title = item.nurseItemName
lookrate(item.orderNo).then(res => {

View File

@ -5,7 +5,7 @@
@scrolltolower="lower" @scroll="scroll">
<view class="scroll-view-item" v-for="(item,index) in GoodsCategorychildrenlist" :key='item.id'
@tap='tapscroll(item,index)'>
<view :class="tabIndex==index?'active':''">
<view :class="tabIndex==index?'actives':'active'">
{{item.goodsCategoryName}}
</view>
</view>
@ -81,7 +81,8 @@
},
onLoad(options) { //
this.goodsCategoryId = options.goodsCategoryId //id
this.GoodsCategorychildrenid = options.goodsCategoryId //id
this.GoodsCategorychildrenid = options.GoodsCategorychildrenid //id
this.tabIndex = options.index
this.baseurl = baseurl;
this.goodsListinfo()
this.GoodsCategorychildren(this.goodsCategoryId);
@ -135,7 +136,7 @@
//
goodsListinfo() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
@ -204,6 +205,7 @@
height: 100%;
.lefttabbar {
position: fixed;
width: 20%;
height: 100%;
display: inline-block;
@ -212,9 +214,19 @@
height: 100%;
}
.active {
.actives {
color: red;
font-size: 34rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.active {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.scroll-view-item {
@ -223,6 +235,7 @@
line-height: 100rpx;
text-align: center;
font-size: 30rpx;
padding: 0 10rpx;
}
}

View File

@ -64,7 +64,7 @@
//
selectedBottomColor: {
type: String,
default: '#30c58d'
default: '#D43953'
},
//
@ -76,7 +76,7 @@
//
selectedTextColor: {
type: String,
default: '#343434'
default: '#D43953'
},
//