This commit is contained in:
曹辉 2023-01-29 15:52:42 +08:00
parent 20383f0709
commit e951f9b56b
2 changed files with 48 additions and 1 deletions

View File

@ -64,7 +64,7 @@
watch: { // watch: { //
goodsName() { goodsName() {
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 => {
this.goodsList = res.rows this.goodsList = res.rows
this.total = res.total this.total = res.total
}) })

View File

@ -1,5 +1,9 @@
<template> <template>
<view class="app"> <view class="app">
<view class="inputs">
<i class="icon"></i>
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
</view>
<view class="lefttabbar"> <view class="lefttabbar">
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper" <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll"> @scrolltolower="lower" @scroll="scroll">
@ -64,6 +68,15 @@
} }
}; };
}, },
watch: { //
goodsName() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
this.goodsList = res.rows
this.total = res.total
})
},
},
onShow() { onShow() {
var that = this var that = this
try { try {
@ -204,6 +217,40 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
.inputs {
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border: 1px solid #f0f0f0;
width: 90%;
height: 65rpx;
margin: 10rpx 0 10rpx 50%;
transform: translateX(-50%);
border-radius: 20rpx;
background-color: #Ffffff;
z-index: 999;
.input {
margin: 0 auto;
position: absolute;
height: 65rpx;
// top: 8%;
left: 10%;
width: 90%;
font-size: 26rpx;
color: #000000;
}
.icon {
background: url(@/static/sousuo.png) no-repeat;
width: 30rpx;
height: 28rpx;
background-size: cover;
position: absolute;
top: 30%;
left: 3%;
}
}
.lefttabbar { .lefttabbar {
position: fixed; position: fixed;
width: 20%; width: 20%;