feat:合作商家可搜索
This commit is contained in:
1 parent
940d327a29
commit
b877a3e828
2 files changed
+29
-5
No files matched your search
@@ -11,6 +11,7 @@ const state = reactive<any>({
|
||||
pa: {
|
||||
pagesize: 10,
|
||||
type: "2",
|
||||
name: "",
|
||||
catgoryId: null,
|
||||
},
|
||||
tabs: [{ id: null, name: "全部", disabled: false }],
|
||||
@@ -40,6 +41,10 @@ onShow(() => {
|
||||
pageRef.value && pageRef.value.reload(false)
|
||||
})
|
||||
|
||||
const search = () => {
|
||||
pageRef.value && pageRef.value.reload(true)
|
||||
}
|
||||
|
||||
const doTab = (e: any) => {
|
||||
const target = state.tabs[e]
|
||||
state.pa.catgoryId = target.id
|
||||
@@ -74,12 +79,31 @@ const toDetail = async (v: any) => {
|
||||
>
|
||||
<template #top>
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-16rpx px-20rpx">
|
||||
<view class="flex w-full">
|
||||
<tm-input
|
||||
class="flex-1"
|
||||
v-model="state.pa.name"
|
||||
type="text"
|
||||
height="66"
|
||||
minHeight="66"
|
||||
fontSize="28"
|
||||
:showClear="true"
|
||||
:focus="false"
|
||||
placeholder="请输入商家名称"
|
||||
style="border: 2rpx solid #0779fd; border-radius: 14rpx"
|
||||
:focus-highlight="false"
|
||||
color="#ECF4F9"
|
||||
>
|
||||
<template v-slot:rightIcon>
|
||||
<tm-button class="mr-1 py-3" size="xs" @click="search">搜索</tm-button>
|
||||
</template>
|
||||
</tm-input>
|
||||
</view>
|
||||
<view class="bg-white rounded-16rpx px-20rpx my-20rpx">
|
||||
<z-tabs :list="state.tabs" @change="doTab" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="h-20rpx" />
|
||||
<view class="flex-row card p-20rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i" @tap="toDetail(v)">
|
||||
<image class="w-180rpx h-180rpx rounded-12rpx my-auto" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
class="flex-1"
|
||||
v-model="state.params.keyword"
|
||||
type="text"
|
||||
:height="66"
|
||||
:minHeight="66"
|
||||
:fontSize="28"
|
||||
height="66"
|
||||
minHeight="66"
|
||||
fontSize="28"
|
||||
:showClear="true"
|
||||
:focus="false"
|
||||
placeholder="请输入商品名称"
|
||||
|
||||
Reference in new issue
Block a user