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="app">
<view class="" v-if='GoodsCategorychildrenlist.length>1'> <view class="" v-if='GoodsCategorychildrenlist.length>1'>
<top-tabbar :tabIndex="tabIndex" :tabBars="GoodsCategorychildrenlist" @toggleToptab="toggleTab" <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> </top-tabbar>
</view> </view>
<view class="inputs"> <view class="inputs">
@ -100,7 +100,7 @@
toggleTab(index) { toggleTab(index) {
if (index == 1111111111111) { if (index == 1111111111111) {
uni.navigateTo({ 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) { } else if (index == 0) {
this.GoodsCategorychildrenid = this.goodsCategoryId this.GoodsCategorychildrenid = this.goodsCategoryId
@ -143,7 +143,7 @@
// //
goodsListinfo() { goodsListinfo() {
this.pageNum = 1; 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) { if (res.code == 200) {
res.rows.forEach(e => { res.rows.forEach(e => {
this.goodsList.push(e) this.goodsList.push(e)

View File

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

View File

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

View File

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