+
diff --git a/app/Http/Home/Views/course/show.volt b/app/Http/Home/Views/course/show.volt
index 6f24937c..c229a53b 100644
--- a/app/Http/Home/Views/course/show.volt
+++ b/app/Http/Home/Views/course/show.volt
@@ -4,10 +4,11 @@
{{ partial('macros/course') }}
- {% set favorite_title = course.me.favorited ? '取消收藏' : '收藏' %}
+ {% set favorite_title = course.me.favorited ? '取消收藏' : '收藏课程' %}
{% set favorite_star = course.me.favorited ? 'layui-icon-star-fill' : 'layui-icon-star' %}
{% set full_course_url = full_url({'for':'home.course.show','id':course.id}) %}
{% set favorite_url = url({'for':'home.course.favorite','id':course.id}) %}
+ {% set consult_url = url({'for':'home.consult.add'},{'course_id':course.id}) %}
{% set qrcode_url = url({'for':'home.qrcode'},{'text':full_course_url}) %}
@@ -18,6 +19,9 @@
+ {% if course.market_price > 0 %}
+
+ {% endif %}
diff --git a/app/Http/Home/Views/course/show_order.volt b/app/Http/Home/Views/course/show_order.volt
index c7420072..ea89b2c9 100644
--- a/app/Http/Home/Views/course/show_order.volt
+++ b/app/Http/Home/Views/course/show_order.volt
@@ -1,8 +1,12 @@
{% if course.me.owned == 0 and course.market_price > 0 %}
{% set order_url = url({'for':'home.order.confirm'},{'item_id':course.id,'item_type':1}) %}
-
+ {% set live_model_ok = course.model == 2 and course.attrs.end_date < date('Y-m-d') %}
+ {% set other_model_ok = course.model != 2 %}
+ {% if live_model_ok or other_model_ok %}
+
+ {% endif %}
{% endif %}
{% if course.market_price == 0 %}
diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css
index aa001338..30ba9113 100644
--- a/public/static/home/css/common.css
+++ b/public/static/home/css/common.css
@@ -1522,8 +1522,6 @@
.consult-info .item {
margin-bottom: 15px;
line-height: 1.5em;
- height: 1.5em;
- clear: both;
}
.consult-info .item .label {
diff --git a/public/static/home/js/course.show.js b/public/static/home/js/course.show.js
index 8e0f17e1..9a022292 100644
--- a/public/static/home/js/course.show.js
+++ b/public/static/home/js/course.show.js
@@ -29,6 +29,21 @@ layui.use(['jquery', 'layer', 'helper'], function () {
});
});
+ /**
+ * 咨询
+ */
+ $('.icon-help').on('click', function () {
+ var url = $(this).parent().data('url');
+ helper.checkLogin(function () {
+ layer.open({
+ type: 2,
+ title: '课程咨询',
+ content: [url, 'no'],
+ area: ['640px', '300px']
+ });
+ });
+ });
+
/**
* 打赏
*/