diff --git a/apis/interfaces/menu.js b/apis/interfaces/menu.js
index 15d307c..e39e162 100644
--- a/apis/interfaces/menu.js
+++ b/apis/interfaces/menu.js
@@ -36,9 +36,25 @@ const menuDet = (recipe) =>{
})
}
+// 指南引导
+const guide = (recipe) =>{
+ return request({
+ url: 'articles/health/guide'
+ })
+}
+
+// 搜索页
+const search = () =>{
+ return request({
+ url: 'health/foods/search'
+ })
+}
+
export {
index,
categories,
queue,
- menuDet
+ menuDet,
+ guide,
+ search
}
diff --git a/apis/interfaces/notice.js b/apis/interfaces/notice.js
new file mode 100644
index 0000000..bc75ea2
--- /dev/null
+++ b/apis/interfaces/notice.js
@@ -0,0 +1,36 @@
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * moduleName: 话题
+ */
+
+import { request } from '../index'
+
+// 分类
+const categories = () =>{
+ return request({
+ url: 'notifications'
+ })
+}
+
+// 列表
+const lists = (type, data) =>{
+ return request({
+ url: 'notifications/' + type + '/list',
+ data:data
+ })
+}
+
+// 详情
+const noticeDet = (notification_id) =>{
+ return request({
+ url: 'notifications/' + notification_id
+ })
+}
+
+export {
+ categories,
+ lists,
+ noticeDet
+}
diff --git a/apis/interfaces/ranking.js b/apis/interfaces/ranking.js
index dbba97e..b82c543 100644
--- a/apis/interfaces/ranking.js
+++ b/apis/interfaces/ranking.js
@@ -23,7 +23,15 @@ const foods = (data) =>{
})
}
+// 食物详情
+const foodDet = (food) =>{
+ return request({
+ url: 'health/foods/' + food
+ })
+}
+
export {
categories,
- foods
+ foods,
+ foodDet
}
diff --git a/apis/interfaces/sign.js b/apis/interfaces/sign.js
index 58684dc..3a26aba 100644
--- a/apis/interfaces/sign.js
+++ b/apis/interfaces/sign.js
@@ -14,6 +14,15 @@ const date = () =>{
})
}
-export {
- date
+// 签到
+const sign = () =>{
+ return request({
+ url: 'user/sign',
+ method: 'POST'
+ })
+}
+
+export {
+ date,
+ sign
}
diff --git a/apis/interfaces/topic.js b/apis/interfaces/topic.js
new file mode 100644
index 0000000..0d2122c
--- /dev/null
+++ b/apis/interfaces/topic.js
@@ -0,0 +1,53 @@
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * moduleName: 话题
+ */
+
+import { request } from '../index'
+
+// 首页
+const index = () =>{
+ return request({
+ url: 'health/discover'
+ })
+}
+
+// 列表
+const lists = (data) =>{
+ return request({
+ url: 'health/topics',
+ data: data
+ })
+}
+
+// 分类
+const categories = () =>{
+ return request({
+ url: 'health/topics/categories'
+ })
+}
+
+// 详情
+const topicDet = (topic) =>{
+ return request({
+ url: 'health/topics/' + topic
+ })
+}
+
+// 点赞
+const topicThumb = (topic) =>{
+ return request({
+ url: 'health/topics/' + topic + '/favorite',
+ method: 'POST'
+ })
+}
+
+export {
+ index,
+ lists,
+ categories,
+ topicDet,
+ topicThumb
+}
diff --git a/pages.json b/pages.json
index ece1cc3..4550cad 100644
--- a/pages.json
+++ b/pages.json
@@ -6,6 +6,20 @@
"navigationBarTitleText": "发现",
"navigationStyle": "custom"
}
+ }, {
+ "path": "pages/index/guide",
+ "name": "indexGuide",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
+ }, {
+ "path": "pages/index/search",
+ "name": "indexSearch",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
}, {
"path": "pages/record/index",
"name": "Record",
@@ -200,30 +214,54 @@
"enablePullDownRefresh": true
}
}, {
- "path": "pages/im/index",
- "name": "IM",
+ "path": "pages/notice/index",
+ "name": "noticeIndex",
"style": {
- "navigationBarTitleText": "聊聊",
+ "navigationBarTitleText": "消息",
"navigationBarBackgroundColor": "#FFFFFF",
- "app-plus": {
- "titleNView": {
- "buttons": [{
- "float": "right",
- "text": "\ue605",
- "fontSrc": "/static/iconfont.ttf",
- "color": "#000",
- "fontSize": "20px"
- }, {
- "float": "left",
- "text": "\ue606",
- "fontSrc": "/static/iconfont.ttf",
- "color": "#000",
- "fontSize": "20px"
- }]
- }
- }
+ "enablePullDownRefresh": true
}
}, {
+ "path": "pages/notice/list",
+ "name": "noticeList",
+ "style": {
+ "navigationBarTitleText": "消息",
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "enablePullDownRefresh": true
+ }
+ }, {
+ "path": "pages/notice/details",
+ "name": "noticeDetails",
+ "style": {
+ "navigationBarTitleText": "消息",
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "enablePullDownRefresh": true
+ }
+ },{
+ "path": "pages/im/index",
+ "name": "IM",
+ "style": {
+ "navigationBarTitleText": "聊聊",
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "app-plus": {
+ "titleNView": {
+ "buttons": [{
+ "float": "right",
+ "text": "\ue605",
+ "fontSrc": "/static/iconfont.ttf",
+ "color": "#000",
+ "fontSize": "20px"
+ }, {
+ "float": "left",
+ "text": "\ue606",
+ "fontSrc": "/static/iconfont.ttf",
+ "color": "#000",
+ "fontSize": "20px"
+ }]
+ }
+ }
+ }
+ },{
"path": "pages/im/chum",
"name": "ImChum",
"style": {
diff --git a/pages/index/guide.vue b/pages/index/guide.vue
new file mode 100644
index 0000000..d45bf00
--- /dev/null
+++ b/pages/index/guide.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 9cdc1ea..f320512 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -4,94 +4,67 @@
欢迎使用ZH健康
-
-
+
+
-
+
低脂鸡胸肉
-
+
精选推荐查看更多
-
-
-
- {{item.title}}
- {{item.describe}}
+
+
+
+ {{item.name}}
+ {{item.description}}
- 话题广场查看更多
+ 话题广场更多分类
-
+
diff --git a/pages/menu/classify.vue b/pages/menu/classify.vue
index 5611823..bb194c2 100644
--- a/pages/menu/classify.vue
+++ b/pages/menu/classify.vue
@@ -1,14 +1,23 @@
-
-
-
+
+
+
+
+
+
@@ -20,31 +29,60 @@
return {
tabArr : [],
menuData : [],
- tabsIndex : this.$Route.query.index
+ tabsIndex : this.$Route.query.index,
+ tabsId : this.$Route.query.id,
+ status : 'loadmore',
+ page : ''
};
},
mounted() {
+ // 获取分类
this.getTab()
- this.getMenu(this.$Route.query.id)
+
+ // 获取列表
+ this.getMenu()
},
methods: {
+ // 分类
getTab(){
categories().then(res => {
this.tabArr = res
})
},
- getMenu(id){
+ // 列表
+ getMenu(pages){
queue({
- category_id: id
+ category_id: this.tabsId,
+ page: pages
}).then(res => {
- this.menuData = res.data
+ if(res.page.current == 1){
+ this.menuData = []
+ }
+ this.menuData = this.menuData.concat(res.data)
+ this.status = this.page.has_more ? 'loadmore': 'nomore'
+ this.page = res.page
})
},
+
+ // 切换分类
tabsClick(item) {
- this.getMenu(item.category_id)
+ this.tabsId = item.category_id
this.tabsIndex = item.index
+ this.getMenu(1)
}
+ },
+
+ // 下拉加载
+ onReachBottom() {
+ if(this.page.has_more){
+ this.status = 'loading'
+ let pages = this.page.current + 1
+ // 获取列表
+ this.getMenu(pages)
+ return
+ }
+ this.status = 'nomore'
}
};
@@ -63,6 +101,7 @@
.box {
padding: 0 $padding;
box-sizing: border-box;
+ margin-top: $margin;
}
// 34CE98
diff --git a/pages/menu/details.vue b/pages/menu/details.vue
index 8b5d7fc..f99e4d9 100644
--- a/pages/menu/details.vue
+++ b/pages/menu/details.vue
@@ -11,7 +11,7 @@
@@ -25,31 +25,31 @@
碳水化合物
-
- 200.00g
+
+ {{ menuData.carbohydrate }}g
蛋白质
-
- 200.00g
+
+ {{ menuData.protein }}g
脂肪
-
- 200.00g
+
+ {{ menuData.cellulose }}g
千卡
-
+
{{ menuData.calory }}
diff --git a/pages/menu/index.vue b/pages/menu/index.vue
index a2a440f..5707409 100644
--- a/pages/menu/index.vue
+++ b/pages/menu/index.vue
@@ -5,7 +5,7 @@
{{ item.name }}
-
+
查看更多
@@ -26,7 +26,6 @@
-
+
+
diff --git a/pages/notice/index.vue b/pages/notice/index.vue
new file mode 100644
index 0000000..ceb7daf
--- /dev/null
+++ b/pages/notice/index.vue
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+ {{ item.type == 'SystemNotification' ? 'APP特色功能介绍、官方推进、活动通知' : '商品订单购买成功、发货成功、退货' }}
+
+
+
+
+
+
+
+
+
diff --git a/pages/notice/list.vue b/pages/notice/list.vue
new file mode 100644
index 0000000..1698454
--- /dev/null
+++ b/pages/notice/list.vue
@@ -0,0 +1,108 @@
+
+
+
+
+
+ {{ item.title }}
+
+
+ {{ item.content }}点我查看
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/ranking/details.vue b/pages/ranking/details.vue
index 5f08d3c..052eda6 100644
--- a/pages/ranking/details.vue
+++ b/pages/ranking/details.vue
@@ -1,13 +1,13 @@
-
+
- 白粉桃
+ {{ foodDate.name }}
- 295千卡/100克
+ {{ foodDate.heat }}
@@ -15,11 +15,11 @@
- 推荐搭配
+ 食物价值
- 白粉桃富含蛋白质、脂肪、维生素、挥发油、有机酸、矿物质、粗纤维和水化合物等多种成份。有解饥消渴,补养身体;且有增进人体胆汁分泌,促进消化和治疗便秘等功效
+ {{ foodDate.recom_text }}
@@ -39,7 +39,7 @@
- 113千卡
+ {{ calory }}{{ current == 0 ? '千卡' : '千焦'}}
每100克(可食用部分)
@@ -65,41 +65,41 @@
含量
- NPV%
+ NRV%
-
+
蛋白质
- 0.1克
+ {{ nutrition.protein.value }}克
- 0.1%
+ {{ nutrition.protein.nrv }}%
-
+
脂肪
- 0.4克
+ {{ nutrition.cellulose.value }}克
- 0.7%
+ {{ nutrition.cellulose.nrv }}%
-
+
碳水化合物
- 0.2克
+ {{ nutrition.carbohydrate.nrv }}克
- 0.1%
+ {{ nutrition.carbohydrate.nrv }}%
@@ -109,20 +109,20 @@
-
+
相关商品
-
-
+
+
- 黑果枸杞
+ {{ item.name }}
- ¥99.00
+ ¥{{ item.price }}
@@ -134,16 +134,40 @@
diff --git a/pages/sign/index.vue b/pages/sign/index.vue
index 533d247..5ac3812 100644
--- a/pages/sign/index.vue
+++ b/pages/sign/index.vue
@@ -2,74 +2,80 @@
-
-
+
- 10天
+ {{ dateData.total }}天
本月签到
-
+
- 1天
+ {{ dateData.continue }}天
- 本月漏签
+ 累计签到
- 2020-01-07
+ {{ dateData.month }}
-
- 1
+
+
+ 日
+
+
+ 一
+
+
+ 二
+
+
+ 三
+
+
+ 四
+
+
+ 五
+
+
+ 六
+
-
- 2
-
-
- 3
-
-
- 4
-
-
- 5
-
-
- 6
-
-
- 7
-
-
- 8
+
+
+ {{ items.isSign ? '签' : items.date }}
+
-
- 立即签到
+
+ {{ dateData.isSign ? '当日已签' : '立即签到'}}
+
+ ZH大健康用户签到
+
@@ -125,20 +149,12 @@
.label {
display: flex;
font-size: $title-size-sm;
- &:first-child {
- flex: 1;
- .day {
- text {
- color: $main-color;
- }
- }
- }
.picture {
width: 74rpx;
height: 74rpx;
margin-right: $margin - 10;
}
- .day {
+ .label-day {
color: $text-gray;
text {
font-size: $title-size-lg;
@@ -147,6 +163,14 @@
padding-right: $padding - 20;
}
}
+ &:first-child {
+ flex: 1;
+ .label-day {
+ text {
+ color: $main-color;
+ }
+ }
+ }
}
}
.signDate {
@@ -158,13 +182,40 @@
font-weight: 600;
}
.list {
- flex-wrap: wrap;
- display: flex;
+ .week {
+ display: flex;
+ .week-label {
+ text-align: center;
+ font-size: $title-size-m;
+ width: 14.28%;
+ margin: $margin - 10 0;
+ }
+ }
.day {
- width: 14.28%;
- text-align: center;
- line-height: 80rpx;
- color: $text-color;
+ flex-wrap: wrap;
+ display: flex;
+ .day-label {
+ width: 14.28%;
+ text-align: center;
+ line-height: 80rpx;
+ color: $text-color;
+ font-size: $title-size-m;
+ .label-block {
+ display: inline-block;
+ background-color: transparent;
+ color: $text-gray-m;
+ border-radius: 50%;
+ width: 56rpx;
+ height: 56rpx;
+ line-height: 56rpx;
+ text-align: center;
+ &.active {
+ background-color: $main-color;
+ color: white;
+ border-radius: 50%;
+ }
+ }
+ }
}
}
@@ -176,7 +227,18 @@
text-align: center;
border-radius: $radius-m;
line-height: 90rpx;
+ &.active {
+ background-color: #ededed;
+ color: $text-gray;
+ }
}
}
}
+
+ .tipsText {
+ text-align: center;
+ line-height: 120rpx;
+ font-size: $title-size-sm;
+ color: $text-gray-m;
+ }
}
diff --git a/pages/topic/details.vue b/pages/topic/details.vue
index a34807d..578b4f2 100644
--- a/pages/topic/details.vue
+++ b/pages/topic/details.vue
@@ -1,46 +1,61 @@
-
- 坚持做瑜伽可以减肥吗?
-
-
-
-
-
- ZH大健康
+
+
+
+
+ {{ topicData.name }}
-
- ZH大健康官方账号
+
+ # 话题 -- {{ topicData.category.name }} #
-
-
-
- 提到骨质疏松,大家的第一反应估计就是补钙,骨质疏松是一种悄无声息的疾病,大多数患者在早期没有症状,随着骨质的逐步流失,逐渐会有全身关节疼痛、甚至稍有不慎便摔成骨折。
- 骨质疏松是一种以低骨量和骨组织微结构破坏为特征,导致骨质脆性增加和易于骨折的全身性骨代谢性疾病。常见于老年人,但各年龄时期都可以发病。
- 一般的症状包括腰背疼痛、身高下降、驼背以及骨折发生等,但事实上,在这些症状发生之前,骨量已经大量流失,骨质疏松也早已开始了。
- 一旦发生骨质疏松性骨折危害巨大,特别是股骨颈等部位发生的骨折,会给患者带来严重的疼痛、高额医疗支出、致残失能等。
- 严重影响生活质量的同时,给家庭也造成巨大的负担,并且会缩短患者寿命,因而骨质疏松性骨折常被称为“人生的最后一次骨折”。提到骨质疏松,大家的第一反应估计就是补钙,骨质疏松是一种悄无声息的疾病,大多数患者在早期没有症状,随着骨质的逐步流失,逐渐会有全身关节疼痛、甚至稍有不慎便摔成骨折。
- 骨质疏松是一种以低骨量和骨组织微结构破坏为特征,导致骨质脆性增加和易于骨折的全身性骨代谢性疾病。常见于老年人,但各年龄时期都可以发病。
- 一般的症状包括腰背疼痛、身高下降、驼背以及骨折发生等,但事实上,在这些症状发生之前,骨量已经大量流失,骨质疏松也早已开始了。
- 一旦发生骨质疏松性骨折危害巨大,特别是股骨颈等部位发生的骨折,会给患者带来严重的疼痛、高额医疗支出、致残失能等。
- 严重影响生活质量的同时,给家庭也造成巨大的负担,并且会缩短患者寿命,因而骨质疏松性骨折常被称为“人生的最后一次骨折”。
-
-
-
- 相关商品
-
-
-
-
-
- 黑果枸杞
+
+ {{ topicData.description }}
+
+
+
+ {{ topicData.clicks }} 人游览
+ {{ topicData.favorites }} 人点赞
-
- ¥99.00
+
+
+ {{ isFavorite ? '已赞' : '点赞' }}
-
- 查看商品
+
+
+
+
+
+
+ {{ topicData.author }}
+
+
+ ZH大健康官方账号
+
+
+
+
+
+
+
+
+ 相关商品
+
+
+
+
+
+ {{ item.name }}
+
+
+ ¥{{ item.price }}
+
+
+
+ 查看商品
+
+
@@ -48,59 +63,164 @@
diff --git a/static/dev/img-00.png b/static/dev/img-00.png
index ab83f2e..7f02387 100644
Binary files a/static/dev/img-00.png and b/static/dev/img-00.png differ
diff --git a/static/find/logo.png b/static/find/logo.png
new file mode 100644
index 0000000..42a745f
Binary files /dev/null and b/static/find/logo.png differ
diff --git a/static/icon/sign-icon.gif b/static/icon/sign-icon.gif
new file mode 100644
index 0000000..42ab2d2
Binary files /dev/null and b/static/icon/sign-icon.gif differ
diff --git a/static/icon/sign-icon.png b/static/icon/sign-icon.png
deleted file mode 100644
index 172c6ce..0000000
Binary files a/static/icon/sign-icon.png and /dev/null differ
diff --git a/uni_modules/oct-menu/components/oct-menu/oct-menu.vue b/uni_modules/oct-menu/components/oct-menu/oct-menu.vue
index aa20acb..ca18a00 100644
--- a/uni_modules/oct-menu/components/oct-menu/oct-menu.vue
+++ b/uni_modules/oct-menu/components/oct-menu/oct-menu.vue
@@ -12,7 +12,15 @@
{{ item.name }}
@@ -41,14 +49,16 @@
default: false
},
- // 是否是详情
+ // det是详情 rank为排行
isType: {
- type: Boolean,
- default: false
+ type:'',
+ default : () => {
+ return {}
+ }
}
},
mounted() {
-
+ // console.log(this.$props)
}
}
diff --git a/uni_modules/oct-topic/components/oct-topic/oct-topic.vue b/uni_modules/oct-topic/components/oct-topic/oct-topic.vue
index bdfdb5a..147e27b 100644
--- a/uni_modules/oct-topic/components/oct-topic/oct-topic.vue
+++ b/uni_modules/oct-topic/components/oct-topic/oct-topic.vue
@@ -1,11 +1,11 @@
-
- {{ item.title }}
+
+ {{ item.name }}
- 阅读{{ item.read }}
- 赞{{ item.praise }}
+ 阅读 {{ item.clicks }}
+ 赞 {{ item.favorites }}