diff --git a/apis/interfaces/store.js b/apis/interfaces/store.js
index 7a071cf..c34249d 100644
--- a/apis/interfaces/store.js
+++ b/apis/interfaces/store.js
@@ -21,7 +21,15 @@ const goods = (id) => {
})
}
+// 套餐列表
+const meals = (id) => {
+ return request({
+ url: 'mall/meals/' + id
+ })
+}
+
export {
mall,
- goods
+ goods,
+ meals
}
diff --git a/pages.json b/pages.json
index f629a0e..fcdfb4c 100644
--- a/pages.json
+++ b/pages.json
@@ -17,7 +17,7 @@
"path": "pages/store/index",
"name": "Store",
"style": {
- "navigationBarTitleText": "健康生活",
+ "navigationBarTitleText": "健康生活",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": {
@@ -38,22 +38,22 @@
"name": "User",
"style": {
"navigationBarTitleText": "我的",
- "navigationBarTextStyle":"white",
- "app-plus": {
- "titleNView": {
- "backgroundImage": "linear-gradient(to right, #34ce98, #22aa98)",
- "type": "transparent"
- }
+ "navigationBarTextStyle": "white",
+ "app-plus": {
+ "titleNView": {
+ "backgroundImage": "linear-gradient(to right, #34ce98, #22aa98)",
+ "type": "transparent"
+ }
}
}
}, {
"path": "pages/auth/auth",
"name": "Auth",
"style": {
- "navigationBarTitleText": "登录",
- "navigationStyle":"custom",
- "app-plus":{
- "animationType":"slide-in-bottom"
+ "navigationBarTitleText": "登录",
+ "navigationStyle": "custom",
+ "app-plus": {
+ "animationType": "slide-in-bottom"
}
}
}, {
@@ -75,7 +75,7 @@
"style": {
"navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false
- }
+ }
}, {
"path": "pages/order/index",
"name": "Order",
@@ -105,11 +105,20 @@
"enablePullDownRefresh": false
}
}, {
- "path": "pages/pay/pay",
+ "path": "pages/pay/pay",
+ "name": "Pay",
"style": {
"navigationBarTitleText": "收银台",
"navigationBarBackgroundColor": "#FFFFFF"
}
+ }, {
+ "path": "pages/store/list",
+ "name": "StoreList",
+ "style": {
+ "navigationBarTitleText": "列表",
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "enablePullDownRefresh": true
+ }
}],
"tabBar": {
"borderStyle": "white",
diff --git a/pages/store/index.vue b/pages/store/index.vue
index 1231297..3c9f739 100644
--- a/pages/store/index.vue
+++ b/pages/store/index.vue
@@ -39,16 +39,13 @@
-
- 宝贝爱吃
- 精选食谱 三餐美味
-
-
-
- 轻卡小食
- 火热商品 一目了然
-
-
+
+
+ {{item.title}}
+ {{item.subtitle}}
+
+
+
@@ -71,7 +68,8 @@
banners : [],
goodTabs : [],
newGood : [],
- goodsArr : []
+ goodsArr : [],
+ meals : []
};
},
mounted(){
@@ -80,11 +78,15 @@
methods:{
getMall(){
mall().then(res => {
- this.banners = res.banners
- this.goodsArr = res.goods
- this.newGood = res.news
- this.goodTabs = res.categories
+ console.log(res)
+ this.banners = res.banners
+ this.goodsArr = res.goods
+ this.newGood = res.news
+ this.goodTabs = res.categories
+ this.meals = res.meals
uni.stopPullDownRefresh()
+ }).catch(err => {
+ console.log(err)
})
}
},
diff --git a/pages/store/list.vue b/pages/store/list.vue
new file mode 100644
index 0000000..52df698
--- /dev/null
+++ b/pages/store/list.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+