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;

View File

@@ -1,11 +1,7 @@
<template>
<view class="out">
<view class="sosuo">
<image></image>
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :show-action="false"></u-search>
</view>
<u-tabs-swiper v-if="type == 'dianpu'" @change="tabsChange" :show-bar="false" :bold="false" :font-size="32" active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0" height="88"></u-tabs-swiper>
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper-item>
<scroll-view :scroll-y="true" style="height:100%">
<view style="padding-top:30rpx">
@@ -16,7 +12,7 @@
<swiper-item>
<scroll-view :scroll-y="true" style="height:100%">
<view class="list">
<darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem>
<!-- <darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem> -->
</view>
</scroll-view>
</swiper-item>
@@ -31,14 +27,13 @@
<view class="bottom bottomxz"></view>
</view>
</view>
<view data-type="hp" @click="sx(2)">好评</view>
<view data-type="hp" @click="sx(2)">好评</view>
</view>
<swiper class="swiper" :current="swiperCurrent" @change="huadong">
<swiper class="swiper" :current="swiperCurrent" @change="huadong">
<swiper-item>
<scroll-view :scroll-y="true" style="height:100%">
<view style="padding-top:30rpx">
<shop v-for="(i,j) in shoplist[0]" :key="j" :name="i.goods_name" :id="i.goods_id" :commonid="i.goods_commonid" :image="i.goods_image"></shop>
</view>
</scroll-view>
</swiper-item>
@@ -56,8 +51,6 @@
</swiper-item>
</swiper>
</view>
</view>
</template>
<style lang="scss" scoped>
@@ -162,6 +155,11 @@ export default {
shoplist:[]
}
},
onLoad(o){
this.type = o.type
this.keyword = o.value
this.search()
},
methods: {
tabsChange(index) {
this.swiperCurrent = index;
@@ -189,10 +187,5 @@ export default {
})
}
},
onLoad(o){
this.type = o.type
this.keyword = o.value
this.search()
}
}
</script>