From 81e47a908e2450ded6d7d33426d9b2b26fab0fb9 Mon Sep 17 00:00:00 2001 From: anyv <anyu@bronet.cn> Date: Thu, 27 Jun 2019 08:50:56 +0800 Subject: [PATCH] 14 --- app/portal/controller/PersonalcenterController.php | 1 + public/themes/simpleboot3/portal/order_salesman/get_all.html | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------- public/themes/simpleboot3/portal/personalcenter/mall_profit.html | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------- simplewind/cmf/controller/WeChatBaseController.php | 2 +- 4 files changed, 356 insertions(+), 111 deletions(-) diff --git a/app/portal/controller/PersonalcenterController.php b/app/portal/controller/PersonalcenterController.php index 00985ea..645ddac 100644 --- a/app/portal/controller/PersonalcenterController.php +++ b/app/portal/controller/PersonalcenterController.php @@ -612,6 +612,7 @@ class PersonalcenterController extends WeChatBaseController{ $where['a.grade'] = $school_grade_class[1]; $where['a.class'] = $school_grade_class[3]; } + if($res['start_time'] != '' && $res['end_time'] != ''){ $start_time = strtotime($res['start_time']); $end_time = strtotime($res['end_time']); diff --git a/public/themes/simpleboot3/portal/order_salesman/get_all.html b/public/themes/simpleboot3/portal/order_salesman/get_all.html index b11fa48..d2fa141 100755 --- a/public/themes/simpleboot3/portal/order_salesman/get_all.html +++ b/public/themes/simpleboot3/portal/order_salesman/get_all.html @@ -34,10 +34,86 @@ font-weight: 400; color: rgba(255, 255, 255, 1); } + + .tx_mask_class { + display: none; + z-index: 3; + width: 100%; + height: 100%; + position: fixed; + background-color: rgba(0, 0, 0, 0.5); + } + + .tx_maskCon_class { + width: 100%; + height: 5.16rem; + background: #fff; + position: fixed; + bottom: 0; + } + + .three_model_class_name { + height: 0.36rem; + margin: 0.08rem; + font-size: 0.24rem; + font-weight: 400; + color: #666666; + opacity: 1; + padding: 0.2rem 0; + line-height: 0; + border-left: none; + border-right: none + } + .get_Go{ + height: 0.36rem; + margin: 0.08rem; + font-size: 0.24rem; + font-weight: 400; + cursor: pointer; + color: #666666; + opacity: 1; + padding: 0.2rem 0; + line-height: 0; + border-left: none; + border-right: none; + } </style> </head> <body style="cursor:pointer;"> + + +<!--学校弹窗--> +<div class="tx_mask_school" onclick="$(this).hide()"> + <div class="tx_maskCon_school" onclick="zZFun(this)"> + <div class="three_model_school"> + <div class="three_model_school_title"> + 选择学校 + </div> + <div class="three_model_school_data there_university" style="display: block;"> + <foreach name="$school" item="s"> + <div class="three_model_school_name <if condition='$key eq 0'>there_unActive</if> school" + data-id="{$s.id}" style="cursor: pointer;">{$s.school} + </div> + </foreach> + </div> + </div> + </div> +</div> +<!--班级弹窗--> +<div class="tx_mask_class" onclick="$(this).hide()"> + <div class="tx_maskCon_class" onclick="zZFun(this)"> + <div class="three_model_school"> + <div class="three_model_school_title"> + 选择班级 + </div> + <div class="three_model_school_data there_university grade" style="display: block;"> + </div> + </div> + </div> +</div> + +<!-- <div class="tx_mask_school"> <div class="tx_maskCon_school"> <div class="three_model_school"> @@ -66,14 +142,14 @@ </div> </div> </div> -</div> +</div>--> <!--统一配送--> <div class="tx_mask_tongyi" onclick="$(this).hide()"> <div class="tx_maskCon_tongyi" onclick="zZFun(this)"> <div class="three_model_school"> <div class="three_model_school_data" style="display: block;"> - <div class="three_model_school_name there_unActive" data-id="1">统一配送</div> - <div class="three_model_school_name" data-id="2">快递配送</div> + <div class="three_modal_kuaidi_name there_unActive" data-id="1">统一配送</div> + <div class="three_modal_kuaidi_name" data-id="2">快递配送</div> </div> </div> </div> @@ -87,18 +163,18 @@ </div> <div> <div class="three_model_school_data" style="display: block;"> - <div class="three_model_school_name" data-name="SF">顺丰快递</div> - <div class="three_model_school_name" data-name="YTO">圆通快递</div> - <div class="three_model_school_name" data-name="ZTO">中通快递</div> - <div class="three_model_school_name there_unActive" data-name="STO">申通快递</div> - <div class="three_model_school_name" data-name="YD">韵达快递</div> - <div class="three_model_school_name" data-name="HHTT">天天快递</div> - <div class="three_model_school_name" data-name="HTKY">百世快递</div> - <div class="three_model_school_name" data-name="YZPY">邮政快递包裹</div> - <div class="three_model_school_name" data-name="EMS">EMS</div> - <div class="three_model_school_name" data-name="DBL">德邦快递</div> - <div class="three_model_school_name" data-name="ZJS">宅急送</div> - <div class="three_model_school_name" data-name="TNT">TNT快递</div> + <div class="get_Go" data-name="SF">顺丰快递</div> + <div class="get_Go" data-name="YTO">圆通快递</div> + <div class="get_Go" data-name="ZTO">中通快递</div> + <div class="get_Go there_unActive" data-name="STO">申通快递</div> + <div class="get_Go" data-name="YD">韵达快递</div> + <div class="get_Go" data-name="HHTT">天天快递</div> + <div class="get_Go" data-name="HTKY">百世快递</div> + <div class="get_Go" data-name="YZPY">邮政快递包裹</div> + <div class="get_Go" data-name="EMS">EMS</div> + <div class="get_Go" data-name="DBL">德邦快递</div> + <div class="get_Go" data-name="ZJS">宅急送</div> + <div class="get_Go" data-name="TNT">TNT快递</div> </div> </div> </div> @@ -157,7 +233,7 @@ <div class="log_three_model_one logistic"> <div class="log_three_model_left">选择快递</div> <div class="log_psong log_psong_select"> - <div class="log_ps_title">请选择快递公司</div> + <div class="log_ps_title2 get_Gofo">请选择快递公司</div> <div class="log_ps_img"> <img src="__TMPL__/public/assets/images/29.png"/> <input type="hidden" id="logistic_name" placeholder="请选择快递公司"/> @@ -193,21 +269,41 @@ </div> <!-- 下拉框 --> <div class="log_three_select"> - <div class="log_three_select_one log_three_select_school" style="cursor: pointer"> + <!-- <div class="log_three_select_one log_three_select_school" style="cursor: pointer"> <div class="log_three_select_title log_three_select_school2"> 请选择学校/班级 </div> <div class="log_three_select_img"> <img src="__TMPL__/public/assets/images/75.png" alt=""/> </div> + </div>--> + + + <div class="log_three_select_one log_three_select_school"> + <div class="log_three_select_title log_three_select_school2"> + 请选择学校 + </div> + <!--<div class="log_three_select_img">--> + <!--<img src="__TMPL__/public/assets/images/75.png" alt="" />--> + <!--</div>--> + </div> + <div class="log_three_select_one log_three_select_school"> + <div class="log_three_select_title log_three_select_class2"> + 请选择班级 + </div> + <!--<div class="log_three_select_img">--> + <!--<img src="__TMPL__/public/assets/images/75.png" alt="" />--> + <!--</div>--> </div> + + <div class="log_three_select_one log_three_select_peisong log_three_select_tongyi" style="cursor: pointer"> <div class="log_three_select_title log_three_select_contant"> 统一配送 </div> - <div class="log_three_select_img"> - <img src="__TMPL__/public/assets/images/75.png" alt=""/> - </div> + <!--<div class="log_three_select_img">--> + <!--<img src="__TMPL__/public/assets/images/75.png" alt=""/>--> + <!--</div>--> </div> <div class="log_three_select_one log_three_select_btn search"> 搜索 @@ -480,14 +576,44 @@ <script src="__TMPL__/public/assets/js/mui.picker.min.js"></script> <script src="__TMPL__/public/assets/js/city.data-3.js"></script> <script> + //选择学校 + $(".log_three_select_school2").click(function() { + $(".tx_mask_school").css("display", "block") + }); + $(".three_model_school_name").click(function() { + var str = $(this).text(); + $('#school').val(str); + console.log(str); + $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); + $(".log_three_select_school2").text(str); + $(".tx_mask_school").css("display", "none") + }); + //选择班级 + $(".log_three_select_class2").click(function() { + $(".tx_mask_class").css("display", "block") + }); + $("body .grade").on('click', '.three_model_class_name', function () { + var str = $(this).text(); + console.log(str); + $('#grade').val(str) + $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); + $(".log_three_select_class2").text(str); + $(".tx_mask_class").css("display", "none") + }) + + function zZFun(e) { + window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); + } +</script> +<script> function zZFun(e) { window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); } // 选择学校 - $(".three_model_school_left").click(function () { - var indexs = $(this).index(); - $(".three_model_school_data").eq(indexs).css("display", "block").siblings().css("display", "none"); - }); +// $(".three_model_school_left").click(function () { +// var indexs = $(this).index(); +// $(".three_model_school_data").eq(indexs).css("display", "block").siblings().css("display", "none"); +// }); $(".log_three_tab_one").click(function () { var tabIndex = $(this).index(); @@ -560,7 +686,7 @@ display: "block" }); }) - $(".tx_mask_tongyi .three_model_school_name").click(function () { + $(".tx_mask_tongyi .three_modal_kuaidi_name").click(function () { var index = $(this).index(); $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); $('.log_three_select_contant').text($(this).text()).css("color", "#333"); @@ -573,12 +699,13 @@ display: "block" }); }); - $(".tx_mask_kuaidi .three_model_school_name").click(function () { + $(".tx_mask_kuaidi .get_Go").click(function () { var index = $(this).index(); + console.log($(this).text()); $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); - $('.log_ps_title').text($(this).text()).css("color", "#333"); + $('.get_Gofo').text($(this).text()).css("color", "#333"); $(".tx_mask_kuaidi").hide(); - $('#logistic_name').val($(this).attr('data-name')) +// $('#logistic_name').val($(this).attr('data-name')) }); var index = $(".log_three_bottom").index(); $("body").on('click', '.log_three_bottom', function () { @@ -588,24 +715,24 @@ }); //学校/弹窗 - $(".log_three_select_school").click(function () { - $(".tx_mask_school").css({ - display: "block" - }); - }); +// $(".log_three_select_school").click(function () { +// $(".tx_mask_school").css({ +// display: "block" +// }); +// }); // tab 大学 - var $xuexiao - $(".there_university div").click(function () { - var index = $(this).index(); - $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); - if ($(this).hasClass("there_unActive")) { - $xuexiao = $(this).text(); - $(".there_university").hide(); - $(".there_class").show(); - $('.three_model_school_left').eq(0).removeClass('word_color').removeClass('three_model_school_hover'); - $('.three_model_school_left').eq(1).addClass('word_color').addClass('three_model_school_hover'); - } - }); +// var $xuexiao +// $(".there_university div").click(function () { +// var index = $(this).index(); +// $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); +// if ($(this).hasClass("there_unActive")) { +// $xuexiao = $(this).text(); +// $(".there_university").hide(); +// $(".there_class").show(); +// $('.three_model_school_left').eq(0).removeClass('word_color').removeClass('three_model_school_hover'); +// $('.three_model_school_left').eq(1).addClass('word_color').addClass('three_model_school_hover'); +// } +// }); $('body').on('click', ".there_class div", function () { var index2 = $(this).index(); $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); @@ -774,7 +901,7 @@ // if(i == 0){ // html += "<div class=\"three_model_school_name there_unActive\" data-id=\""+result[i].id+"\">"+result[i].grade+"—"+i2+"</div>"; // } - html += "<div class=\"three_model_school_name\" data-id=\"" + result[i].id + "\">" + result[i].grade + "-" + i2 + "班</div>"; + html += "<div class=\"three_model_class_name\" data-id=\"" + result[i].id + "\">" + result[i].grade + "-" + i2 + "班</div>"; } } $('.grade').html(html); diff --git a/public/themes/simpleboot3/portal/personalcenter/mall_profit.html b/public/themes/simpleboot3/portal/personalcenter/mall_profit.html index 6a97363..617ea80 100755 --- a/public/themes/simpleboot3/portal/personalcenter/mall_profit.html +++ b/public/themes/simpleboot3/portal/personalcenter/mall_profit.html @@ -29,11 +29,75 @@ .mui-dtpicker-header,.mui-dtpicker-title h5{ background-color: white; } + .tx_mask_class { + display: none; + z-index: 3; + width: 100%; + height: 100%; + position: fixed; + background-color: rgba(0, 0, 0, 0.5); + } + + .tx_maskCon_class { + width: 100%; + height: 5.16rem; + background: #fff; + position: fixed; + bottom: 0; + } + + .three_model_class_name { + height: 0.36rem; + margin: 0.08rem; + font-size: 0.24rem; + font-weight: 400; + color: #666666; + opacity: 1; + padding: 0.2rem 0; + line-height: 0; + border-left: none; + border-right: none + } </style> </head> <body> -<div class="tx_mask_school"> + + +<!--学校弹窗--> +<div class="tx_mask_school" onclick="$(this).hide()"> + <div class="tx_maskCon_school" onclick="zZFun(this)"> + <div class="three_model_school"> + <div class="three_model_school_title"> + 选择学校 + </div> + <div class="three_model_school_data there_university" style="display: block;"> + <volist name="school" id="vo"> + <div class="three_model_school_name <eq name='key' value='0'>there_unActive</eq>" onclick="click_school({$vo.id})">{$vo.school}</div> + </volist> + </div> + </div> + </div> +</div> +<!--班级弹窗--> +<div class="tx_mask_class" onclick="$(this).hide()"> + <div class="tx_maskCon_class" onclick="zZFun(this)"> + <div class="three_model_school"> + <div class="three_model_school_title"> + 选择班级 + </div> + <div class="three_model_school_data there_university banjiadd" style="display: block;"> + <!--<volist name="grade_class_show" id="vo"> + <div class="three_model_school_name banji">{$vo}</div> + </volist>--> + </div> + </div> + </div> +</div> + + + +<!--<div class="tx_mask_school"> <div class="tx_maskCon_school"> <div class="three_model_school"> <div class="three_model_school_title"> @@ -61,7 +125,7 @@ </div> </div> </div> -</div> +</div>--> <div class="log_top_co"> <!-- 顶部 --> <div class=" order_top log_top_co"> @@ -113,13 +177,24 @@ <div class="log_ten_money_selcet"> <div class="log_ten_money_select_top"><span>总盈利:</span>¥{$total_money}</div> <div class="log_ten_money_select_bottom"> - <div class="log_nine_list_one log_banjis"> + <div class="log_nine_list_one log_banjis log_three_select_school2"> <div class="log_nine_list_one_left"> <div class="log_ten_money_select_title "> 选择学校 </div> </div> - <div class="log_xue school_grade_class">请选择学校和班级</div> + <div class="log_xue school_grade_class select_school2 xeschool">请选择学校</div> + <div class="log_nine_list_one_right"> + <img src="__TMPL__/public/assets/images/29.png" alt="" /> + </div> + </div> + <div class="log_nine_list_one log_banjis log_three_select_class2"> + <div class="log_nine_list_one_left"> + <div class="log_ten_money_select_title "> + 选择班级 + </div> + </div> + <div class="log_xue school_grade_class select_class2 xegread">请选择班级</div> <div class="log_nine_list_one_right"> <img src="__TMPL__/public/assets/images/29.png" alt="" /> </div> @@ -201,7 +276,7 @@ grade = JSON.parse(data); $('.banji').remove(); for(i=0;i<grade.length;i++){ - $('.banjiadd').append("<div class='three_model_school_name banji'>"+grade[i]+"</div>"); + $('.banjiadd').append("<div class='three_model_class_name banji'>"+grade[i]+"</div>"); } }else{ $('.banji').remove(); @@ -223,20 +298,28 @@ * */ function my_query(){ - grade_class = $('.school_grade_class').text(); + xeschool = $('.xeschool').text(); + xegread = $('.xegread').text(); start_time = $('.start_time').text(); end_time = $('.end_time').text(); - if(grade_class == '请选择学校和班级'){ - grade_class = ''; - } - if(start_time == '请选择开始时间'){ - start_time = ''; - } - if(end_time == '请选择结束时间'){ - end_time = ''; + + if(xeschool == '请选择学校'){ + alert('请选择学校'); + }else{ + if(xegread == '请选择班级'){ + alert('请选择班级'); + }else{ + grade_class = xeschool+' '+xegread; + if(start_time == '请选择开始时间'){ + start_time = ''; + } + if(end_time == '请选择结束时间'){ + end_time = ''; + } + window.location.href = "{:url('Personalcenter/mall_profit')}?grade_class="+grade_class+"&start_time="+start_time+"&end_time="+end_time; + } } - window.location.href = "{:url('Personalcenter/mall_profit')}?grade_class="+grade_class+"&start_time="+start_time+"&end_time="+end_time; - } + } </script> <script> @@ -256,21 +339,26 @@ .removeClass("log_ten_block"); }); +// var dtpicker = new mui.DtPicker({ +// type: "date", //设置日历初始视图模式 +// beginDate: new Date(2015, 04, 25), //设置开始日期 +// labels: ['年', '月', '日'], //设置默认标签区域提示语 +// customData: { +// h: [{ +// value: 'AM', +// text: 'AM' +// }, +// { +// value: 'PM', +// text: 'PM' +// } +// ] +// } +// }) var dtpicker = new mui.DtPicker({ - type: "date", //设置日历初始视图模式 + type: "datetime", //设置日历初始视图模式 beginDate: new Date(2015, 04, 25), //设置开始日期 - labels: ['年', '月', '日'], //设置默认标签区域提示语 - customData: { - h: [{ - value: 'AM', - text: 'AM' - }, - { - value: 'PM', - text: 'PM' - } - ] - } + labels: ['年', '月', '日','时','分','秒'], //设置默认标签区域提示语 }) //时间/日期别名 $('.log_nineKai').click(function(){ @@ -287,12 +375,12 @@ $('.log_jsu').css('color', '#333333'); }); }) - //学校/班级弹窗 - $(".log_banjis").click(function() { - $(".tx_mask_school").css({ - display: "block" - }); - }); +// //学校/班级弹窗 +// $(".log_banjis").click(function() { +// $(".tx_mask_school").css({ +// display: "block" +// }); +// }); //tab弹框 $(".three_model_school_tab>div").click(function() { var tabindex = $(this).index(); @@ -300,39 +388,68 @@ $('.three_model_school_data').eq(tabindex).css('display', 'block').siblings().css('display', 'none'); }); // tab 大学 - var $xuexiao - $(".there_university div").click(function() { - var index = $(this).index(); +// var $xuexiao +// $(".there_university div").click(function() { +// var index = $(this).index(); +// $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); +// if($(this).hasClass("there_unActive")) { +// console.log($(this).text()); +// $xuexiao = $(this).text() +// $(".there_university").hide(); +// $(".there_class").show(); +// $('.three_model_school_left').eq(0).removeClass('word_color').removeClass('three_model_school_hover'); +// $('.three_model_school_left').eq(1).addClass('word_color').addClass('three_model_school_hover'); +// } +// }); +// $('.there_class div').click(function() { +// console.log($xuexiao) +// var index2 = $(this).index(); +// $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); +// if($xuexiao == undefined) { +// alert('请选择学校') +// } else if($(this).hasClass("there_unActive")) { +// var banji = $(this).text(); +// $('.log_xue').text($xuexiao + ' ' + "—" + ' ' + banji); +// $(".log_xue").css("color","#333") +// $(".tx_mask_school").hide(); +// } +// }) + //选择学校 + $(".log_three_select_school2").click(function() { + $(".tx_mask_school").css("display", "block") + }) + $(".three_model_school_name").click(function() { + var str = $(this).text(); + console.log(str); $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); - if($(this).hasClass("there_unActive")) { - console.log($(this).text()); - $xuexiao = $(this).text() - $(".there_university").hide(); - $(".there_class").show(); - $('.three_model_school_left').eq(0).removeClass('word_color').removeClass('three_model_school_hover'); - $('.three_model_school_left').eq(1).addClass('word_color').addClass('three_model_school_hover'); - } - }); - $('.there_class div').click(function() { - console.log($xuexiao) - var index2 = $(this).index(); + $(".select_school2").text(str); + $('.select_school2').css('color', '#333333'); + $(".tx_mask_school").css("display", "none") + }) + //选择班级 + $(".log_three_select_class2").click(function() { + $(".tx_mask_class").css("display", "block") + }) + $("body .banjiadd").on('click', '.three_model_class_name', function () { + var str = $(this).text(); + console.log(str) $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); - if($xuexiao == undefined) { - alert('请选择学校') - } else if($(this).hasClass("there_unActive")) { - var banji = $(this).text(); - $('.log_xue').text($xuexiao + ' ' + "—" + ' ' + banji); - $(".log_xue").css("color","#333") - $(".tx_mask_school").hide(); - } + $(".select_class2").text(str); + $('.select_class2').css('color', '#333333'); + $(".tx_mask_class").css("display", "none") + console.log($(".select_class2").text(str)) }) + + function zZFun(e) { + window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); + } // 关闭弹窗 - $(document).mouseup(function(e) { - var _con = $('.tx_maskCon_school'); - if(!_con.is(e.target) && _con.has(e.target).length === 0) { - $('.tx_mask_school').hide() - } - }) +// $(document).mouseup(function(e) { +// var _con = $('.tx_maskCon_school'); +// if(!_con.is(e.target) && _con.has(e.target).length === 0) { +// $('.tx_mask_school').hide() +// } +// }) </script> </body> diff --git a/simplewind/cmf/controller/WeChatBaseController.php b/simplewind/cmf/controller/WeChatBaseController.php index f2c40a6..a9178f2 100644 --- a/simplewind/cmf/controller/WeChatBaseController.php +++ b/simplewind/cmf/controller/WeChatBaseController.php @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController */ public function checkWeChatUserLogin() { - /*$user = Db::name('user')->where('id',2)->find(); + /*$user = Db::name('user')->where('id',6)->find(); cmf_update_current_user($user);*/ $userId = cmf_get_current_user_id(); if (empty($userId)) { -- libgit2 0.24.0