From 82d387a0007f1b584167526c51a54f801ced4836 Mon Sep 17 00:00:00 2001
From: luyuan <1162963624@qq.com>
Date: Sat, 18 Jul 2020 11:44:05 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=90=9C=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/api/shop.js | 6 ++++
pageB/components/search/shop.vue | 14 +++++---
pageB/search/out.vue | 61 ++++++++++++++++++++++++--------
3 files changed, 63 insertions(+), 18 deletions(-)
diff --git a/common/api/shop.js b/common/api/shop.js
index d0afccd..d114563 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -149,6 +149,12 @@ export default {
return vm.$u.post('goods/goodsInfo', {
goods_id: id
});
+ },
+ // 商品搜索
+ ShopSearch({keyword,page = 1,order = 'goods_salenum'}){
+ return vm.$u.post('ShopSearch/search',{
+ keyword,page,order
+ })
}
}
}
diff --git a/pageB/components/search/shop.vue b/pageB/components/search/shop.vue
index bbd42b0..9b4427e 100644
--- a/pageB/components/search/shop.vue
+++ b/pageB/components/search/shop.vue
@@ -1,9 +1,9 @@
-
-
+
+
- 这是标题
- 这是简介
+ {{name}}
+ {{advword}}
@@ -14,6 +14,12 @@ export default {
return {
}
+ },
+ props:['name','advword','id','image'],
+ methods:{
+ tap(){
+ this.$emit("tap",{id:this.id})
+ }
}
}
diff --git a/pageB/search/out.vue b/pageB/search/out.vue
index f50b8ca..46f05a7 100644
--- a/pageB/search/out.vue
+++ b/pageB/search/out.vue
@@ -10,10 +10,6 @@
-
-
-
-
@@ -25,17 +21,42 @@
-
- 销量
-
- 价格
-
-
-
+
+
+ 销量
+
+ 价格
+
+
+
+
+ 好评
- 好评
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ D
+
+
+
+
@@ -137,9 +158,11 @@ export default {
current: 0,
swiperCurrent: 0,
keyword:"",
- type:""
+ type:"",
+ shoplist:[]
}
- }, methods: {
+ },
+ methods: {
tabsChange(index) {
this.swiperCurrent = index;
},
@@ -155,11 +178,21 @@ export default {
},
sx(type){
console.log(type)
+
+ },
+ huadong(e){
+ console.log(e.detail.current)
+ },
+ search(){
+ this.$u.api.ShopSearch({keyword:this.keyword}).then((res)=>{
+ this.shoplist[0] = res.data.data
+ })
}
},
onLoad(o){
this.type = o.type
this.keyword = o.value
+ this.search()
}
}
\ No newline at end of file