order 7.25

This commit is contained in:
2020-07-25 15:17:52 +08:00
parent 94636380f1
commit c931e87209
11 changed files with 195 additions and 778 deletions

View File

@@ -1,19 +1,9 @@
<template>
<view class="search">
<view class="sosuo">
<image></image>
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :action-style="{
'font-size':'32rpx',
'color':'#FF780F',
'overflow':'unset'
}"
@search="search"
></u-search>
</view>
<view class="list">
<view class="title">搜索发现</view>
<view class="label">
<text>这是标签</text>
<text v-for="(label, index) in searchwordlist" :key="index" @click="search(label.word)">{{ label.word }}</text>
</view>
</view>
</view>
@@ -23,17 +13,40 @@ export default {
name:"search",
data(){
return{
keyword:""
keyword: "",
searchwordlist: [],
}
},
},
created() {
this.getWordList();
},
// 点击搜索按钮
onNavigationBarButtonTap(e) {
if(e.index == 0) this.search(this.keyword);
},
// 输入框文本变化
onNavigationBarSearchInputChanged(e) {
this.keyword = e.text;
},
// 点击键盘搜索按钮
onNavigationBarSearchInputConfirmed(value) {
this.search(this.keyword);
},
methods:{
getWordList() {
this.$u.api.searchwordlist().then(res => {
this.searchwordlist = res.data;
})
},
search(value){
// console.log(value)
// console.log(value)
if(!value) this.$u.toast('搜索内容不可为空');
this.$u.route({
url:"/pageB/search/out",
params:{
value,
type:"shop"
url: "/pageB/search/out",
params: {
value: value,
type: "shop",
order: 'goods_salenum'
}
})
}
@@ -67,7 +80,8 @@ export default {
}
.label{
display: flex;
>text{
flex-wrap: wrap;
> text {
margin-top: 20rpx;
margin-right: 30rpx;
font-size: 26rpx;