diff --git a/config/requestConfig.js b/config/requestConfig.js
index 57862e2..29dd9fa 100644
--- a/config/requestConfig.js
+++ b/config/requestConfig.js
@@ -128,6 +128,8 @@ $http.requestStart = function(options) {
}
if (storeUserInfo.token) {
options.header['token'] = storeUserInfo.token;
+ options.header['appType'] = 'medical';
+
};
return options;
}
diff --git a/pages.json b/pages.json
index 64d47dc..6157728 100644
--- a/pages.json
+++ b/pages.json
@@ -270,7 +270,7 @@
"text": "购物车"
},
{
- "pagePath": "pages/library/library",
+ "pagePath": "pages/news/news",
"iconPath": "static/tab/tab_nor_03.png",
"selectedIconPath": "static/tab/tab_cur_03.png",
"text": "太湖公益"
diff --git a/pages/course/index.vue b/pages/course/index.vue
index cec33f5..6dfd472 100644
--- a/pages/course/index.vue
+++ b/pages/course/index.vue
@@ -2,14 +2,31 @@
-
-
-
- {{news.title}}
-
-
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
+
-
+
+
+
@@ -20,24 +37,23 @@
var clear;
import {
mapState
- } from 'vuex';
+ } from 'vuex';
export default {
data() {
return {
playData: {},
- newsId: null,
- news: {
- content: '',
- title: ''
- }
+ tagId: null,
+ pageTitle: '',
+ courseList: []
};
},
//第一次加载
onLoad(e) {
// 隐藏原生的tabbar
uni.hideTabBar();
- this.newsId = e.newsid
- console.log(e, '------')
+ this.tagId = e.id
+ this.pageTitle = e.title
+ console.log(e, '传入分类id')
},
computed: {
...mapState(['userInfo'])
@@ -55,15 +71,27 @@
//方法
methods: {
getData() {
- this.$http
- .post('common/message/getMessageById?id=' + this.newsId)
+ $http.request({
+ url: "medical/home/getMarketCourseList",
+ method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
+ data: {
+ "id": this.tagId,
+ "limit": 12,
+ "page": 1
+ },
+ header: { //默认 无 说明:请求头
+ 'Content-Type': 'application/json'
+ },
+ })
.then(res => {
if (res.code == 0) {
- this.news.content = res.result.content
- this.news.title = res.result.title
+ if (res.courseList.records.length > 0) {
+ this.courseList = res.courseList.records
+ } else {
+ this.courseList = []
+ }
}
- }).catch(e => {
- console.log(e, '获取新闻详情报错')
+
});
}
},
@@ -71,12 +99,46 @@
\ No newline at end of file
diff --git a/pages/news/news.vue b/pages/news/news.vue
index cec33f5..51c390b 100644
--- a/pages/news/news.vue
+++ b/pages/news/news.vue
@@ -75,7 +75,7 @@
.box {
background-color: #fff;
@include pleft_right(10px);
- min-height: calc(100vh - 70rpx);
+ min-height: calc(100vh - 270rpx);
}
.title{font-size: 32rpx; font-weight: bold; display: block; text-align: center;}
.content { font-size: 26rpx; line-height: 48rpx; margin-top: 10rpx;}
diff --git a/pages/peanut/home.vue b/pages/peanut/home.vue
index fea2085..876716e 100644
--- a/pages/peanut/home.vue
+++ b/pages/peanut/home.vue
@@ -188,7 +188,7 @@
- 更多试听
+ 更多试听
@@ -519,9 +519,9 @@
},
// 跳转
- onPageJump(url,thatId) {
+ onPageJump(url,thatId,title) {
uni.navigateTo({
- url: `${url}?id=${thatId}`
+ url: `${url}?id=${thatId}&title=${title}`
});
},
@@ -1326,6 +1326,6 @@
}
.imgcontainer {
- background-color: #d0e9ff;
+ background-color: $imgBg;
}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
new file mode 100644
index 0000000..be51657
--- /dev/null
+++ b/project.config.json
@@ -0,0 +1,28 @@
+{
+ "appid": "touristappid",
+ "compileType": "miniprogram",
+ "libVersion": "2.25.3",
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "setting": {
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "minified": true,
+ "enhance": true,
+ "showShadowRootInWxmlPanel": true,
+ "packNpmRelationList": [],
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ }
+ },
+ "condition": {},
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 2
+ }
+}
\ No newline at end of file
diff --git a/style/mixin.scss b/style/mixin.scss
index 267a841..dd7ea18 100644
--- a/style/mixin.scss
+++ b/style/mixin.scss
@@ -3,6 +3,8 @@
$themeColor: #258feb;
// 页面背景色
$containerColor: #f4f7ff;
+// 图片背景颜色
+$imgBg: #edf3ff;
@mixin theme($type,$path:''){
@if $type == "btn_bg" {
@@ -17,6 +19,7 @@ $containerColor: #f4f7ff;
background-image: linear-gradient(180deg, #e4edff 0%, #fff 100%);
}
}
+
// 左右paddingpx
@mixin pleft_right($p) {
padding-left:$p ;