更新代码
This commit is contained in:
178
resources/views/layouts/app.blade.php
Normal file
178
resources/views/layouts/app.blade.php
Normal file
@@ -0,0 +1,178 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">
|
||||
<title>@yield('title', config('app.name')) @if(session('area','')) {{ session('area','')->province??'' }}{{ session('area','')->city??'' }}{{ session('area','')->area??'' }} @endif</title>
|
||||
<link rel="stylesheet" href="/assets/home/css/mzui.min.css">
|
||||
<link rel="stylesheet" href="/assets/home/css/style.css?{{time()}}">
|
||||
@yield('css')
|
||||
@yield('js')
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@yield('content')
|
||||
<section class="layer hidden affix no-margin no-padding" id="pass">
|
||||
<div class="empty" style="padding-top:20%">
|
||||
<img src="/assets/home/img/gz010.png" style="width: 76%;">
|
||||
<p style="margin-top: 1.5rem;font-size: .8rem;">
|
||||
关注公众平台
|
||||
<br>
|
||||
及时获取最新消息
|
||||
</p>
|
||||
<div style="width:30%;margin:10px auto;">
|
||||
<button class="btn ajax-get refresh" data-href="{{ route('pass.time') }}" style="background-color: #f49d0c;color: #fff;border-radius: .2rem;margin-top: .5rem">今日不再提示</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="white_fixed"></div>
|
||||
</section>
|
||||
@section('footer')
|
||||
@include('layouts.footer')
|
||||
@show
|
||||
</body>
|
||||
|
||||
<script type="text/javascript" src="/assets/home/js/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/home/js/mzui.min.js" ></script>
|
||||
@section('layer')
|
||||
<script type="text/javascript" src="/assets/home/js/layer/layer.min.js" ></script>
|
||||
@show
|
||||
<script type="text/javascript" src="/assets/home/js/cjango.js?v={{uniqid()}}"></script>
|
||||
<script type="text/javascript" src="/assets/home/js/vue.js"></script>
|
||||
<script type="text/javascript" src="/assets/home/js/main.js"></script>
|
||||
@section('share')
|
||||
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
@php
|
||||
$app = app('wechat.official_account');
|
||||
$share_url = route("index.index");
|
||||
$share_title = '宝宝课欢迎您加入';
|
||||
|
||||
if(Auth::user() && Auth::user()->identity->identity_id>0){
|
||||
$share_desc = Auth::user()->info->nickname .'邀请您加入';
|
||||
$share_imgUrl = 'http://bbclass.shanyoubao.com/storage/headimgurl/'.Auth::id().'.jpg';
|
||||
}else{
|
||||
$share_desc = '为宝宝提供优质的教育和娱乐';
|
||||
$share_imgUrl = '';
|
||||
}
|
||||
|
||||
if(Auth::user() && Auth::user()->identity->identity_id>0){
|
||||
$share_url = route("index.index").'?share_uid='.Auth::id();
|
||||
$canShare = true;
|
||||
}else{
|
||||
$canShare = false;
|
||||
}
|
||||
|
||||
// $shareinfo = App\Models\WechatRule::where('name','share_config')->first();
|
||||
// if($shareinfo){
|
||||
// $share_title = $shareinfo->title ?? '宝宝课欢迎您加入';
|
||||
// $share_desc = $shareinfo->description ?? '为宝宝提供优质的教育和娱乐';
|
||||
// $share_imgUrl = 'http://www.bohaimingpin.com'.$shareinfo->storage->path ?? 'http://www.bohaimingpin.com/storage/2018/11/12/ed7a8c50f93d582ea8768e944ab9093f.jpg';
|
||||
// }
|
||||
|
||||
@endphp
|
||||
|
||||
wx.config(<?php echo $app->jssdk->buildConfig(['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'hideMenuItems', 'getLocation', 'openLocation', 'checkJsApi', 'scanQRCode']) ?>);
|
||||
wx.ready(function() {
|
||||
|
||||
@section('hideMenuItems')
|
||||
wx.hideMenuItems({
|
||||
menuList: ['menuItem:copyUrl','menuItem:share:facebook','menuItem:share:QZone','menuItem:readMode','menuItem:openWithQQBrowser','menuItem:openWithSafari','menuItem:originPage','menuItem:share:weiboApp','menuItem:share:qq','menuItem:share:email','menuItem:share:brand'@if(!$canShare) ,'menuItem:share:appMessage','menuItem:share:timeline' @endif]
|
||||
});
|
||||
@show
|
||||
|
||||
wx.onMenuShareTimeline({
|
||||
title: '{{ $share_title }}',
|
||||
desc: '{{ $share_desc }}',
|
||||
link: '{{ $share_url }}',
|
||||
imgUrl: '{{ $share_imgUrl }}',
|
||||
success: function () {
|
||||
}
|
||||
});
|
||||
|
||||
wx.onMenuShareAppMessage({
|
||||
title: '{{ $share_title }}',
|
||||
desc: '{{ $share_desc }}',
|
||||
link: '{{ $share_url }}',
|
||||
imgUrl: '{{ $share_imgUrl }}',
|
||||
success: function () {
|
||||
}
|
||||
});
|
||||
|
||||
wx.getLocation({
|
||||
type : 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
||||
success : function(res) {
|
||||
console.log(res);
|
||||
var token = "{{ csrf_token() }}";
|
||||
$.post("{{ route('index.location') }}",{lat:res.latitude,lng:res.longitude,_token:token},function(result){
|
||||
if (result.statusCode==200) {
|
||||
location.reload();
|
||||
$('.home_location').html(result.message+' <i class="icon-angle-down"></i>');
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel : function(res) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
wx.error(function(res) {
|
||||
// updateAlert(res.errMsg);
|
||||
});
|
||||
|
||||
|
||||
$(".mapOpen").on('click',function(){
|
||||
var $this=$(this);
|
||||
var lat=$this.data('lat');
|
||||
var lng=$this.data('lng');
|
||||
var title=$this.data('title');
|
||||
var address=$this.data('address');
|
||||
lat = parseFloat(lat);
|
||||
lng = parseFloat(lng);
|
||||
|
||||
if (lat=='0.0000000' || lng=='0.0000000') {
|
||||
updateAlert($this.data('message'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
wx.openLocation({
|
||||
latitude: lat,
|
||||
longitude: lng,
|
||||
name: title,
|
||||
address: address,
|
||||
scale: 13,
|
||||
infoUrl: ''
|
||||
});
|
||||
});
|
||||
|
||||
@if(Auth::user())
|
||||
@if(empty(Auth::user()->info->subscribe_at) && Auth::user()->info->pass_at<now())
|
||||
var myDisplay = new $.Display({
|
||||
display: 'popover',
|
||||
backdrop:'fade',
|
||||
target: '#pass',
|
||||
placement:'center',
|
||||
autoHide:false,
|
||||
displayAuto:true
|
||||
});
|
||||
@endif
|
||||
@endif
|
||||
</script>
|
||||
@show
|
||||
@yield('script')
|
||||
<script type="text/javascript">
|
||||
/*分享*/
|
||||
$(".j_footer_share").on('click',function (e) {
|
||||
$("#shareimg").attr('src',"{{ route('share.getnewCode') }}?_t={{ time() }}");
|
||||
$(".j_share").show();
|
||||
console.log('33');
|
||||
});
|
||||
$(".j_share_close").click(function (e) {
|
||||
$(".j_share").hide();
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
136
resources/views/layouts/app.blade.php##
Normal file
136
resources/views/layouts/app.blade.php##
Normal file
@@ -0,0 +1,136 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<title>@yield('title', config('app.name'))</title>
|
||||
<link rel="stylesheet" href="/assets/home/css/mzui.min.css">
|
||||
<link rel="stylesheet" href="/assets/home/css/swiper.min.css">
|
||||
<link rel="stylesheet" href="/assets/home/css/style.css">
|
||||
@yield('css')
|
||||
@yield('js')
|
||||
</head>
|
||||
<body>
|
||||
@section('footer')
|
||||
<footer class="c_footer">
|
||||
<div class="c_footer_bg">
|
||||
<div class="c_cell @if (($nav ?? 0) == 1) active @endif" data-href="{{ route('index.index') }}">
|
||||
<i class="icon-home"></i>
|
||||
<span>商城</span>
|
||||
</div>
|
||||
@if(Auth::user() && Auth::user()->identity->identity_id > 0)
|
||||
<div class="c_cell @if (($nav ?? 0) == 2) active @endif" data-href="{{ route('share.index') }}">
|
||||
<i class="icon-qrcode"></i>
|
||||
<span>推荐码</span>
|
||||
</div>
|
||||
@else
|
||||
<div class="c_cell @if (($nav ?? 0) == 2) active @endif" data-href="{{ route('vip.create') }}">
|
||||
<i class="icon-diamond" style="font-size:.9rem"></i>
|
||||
<span>99元成为会员</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="c_cell @if (($nav ?? 0) == 3) active @endif" data-href="{{ route('cart.index') }}">
|
||||
<i class="icon-shopping-cart"></i>
|
||||
<span>购物车</span>
|
||||
</div>
|
||||
<div class="c_cell @if (($nav ?? 0) == 4) active @endif" data-href="{{ route('user.index') }}">
|
||||
<i class="icon-user"></i>
|
||||
<span>会员中心</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@show
|
||||
@yield('content')
|
||||
<section class="layer hidden affix no-margin no-padding" id="pass">
|
||||
<div class="empty" style="padding-top:20%">
|
||||
<img src="/img/success010.png" style="width: 65%;">
|
||||
<p style="margin-top: 1.5rem;font-size: .8rem;">
|
||||
关注公众平台
|
||||
<br>
|
||||
及时获取最新消息
|
||||
</p>
|
||||
<div style="width:30%;margin:10px auto;">
|
||||
<button class="btn success ajax-get refresh" data-href="{{ route('pass.time') }}">今日不再提示</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="white_fixed"></div>
|
||||
</section>
|
||||
<script type="text/javascript" src="/assets/home/js/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/home/js/mzui.min.js" ></script>
|
||||
<script type="text/javascript" src="/assets/home/js/layer/layer.min.js" ></script>
|
||||
<script type="text/javascript" src="/assets/home/js/cjango.js?v={{uniqid()}}"></script>
|
||||
<script type="text/javascript" src="/assets/home/js/vue.js"></script>
|
||||
<style>
|
||||
.popover{width:70%;margin: 0 15%;}
|
||||
</style>
|
||||
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
@php
|
||||
$app = app('wechat.official_account');
|
||||
$share_url = route("index.index");
|
||||
$share_title = '博海名品欢迎您加入';
|
||||
$share_desc = '颠覆思维,我为博海名品代言';
|
||||
$share_imgUrl = 'http://www.bohaimingpin.com/storage/2018/11/12/ed7a8c50f93d582ea8768e944ab9093f.jpg';
|
||||
if(Auth::user() && Auth::user()->identity->identity_id>0){
|
||||
$share_url = route("vip.create").'?share_uid='.Auth::id();
|
||||
$canShare = true;
|
||||
}else{
|
||||
$canShare = false;
|
||||
}
|
||||
|
||||
$shareinfo = App\Models\WechatRule::where('name','share_config')->first();
|
||||
if($shareinfo){
|
||||
$share_title = $shareinfo->title ?? '博海名品欢迎您加入';
|
||||
$share_desc = $shareinfo->description ?? '颠覆思维,我为博海名品代言';
|
||||
$share_imgUrl = 'http://www.bohaimingpin.com'.$shareinfo->storage->path ?? 'http://www.bohaimingpin.com/storage/2018/11/12/ed7a8c50f93d582ea8768e944ab9093f.jpg';
|
||||
}
|
||||
|
||||
@endphp
|
||||
|
||||
wx.config(<?php echo $app->jssdk->buildConfig(['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'hideMenuItems']) ?>);
|
||||
wx.ready(function() {
|
||||
|
||||
@section('hideMenuItems')
|
||||
wx.hideMenuItems({
|
||||
menuList: ['menuItem:copyUrl','menuItem:share:facebook','menuItem:share:QZone','menuItem:readMode','menuItem:openWithQQBrowser','menuItem:openWithSafari','menuItem:originPage','menuItem:share:weiboApp','menuItem:share:qq','menuItem:share:email','menuItem:share:brand'@if(!$canShare) ,'menuItem:share:appMessage','menuItem:share:timeline' @endif]
|
||||
});
|
||||
@show
|
||||
|
||||
wx.onMenuShareTimeline({
|
||||
title: '{{ $share_title }}',
|
||||
desc: '{{ $share_desc }}',
|
||||
link: '{{ $share_url }}',
|
||||
imgUrl: '{{ $share_imgUrl }}',
|
||||
success: function () {
|
||||
}
|
||||
});
|
||||
wx.onMenuShareAppMessage({
|
||||
title: '{{ $share_title }}',
|
||||
desc: '{{ $share_desc }}',
|
||||
link: '{{ $share_url }}',
|
||||
imgUrl: '{{ $share_imgUrl }}',
|
||||
success: function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
wx.error(function(res) {
|
||||
// updateAlert(res.errMsg);
|
||||
});
|
||||
@if(Auth::user())
|
||||
@if(Auth::user()->identity->identity_id>0 && (Auth::user()->gift_order==1) && empty(Auth::user()->info->subscribe_at) && Auth::user()->info->pass_at<now())
|
||||
var myDisplay = new $.Display({
|
||||
display: 'popover',
|
||||
backdrop:'fade',
|
||||
target: '#pass',
|
||||
placement:'center',
|
||||
autoHide:false,
|
||||
displayAuto:true
|
||||
});
|
||||
@endif
|
||||
@endif
|
||||
</script>
|
||||
|
||||
@yield('script')
|
||||
</body>
|
||||
</html>
|
||||
45
resources/views/layouts/footer.blade.php
Normal file
45
resources/views/layouts/footer.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<footer class="row cn_footer">
|
||||
<div class="@if( ($nav??'1') ==1) cn_current @endif cell" data-href="{{ route('index.index') }}">
|
||||
<div class="cn_footer_i"><span class="cn_footer1"></span></div>
|
||||
<div class="cn_footer_name">首页</div>
|
||||
</div>
|
||||
<div class="@if( ($nav??'1') ==3) cn_current @endif cell" data-href="{{ route('cart.index') }}">
|
||||
<div class="cn_footer_i footer_center">
|
||||
@if(Auth::user() && Auth::user()->cart_num == Params::get('lesson_num'))
|
||||
<!--说明:注释部分为报课满时显示 替换 class="cn_footer5" -->
|
||||
<span class="cn_footer5_full" style="width: 1.2rem;height: 1.7rem;position: absolute;left: calc(50% - .6rem);margin-top: .7rem"></span>
|
||||
@else
|
||||
<span class="cn_footer5" style="width: 1.2rem;height: 1.7rem;position: absolute;left: calc(50% - .6rem);margin-top: .7rem"></span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="cn_footer_name" style="position: absolute;bottom: .1rem;width: 30%;left: 35%;">{{ Auth::user()->cart_num??0 }}/{{ Params::get('lesson_num') }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="@if( ($nav??'1') ==2) cn_current @endif cell" data-href="{{ route('user.index') }}">
|
||||
<div class="cn_footer_i"><span class="cn_footer4"></span></div>
|
||||
<div class="cn_footer_name">个人中心</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<div class="j_share">
|
||||
<div class="j_share_container">
|
||||
<img id="shareimg" src="">
|
||||
<div class="j_share_notice">长按图片保存到本地</div>
|
||||
<i class="icon-remove-circle j_share_close"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(url()->current()==route('index.index') && !empty($show_gift_url))
|
||||
<!--提示有礼物要添加收货地址-->
|
||||
<div class="notice_0416" id="notice_0416_show">
|
||||
<div class="notice_0416_container">
|
||||
<div class="notice_0416_img"><img src="/assets/home/img/q0010.jpg"></div>
|
||||
<div class="notice_0416_text">您有礼物需要添加收货地址</div>
|
||||
<div class="notice_0416_btn" data-href="{{$show_gift_url}}">去添加</div>
|
||||
<i class="icon-remove-circle notice_0416_close" onclick="document.getElementById('notice_0416_show').style.display='none';"></i>
|
||||
</div>
|
||||
</div>
|
||||
<!--end 提示有礼物要添加收货地址-->
|
||||
@endif
|
||||
66
resources/views/layouts/share.blade.php
Normal file
66
resources/views/layouts/share.blade.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
@php
|
||||
$app = app('wechat.official_account');
|
||||
$share_url = route("index.index");
|
||||
$share_title = '博海名品欢迎您加入';
|
||||
$share_desc = '颠覆思维,我为博海名品代言';
|
||||
$share_imgUrl = 'http://www.bohaimingpin.com/storage/2018/11/12/ed7a8c50f93d582ea8768e944ab9093f.jpg';
|
||||
if(Auth::user() && Auth::user()->identity->identity_id>0){
|
||||
$share_url = route("vip.create").'?share_uid='.Auth::id();
|
||||
$canShare = true;
|
||||
}else{
|
||||
$canShare = false;
|
||||
}
|
||||
|
||||
$shareinfo = App\Models\WechatRule::where('name','share_config')->first();
|
||||
if($shareinfo){
|
||||
$share_title = $shareinfo->title ?? '博海名品欢迎您加入';
|
||||
$share_desc = $shareinfo->description ?? '颠覆思维,我为博海名品代言';
|
||||
$share_imgUrl = 'http://www.bohaimingpin.com'.$shareinfo->storage->path ?? 'http://www.bohaimingpin.com/storage/2018/11/12/ed7a8c50f93d582ea8768e944ab9093f.jpg';
|
||||
}
|
||||
|
||||
@endphp
|
||||
|
||||
wx.config(<?php echo $app->jssdk->buildConfig(['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'hideMenuItems']) ?>);
|
||||
wx.ready(function() {
|
||||
|
||||
@section('hideMenuItems')
|
||||
wx.hideMenuItems({
|
||||
menuList: ['menuItem:copyUrl','menuItem:share:facebook','menuItem:share:QZone','menuItem:readMode','menuItem:openWithQQBrowser','menuItem:openWithSafari','menuItem:originPage','menuItem:share:weiboApp','menuItem:share:qq','menuItem:share:email','menuItem:share:brand'@if(!$canShare) ,'menuItem:share:appMessage','menuItem:share:timeline' @endif]
|
||||
});
|
||||
@show
|
||||
|
||||
wx.onMenuShareTimeline({
|
||||
title: '{{ $share_title }}',
|
||||
desc: '{{ $share_desc }}',
|
||||
link: '{{ $share_url }}',
|
||||
imgUrl: '{{ $share_imgUrl }}',
|
||||
success: function () {
|
||||
}
|
||||
});
|
||||
wx.onMenuShareAppMessage({
|
||||
title: '{{ $share_title }}',
|
||||
desc: '{{ $share_desc }}',
|
||||
link: '{{ $share_url }}',
|
||||
imgUrl: '{{ $share_imgUrl }}',
|
||||
success: function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
wx.error(function(res) {
|
||||
// updateAlert(res.errMsg);
|
||||
});
|
||||
@if(Auth::user())
|
||||
@if(Auth::user()->identity->identity_id>0 && (Auth::user()->gift_order==1) && empty(Auth::user()->info->subscribe_at) && Auth::user()->info->pass_at<now())
|
||||
var myDisplay = new $.Display({
|
||||
display: 'popover',
|
||||
backdrop:'fade',
|
||||
target: '#pass',
|
||||
placement:'center',
|
||||
autoHide:false,
|
||||
displayAuto:true
|
||||
});
|
||||
@endif
|
||||
@endif
|
||||
</script>
|
||||
Reference in New Issue
Block a user