From 7a2dda4461386c56d67c788aed2212fd8eeabfa7 Mon Sep 17 00:00:00 2001
From: BigBoss <2280520255@qq.com>
Date: Fri, 15 May 2020 22:20:48 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=80=BB=E8=BE=91=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/data.js | 33 +++---
src/components/CommodityCard/CommodityCard.vue | 30 +++---
.../HMFilterDropdown/HMFilterDropdown.vue | 10 +-
src/pages/frameDetail/frameDetail.vue | 10 +-
src/pages/index/index.vue | 119 ++++++++++++++-------
src/store/index.js | 2 +-
src/store/modules/read.js | 40 +++++++
src/store/url.js | 4 +-
8 files changed, 176 insertions(+), 72 deletions(-)
create mode 100644 src/store/modules/read.js
diff --git a/src/common/data.js b/src/common/data.js
index 9e85539..198bc0b 100644
--- a/src/common/data.js
+++ b/src/common/data.js
@@ -37,6 +37,8 @@
*/
// 以下演示数据中,我故意把value设置成跟name一样,只是为了方便演示,使示例更加易懂,实际使用时候value应该是一个标识,给后台识别所用的.
// 数据较长,请仔细查看。
+
+
export default [
{
"name":'综合',
@@ -52,8 +54,8 @@ export default [
"name":'品牌',
"type": 'filter',
"submenu": [{
- "name": '品牌',
- "value": "品牌",
+ // "name": '品牌',
+ // "value": "品牌",
"submenu": [{
"name": "帕森",
"value": "帕森",
@@ -70,20 +72,19 @@ export default [
"name":'功能',
"type": 'filter',
"submenu": [{
- "name": "智能排序",
- "value": "智能排序"
- },
- {
- "name": "离我最近",
- "value": "离我最近"
- },
- {
- "name": "人均从高到低",
- "value": "人均从高到低"
- },
- {
- "name": "人均从低到高",
- "value": "人均从低到高"
+ "submenu": [{
+ "name": "满减活动",
+ "value": "满减活动"
+ },
+ {
+ "name": "打折优惠",
+ "value": "打折优惠"
+ },
+ {
+ "name": "会员专享",
+ "value": "会员专享"
+ }
+ ]
}
]
},
diff --git a/src/components/CommodityCard/CommodityCard.vue b/src/components/CommodityCard/CommodityCard.vue
index d153156..fdef58e 100644
--- a/src/components/CommodityCard/CommodityCard.vue
+++ b/src/components/CommodityCard/CommodityCard.vue
@@ -1,15 +1,15 @@
-
-
+
+
{{goods.name}}
{{goods.price}}
- {{goods.originCost}}
+ {{goods.rsSon.Max_Price}}
- {{goods.slogan}}
+ {{goods.trade_num}}人购买
@@ -21,18 +21,19 @@
* 商品数据
*/
goods: {
- goods_id: Number,
- img: String,
+ id: Number,
+ imgurl: String,
name: String,
+ rsSon:Object,
originCost:String,
price: String,
- slogan:String,
+ trade_num:String,
goodType:String,
}
},
created() {
- console.log(this.goods)
+ // console.log(this.goods)
},
data() {
return {
@@ -40,9 +41,14 @@
};
},
methods:{
- toGoods(id,type){
- // console.log('toGoods =====> id======>', id)
- // console.log(type)
+ toGoods(id,type){
+ uni.navigateTo({
+ url: `../frameDetail/frameDetail?oderId=`+id,
+ success: res => {},
+ fail: () => {},
+ complete: () => {}
+ });
+ console.log('toGoods =====> id:'+id +"======>type:"+type)
switch(type){
case 1:
uni.navigateTo({
@@ -124,7 +130,7 @@
}
}
- .slogan{
+ .trade_num{
color: #999999;
font-size: 20rpx;
}
diff --git a/src/components/HMFilterDropdown/HMFilterDropdown.vue b/src/components/HMFilterDropdown/HMFilterDropdown.vue
index 56f9cee..5c8e973 100644
--- a/src/components/HMFilterDropdown/HMFilterDropdown.vue
+++ b/src/components/HMFilterDropdown/HMFilterDropdown.vue
@@ -45,7 +45,7 @@
-
+