diff --git a/manifest.json b/manifest.json index 71c59c0..628b90b 100644 --- a/manifest.json +++ b/manifest.json @@ -134,15 +134,15 @@ "ios" : { "appstore" : "unpackage/res/icons/1024x1024.png", "ipad" : { - "app" : "", - "app@2x" : "", - "notification" : "", - "notification@2x" : "", - "proapp@2x" : "", - "settings" : "", - "settings@2x" : "", - "spotlight" : "", - "spotlight@2x" : "" + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" }, "iphone" : { "app@2x" : "unpackage/res/icons/120x120.png", diff --git a/pages.json b/pages.json index 0bf9f03..41c498a 100644 --- a/pages.json +++ b/pages.json @@ -254,6 +254,20 @@ { "navigationBarTitleText" : "课程详细" } + }, + { + "path" : "pages/course/courseSet", + "style" : + { + "navigationBarTitleText" : "课程设置" + } + }, + { + "path" : "pages/course/illustrate", + "style" : + { + "navigationBarTitleText" : "课程说明" + } } ], "globalStyle": { @@ -284,7 +298,7 @@ "text": "购物车" }, { - "pagePath": "pages/news/news", + "pagePath": "pages/peanut/shopping", "iconPath": "static/tab/tab_nor_03.png", "selectedIconPath": "static/tab/tab_cur_03.png", "text": "太湖公益" diff --git a/pages/course/courseDetail.vue b/pages/course/courseDetail.vue index 36c090b..7a1c64e 100644 --- a/pages/course/courseDetail.vue +++ b/pages/course/courseDetail.vue @@ -4,96 +4,69 @@ - + + - - 桃源探秘•陶渊明的魔域桃源 - - - - - - - ¥299起 - - - - - - - 加入收藏 - - - - - 购买整套课程 - - + + {{course.title}} - + - - 需要注意的是当使用插槽时,内置样式将会失效,只保留排版样式,此时的样式需要开发者自己实现 如果 uni-list-item - 组件内置属性样式无法满足需求,可以使用插槽来自定义uni-list-item里的内容。 uni-list-item提供了3个可扩展的插槽: + - - - 上部 - - - - - - 下部 + + + + + {{item.title}} - - - 一、概论 + + + {{item.title}} - - 二、阴阳应象大论(上) - - - 三、阴阳应象大论(下) - - - 四、阴阳离合论(一) - - - 一、概论 - - - 二、阴阳应象大论(上) - - - 三、阴阳应象大论(下) - - - 四、阴阳离合论(一) - - - 一、概论 - - - 二、阴阳应象大论(上) - - - 三、阴阳应象大论(下) - - - 四、阴阳离合论(一) + + + + 您还未购买此课程,开通 超级VIP 或 购买课程 均可观看课程 + + + + + 立即购买 + + + + + 开通超级VIP + + + - - - - + + + + + 请选择您的购买时长 + + + + {{item.productName}} - ¥{{item.price}} + + + + + @@ -135,11 +108,16 @@ // backgroundColor: '#258feb' }, + pricespop:false, subList: [], scrollable: false, pageTitle: null, courseList: [], - // status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据 + course: {}, + librayList: [], // 目录列表 + curId: null, + curIndex: 0, + proPriceList:[], }; }, @@ -147,11 +125,10 @@ onLoad(e) { // 隐藏原生的tabbar uni.hideTabBar(); - this.courseId = e.id - this.pageTitle = e.title + // this.pageTitle = e.title console.log(e, '传入分类id') // this.getCateList(this.courseId) - // this.getData(this.courseId) + this.getData(e.id) }, onPageScroll(e) { this.scrollTop = e.scrollTop; @@ -174,17 +151,13 @@ // musicPlay }, //方法 - methods: { + methods: { getData(id) { - this.status = 1 - this.flag = false $http.request({ - url: "medical/home/getMedicalCourseList", + url: "sociology/course/getCourseDetail", method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 data: { - "id": id, - "limit": 12, - "page": this.page + "id": id }, header: { //默认 无 说明:请求头 'Content-Type': 'application/json' @@ -192,26 +165,98 @@ }) .then(res => { if (res.code == 0) { - if (res.courses.records.length > 0) { - var list = res.courses.records - this.courseList = this.courseList.concat(list) - if (res.courses.pages > this.page) { - this.status = 0 - } else { - this.status = 2 - } - } else if (this.page > 1) { - this.status = 2 // 加载完成 - - } else { - - this.status = 3 // 暂无数据 + this.course = res.data.course + this.pageTitle = this.course.title + this.librayList = res.data.catalogues + if (this.librayList.length > 0) { + this.courseId = this.librayList[0].id + this.curId = this.librayList[0].id + this.curIndex = 0 + this.getChapterList(this.courseId) } - console.log('status', this.status) } - this.flag = true + }).catch(e => { - console.log(e, '数据报错') + console.log(e, '获取目录数据报错') + }); + + }, + goBuy() { + $http.request({ + url: "sociology/product/getProductListForCourse", + method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 + data: { + "id": this.curId + }, + header: { //默认 无 说明:请求头 + 'Content-Type': 'application/json' + }, + }) + .then(res => { + if (res.code == 0) { + if (res.productList.length > 0) { + this.proPriceList = res.productList + } else { + this.proPriceList = [] + } + } + + }).catch(e => { + console.log(e, '获取商品列表报错') + }); + + this.pricespop = true + }, + closePup(){ + this.pricespop = false + this.proPriceList = [] + }, + choosePrice(item){ + console.log(item,'choosePrice') + uni.showModal({ + title: '提示', + cancelText: '再想想', + content: `您正在购买 ${item.productName},价格是${item.price}元,是否继续?`, + success: function(res) { + if (res.confirm) { + console.log('用户点击确定'); + } else if (res.cancel) { + console.log('用户点击取消'); + } + } + }); + }, + clicklib(item, index) { + if (item.id == this.curId) { + return + } + this.curIndex = index + this.curId = item.id + this.getChapterList(item.id) + }, + getChapterList(id) { + $http.request({ + url: "sociology/course/getCourseCatalogueChapterList", + method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 + data: { + "id": id + }, + header: { //默认 无 说明:请求头 + 'Content-Type': 'application/json' + }, + }) + .then(res => { + if (res.code == 0) { + if (res.chapterList.length > 0) { + this.courseList = res.chapterList + // console.log('status', res) + } else { + this.courseList = [] + } + } + + }).catch(e => { + console.log(e, '获取章节列表数据报错') }); }, // 跳转 @@ -225,6 +270,34 @@ \ No newline at end of file diff --git a/pages/course/illustrate.vue b/pages/course/illustrate.vue new file mode 100644 index 0000000..f9de287 --- /dev/null +++ b/pages/course/illustrate.vue @@ -0,0 +1,226 @@ + + + + + + + + 点击课程名称即可查看对应的课程说明 + + + + + + + + --- {{item1.title}} + + + --- --- {{item2.title}} + + + --- --- --- {{item3.title}} + + + + + + + + + + + + + + + + 超强树选择器、树组件、树插件、无限级联树、单选树、多选树、自定义样式树、树形选择 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/course/index.vue b/pages/course/index.vue index e7b7f1d..f69210e 100644 --- a/pages/course/index.vue +++ b/pages/course/index.vue @@ -2,7 +2,7 @@ - + 课程说明 - - + + 了解课程 @@ -79,6 +79,7 @@ return { playData: {}, tagId: null, + pid:null, fixed: false, fatherTabId: null, subTabId: null, // @@ -115,6 +116,7 @@ uni.hideTabBar(); this.tagId = e.id this.pageTitle = e.title + this.pid = e.pid console.log(e, '传入分类id') this.getCateList(this.tagId) }, @@ -193,6 +195,10 @@ } + }else{ + this.subList = [] + this.subTabId = id + this.getData(id) } console.log(this.curTagId, '当前高亮') } @@ -278,6 +284,12 @@ url: `${url}?id=${id}` }); }, + + shuomingPage(url,id,pid){ + uni.navigateTo({ + url: `${url}?id=${id}&pid=${pid}` + }); + } }, }; @@ -289,7 +301,7 @@ padding: 0 20rpx; } - + .curseSet{margin-right: 20rpx; font-size: 26rpx;} .fixed { position: fixed; z-index: 1; width: 100%; background-color: #fff; diff --git a/pages/news/news.vue b/pages/news/news.vue index 51c390b..fb2d669 100644 --- a/pages/news/news.vue +++ b/pages/news/news.vue @@ -2,20 +2,22 @@ - + {{news.title}} - + + - - + + @@ -73,7 +114,7 @@ @import '@/style/mixin.scss'; .box { - background-color: #fff; + background-color: #fff; @include pleft_right(10px); min-height: calc(100vh - 270rpx); } diff --git a/pages/peanut/home.vue b/pages/peanut/home.vue index 19c64eb..43d8b86 100644 --- a/pages/peanut/home.vue +++ b/pages/peanut/home.vue @@ -14,10 +14,6 @@ - - - 课程设置 - 我的课程 @@ -30,6 +26,10 @@ 吴门医述 + + + 学习大纲 + @@ -174,7 +174,7 @@ 精彩试听 - + @@ -182,7 +182,7 @@ {{item.title}} - + 购买 @@ -197,14 +197,27 @@ - - + + + + + + diff --git a/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue b/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue new file mode 100644 index 0000000..384c39a --- /dev/null +++ b/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue @@ -0,0 +1,147 @@ + + + + + + + diff --git a/uni_modules/uni-collapse/package.json b/uni_modules/uni-collapse/package.json new file mode 100644 index 0000000..65c5c2e --- /dev/null +++ b/uni_modules/uni-collapse/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-collapse", + "displayName": "uni-collapse 折叠面板", + "version": "1.4.4", + "description": "Collapse 组件,可以折叠 / 展开的内容区域。", + "keywords": [ + "uni-ui", + "折叠", + "折叠面板", + "手风琴" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-collapse/readme.md b/uni_modules/uni-collapse/readme.md new file mode 100644 index 0000000..bc758eb --- /dev/null +++ b/uni_modules/uni-collapse/readme.md @@ -0,0 +1,12 @@ + + +## Collapse 折叠面板 +> **组件名:uni-collapse** +> 代码块: `uCollapse` +> 关联组件:`uni-collapse-item`、`uni-icons`。 + + +折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/uni_modules/uni-icons/changelog.md b/uni_modules/uni-icons/changelog.md index 6449885..620ab02 100644 --- a/uni_modules/uni-icons/changelog.md +++ b/uni_modules/uni-icons/changelog.md @@ -1,3 +1,21 @@ +## 2.0.9(2024-01-12) +fix: 修复图标大小默认值错误的问题 +## 2.0.8(2023-12-14) +- 修复 项目未使用 ts 情况下,打包报错的bug +## 2.0.7(2023-12-14) +- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug +## 2.0.6(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.5(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.4(2023-12-06) +- 优化 uni-app x 下示例项目图标排序 +## 2.0.3(2023-12-06) +- 修复 nvue下引入组件报错的bug +## 2.0.2(2023-12-05) +-优化 size 属性支持单位 +## 2.0.1(2023-12-05) +- 新增 uni-app x 支持定义图标 ## 1.3.5(2022-01-24) - 优化 size 属性可以传入不带单位的字符串数值 ## 1.3.4(2022-01-24) diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue b/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue new file mode 100644 index 0000000..398678e --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue @@ -0,0 +1,91 @@ + + + {{unicode}} + + + + + + diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue index 86e7444..7da5356 100644 --- a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue @@ -1,24 +1,28 @@ - {{unicode}} + {{unicode}} - + + +