Commit acd10efa by 陈超

T

parent 39ac60fe
...@@ -36,62 +36,52 @@ ...@@ -36,62 +36,52 @@
<script src="__THEMEW3G__/js/extension.js" charset="utf-8"></script> <script src="__THEMEW3G__/js/extension.js" charset="utf-8"></script>
<script> <script>
$(function(){ // $(function(){
$('#btn_search_site').click(function(){ // $('#btn_search_site').click(function(){
var search_cate = $('#search_cate').val(); // var search_cate = $('#search_cate').val();
var search_combo_input = $('#search_combo_input').val(); // var search_combo_input = $('#search_combo_input').val();
if(search_combo_input != ''){ // if(search_combo_input != ''){
if(search_cate == 'course'){ // if(search_cate == 'course'){
window.open("{:U('course/Video/index')}"+"?search="+search_combo_input); // window.open("{:U('course/Video/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'school'){ // }else if(search_cate == 'school'){
window.open("{:U('school/Index/index')}"+"?search="+search_combo_input); // window.open("{:U('school/Index/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'teacher'){ // }else if(search_cate == 'teacher'){
window.open("{:U('classroom/Teacher/index')}"+"?search="+search_combo_input); // window.open("{:U('classroom/Teacher/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'exams'){ // }else if(search_cate == 'exams'){
window.open("{:U('exams/Index/paper')}"+"&search="+search_combo_input); // window.open("{:U('exams/Index/paper')}"+"&search="+search_combo_input);
}else if(search_cate == 'goods'){ // }else if(search_cate == 'goods'){
window.open("{:U('mall/Goods/index')}"+"?search="+search_combo_input); // window.open("{:U('mall/Goods/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'wenda'){ // }else if(search_cate == 'wenda'){
window.open("{:U('wenda/Index/index')}"+"?search="+search_combo_input); // window.open("{:U('wenda/Index/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'news'){ // }else if(search_cate == 'news'){
window.open("{:U('news/Topic/index')}"+"?search="+search_combo_input); // window.open("{:U('news/Topic/index')}"+"?search="+search_combo_input);
} // }
} // }
}); // });
$(document).keydown(function(event){ // $(document).keydown(function(event){
var search_cate = $('#search_cate').val(); // var search_cate = $('#search_cate').val();
var search_combo_input = $('#search_combo_input').val(); // var search_combo_input = $('#search_combo_input').val();
if(search_combo_input != '') { // if(search_combo_input != '') {
if (event.keyCode == 13) { // if (event.keyCode == 13) {
if(search_cate == 'course'){ // if(search_cate == 'course'){
window.open("{:U('course/Video/index')}"+"?search="+search_combo_input); // window.open("{:U('course/Video/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'school'){ // }else if(search_cate == 'school'){
window.open("{:U('school/Index/index')}"+"?search="+search_combo_input); // window.open("{:U('school/Index/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'teacher'){ // }else if(search_cate == 'teacher'){
window.open("{:U('classroom/Teacher/index')}"+"?search="+search_combo_input); // window.open("{:U('classroom/Teacher/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'exams'){ // }else if(search_cate == 'exams'){
window.open("{:U('exams/Index/paper')}"+"&search="+search_combo_input); // window.open("{:U('exams/Index/paper')}"+"&search="+search_combo_input);
}else if(search_cate == 'goods'){ // }else if(search_cate == 'goods'){
window.open("{:U('mall/Goods/index')}"+"?search="+search_combo_input); // window.open("{:U('mall/Goods/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'wenda'){ // }else if(search_cate == 'wenda'){
window.open("{:U('wenda/Index/index')}"+"?search="+search_combo_input); // window.open("{:U('wenda/Index/index')}"+"?search="+search_combo_input);
}else if(search_cate == 'news'){ // }else if(search_cate == 'news'){
window.open("{:U('news/Topic/index')}"+"?search="+search_combo_input); // window.open("{:U('news/Topic/index')}"+"?search="+search_combo_input);
} // }
} // }
} // }
}); // });
}); // });
$(function(){
$(".aingstoit p").click(function(){
if ($(".aingstoit span").css("display")=="none") {
$(".aingstoit span").show();
} else {
$(".aingstoit span").hide();
}
})
})
</script> </script>
</head> </head>
<body> <body>
...@@ -333,6 +323,7 @@ ...@@ -333,6 +323,7 @@
let url = "{:U('mall/Goods/view')}" let url = "{:U('mall/Goods/view')}"
window.location.href = url.replace(/\[.*?\]/g, item.id) window.location.href = url.replace(/\[.*?\]/g, item.id)
}, },
//搜索课程
searchCourse: function() { searchCourse: function() {
let that = this let that = this
let on = "{$marketConf['order_switch']}" == 1 let on = "{$marketConf['order_switch']}" == 1
...@@ -355,6 +346,7 @@ ...@@ -355,6 +346,7 @@
} }
}) })
}, },
//搜索题目
searchQuestion: function() { searchQuestion: function() {
let that = this let that = this
$.ajax({ $.ajax({
...@@ -376,6 +368,7 @@ ...@@ -376,6 +368,7 @@
} }
}) })
}, },
//搜索物品
searchGoods: function() { searchGoods: function() {
let that = this let that = this
$.ajax({ $.ajax({
......
...@@ -194,7 +194,6 @@ ...@@ -194,7 +194,6 @@
} }
}, },
onLoad: function() { onLoad: function() {
console.log('onLoad')
let that = this let that = this
let opt = that.options[that.tab] let opt = that.options[that.tab]
if(that.tab == 2) { if(that.tab == 2) {
...@@ -219,6 +218,10 @@ ...@@ -219,6 +218,10 @@
that.finished = res.nowPage >= res.totalPages that.finished = res.nowPage >= res.totalPages
} }
}) })
} else if(that.tab == 1) {
} else {
} }
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div id="app"> <div id="app">
<div class="layout_v"> <div class="layout_v">
<div class="goods_detail_top"> <div class="goods_detail_top">
<van-image ></van-image> <van-image width="100%" height="160" :src="info.cover" ></van-image>
</div> </div>
</div> </div>
</div> </div>
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
el: "#app", el: "#app",
created:function(){ created:function(){
let d = {:json_encode($data)}; this.info = {:json_encode($data)};
console.log(d)
}, },
data: function() { data: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment