From 51274bf749f0bdaf1324f00801dd3bba5af7a521 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Wed, 24 Feb 2021 18:10:39 +0800 Subject: [PATCH] add api --- src/js/api.js | 5 + src/pages/course/experience/experience.vue | 155 ++++++++++++++++++++++++----- src/pages/course/list/list.vue | 6 +- src/pages/course/offer/offer.vue | 62 +++++++++--- src/pages/course/offer_info/offer_info.vue | 24 ++++- src/pages/index/index.vue | 4 +- 6 files changed, 211 insertions(+), 45 deletions(-) diff --git a/src/js/api.js b/src/js/api.js index 8ca16a5..dbe4515 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -35,6 +35,11 @@ API['course'] = { homeworkRecordInfo: `${ORIGIN}/stadium/coach/homework/recordInfo`, // 小程序-作业完成详情 homeworkAdd: `${ORIGIN}/stadium/coach/homework/add`, // 小程序-布置作业 + + // 体验课 + getOfferPriceList: `${ORIGIN}/stadium/coach/getOfferPriceList`, // 小程序-体验课预约列表 + offerExpBookingPrice: `${ORIGIN}/stadium/coach/offerExpBookingPrice`, // 体验课-报价 - 教练端 + } API['approve'] = { diff --git a/src/pages/course/experience/experience.vue b/src/pages/course/experience/experience.vue index e7d9758..36d8e4b 100644 --- a/src/pages/course/experience/experience.vue +++ b/src/pages/course/experience/experience.vue @@ -1,56 +1,70 @@ @@ -127,15 +220,21 @@ export default { padding: 20upx; border-radius: 10upx; background-color: #fff; - border: 2upx solid $themeColor; + border: 2upx solid transparent; + &.border{ + border-color: $themeColor; + } .i-header{ @include centerFlex(flex-end); .h-icon{ width: 36upx; height: 36upx; - border: 2upx solid #9a9a9d; border-radius: 50%; + overflow: hidden; + &.border{ + box-shadow: inset 0 0 0 2upx #9a9a9d; + } >image{ width: 100%; height: 100%; @@ -248,7 +347,13 @@ export default { width: 36upx; height: 36upx; border-radius: 50%; - border: 2upx solid #9a9a9d; + &.border{ + box-shadow: inset 0 0 0 2upx #9a9a9d; + } + >image{ + width: 100%; + height: 100%; + } } } .fb-btn{ diff --git a/src/pages/course/list/list.vue b/src/pages/course/list/list.vue index abdd679..263d977 100644 --- a/src/pages/course/list/list.vue +++ b/src/pages/course/list/list.vue @@ -32,7 +32,7 @@ 预约人数:{{e.experience_person_number || 0}} - 查看详情 + 查看详情 @@ -162,8 +162,8 @@ export default { this.$nextTick(_=>this.$forceUpdate()); }, // 体验 - toExInfo(){ - util.routeTo(`/pages/course/experience/experience`, 'nT'); + toExInfo(e){ + util.routeTo(`/pages/course/experience/experience?course_id=${e.id}`, 'nT'); }, toClass(e){ console.warn(e); diff --git a/src/pages/course/offer/offer.vue b/src/pages/course/offer/offer.vue index 782a4b3..03643ac 100644 --- a/src/pages/course/offer/offer.vue +++ b/src/pages/course/offer/offer.vue @@ -3,36 +3,36 @@ 课程名称: - 哈哈哈哈哈哈哈哈哈 + {{optionsQuery.course_name || '-'}} 上课用户: - 张三 + {{optionsQuery.user_name || '-'}} 课程次数: - + 课程报价: - + - 确定 + 确定 - + 请确定课程报价信息 - 课程名称:羽毛球课程羽毛球课程(包学会) - 上课用户:羽毛球课程羽毛球课程(包学会) - 课程次数:羽毛球课程羽毛球课程(包学会) - 课程报价:羽毛球课程羽毛球课程(包学会) + 课程名称:{{optionsQuery.course_name || '-'}} + 上课用户:{{optionsQuery.user_name || '-'}} + 课程次数:{{courseNumber || '-'}} + 课程报价:{{coursePrice || '-'}} - 取消 - 提交 + 取消 + 提交 @@ -40,8 +40,46 @@ diff --git a/src/pages/course/offer_info/offer_info.vue b/src/pages/course/offer_info/offer_info.vue index 4b2c3da..a08e6ab 100644 --- a/src/pages/course/offer_info/offer_info.vue +++ b/src/pages/course/offer_info/offer_info.vue @@ -1,15 +1,33 @@ diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 1cac65d..243c04c 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -14,7 +14,7 @@ 本月课时 {{ course_times || 0 }} - +