作者 景龙
1 个管道 的构建 失败 耗费 5 秒

修改废品问题

正在显示 56 个修改的文件 包含 1148 行增加302 行删除
... ... @@ -21,7 +21,7 @@ class About extends Backend
public function _initialize()
{
parent::_initialize();
$this->request->filter(['strip_tags']);
// $this->request->filter(['strip_tags']);
$this->model = new \app\admin\model\About;
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 首页banner图标
*
* @icon fa fa-circle-o
*/
class Banner extends Backend
{
/**
* Banner模型对象
* @var \app\admin\model\Banner
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Banner;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
... ... @@ -4,6 +4,7 @@ namespace app\admin\controller;
use app\common\controller\Backend;
use think\Config;
use think\Db;
/**
* 控制台
... ... @@ -33,11 +34,18 @@ class Dashboard extends Backend
Config::parse($addonComposerCfg, "json", "composer");
$config = Config::get("composer");
$addonVersion = isset($config['version']) ? $config['version'] : __('Unknown');
//平台总金额
$totalorderamount = Db::table('gc_platform')->where('id',1)->field('account_balance')->find();
//总会员数
$totaluser = Db::table('gc_user')->count();
//总订单数
$totalproduct = Db::table('gc_porder')->count();
$totalgift = Db::table('gc_gorder')->count();
$this->view->assign([
'totaluser' => 35200,
'totaluser' => $totaluser,
'totalviews' => 219390,
'totalorder' => 32143,
'totalorderamount' => 174800,
'totalorder' => $totalproduct+$totalgift,
'totalorderamount' => $totalorderamount['account_balance'],
'todayuserlogin' => 321,
'todayusersignup' => 430,
'todayorder' => 2324,
... ...
... ... @@ -4,6 +4,7 @@ namespace app\admin\controller;
use app\common\controller\Backend;
use app\admin\model\User;
use app\admin\model\Platform;
use think\Db;
/**
... ... @@ -20,12 +21,18 @@ class Porder extends Backend
*/
protected $model = null;
protected $status = 0;
protected $percent = 0.01;//按照比例扣取费用1%
protected $percent = 0;//按照比例扣取费用1%
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Porder;
$percent = Db::table('gc_spercentage')
->order('id desc')
->field('percentage')
->find();
$percent = $percent['percentage']/100;
$this->percent = $percent;
}
/**
... ... @@ -105,8 +112,15 @@ class Porder extends Backend
$data = $this->model->where($pk, '=', $ids)->find();
$userModel = new User();
$money = (1 - $this->percent) * $data['total_price'];
//用户账户增加余额
$result = $userModel->where(['id'=>$data['s_uid'],'status'=>'normal'])->setInc('money',$money);
if($result){
//平台账户增加余额
$platformModel = new Platform();
$account_balance = $this->percent * $data['total_price'];
$result1 = $platformModel->where('id',1)->setInc('account_balance',$account_balance);
//订单更新扣取费用字段
$result2 = $this->model->where($pk, '=', $ids)->update(['is_due'=>1]);
if($result && $result1 && $result2){
$this->success('扣取成功');
}else{
$this->error('扣取失败');
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 扣取百分比管理
*
* @icon fa fa-circle-o
*/
class Spercentage extends Backend
{
/**
* Spercentage模型对象
* @var \app\admin\model\Spercentage
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Spercentage;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 设置获得积分管理
*
* @icon fa fa-circle-o
*/
class Sscore extends Backend
{
/**
* Sscore模型对象
* @var \app\admin\model\Sscore
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Sscore;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
return [
'Id' => 'ID',
'Image' => '图片',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
];
... ...
<?php
return [
'Id' => 'ID',
'Percentage' => '扣取百分比',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
];
... ...
<?php
return [
'Id' => 'ID',
'Set_rule' => '积分规则',
'Set_score' => '所获积分',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
];
... ...
<?php
namespace app\admin\model;
use think\Model;
class Banner extends Model
{
// 表名
protected $name = 'banner';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
// 追加属性
protected $append = [
'deletetime_text'
];
public function getDeletetimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['deletetime']) ? $data['deletetime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setDeletetimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Platform extends Model
{
// 表名
protected $name = 'platform';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
// 追加属性
protected $append = [
'deletetime_text'
];
public function getDeletetimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['deletetime']) ? $data['deletetime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setDeletetimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Spercentage extends Model
{
// 表名
protected $name = 'spercentage';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
// 追加属性
protected $append = [
'deletetime_text'
];
public function getDeletetimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['deletetime']) ? $data['deletetime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setDeletetimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Sscore extends Model
{
// 表名
protected $name = 'sscore';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
// 追加属性
protected $append = [
'deletetime_text'
];
public function getDeletetimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['deletetime']) ? $data['deletetime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setDeletetimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Banner extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Spercentage extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Sscore extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
... ... @@ -28,7 +28,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea data-rule="required" class="form-control editor" rows="5" name="row[description]" cols="50">{$row.description}</textarea>
<textarea id="c-description" data-rule="required" class="form-control editor" rows="5" name="row[description]" cols="50">{$row.description}</textarea>
</div>
</div>
<div class="form-group layer-footer">
... ...
... ... @@ -10,10 +10,10 @@
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('about/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('about/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('about/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('about/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('about/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('about/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -17,7 +17,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-money" data-rule="required" class="form-control" step="0.01" name="row[money]" type="number" value="0.00">
<input id="c-money" data-rule="required range(0~)" class="form-control" step="0.01" name="row[money]" type="number" value="0.00">
</div>
</div>
<div class="form-group layer-footer">
... ...
... ... @@ -9,10 +9,10 @@
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('account/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('account/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('account/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('account/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('account/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -10,10 +10,10 @@
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('bank/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('bank/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('bank/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('bank/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('bank/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('bank/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('banner/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('banner/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('banner/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('banner/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('banner/multi')?'':'hide'}">
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('banner/edit')}"
data-operate-del="{:$auth->check('banner/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -10,7 +10,7 @@
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,add,edit,del')}
<div class="dropdown btn-group {:$auth->check('category/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -10,10 +10,10 @@
<!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('comment/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('comment/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('comment/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('comment/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('comment/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('comment/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -132,7 +132,7 @@
{:build_heading(null, false)}
<ul class="nav nav-tabs">
<li class="active"><a href="#one" data-toggle="tab">{:__('Dashboard')}</a></li>
<li><a href="#two" data-toggle="tab">{:__('Custom')}</a></li>
<!--<li><a href="#two" data-toggle="tab">{:__('Custom')}</a></li>-->
</ul>
</div>
<div class="panel-body">
... ... @@ -149,15 +149,15 @@
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-violet"><i class="fa fa-book"></i></span>
<div class="sm-st-info">
<span>{$totalviews}</span>
{:__('Total view')}
</div>
</div>
</div>
<!--<div class="col-sm-3 col-xs-6">-->
<!--<div class="sm-st clearfix">-->
<!--<span class="sm-st-icon st-violet"><i class="fa fa-book"></i></span>-->
<!--<div class="sm-st-info">-->
<!--<span>{$totalviews}</span>-->
<!--{:__('Total view')}-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="col-sm-3 col-xs-6">
<div class="sm-st clearfix">
<span class="sm-st-icon st-blue"><i class="fa fa-shopping-bag"></i></span>
... ... @@ -178,254 +178,254 @@
</div>
</div>
<div class="row">
<div class="col-lg-8">
<div id="echart" style="height:200px;width:100%;"></div>
</div>
<div class="col-lg-4">
<div class="card sameheight-item stats">
<div class="card-block">
<div class="row row-sm stats-container">
<div class="col-xs-6 stat-col">
<div class="stat-icon"> <i class="fa fa-rocket"></i> </div>
<div class="stat">
<div class="value"> {$todayusersignup} </div>
<div class="name"> {:__('Today user signup')} </div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 30%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"> <i class="fa fa-shopping-cart"></i> </div>
<div class="stat">
<div class="value"> {$todayuserlogin} </div>
<div class="name"> {:__('Today user login')} </div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"> <i class="fa fa-line-chart"></i> </div>
<div class="stat">
<div class="value"> {$todayorder} </div>
<div class="name"> {:__('Today order')} </div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"> <i class="fa fa-users"></i> </div>
<div class="stat">
<div class="value"> {$unsettleorder} </div>
<div class="name"> {:__('Unsettle order')} </div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"> <i class="fa fa-list-alt"></i> </div>
<div class="stat">
<div class="value"> {$sevendnu} </div>
<div class="name"> {:__('Seven dnu')} </div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
<div class="col-xs-6 stat-col">
<div class="stat-icon"> <i class="fa fa-dollar"></i> </div>
<div class="stat">
<div class="value"> {$sevendau} </div>
<div class="name"> {:__('Seven dau')} </div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 25%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--<div class="row">-->
<!--<div class="col-lg-8">-->
<!--<div id="echart" style="height:200px;width:100%;"></div>-->
<!--</div>-->
<!--<div class="col-lg-4">-->
<!--<div class="card sameheight-item stats">-->
<!--<div class="card-block">-->
<!--<div class="row row-sm stats-container">-->
<!--<div class="col-xs-6 stat-col">-->
<!--<div class="stat-icon"> <i class="fa fa-rocket"></i> </div>-->
<!--<div class="stat">-->
<!--<div class="value"> {$todayusersignup} </div>-->
<!--<div class="name"> {:__('Today user signup')} </div>-->
<!--</div>-->
<!--<div class="progress">-->
<!--<div class="progress-bar progress-bar-success" style="width: 30%"></div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-xs-6 stat-col">-->
<!--<div class="stat-icon"> <i class="fa fa-shopping-cart"></i> </div>-->
<!--<div class="stat">-->
<!--<div class="value"> {$todayuserlogin} </div>-->
<!--<div class="name"> {:__('Today user login')} </div>-->
<!--</div>-->
<!--<div class="progress">-->
<!--<div class="progress-bar progress-bar-success" style="width: 25%"></div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-xs-6 stat-col">-->
<!--<div class="stat-icon"> <i class="fa fa-line-chart"></i> </div>-->
<!--<div class="stat">-->
<!--<div class="value"> {$todayorder} </div>-->
<!--<div class="name"> {:__('Today order')} </div>-->
<!--</div>-->
<!--<div class="progress">-->
<!--<div class="progress-bar progress-bar-success" style="width: 25%"></div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-xs-6 stat-col">-->
<!--<div class="stat-icon"> <i class="fa fa-users"></i> </div>-->
<!--<div class="stat">-->
<!--<div class="value"> {$unsettleorder} </div>-->
<!--<div class="name"> {:__('Unsettle order')} </div>-->
<!--</div>-->
<!--<div class="progress">-->
<!--<div class="progress-bar progress-bar-success" style="width: 25%"></div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-xs-6 stat-col">-->
<!--<div class="stat-icon"> <i class="fa fa-list-alt"></i> </div>-->
<!--<div class="stat">-->
<!--<div class="value"> {$sevendnu} </div>-->
<!--<div class="name"> {:__('Seven dnu')} </div>-->
<!--</div>-->
<!--<div class="progress">-->
<!--<div class="progress-bar progress-bar-success" style="width: 25%"></div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-xs-6 stat-col">-->
<!--<div class="stat-icon"> <i class="fa fa-dollar"></i> </div>-->
<!--<div class="stat">-->
<!--<div class="value"> {$sevendau} </div>-->
<!--<div class="name"> {:__('Seven dau')} </div>-->
<!--</div>-->
<!--<div class="progress">-->
<!--<div class="progress-bar progress-bar-success" style="width: 25%"></div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="row" style="margin-top:15px;">
<!--<div class="row" style="margin-top:15px;">-->
<div class="col-lg-12">
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-blue">
<div class="panel-body">
<div class="panel-title">
<span class="label label-success pull-right">{:__('Real time')}</span>
<h5>{:__('Category count')}</h5>
</div>
<div class="panel-content">
<h1 class="no-margins">1234</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
<small>{:__('Category count tips')}</small>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-aqua-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-info pull-right">{:__('Real time')}</span>
<h5>{:__('Attachment count')}</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">1043</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-modx"></i> 2592</div>
<small>{:__('Attachment count tips')}</small>
</div>
</div>
</div>
</div>
<!--<div class="col-lg-12">-->
<!--</div>-->
<!--<div class="col-xs-6 col-md-3">-->
<!--<div class="panel bg-blue">-->
<!--<div class="panel-body">-->
<!--<div class="panel-title">-->
<!--<span class="label label-success pull-right">{:__('Real time')}</span>-->
<!--<h5>{:__('Category count')}</h5>-->
<!--</div>-->
<!--<div class="panel-content">-->
<!--<h1 class="no-margins">1234</h1>-->
<!--<div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>-->
<!--<small>{:__('Category count tips')}</small>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-xs-6 col-md-3">-->
<!--<div class="panel bg-aqua-gradient">-->
<!--<div class="panel-body">-->
<!--<div class="ibox-title">-->
<!--<span class="label label-info pull-right">{:__('Real time')}</span>-->
<!--<h5>{:__('Attachment count')}</h5>-->
<!--</div>-->
<!--<div class="ibox-content">-->
<!--<h1 class="no-margins">1043</h1>-->
<!--<div class="stat-percent font-bold text-gray"><i class="fa fa-modx"></i> 2592</div>-->
<!--<small>{:__('Attachment count tips')}</small>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="col-xs-6 col-md-3">
<div class="panel bg-purple-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-primary pull-right">{:__('Real time')}</span>
<h5>{:__('Article count')}</h5>
</div>
<div class="ibox-content">
<!--<div class="col-xs-6 col-md-3">-->
<!--<div class="panel bg-purple-gradient">-->
<!--<div class="panel-body">-->
<!--<div class="ibox-title">-->
<!--<span class="label label-primary pull-right">{:__('Real time')}</span>-->
<!--<h5>{:__('Article count')}</h5>-->
<!--</div>-->
<!--<div class="ibox-content">-->
<div class="row">
<div class="col-md-6">
<h1 class="no-margins">1234</h1>
<div class="font-bold"><i class="fa fa-commenting"></i> <small>{:__('Comment count')}</small></div>
</div>
<div class="col-md-6">
<h1 class="no-margins">6754</h1>
<div class="font-bold"><i class="fa fa-heart"></i> <small>{:__('Like count')}</small></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel bg-green-gradient">
<div class="panel-body">
<div class="ibox-title">
<span class="label label-primary pull-right">{:__('Real time')}</span>
<h5>{:__('News count')}</h5>
</div>
<div class="ibox-content">
<!--<div class="row">-->
<!--<div class="col-md-6">-->
<!--<h1 class="no-margins">1234</h1>-->
<!--<div class="font-bold"><i class="fa fa-commenting"></i> <small>{:__('Comment count')}</small></div>-->
<!--</div>-->
<!--<div class="col-md-6">-->
<!--<h1 class="no-margins">6754</h1>-->
<!--<div class="font-bold"><i class="fa fa-heart"></i> <small>{:__('Like count')}</small></div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-xs-6 col-md-3">-->
<!--<div class="panel bg-green-gradient">-->
<!--<div class="panel-body">-->
<!--<div class="ibox-title">-->
<!--<span class="label label-primary pull-right">{:__('Real time')}</span>-->
<!--<h5>{:__('News count')}</h5>-->
<!--</div>-->
<!--<div class="ibox-content">-->
<div class="row">
<div class="col-md-6">
<h1 class="no-margins">5302</h1>
<div class="font-bold"><i class="fa fa-commenting"></i> <small>{:__('Comment count')}</small></div>
</div>
<div class="col-md-6">
<h1 class="no-margins">8205</h1>
<div class="font-bold"><i class="fa fa-user"></i> <small>{:__('Like count')}</small></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--<div class="row">-->
<!--<div class="col-md-6">-->
<!--<h1 class="no-margins">5302</h1>-->
<!--<div class="font-bold"><i class="fa fa-commenting"></i> <small>{:__('Comment count')}</small></div>-->
<!--</div>-->
<!--<div class="col-md-6">-->
<!--<h1 class="no-margins">8205</h1>-->
<!--<div class="font-bold"><i class="fa fa-user"></i> <small>{:__('Like count')}</small></div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--如果需要删除最新新闻和最新发贴,删除HTML后还需要删除dashboard.js中的代码-->
<div class="row">
<div class="col-lg-4">
<div class="box box-danger">
<div class="box-header">
<h3 class="box-title">{:__('Recent news')}</h3>
<div class="box-tools pull-right">
<a href="https://www.fastadmin.net" target="_blank" class="btn btn-box-tool">{:__('More')}</a>
</div>
</div>
<div class="box-body" id="news-list">
</div>
</div>
</div>
<div class="col-lg-4">
<div class="box box-success">
<div class="box-header">
<h3 class="box-title">{:__('Recent discussion')}</h3>
<div class="box-tools pull-right">
<a href="https://forum.fastadmin.net" class="btn btn-box-tool">{:__('More')}</a>
</div>
</div>
<div class="box-body" id="discussion-list">
</div>
</div>
</div>
<div class="col-lg-4">
<div class="box box-info">
<div class="box-header"><h3 class="box-title">{:__('Server info')}</h3></div>
<div class="box-body">
<table class="table table-striped">
<tbody>
<tr>
<td width="140">{:__('FastAdmin version')}</td>
<td>{$Think.config.fastadmin.version} <a href="javascript:;" class="btn btn-xs btn-checkversion">检查最新版</a></td>
</tr>
<tr>
<td>{:__('FastAdmin addon version')}</td>
<td>{$addonversion}</td>
</tr>
<tr>
<td>{:__('Sapi name')}</td>
<td>{:php_sapi_name()}</td>
</tr>
<tr>
<td>{:__('Debug mode')}</td>
<td>{$Think.config.app_debug?__('Yes'):__('No')}</td>
</tr>
<tr>
<td>{:__('Software')}</td>
<td>{$Think.server.SERVER_SOFTWARE}</td>
</tr>
<tr>
<td>{:__('Upload mode')}</td>
<td>{$uploadmode}</td>
</tr>
<tr>
<td>{:__('Upload url')}</td>
<td>{$config.upload.uploadurl}</td>
</tr>
<tr>
<td>{:__('Upload Cdn url')}</td>
<td>{$config.upload.cdnurl}</td>
</tr>
<tr>
<td>{:__('Timezone')}</td>
<td>{:date_default_timezone_get()}</td>
</tr>
<tr>
<td>{:__('Cdn url')}</td>
<td>__CDN__</td>
</tr>
<tr>
<td>{:__('Language')}</td>
<td>{$config.language}</td>
</tr>
</tbody></table>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="two">
<div class="row">
<div class="col-xs-12">
{:__('Custom zone')}
</div>
</div>
<!--<div class="row">-->
<!--<div class="col-lg-4">-->
<!--<div class="box box-danger">-->
<!--<div class="box-header">-->
<!--<h3 class="box-title">{:__('Recent news')}</h3>-->
<!--<div class="box-tools pull-right">-->
<!--<a href="https://www.fastadmin.net" target="_blank" class="btn btn-box-tool">{:__('More')}</a>-->
<!--</div>-->
<!--</div>-->
<!--<div class="box-body" id="news-list">-->
<!---->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-lg-4">-->
<!--<div class="box box-success">-->
<!--<div class="box-header">-->
<!--<h3 class="box-title">{:__('Recent discussion')}</h3>-->
<!--<div class="box-tools pull-right">-->
<!--<a href="https://forum.fastadmin.net" class="btn btn-box-tool">{:__('More')}</a>-->
<!--</div>-->
<!--</div>-->
<!--<div class="box-body" id="discussion-list">-->
<!---->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-lg-4">-->
<!--<div class="box box-info">-->
<!--<div class="box-header"><h3 class="box-title">{:__('Server info')}</h3></div>-->
<!--<div class="box-body">-->
<!--<table class="table table-striped">-->
<!--<tbody>-->
<!--<tr>-->
<!--<td width="140">{:__('FastAdmin version')}</td>-->
<!--<td>{$Think.config.fastadmin.version} <a href="javascript:;" class="btn btn-xs btn-checkversion">检查最新版</a></td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('FastAdmin addon version')}</td>-->
<!--<td>{$addonversion}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Sapi name')}</td>-->
<!--<td>{:php_sapi_name()}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Debug mode')}</td>-->
<!--<td>{$Think.config.app_debug?__('Yes'):__('No')}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Software')}</td>-->
<!--<td>{$Think.server.SERVER_SOFTWARE}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Upload mode')}</td>-->
<!--<td>{$uploadmode}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Upload url')}</td>-->
<!--<td>{$config.upload.uploadurl}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Upload Cdn url')}</td>-->
<!--<td>{$config.upload.cdnurl}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Timezone')}</td>-->
<!--<td>{:date_default_timezone_get()}</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Cdn url')}</td>-->
<!--<td>__CDN__</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td>{:__('Language')}</td>-->
<!--<td>{$config.language}</td>-->
<!--</tr>-->
<!--</tbody></table>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
<!--<div class="tab-pane fade" id="two">-->
<!--<div class="row">-->
<!--<div class="col-xs-12">-->
<!--{:__('Custom zone')}-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</div>
... ...
... ... @@ -23,13 +23,13 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" data-rule="required" class="form-control" name="row[stock]" type="number">
<input id="c-stock" data-rule="required range(1~)" class="form-control" name="row[stock]" type="number" value="1">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="0">
<input id="c-score" data-rule="required range(1~)" class="form-control" name="row[score]" type="number" value="1">
</div>
</div>
<div class="form-group">
... ...
... ... @@ -23,13 +23,13 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" data-rule="required" class="form-control" name="row[stock]" type="number" value="{$row.stock}">
<input id="c-stock" data-rule="required range(1~)" class="form-control" name="row[stock]" type="number" value="{$row.stock}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="{$row.score}">
<input id="c-score" data-rule="required range(1~)" class="form-control" name="row[score]" type="number" value="{$row.score}">
</div>
</div>
<div class="form-group">
... ...
... ... @@ -10,10 +10,10 @@
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('gift/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('gift/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('gift/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('gift/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('gift/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('gift/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -10,10 +10,10 @@
<!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('gorder/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('gorder/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('gorder/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('gorder/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('gorder/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('gorder/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -10,10 +10,10 @@
<!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('porder/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('porder/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('porder/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('porder/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('porder/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('porder/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -10,10 +10,10 @@
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('problem/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('problem/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('problem/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('problem/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('problem/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('problem/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -40,13 +40,13 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" name="row[price]" type="number">
<input id="c-price" data-rule="required range(0.01~)" class="form-control" name="row[price]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" data-rule="required" class="form-control" name="row[stock]" type="number" value="0">
<input id="c-stock" data-rule="required range(1~)" class="form-control" name="row[stock]" type="number" value="0">
</div>
</div>
<!--<div class="form-group">-->
... ...
... ... @@ -41,13 +41,13 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" name="row[price]" type="number" value="{$row.price}">
<input id="c-price" data-rule="required range(0.01~)" class="form-control" name="row[price]" type="number" value="{$row.price}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" data-rule="required" class="form-control" name="row[stock]" type="number" value="{$row.stock}">
<input id="c-stock" data-rule="required range(1~)" class="form-control" name="row[stock]" type="number" value="{$row.stock}">
</div>
</div>
<!--<div class="form-group">-->
... ...
... ... @@ -10,10 +10,10 @@
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('product/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('product/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('product/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('product/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('product/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('product/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -10,10 +10,10 @@
<!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('sell/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('sell/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('sell/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('sell/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('sell/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('sell/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Percentage')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-percentage" data-rule="required range(1~100)" class="form-control" name="row[percentage]" type="number">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Percentage')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-percentage" data-rule="required range(1~100)" class="form-control" name="row[percentage]" type="number" value="{$row.percentage}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('spercentage/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('spercentage/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('spercentage/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('spercentage/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('spercentage/multi')?'':'hide'}">
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('spercentage/edit')}"
data-operate-del="{:$auth->check('spercentage/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Set_rule')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-set_rule" data-rule="required" class="form-control" name="row[set_rule]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Set_score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-set_score" data-rule="required range(1~)" class="form-control" name="row[set_score]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Set_rule')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-set_rule" data-rule="required" class="form-control" name="row[set_rule]" type="text" value="{$row.set_rule}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Set_score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-set_score" data-rule="required range(1~)" class="form-control" name="row[set_score]" type="number" value="{$row.set_score}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('sscore/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('sscore/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('sscore/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('sscore/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<div class="dropdown btn-group {:$auth->check('sscore/multi')?'':'hide'}">
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('sscore/edit')}"
data-operate-del="{:$auth->check('sscore/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -8,7 +8,7 @@
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,add,edit,del')}
<div class="dropdown btn-group {:$auth->check('user/group/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -8,7 +8,7 @@
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,add,edit,del')}
<div class="dropdown btn-group {:$auth->check('user/rule/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -114,6 +114,12 @@
</div>
{/if}
<div class="form-group">
<label for="c-address" class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-4">
<input id="c-address" data-rule="" class="form-control" name="row[address]" type="text" value="{$row.address}">
</div>
</div>
<div class="form-group">
<label for="c-successions" class="control-label col-xs-12 col-sm-2">{:__('Successions')}:</label>
... ...
... ... @@ -8,7 +8,7 @@
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,edit,del')}
<div class="dropdown btn-group {:$auth->check('user/user/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
... ...
... ... @@ -51,4 +51,37 @@ class Index extends Api
$this->error('请求方式错误');
}
}
/**
* @ApiTitle (获取banner图)
* @ApiSummary (获取banner图)
* @ApiMethod (GET)
* @ApiRoute (/api/index/getBanner)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiReturn ({
"code": 1,
"msg": "成功",
"time": "1553831004",
"data": [
{
"id": 1,
"image": "http://feipin.w.brotop.cn/uploads/20190319/4a4c015ca04593f70a4836da45f2dea4.jpg"//banner图
},
{
"id": 2,
"image": "http://feipin.w.brotop.cn/uploads/20190319/4d82786ab0f7866110519f221cbf29a6.jpg"
},
]
})
*/
public function getBanner(){
if($this->request->isGet()){
$data = Db::table('gc_banner')
->field('id,image')
->select();
$this->success('成功', $data);
}else{
$this->error('请求方式错误');
}
}
}
... ...
... ... @@ -254,8 +254,22 @@ class Person extends Api
* @return bool
*/
public function getScore($share_uid,$type){
$score = config('site.'.$type);
if($type == 'share_purchase'){
$scoreRule = Db::table('gc_sscore')
->where('set_rule','like','%购买%')
->field('set_score')
->find();
}else if($type == 'share_sell'){
$scoreRule = Db::table('gc_sscore')
->where('set_rule','like','%卖废品%')
->field('set_score')
->find();
}
// $score = config('site.'.$type);
$score = 0;
if($scoreRule){
$score = $scoreRule['set_score'];
}
$offlineModel = new Line();
//此处判断不能相互成为下线(你成为我的下线,我就不能成为你的下线)
$offlineModel->where(['off_uid'=>$share_uid,'uid'=>$this->user_id])->find();
... ...
... ... @@ -40,7 +40,7 @@ class Wxpay extends Api
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="openid", type="string", required=true, description="小程序openid")
* @ApiParams (name="pay_order_sn", type="string", required=true, description="支付订单号")
* @ApiParams (name="type", type="integer", required=true, description="支付方式(0:微信支付,1:余额支付)")
* @ApiParams (name="type", type="string", required=true, description="支付方式(wx:微信支付,balance:余额支付)")
* @ApiReturn ({code: 0, msg: "无效的订单", time: "1554176100", data: null})
*/
public function pay(){
... ...
此 diff 太大无法显示。
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'banner/index',
add_url: 'banner/add',
edit_url: 'banner/edit',
del_url: 'banner/del',
multi_url: 'banner/multi',
table: 'banner',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'image', title: __('Image'), formatter: Table.api.formatter.image},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
... ... @@ -57,13 +57,26 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
Layer.alert(ret.msg);
return false;
},visible: function (row) {
if(row.status == 3){
if(row.status == 3 && row.is_due == 0){
return true;
}else{
return false;
}
}
},
{
name: 'ajax',
text: __('已扣取'),
title: __('已扣取'),
classname: 'btn btn-xs btn-success btn-magic',
icon: 'fa fa-magic',
visible: function (row) {
if(row.status == 3 && row.is_due == 1){
return true;
}else{
return false;
}
}
}
]}
]
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'spercentage/index',
add_url: 'spercentage/add',
edit_url: 'spercentage/edit',
del_url: 'spercentage/del',
multi_url: 'spercentage/multi',
table: 'spercentage',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'percentage', title: __('Percentage')},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
// {field: 'deletetime', title: __('Deletetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'sscore/index',
add_url: 'sscore/add',
edit_url: 'sscore/edit',
del_url: 'sscore/del',
multi_url: 'sscore/multi',
table: 'sscore',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'set_rule', title: __('Set_rule')},
{field: 'set_score', title: __('Set_score')},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
// {field: 'deletetime', title: __('Deletetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
... ... @@ -25,7 +25,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id'), sortable: true},
{field: 'group.name', title: __('Group')},
// {field: 'group.name', title: __('Group')},
{field: 'username', title: __('Username'), operate: 'LIKE'},
{field: 'nickname', title: __('Nickname'), operate: 'LIKE'},
// {field: 'email', title: __('Email'), operate: 'LIKE'},
... ... @@ -33,15 +33,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'mobile', title: __('Mobile'), operate: 'LIKE'},
{field: 'avatar', title: __('Avatar'), formatter: Table.api.formatter.image, operate: false},
{field: 'score', title: __('Score'), operate: 'BETWEEN', sortable: true},
{field: 'money', title: __('Money')},
// {field: 'level', title: __('Level'), operate: 'BETWEEN', sortable: true},
{field: 'address', title: __('Address')},//上门地址
// {field: 'gender', title: __('Gender'), visible: false, searchList: {1: __('Male'), 0: __('Female')}},
{field: 'successions', title: __('Successions'), visible: false, operate: 'BETWEEN', sortable: true},
{field: 'maxsuccessions', title: __('Maxsuccessions'), visible: false, operate: 'BETWEEN', sortable: true},
{field: 'logintime', title: __('Logintime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
{field: 'loginip', title: __('Loginip'), formatter: Table.api.formatter.search},
{field: 'jointime', title: __('Jointime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
{field: 'joinip', title: __('Joinip'), formatter: Table.api.formatter.search},
// {field: 'successions', title: __('Successions'), visible: false, operate: 'BETWEEN', sortable: true},
// {field: 'maxsuccessions', title: __('Maxsuccessions'), visible: false, operate: 'BETWEEN', sortable: true},
// {field: 'logintime', title: __('Logintime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
// {field: 'loginip', title: __('Loginip'), formatter: Table.api.formatter.search},
// {field: 'jointime', title: __('Jointime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
// {field: 'joinip', title: __('Joinip'), formatter: Table.api.formatter.search},
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {normal: __('Normal'), hidden: __('Hidden')}},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,buttons: [
{name: 'offline', text: '我的团队', title: '我的团队', icon: 'fa fa-list', classname: 'btn btn-xs btn-success btn-dialog', url: "off/line/offline"}
... ...