Commit 11cf6ca3 authored by Damon's avatar Damon

refactor: 备件去掉搜索

parent db22cdc3
<template>
<view class="u-flex det-wrap">
<view class="search">
<u-search
:clearabled="true"
:action-style="searchStyle"
bg-color="#fff"
v-model="keyword"
@custom="searchParts"
@search="searchParts"
></u-search>
</view>
<view class="content" v-if="lists.length > 0">
<scroll-view style="height: 100%;" scroll-y="true">
<select-parts
......@@ -56,16 +45,10 @@
},
data() {
return {
lists: [],
keyword: ''
lists: []
}
},
computed: {
searchStyle() {
return {
color: "#2272FF"
};
},
// 配件数
partNum() {
return this.lists.reduce((counter, { checked }) => checked ? counter += 1 : counter, 0)
......@@ -85,10 +68,7 @@
},
methods: {
getReserve() {
const params = {
keyword: this.keyword
}
this.$u.api.getMyReserve(params).then(res => {
this.$u.api.getMyReserve().then(res => {
if (res.code === 200) {
const data = res.data || []
this.lists = data.map(v => {
......@@ -101,11 +81,6 @@
}
})
},
// 搜索配件
searchParts(val) {
this.keyword = val
this.getReserve()
},
numChange(val, index) {
this.$set(this.lists[index], 'quantity', val)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment