| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- @extends('layouts.base')
- @section('content')
- @section('title', trans('打赏列表'))
- <div class="w1200 ">
- <div class=" rightlist ">
- <div class="right-titpos">
- <ul class="add-snav">
- {{--<li class="active"><a href="#">区域代理</a></li>--}}
- <a class='btn btn-primary' href="{{yzWebUrl('plugin.room.admin.reward-set.add')}}"
- style="margin-bottom:5px;"><i class='fa fa-plus'></i> 添加打赏</a>
- </ul>
- </div>
- <form action="" method="post" class="form-horizontal" id="form1">
- <div class="right-addbox">
- <div class="panel panel-info">
- </div>
- </div>
- </form>
- <div class="clearfix">
- <div class='panel panel-default'>
- <div class='panel-body table-responsive'>
- <table class="table table-hover" style="overflow:visible;">
- <thead>
- <tr>
- <th style='width:8%;'>ID</th>
- <th style='width:5%;'>排序</th>
- <th style='width:10%;'>名称</th>
- <th style='width:8%;'>图标</th>
- <th style='width:8%;'>特效状态</th>
- <th style='width:15%;'>打赏数量</th>
- <th style='width:10%;'>添加时间</th>
- <th style='width:8%;'>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list as $row)
- <tr>
- <td>{{$row['id']}}</td>
- <td>{{$row['sort']}}</td>
- <td>{{$row['name']}}</td>
- <td>
- <img src="{{tomedia($row['icon'])}}"
- style="width: 30px; height: 30px;border:1px solid #ccc;padding:1px;">
- </br>
- </td>
- <td style="overflow:visible;">
- <div class="col-sm-2 col-xs-6">
- <input class="mui-switch " id="recommend{{$row['id']}}" type="checkbox" style="overflow: auto"
- @if($row['show_effect'] == 1))
- checked
- @endif
- onclick="recommend({{$row['id']}})"/>
- </div>
- </td>
- <td>
- {{$row['number']}}
- </td>
- <td>
- {{$row['created_at']}}
- </td>
- <td style="position:relative; overflow:visible;">
- <a href="{{yzWebUrl('plugin.room.admin.reward-set.edit',['id'=>$row['id']])}}"
- class="btn btn-default btn-sm" title="编辑"><i class="fa fa-edit"></i></a>
- <a href="{{yzWebUrl('plugin.room.admin.reward-set.delete',['id'=>$row['id']])}}"
- onclick="return confirm('是否确认删除?');
- return false;" class="btn btn-default btn-sm"
- title="删除"><i
- class="fa fa-trash"></i></a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- {!! $pager !!}
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="{{static_url('js/area/cascade_street.js')}}"></script>
- <script language='javascript'>
- $('.tdedit').mouseover(function () {
- $(this).find('.fa-pencil').show();
- }).mouseout(function () {
- $(this).find('.fa-pencil').hide();
- });
- $('.fa-edit-item').click(function () {
- var areaData = $(this).closest('span').find('span').html();
- var agentid = $(this).data('agentid');
- popwin = $('#modal-module-menus-notice').modal();
- $('.area-text').text(areaData);
- $('.area-agent-id').val(agentid);
- cascdeInit();
- });
- function recommend(id) {
- var url_open = "{!! yzWebUrl('plugin.room.admin.reward-set.effect') !!}";
- var url_close = "{!! yzWebUrl('plugin.room.admin.reward-set.close-effect') !!}"
- var postdata = {
- id: id,
- };
- var recommend = "#recommend" + id;
- if ($(recommend).is(':checked')) {
- //开
- $.post(url_open,postdata,function(data){
- if (data.result == 1) {
- $(recommend).attr("checked",true);
- showPopover($(recommend),"开启成功")
- } else {
- showPopover($(recommend),"开启失败")
- $(recommend).attr("checked",false);
- }
- }, "json");
- } else {
- //关
- $.post(url_close,postdata,function(data){
- showPopover($(recommend),"关闭成功")
- }, "json");
- }
- }
- function showPopover(target, msg) {
- target.attr("data-original-title", msg);
- $('[data-toggle="tooltip"]').tooltip();
- target.tooltip('show');
- target.focus();
- //2秒后消失提示框
- setTimeout(function () {
- target.attr("data-original-title", "");
- target.tooltip('hide');
- }, 2000
- );
- }
- $('#submit').click(function () {
- var agentid = $('.area-agent-id').val();
- var provanceId = $('#sel-provance').val();
- var cityId = $('#sel-city').val();
- var districtId = $('#sel-area').val();
- var streetId = $('#sel-street').val();
- var obg = {
- province_id: provanceId,
- city_id: cityId,
- district_id: districtId,
- street_id: streetId
- };
- fastChange(agentid, obg);
- });
- function fastChange(id, value) {
- $.ajax({
- url: "{!! yzWebUrl('plugin.area-dividend.admin.agent.change') !!}",
- type: "post",
- data: {id: id, value: value},
- cache: false,
- success: function ($data) {
- //console.log($data);return;
- if ($data.result == 0) {
- confirm($data.msg);
- }
- location.reload();
- }
- })
- }
- $(function () {
- $('#export').click(function () {
- $('#form1').attr('action', '{!! yzWebUrl('plugin.area-dividend.admin.agent.export') !!}');
- $('#form1').submit();
- });
- $('#search').click(function () {
- $('#form1').attr('action', '{!! yzWebUrl('plugin.area-dividend.admin.agent') !!}');
- $('#form1').submit();
- });
- });
- </script>
- @endsection
|