作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

合并分支 'wangxiaogang' 到 'master'

Wangxiaogang



查看合并请求 !95
... ... @@ -282,6 +282,16 @@ class OrderpageController extends WeChatBaseController{
}
public function get_school(){
$area = $this->request->param('area',0);
if(empty($area)){
$this->error('缺少必要参数');
}
$where['region'] = ['like',"%$area%"];
$data = Db::name('school')->where($where)->select();
$this->success('SUCCESS','',$data);
}
... ...
... ... @@ -284,6 +284,27 @@
$("#city_text").text((items[0] || {}).text + "," + (items[1] || {}).text + "," + (items[2] || {}).text); //该ID为接收城市ID字段
$('#city_text').css('color', '#333333');
$("#city_text").html((items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text);
var area = items[0].text+" "+items[1].text+" "+items[2].text;
$.ajax({
url:"{:url('get_school')}",
type:"GET",
data:{'area':area},
success:function(res){
if(res.code == 1){
var data = res.data;
var html = "";
$(data).each(function(key,vo){
html +="<div class=\"three_model_school_name\" onclick=\"click_school("+vo.id+")\">"+vo.school+"</div>";
})
$('.there_university').html(html);
}else{
alert(res.msg)
}
},
error:function(res){
alert('与服务器断开连接')
}
})
});
}, 200);
});
... ... @@ -303,7 +324,7 @@
// tab 大学
var $xuexiao
$(".there_university div").click(function() {
$("body").on('click',".there_university div",function() {
var index = $(this).index();
$(this).addClass("there_unActive").siblings().removeClass("there_unActive");
if($(this).hasClass("there_unActive")) {
... ... @@ -315,7 +336,7 @@
$('.three_model_school_left').eq(1).addClass('word_color').addClass('three_model_school_hover');
}
});
$('.there_class div').click(function() {
$("body").on("click",'.there_class div',function() {
console.log($xuexiao)
var index2 = $(this).index();
$(this).addClass("there_unActive").siblings().removeClass("there_unActive");
... ...