Commit 19cb82ed by LiuJunYi

1

parent fbec30e0
<?php
namespace app\admin\controller;
class Business extends AuthBase
{
//商家入住
public function index()
{
$where = [];
if(input('business_name')){
$where['business_name'] = input('business_name');
}
$business = \app\common\model\Business::where($where)->order('id','desc')->paginate('15');
$this->assign(compact('business'));
return $this->fetch();
}
}
\ No newline at end of file
......@@ -3,6 +3,14 @@
namespace app\admin\controller;
use app\admin\controller\AuthBase;
use app\common\model\Refund;
use app\common\utils\WXSendMessage;
use think\Db;
use think\Exception;
use think\Loader;
Loader::import('wxpay.Api');
class Order extends AuthBase
{
......@@ -213,4 +221,84 @@ class Order extends AuthBase
$this->error('修改失败,本次审核无效');
}
}
//申请退款
public function passRefund()
{
// //获取该订单
$refund = Refund::get([
'id' => input('post.id', 0),
'status' => 1
]);
if (!$refund) {
return json(['code' => 1, 'msg' => '退款异常,请刷新页面重试!']);
}
$order = \app\common\model\Order::get($refund->order_id);
Db::startTrans();
try{
//修改订单状态
$refund->status = 2;
$order->is_refund = 3;
$order->status = 3;
$project = \app\common\model\Project::get($order->pid);
$project->sign_num = $project->sign_num-$order['extras']['sign_limits'];
$refund->save();//修改退款列表状态
$order->save();//修改订单状态
$project->save();//减少限制数组量
//微信退款
$input = new \WxPayRefund();
$input->SetOut_trade_no($order['out_trade_no']);
$input->SetTotal_fee($order['total_fee'] * 100);
$input->SetRefund_fee($order['total_fee'] * 100);
$config = new \WxPayConfig();
$input->SetOut_refund_no("sdkphp" . date("YmdHis"));
$input->SetOp_user_id($config->GetMerchantId());
$result = \WxPayApi::refund($config, $input);
if ($result['return_code'] == 'SUCCESS') {
Db::commit();
//发送消息模板
$openId = \app\common\model\User::get($order->uid)['openid'];
$template_id = config('wxapp.template_id_refund');
$page = config('wxapp.page');
$form_id = $order->prepay_id;
$param = [
$order->out_trade_no,
$order->title,
$order->total_fee,
date('Y-m-d H:i:s')
];
WXSendMessage::send_template_notice($openId, $template_id, $page, $form_id, $param);
return json(['code' => 0, 'msg' => '退款成功']);
} else {
throw new Exception($result['return_msg']);
}
}catch(Exception $e){
Db::rollback();
return json(['code' => 1, 'msg' => $e->getMessage()]);
}
}
//驳回
public function noPassRefund()
{
$refund = Refund::get([
'id' => input('post.id', 0),
'status' => 1
]);
if (!$refund) {
return ['code' => 1, 'msg' => '退款异常,请刷新页面重试!'];
}
$refund->status = 3;
$refund->save();
$order = \app\common\model\Order::get($refund->order_id);
$order->is_refund = 2;
$order->save();
return ['code' => 0, 'msg' => '驳回成功'];
}
}
{layout name="public/layout_main"}
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i>商家入住管理</h3>
<!-- 分割线 -->
<hr>
<div class="row margin-bottom">
<div class="col-md-12">
<form class="form-inline pull-left" method="GET" action="/admin/Business/index">
<div class="form-group margin-right">
<input class="form-control" type="text" name="business_name" value="{:input('business_name')}"
placeholder="商家名称">
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th width="50">ID</th>
<th width="200">商家名称</th>
<th width="150">商家类型</th>
<th width="150">联系人</th>
<th width="150">手机号</th>
<th width="150">微信号</th>
<th>备注</th>
<th width="150">申请时间</th>
</tr>
</thead>
<tbody>
{foreach $business as $v}
<tr>
<td>{$v['id']}</td>
<td>{$v['business_name']}</td>
<td>{:config('business_type')[$v['business_type']]}</td>
<td>{$v['contacts']}</td>
<td>{$v['phone']}</td>
<td>{$v['wx_number']}</td>
<td>{$v['remark']}</td>
<td>{$v['created_at']}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
{$business->render()}
</div>
</div>
</section>
<script type="text/javascript">
</script>
......@@ -10,10 +10,14 @@
<form class="form-inline" method="GET" id="order-search" action="<?php echo url('@admin/order/refund')?>">
<div class="form-group">
<select name="status" class="form-control" id="status">
<option value="-1" {if condition="$status=='-1'"}selected{/if}>全部退款状态</option>
<option value="1" {if condition="$status=='1'"}selected{/if}>申请中</option>
<option value="2" {if condition="$status=='2'"}selected{/if}>退款成功</option>
<option value="3" {if condition="$status=='3'"}selected{/if}>退款失败</option>
<option value="-1" {if condition="$status=='-1'" }selected{
/if}>全部退款状态</option>
<option value="1" {if condition="$status=='1'" }selected{
/if}>申请中</option>
<option value="2" {if condition="$status=='2'" }selected{
/if}>退款成功</option>
<option value="3" {if condition="$status=='3'" }selected{
/if}>退款失败</option>
</select>
</div>
<!--<button type="submit" class="btn btn-primary">搜索</button>-->
......@@ -37,7 +41,7 @@
<th>微信交易订单号</th>
<th>微信支付状态</th>
<th>退款状态</th>
<th>审核</th>
<th width="150">审核</th>
</tr>
</thead>
<tbody>
......@@ -87,12 +91,16 @@
</span>
</td>
<td>
{if condition="$vo.status == 1"}
<a href="javascript:" class="btn btn-primary btn-xs check-btn" data-id="{$vo.id}">审核</a>
{/if}
<!--{if condition="$vo.status == 1"}-->
<!--<a href="javascript:" class="btn btn-primary btn-xs check-btn" data-id="{$vo.id}">审核</a>-->
<!--{/if}-->
<div style="width:100%;display:flex;justify-content: space-around;">
<button data-id="{$vo['id']}" class="pass-refund btn btn-xs btn-primary " {if $vo[
'status']!=1}disabled="disabled"{/if}>退款</button>
<button data-id="{$vo['id']}" class="no-refund btn btn-xs btn-warning " {if $vo[
'status']!=1}disabled="disabled"{/if}>驳回</button>
</div>
<!--<a href="##" class="btn btn-xs btn-primary">退款</a>-->
<!--<a href="##" class="btn btn-xs btn-warning">驳回</a>-->
</td>
</tr>
{/volist}
......@@ -133,46 +141,87 @@
</section>
<script type="text/javascript">
$("#status").change(function(){
$("#status").change(function () {
$("#order-search").submit();
});
// 文档加载完毕之后,会进入该方法
$(function(){
$(".btn-delete").click(function(){
$(function () {
$(".btn-delete").click(function () {
var _this = $(this);
var url = "delete";
var oid = _this.attr('oid');
showDialog("提示", "确定删除这篇文章吗?", function () {
// ajax post 方法
$.post(url, {id:oid}, function (res) {
$.post(url, {id: oid}, function (res) {
var res = JSON.parse(res);
if (res.error == 1) {
// javascript 的默认弹出提示方法
alert(res.msg);
} else {
_this.remove();
$("#tr_"+oid).fadeOut();
$("#tr_" + oid).fadeOut();
}
});
});
});
$(".check-btn").click(function(){
$(".check-btn").click(function () {
comment_id = $(this).data('id');
$("#mymodal").modal();
});
$("#set_status").click(function(){
$("#set_status").click(function () {
var status = $("input[name='state']:checked").val();
if(status){
$.post("{:url('admin/order/refundStatus')}",{id:comment_id,status:status},function(data){
if(data['code']==1){
if (status) {
$.post("{:url('admin/order/refundStatus')}", {id: comment_id, status: status}, function (data) {
if (data['code'] == 1) {
alert(data['msg']);
window.location.reload();
}
});
$("#mymodal").modal();
}else{
} else {
alert('请选择要进行的审核操作');
}
});
//审核通过
$('.pass-refund').on('click', function () {
var that = this;
layer.confirm("您确定退款吗?", {icon: 3, title:'提示'}, function(index){
var id = $(that).attr('data-id');
var load = layer.load(2);
$.post("{:url('passRefund')}",{id:id},function(res){
layer.close(load);
if(res.code==0){
layer.msg(res.msg);
$(that).attr('disabled','disabled');
$(that).next().attr('disabled','disabled');
}else{
layer.msg(res.msg);
}
},'json');
layer.close(index);
});
});
//驳回
$('.no-refund').on('click', function () {
var that = this;
layer.confirm("您确定驳回退款吗?", {icon: 3, title:'提示'}, function(index){
var id = $(that).attr('data-id');
var load = layer.load(2);
$.post("{:url('noPassRefund')}",{id:id},function(res){
layer.close(load);
if(res.code==0){
layer.msg(res.msg);
$(that).attr('disabled','disabled');
$(that).prev().attr('disabled','disabled');
}else{
layer.msg(res.msg);
}
},'json');
layer.close(index);
});
});
});
</script>
......@@ -35,6 +35,7 @@
<script src="/static/pnotify/js/pnotify.js" type="text/javascript"></script>
<script src="/static/js/art-template.js" type="text/javascript"></script>
<script src="/static/fancybox/jquery.fancybox.min.js" type="text/javascript"></script>
<script src="/static/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript">
//获取url中"?"符后的字串
......
......@@ -88,6 +88,10 @@
<li <?php if(CONTROLLER_NAME == 'Log'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Log/index", ['level'=>'info'])?>">日志信息</a>
</li>
<li <?php if(CONTROLLER_NAME == 'Log'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Business/index")?>">商家入住</a>
</li>
</ul>
</li>
......
......@@ -8,6 +8,7 @@
namespace app\api\controller;
use app\common\utils\WXSendMessage;
use think\Db;
use think\Exception;
use think\Loader;
......@@ -290,7 +291,14 @@ class Order extends Base
$user->is_vip = 1;
$user->vip_endtime = $order['extras']['vip_endtime'];
$user->save();
} else {
//限制组数加1
//获取订单的项目
$project = ProjectModel::get($order->pid);
$project->sign_num = $project->sign_num + $order['extras']['sign_limits'];
$project->save();
}
// 提交事务
Db::commit();
$succeed = true;
......@@ -427,12 +435,28 @@ class Order extends Base
public function sendTemplate()
{
//查看订单是否存在
// $id = input('order_id',0);
// $order = OrderModel::get($id);
// if(!$order){
// return ['code'=>1,'msg'=>'订单不存在'];
// }
$id = input('order_id', 0);
$order = OrderModel::get($id);
if (!$order) {
return ['code' => 1, 'msg' => '订单不存在'];
}
//发送消息模板
return ['code' => 0, 'msg' => '支付成功','data'=>['order'=>input('order_id')]];
$openId = UserModel::get($order->uid)['openid'];
$template_id = config('wxapp.template_id_paied');
$page = config('wxapp.page');
$form_id = $order->prepay_id;
$param = [
$order->out_trade_no,
$order->title,
$order->total_fee,
$order->created_at,
];
$result = WXSendMessage::send_template_notice($openId, $template_id, $page, $form_id, $param);
if ($result->errcode != 0) {
return ['code' => 1, 'msg' => $result->errmsg];
}
return ['code' => 0, 'msg' => '支付成功'];
}
}
\ No newline at end of file
<?php
namespace app\common\model;
class Business extends BaseModel
{
// 设置当前模型对应的完整数据表名称
protected $table = 'business_join';
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ class Refund extends BaseModel
$status = array(
'1'=>['color'=>'#c33eff','name'=>'申请中'],
'2'=>['color'=>'#4acc2e','name'=>'退款成功'],
'3'=>['color'=>'#cc2e2e','name'=>'退款失败']
'3'=>['color'=>'#cc2e2e','name'=>'驳回']
);
return $status[$data['status']];
//1-申请中,2-退款成功,3-退款失败
......
......@@ -9,8 +9,8 @@ use app\common\model\Message as MessageModel;
use app\common\utils\RedisHelper;
/**
* 微信公众号发送消息
*/
* 微信公众号发送消息
*/
class WXSendMessage
{
/*
......@@ -18,16 +18,15 @@ class WXSendMessage
*/
public static function access_token()
{
$redis = RedisHelper::getInstance()->getRedis();
$key = "access_token";
$access_token = false;
// 存在access_token
if ($redis->get($key)) {
$access_token = $redis->get($key);
if (cache($key)) {
$access_token = cache($key);
}else{
//更换成自己的APPID和APPSECRET
$appid = config("wechat.appid");
$appsecret = config("wechat.appsecret");
$appid = config("wxapp.appKey");
$appsecret = config("wxapp.appSecret");
$token_url="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret=".$appsecret;
......@@ -37,14 +36,42 @@ class WXSendMessage
$access_token = $result->access_token;
// 存入,7000秒过期
$redis->set($key, $access_token);
$redis->expire($key, 7000);
cache($key, $access_token,7000);
}
return $access_token;
}
/*
* 发送模版消息
*/
public static function send_template_notice( $to_openid, $template_id, $page, $form_id, $params )
{
$access_token = WXSendMessage::access_token();
$url = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=".$access_token;
$data['touser'] = $to_openid;
$data['template_id'] = $template_id;
$data['page'] = $page;
$data['form_id'] = $form_id;
$i = 1;
foreach ($params as $param) {
$data['data']["keyword".$i]['value'] = $param;
$i++;
}
// 提交数据是JSON字符串
$data = json_encode($data);
$result = WXSendMessage::https_curl_post($url, $data);
$final = json_decode($result);
return $final;
}
/*
* 网络请求
*/
public static function https_curl_post($url='', $postdata='', $options=array()){
......
......@@ -252,7 +252,11 @@ $config = [
'appSecret' => '9708059f5f0a280bea0779df44389231',
// 模版消息ID
// 微信支付订单-付款成功-7天内可推送3条模版消息
'template_id_paied' => 'p8VgRZJ8pFnnVfKKwGILs203k6g1IhCTpsGWrVTCAZs',
'template_id_paied' => 'SupDIPHVs9Iicj7yC0p78AVtILmCpqlE7vIWuXvyRPo',
//退款和支付共同用的
'template_id_refund' => '_nkKG2jYAXY5Rf52-N3dc_eKjwcxG4OoQBwYPuXgwwY',
//通知回调
'page' => ''
],
// 阿里云短信配置
......@@ -330,9 +334,19 @@ $config = [
'sign_type' => 'MD5',
'key' => 'meixingzheqinziyou2018jqtechgzgy',
'app_secret' => '9708059f5f0a280bea0779df44389231',
'ssl_cert_path' => '',
'ssl_key_path' => ''
'ssl_cert_path' => '/home/wanggang/files/mavelerWeb/apiclient_cert.pem',
'ssl_key_path' => '/home/wanggang/files/mavelerWeb/apiclient_key.pem'
],
// +----------------------------------------------------------------------
// | 入住商家类型
// +----------------------------------------------------------------------
'business_type' => [
1 => '餐厅',
2 => '乐园',
3 => '早教',
]
];
return $config;
......@@ -2,7 +2,9 @@
namespace app\mob\controller;
use app\common\model\Business;
use app\mob\controller\Base;
use think\Validate;
class Index extends Base
......@@ -10,7 +12,7 @@ class Index extends Base
/**
* 首页
*/
public function index($id=0)
public function index($id = 0)
{
return view();
}
......@@ -20,7 +22,7 @@ class Index extends Base
*/
public function agreement()
{
$this->redirect(url('@mob/Post/read', ['id'=>5]));
$this->redirect(url('@mob/Post/read', ['id' => 5]));
}
/**
......@@ -28,17 +30,42 @@ class Index extends Base
*/
public function help()
{
$this->redirect(url('@mob/Post/read', ['id'=>2]));
$this->redirect(url('@mob/Post/read', ['id' => 2]));
}
/**
* 商家入驻
*/
public function shopjoin($id=0)
public function shopjoin()
{
return view();
}
public function businessJoin()
{
$validate = Validate::make([
['business_name', 'require', '请输入商家名称'],
['business_type', 'require', '请输入商家类型'],
['contacts', 'require', '请输入您的姓名'],
['phone', 'require', '请输入您的手机号'],
['wx_number', 'require', '请输入您的微信号'],
]);
$result = $validate->check(input('post.'));
//校验
if(!$result){
return json(['code'=>1,'msg'=>$validate->getError()]);
}
$business = new Business();
$business->business_name = input('post.business_name');
$business->business_type = input('post.business_type');
$business->contacts = input('post.contacts');
$business->phone = input('post.phone');
$business->wx_number = input('post.wx_number');
$business->remark = input('post.remark', '');
$business->save();
return json(['code'=>1,'msg'=>'入住信息提交成功']);
}
}
......
{layout name="layout/main"}
<style type="text/css">
body{
body {
padding: 0px 0px;
box-sizing: border-box;
}
.wrapper{
}
.wrapper {
top: 0;
background: white;
box-sizing: border-box;
padding-bottom: 0px;
}
.post_title{
}
.post_title {
word-wrap: break-word;
font-weight: bold;
font-size: 18px;
text-align: center;
}
#first_div{
}
#first_div {
padding: 15px 10px;
}
#seconde_div {
}
#seconde_div {
color: #494949;
border-top: 1px solid #eee;
}
.mod_title{
}
.mod_title {
font-size: 14px;
color: #9c9c9c;
display: block;
padding: 10px 0px;
background: #f5f5f5;
padding-left: 15px;
}
.mod_form{
}
.mod_form {
width: 100%;
box-sizing: border-box;
display: flex;
flex-flow: column;
justify-content: flex-start;
align-items: flex-start;
}
.mod_tips{
}
.mod_tips {
padding: 12px 15px;
color: #353535;
font-size: 14px;
}
.mod_form .mod_row{
}
.mod_form .mod_row {
width: 100%;
padding:12px 15px;
display:flex;
padding: 12px 15px;
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
background:#fff;
align-items:center;
line-height:1.4;
font-size:16px;
overflow:hidden;
white-space:nowrap;
background: #fff;
align-items: center;
line-height: 1.4;
font-size: 16px;
overflow: hidden;
white-space: nowrap;
border-bottom: 1px solid #eee;
box-sizing: border-box;
}
.mod_form .mod_row .row_input{
}
.mod_form .mod_row .row_input {
text-align: right;
background: none;
border: none;
......@@ -67,25 +76,27 @@ body{
width: 60%;
font-size: 16px;
color: gray;
}
.mod_form .mod_row .row_input::-webkit-input-placeholder{
}
.mod_form .mod_row .row_input::-webkit-input-placeholder {
color: #9c9c9c;
}
.mod_submit{
}
.mod_submit {
height: 44px;
border-radius: 44px;
line-height: 44px;
background:#2db7f5!important;
background: #2db7f5 !important;
color: white;
border:0!important;
box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);
border: 0 !important;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
margin-top: 20px;
text-align: center;
width: 80%;
box-sizing: border-box;
outline: none;
font-size: 16px;
}
}
</style>
<section class="wrapper">
......@@ -101,47 +112,55 @@ body{
合作须知;合作须知;合作须知。 合作须知;合作须知;合作须知。 合作须知;合作须知;合作须知。 合作须知;合作须知;合作须知。
</div>
<span class="mod_title">入驻信息</span>
<form action="">
<div class="mod_form">
<div class="mod_row">
<span class="row_title">商家名称</span>
<input class="row_input" type="text" placeholder="请输入商家名称"></input>
<input class="row_input" type="text" placeholder="请输入商家名称" name="business_name"></input>
</div>
<div class="mod_row">
<span class="row_title">商家类型</span>
<select style="text-align:right;width:70px;" class="row_input">
<option>请选择</option>
<option>餐厅</option>
<option>乐园</option>
<option>早教</option>
<select style="text-align:right;width:70px;" class="row_input" name="business_type">
<option value="">请选择</option>
{foreach :config('business_type') as $k=>$v}
<option value="{$k}">{$v}</option>
{/foreach}
</select>
</div>
<div class="mod_row">
<span class="row_title">联系人</span>
<input class="row_input" type="text" placeholder="请输入您的姓名"></input>
<input class="row_input" name="contacts" type="text" placeholder="请输入您的姓名"></input>
</div>
<div class="mod_row">
<span class="row_title">联系方式</span>
<input class="row_input" type="text" placeholder="请输入您的手机号"></input>
<input class="row_input" name="phone" type="number" placeholder="请输入您的手机号"></input>
</div>
<div class="mod_row">
<span class="row_title">微信号</span>
<input class="row_input" type="text" placeholder="请输入您的微信号"></input>
<input class="row_input" name="wx_number" type="text" placeholder="请输入您的微信号"></input>
</div>
<div class="mod_row">
<span class="row_title">备注</span>
<input class="row_input" type="text" placeholder="(可选)请输入备注"></input>
<input class="row_input" name="remark" type="text" placeholder="(可选)请输入备注"></input>
</div>
<div style="width:100%;background:#f5f5f5;text-align: center;">
<button class="mod_submit">提交申请</button>
<button type="button" class="mod_submit">提交申请</button>
</div>
</div>
</form>
</div>
</section>
<script type="text/javascript">
$(function(){
});
$(function () {
$('.mod_submit').click(function () {
var data = $('form').serialize()
$.post("{:url('businessJoin')}", data, function (res) {
layer.msg(res.msg);
}, 'json');
});
});
</script>
</script>
......@@ -30,6 +30,7 @@
<script src="/qunstatic/js/app.js"></script>
<script src="/qunstatic/js/jquery.swipebox.min.js" type="text/javascript"></script>
<script src="/static/layer/layer.js"></script>
</head>
<!-- <?php //require(ROOT_PATH."public/qunstatic/jssdk/mob.jssdk.php");?> -->
......
/*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */
;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'<h3 style="'+(e?n.title[1]:"")+'">'+(e?n.title[0]:n.title)+"</h3>":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e='<span yes type="1">'+n.btn[0]+"</span>",2===t&&(e='<span no type="0">'+n.btn[1]+"</span>"+e),'<div class="layui-m-layerbtn">'+e+"</div>"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='<i></i><i class="layui-m-layerload"></i><i></i><p>'+(n.content||"")+"</p>"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"<div "+("string"==typeof n.shade?'style="'+n.shade+'"':"")+' class="layui-m-layershade"></div>':"")+'<div class="layui-m-layermain" '+(n.fixed?"":'style="position:static;"')+'><div class="layui-m-layersection"><div class="layui-m-layerchild '+(n.skin?"layui-m-layer-"+n.skin+" ":"")+(n.className?n.className:"")+" "+(n.anim?"layui-m-anim-"+n.anim:"")+'" '+(n.style?'style="'+n.style+'"':"")+">"+l+'<div class="layui-m-layercont">'+n.content+"</div>"+c+"</div></div></div>",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;o<r;o++)l.touch(s[o],a);if(e.shade&&e.shadeClose){var c=t[i]("layui-m-layershade")[0];l.touch(c,function(){layer.close(n.index,e.end)})}e.end&&(l.end[n.index]=e.end)},e.layer={v:"2.0",index:r,open:function(e){var t=new c(e||{});return t.index},close:function(e){var n=a("#"+o[0]+e)[0];n&&(n.innerHTML="",t.body.removeChild(n),clearTimeout(l.timer[e]),delete l.timer[e],"function"==typeof l.end[e]&&l.end[e](),delete l.end[e])},closeAll:function(){for(var e=t[i](o[0]),n=0,a=e.length;n<a;n++)layer.close(0|e[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var e=document.scripts,n=e[e.length-1],i=n.src,a=i.substring(0,i.lastIndexOf("/")+1);n.getAttribute("merge")||document.head.appendChild(function(){var e=t.createElement("link");return e.href=a+"need/layer.css?2.0",e.type="text/css",e.rel="styleSheet",e.id="layermcss",e}())}()}(window);
\ No newline at end of file
.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px}
\ No newline at end of file
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