活动后台管理,活动列表接口,详情接口,发布接口,收藏接口
This commit is contained in:
parent
c3af2aef07
commit
3dedec8448
@ -3,6 +3,12 @@
|
|||||||
namespace app\admin\controller\school\activity;
|
namespace app\admin\controller\school\activity;
|
||||||
|
|
||||||
use app\common\controller\Backend;
|
use app\common\controller\Backend;
|
||||||
|
use think\Db;
|
||||||
|
use think\db\exception\DataNotFoundException;
|
||||||
|
use think\db\exception\ModelNotFoundException;
|
||||||
|
use think\exception\DbException;
|
||||||
|
use think\exception\PDOException;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动
|
* 活动
|
||||||
@ -18,10 +24,17 @@ class Activity extends Backend
|
|||||||
*/
|
*/
|
||||||
protected $model = null;
|
protected $model = null;
|
||||||
|
|
||||||
|
|
||||||
|
protected $qSwitch = true;
|
||||||
|
protected $qFields = ["user_id"];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
|
||||||
$this->model = new \app\admin\model\school\activity\Activity;
|
$this->model = new \app\admin\model\school\activity\Activity;
|
||||||
|
parent::_initialize();
|
||||||
$this->view->assign("statusList", $this->model->getStatusList());
|
$this->view->assign("statusList", $this->model->getStatusList());
|
||||||
$this->view->assign("cancelTypeList", $this->model->getCancelTypeList());
|
$this->view->assign("cancelTypeList", $this->model->getCancelTypeList());
|
||||||
$this->view->assign("recommendList", $this->model->getRecommendList());
|
$this->view->assign("recommendList", $this->model->getRecommendList());
|
||||||
@ -30,6 +43,13 @@ class Activity extends Backend
|
|||||||
$this->view->assign("addTypeList", $this->model->getAddTypeList());
|
$this->view->assign("addTypeList", $this->model->getAddTypeList());
|
||||||
$this->view->assign("feelList", $this->model->getFeelList());
|
$this->view->assign("feelList", $this->model->getFeelList());
|
||||||
$this->view->assign("authStatusList", $this->model->getAuthStatusList());
|
$this->view->assign("authStatusList", $this->model->getAuthStatusList());
|
||||||
|
|
||||||
|
|
||||||
|
$this->view->assign("cateList", $this->model->getCateList());
|
||||||
|
$this->view->assign("cateListJson", json_encode($this->model->getCateList(), JSON_UNESCAPED_UNICODE));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -41,6 +61,36 @@ class Activity extends Backend
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/** 更新或新增后判断
|
||||||
|
* @param $classes_activity_id
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function update_classes($classes_activity_id,$params){
|
||||||
|
(new \app\common\model\school\activity\Activity)->update_classes($classes_activity_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** 更新或新增前判断
|
||||||
|
* @param $classes_activity_id
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function update_check(&$params,$row=null){
|
||||||
|
(new \app\common\model\school\activity\Activity)->update_check($params,$row);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除前判断
|
||||||
|
* @param $id
|
||||||
|
* @param $params
|
||||||
|
* @param $row
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function updateCheck($id,$params=[],$row=null){
|
||||||
|
(new \app\common\model\school\activity\Activity)->updateCheck($id,$params,$row);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看
|
* 查看
|
||||||
*/
|
*/
|
||||||
@ -76,4 +126,163 @@ class Activity extends Backend
|
|||||||
return $this->view->fetch();
|
return $this->view->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \think\Exception
|
||||||
|
*/
|
||||||
|
public function add()
|
||||||
|
{
|
||||||
|
if (false === $this->request->isPost()) {
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
$params = $this->request->post('row/a');
|
||||||
|
if (empty($params)) {
|
||||||
|
$this->error(__('Parameter %s can not be empty', ''));
|
||||||
|
}
|
||||||
|
$params = $this->preExcludeFields($params);
|
||||||
|
|
||||||
|
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||||
|
$params[$this->dataLimitField] = $this->auth->id;
|
||||||
|
}
|
||||||
|
$result = false;
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
//是否采用模型验证
|
||||||
|
if ($this->modelValidate) {
|
||||||
|
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||||
|
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||||
|
$this->model->validateFailException()->validate($validate);
|
||||||
|
}
|
||||||
|
$this->update_check($params,$row=null);
|
||||||
|
$result = $this->model->allowField(true)->save($params);
|
||||||
|
$this->update_classes($this->model["id"],$params);
|
||||||
|
|
||||||
|
$row = $this->model->get($this->model[ "id" ]);
|
||||||
|
if($params["auth_status"] == 1){
|
||||||
|
//审核通过
|
||||||
|
//调用事件
|
||||||
|
$data = ['activity' => $row,"user_id"=>$row["user_id"],"oper_type"=>"admin","oper_id"=>$this->auth->id];
|
||||||
|
\think\Hook::listen('new_activity_auth_success_after', $data);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//审核不通过
|
||||||
|
//审核通过
|
||||||
|
//调用事件
|
||||||
|
$data = ['activity' => $row,"user_id"=>$row["user_id"],"oper_type"=>"admin","oper_id"=>$this->auth->id];
|
||||||
|
\think\Hook::listen('new_activity_auth_fail_after', $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Db::commit();
|
||||||
|
} catch (ValidateException|PDOException|\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
if ($result === false) {
|
||||||
|
$this->error(__('No rows were inserted'));
|
||||||
|
}
|
||||||
|
$this->success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param $ids
|
||||||
|
* @return string
|
||||||
|
* @throws DbException
|
||||||
|
* @throws \think\Exception
|
||||||
|
*/
|
||||||
|
public function edit($ids = null)
|
||||||
|
{
|
||||||
|
$row = $this->model->get($ids);
|
||||||
|
if (!$row) {
|
||||||
|
$this->error(__('No Results were found'));
|
||||||
|
}
|
||||||
|
$adminIds = $this->getDataLimitAdminIds();
|
||||||
|
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||||
|
$this->error(__('You have no permission'));
|
||||||
|
}
|
||||||
|
if (false === $this->request->isPost()) {
|
||||||
|
$this->view->assign('row', $row);
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
$params = $this->request->post('row/a');
|
||||||
|
if (empty($params)) {
|
||||||
|
$this->error(__('Parameter %s can not be empty', ''));
|
||||||
|
}
|
||||||
|
$params = $this->preExcludeFields($params);
|
||||||
|
$result = false;
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
//是否采用模型验证
|
||||||
|
if ($this->modelValidate) {
|
||||||
|
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||||
|
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||||
|
$row->validateFailException()->validate($validate);
|
||||||
|
}
|
||||||
|
$this->update_check($params,$row);
|
||||||
|
$result = $row->allowField(true)->save($params);
|
||||||
|
$this->update_classes($row["id"],$params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Db::commit();
|
||||||
|
} catch (ValidateException|PDOException|\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
if (false === $result) {
|
||||||
|
$this->error(__('No rows were updated'));
|
||||||
|
}
|
||||||
|
$this->success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @param $ids
|
||||||
|
* @return void
|
||||||
|
* @throws DbException
|
||||||
|
* @throws DataNotFoundException
|
||||||
|
* @throws ModelNotFoundException
|
||||||
|
*/
|
||||||
|
public function del($ids = null)
|
||||||
|
{
|
||||||
|
if (false === $this->request->isPost()) {
|
||||||
|
$this->error(__("Invalid parameters"));
|
||||||
|
}
|
||||||
|
$ids = $ids ?: $this->request->post("ids");
|
||||||
|
if (empty($ids)) {
|
||||||
|
$this->error(__('Parameter %s can not be empty', 'ids'));
|
||||||
|
}
|
||||||
|
$pk = $this->model->getPk();
|
||||||
|
$adminIds = $this->getDataLimitAdminIds();
|
||||||
|
if (is_array($adminIds)) {
|
||||||
|
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||||
|
}
|
||||||
|
$list = $this->model->where($pk, 'in', $ids)->select();
|
||||||
|
foreach ($list as $item) {
|
||||||
|
$this->updateCheck($item->id);
|
||||||
|
}
|
||||||
|
$count = 0;
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
foreach ($list as $item) {
|
||||||
|
$count += $item->delete();
|
||||||
|
}
|
||||||
|
Db::commit();
|
||||||
|
} catch (PDOException|Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
if ($count) {
|
||||||
|
$this->success();
|
||||||
|
}
|
||||||
|
$this->error(__('No rows were deleted'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ class SettleLog extends Backend
|
|||||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||||
|
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
->with(['order','log','user','third'])
|
->with(['order','log','touser','payuser'])
|
||||||
->where($where)
|
->where($where)
|
||||||
->order($sort, $order)
|
->order($sort, $order)
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
@ -60,8 +60,8 @@ class SettleLog extends Backend
|
|||||||
|
|
||||||
$row->getRelation('order')->visible(['order_no']);
|
$row->getRelation('order')->visible(['order_no']);
|
||||||
$row->getRelation('log')->visible(['id','price']);
|
$row->getRelation('log')->visible(['id','price']);
|
||||||
$row->getRelation('user')->visible(['nickname','realname','mobile','avatar']);
|
$row->getRelation('touser')->visible(['nickname','realname','mobile','avatar']);
|
||||||
$row->getRelation('third')->visible(['openname']);
|
$row->getRelation('payuser')->visible(['nickname','realname','mobile','avatar']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||||
|
@ -42,6 +42,10 @@ class Activity extends Model
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
public function getCateList(){
|
||||||
|
return \app\admin\model\school\activity\Cate::column("name", 'id');
|
||||||
|
}
|
||||||
|
|
||||||
protected static function init()
|
protected static function init()
|
||||||
{
|
{
|
||||||
self::afterInsert(function ($row) {
|
self::afterInsert(function ($row) {
|
||||||
@ -232,7 +236,7 @@ class Activity extends Model
|
|||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\admin\model\school\activity\order;
|
namespace app\admin\model\school\activity\order;
|
||||||
|
|
||||||
|
use app\admin\model\school\activity\Activity;
|
||||||
use think\Model;
|
use think\Model;
|
||||||
use traits\model\SoftDelete;
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
@ -193,18 +194,18 @@ class Order extends Model
|
|||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function activity()
|
public function activity()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\school\Activity', 'activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo(Activity::class, 'activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function detail()
|
public function detail()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('Detail', 'activity_order_detail_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo(OrderDetail::class, 'activity_order_detail_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,12 +59,12 @@ class OrderCode extends Model
|
|||||||
|
|
||||||
public function order()
|
public function order()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\school\activity\Order', 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo(Order::class, 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\User', 'verification_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'verification_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\admin\model\school\activity\order;
|
namespace app\admin\model\school\activity\order;
|
||||||
|
|
||||||
|
use app\admin\model\school\activity\Activity;
|
||||||
use think\Model;
|
use think\Model;
|
||||||
use traits\model\SoftDelete;
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
@ -164,18 +165,18 @@ class OrderDetail extends Model
|
|||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function order()
|
public function order()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\school\activity\Order', 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo(Order::class, 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function activity()
|
public function activity()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\school\Activity', 'activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo(Activity::class, 'activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\admin\model\school\activity\order;
|
namespace app\admin\model\school\activity\order;
|
||||||
|
|
||||||
|
use app\admin\model\user\withdrawal\UserwithdrawalLog;
|
||||||
use think\Model;
|
use think\Model;
|
||||||
use traits\model\SoftDelete;
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
@ -85,24 +86,24 @@ class SettleLog extends Model
|
|||||||
|
|
||||||
public function order()
|
public function order()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\school\activity\Order', 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo(Order::class, 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function log()
|
public function log()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\user\withdrawal\Log', 'withdrawal_log_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo(UserwithdrawalLog::class, 'withdrawal_log_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function user()
|
public function touser()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\User', 'to_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'to_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function third()
|
public function payuser()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\Third', 'pay_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'pay_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,6 @@ class Userwithdrawal extends Model
|
|||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,6 +100,6 @@ class UserwithdrawalLog extends Model
|
|||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,13 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
|
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="mobile" data-format-item="{id} - {nickname} - {mobile}" class="form-control selectpage" name="row[user_id]" type="text" value="{$q_user_id}">
|
||||||
|
<span style="color: red">
|
||||||
|
|
||||||
|
(没找到用户则点击按钮创建用户后重新下拉框选用户)
|
||||||
|
<a data-url="user/user/changeuser" href="javascript:;" class="btn btn-success btn-changeuser {:$auth->check('user/user/changeuser')?'':'hide'}" title="根据手机号生成用户" ><i class="fa fa-plus"></i> 根据手机号生成用户</a>
|
||||||
|
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -26,84 +32,145 @@
|
|||||||
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cate_ids')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Cate_ids')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-cate_ids" data-rule="required" data-source="cate/index" data-multiple="true" class="form-control selectpage" name="row[cate_ids]" type="text" value="">
|
<input id="c-cate_ids" data-rule="required" data-max-select-limit="3" data-source="school/activity/cate/index" data-params='{"custom[status]":"1"}' data-multiple="true" class="form-control selectpage" name="row[cate_ids]" type="text" value="">
|
||||||
</div>
|
|
||||||
</div>
|
<span style="color: red">
|
||||||
<div class="form-group">
|
(没找到{:__('Cate_ids')}则点击按钮创建{:__('Cate_ids')}后重新下拉框选{:__('Cate_ids')})
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
|
<a href="javascript:;" data-url="school/activity/cate/index" class="btn btn-success btn-changeuser {:$auth->check('school/activity/cate/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-province" class="form-control" name="row[province]" type="number">
|
</span>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-city" class="form-control" name="row[city]" type="number">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-district" class="form-control" name="row[district]" type="number">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text"></div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-province" class="form-control" name="row[province]" type="number">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-city" class="form-control" name="row[city]" type="number">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-district" class="form-control" name="row[district]" type="number">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-address" class="form-control" name="row[address]" type="text">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-address" class="form-control" name="row[address]" type="text">
|
<div class='control-relative'>
|
||||||
|
<input id="c-address" class="form-control form-control"
|
||||||
|
data-lat-id="c-latitude" data-lng-id="c-longitude" data-rule="required" readonly data-input-id="c-address" data-toggle="addresspicker" name="row[address]" value="" type="text" placeholder="请地图选址。如调起地图失败请检查插件《地图位置(经纬度)选择》是否安装">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" style="display: none">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-3">
|
||||||
|
<input id="c-longitude" readonly class="form-control" name="row[longitude]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-3">
|
||||||
|
<input id="c-latitude" readonly class="form-control" name="row[latitude]" type="text" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="">
|
<input id="c-address_detail" class="form-control" data-rule="required" name="row[address_detail]" type="text" value="" placeholder="请输入{:__('Address_detail')}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('报名开始结束时间')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="">
|
<input id="c-sign_time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[sign_time]" type="text" value="{:date('Y-m-d 0:01')} - {:date('Y-m-d H:i')}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('活动开始结束时间')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="">
|
<input id="c-time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[time]" type="text" value="{:date('Y-m-d 0:01')} - {:date('Y-m-d H:i')}">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
@ -128,24 +195,24 @@
|
|||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{foreach name="statusList" item="vo"}
|
{foreach name="statusList" item="vo"}
|
||||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
|
<label for="row[status]-{$key}"><input id="row[status]-{$key}" disabled name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cancel_type')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Cancel_type')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- -->
|
||||||
|
<!-- <select id="c-cancel_type" class="form-control selectpicker" name="row[cancel_type]">-->
|
||||||
|
<!-- {foreach name="cancelTypeList" item="vo"}-->
|
||||||
|
<!-- <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>-->
|
||||||
|
<!-- {/foreach}-->
|
||||||
|
<!-- </select>-->
|
||||||
|
|
||||||
<select id="c-cancel_type" class="form-control selectpicker" name="row[cancel_type]">
|
<!-- </div>-->
|
||||||
{foreach name="cancelTypeList" item="vo"}
|
<!-- </div>-->
|
||||||
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
@ -188,66 +255,66 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="0">
|
<!-- <input id="c-sale" class="form-control" name="row[sale]" type="number" value="0">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-views" class="form-control" name="row[views]" type="number" value="0">
|
<!-- <input id="c-views" class="form-control" name="row[views]" type="number" value="0">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- -->
|
||||||
|
<!-- <select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">-->
|
||||||
|
<!-- {foreach name="addTypeList" item="vo"}-->
|
||||||
|
<!-- <option value="{$key}" {in name="key" value="2"}selected{/in}>{$vo}</option>-->
|
||||||
|
<!-- {/foreach}-->
|
||||||
|
<!-- </select>-->
|
||||||
|
|
||||||
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
|
<!-- </div>-->
|
||||||
{foreach name="addTypeList" item="vo"}
|
<!-- </div>-->
|
||||||
<option value="{$key}" {in name="key" value="2"}selected{/in}>{$vo}</option>
|
<!-- <div class="form-group">-->
|
||||||
{/foreach}
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>-->
|
||||||
</select>
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Feel')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- -->
|
||||||
|
<!-- <select id="c-feel" class="form-control selectpicker" name="row[feel]">-->
|
||||||
|
<!-- {foreach name="feelList" item="vo"}-->
|
||||||
|
<!-- <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>-->
|
||||||
|
<!-- {/foreach}-->
|
||||||
|
<!-- </select>-->
|
||||||
|
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="">
|
<!-- <input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="0">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Feel')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-verification_num" class="form-control" name="row[verification_num]" type="number">-->
|
||||||
<select id="c-feel" class="form-control selectpicker" name="row[feel]">
|
<!-- </div>-->
|
||||||
{foreach name="feelList" item="vo"}
|
<!-- </div>-->
|
||||||
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
|
<!-- <div class="form-group">-->
|
||||||
{/foreach}
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Collect')}:</label>-->
|
||||||
</select>
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-collect" class="form-control" name="row[collect]" type="number">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-verification_num" class="form-control" name="row[verification_num]" type="number">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Collect')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-collect" class="form-control" name="row[collect]" type="number">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
@ -266,18 +333,18 @@
|
|||||||
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="">
|
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_time')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Auth_time')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
<!-- <input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Canceltime')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Canceltime')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-canceltime" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[canceltime]" type="text" value="{:date('Y-m-d H:i:s')}">
|
<!-- <input id="c-canceltime" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[canceltime]" type="text" value="{:date('Y-m-d H:i:s')}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
@ -3,8 +3,17 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="mobile" data-format-item="{id} - {nickname} - {mobile}" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||||
|
|
||||||
|
<span style="color: red">
|
||||||
|
|
||||||
|
(没找到用户则点击按钮创建用户后重新下拉框选用户)
|
||||||
|
<a data-url="user/user/changeuser" href="javascript:;" class="btn btn-success btn-changeuser {:$auth->check('user/user/changeuser')?'':'hide'}" title="根据手机号生成用户" ><i class="fa fa-plus"></i> 根据手机号生成用户</a>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
||||||
@ -26,84 +35,146 @@
|
|||||||
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text" value="{$row.address_city|htmlentities}"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cate_ids')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Cate_ids')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-cate_ids" data-rule="required" data-source="cate/index" data-multiple="true" class="form-control selectpage" name="row[cate_ids]" type="text" value="{$row.cate_ids|htmlentities}">
|
<input id="c-cate_ids" data-rule="required" data-max-select-limit="3" data-source="school/activity/cate/index" data-params='{"custom[status]":"1"}' data-multiple="true" class="form-control selectpage" name="row[cate_ids]" type="text" value="{$row.cate_ids|htmlentities}">
|
||||||
</div>
|
|
||||||
</div>
|
<span style="color: red">
|
||||||
<div class="form-group">
|
(没找到{:__('Cate_ids')}则点击按钮创建{:__('Cate_ids')}后重新下拉框选{:__('Cate_ids')})
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
|
<a href="javascript:;" data-url="school/activity/cate/index" class="btn btn-success btn-changeuser {:$auth->check('school/activity/cate/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-province" class="form-control" name="row[province]" type="number" value="{$row.province|htmlentities}">
|
</span>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-city" class="form-control" name="row[city]" type="number" value="{$row.city|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-district" class="form-control" name="row[district]" type="number" value="{$row.district|htmlentities}">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text" value="{$row.address_city|htmlentities}"></div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Cate_ids')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-cate_ids" data-rule="required" data-source="cate/index" data-multiple="true" class="form-control selectpage" name="row[cate_ids]" type="text" value="{$row.cate_ids|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-province" class="form-control" name="row[province]" type="number" value="{$row.province|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-city" class="form-control" name="row[city]" type="number" value="{$row.city|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-district" class="form-control" name="row[district]" type="number" value="{$row.district|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="{$row.address_detail|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="{$row.longitude|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="{$row.latitude|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
|
<div class='control-relative'>
|
||||||
|
<input id="c-address" class="form-control form-control"
|
||||||
|
data-lat-id="c-latitude" data-lng-id="c-longitude" data-rule="required" readonly data-input-id="c-address" data-toggle="addresspicker" name="row[address]" value="{$row.address}" type="text" placeholder="请地图选址。如调起地图失败请检查插件《地图位置(经纬度)选择》是否安装">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" style="display: none">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-3">
|
||||||
|
<input id="c-longitude" readonly class="form-control" name="row[longitude]" type="text" value="{$row.longitude}">
|
||||||
|
</div>
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-3">
|
||||||
|
<input id="c-latitude" readonly class="form-control" name="row[latitude]" type="text" value="{$row.latitude}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="{$row.address_detail|htmlentities}">
|
<input id="c-address_detail" class="form-control" data-rule="required" name="row[address_detail]" type="text" value="{$row.address_detail}" placeholder="请输入{:__('Address_detail')}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('报名开始结束时间')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="{$row.longitude|htmlentities}">
|
<input id="c-sign_time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[sign_time]" type="text" value="{:$row.sign_start_time?datetime($row.sign_start_time):''} - {:$row.sign_end_time?datetime($row.sign_end_time):''}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('活动开始结束时间')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="{$row.latitude|htmlentities}">
|
<input id="c-time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[time]" type="text" value="{:$row.start_time?datetime($row.start_time):''} - {:$row.end_time?datetime($row.end_time):''}">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_time]" type="text" value="{:$row.sign_start_time?datetime($row.sign_start_time):''}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_time]" type="text" value="{:$row.sign_end_time?datetime($row.sign_end_time):''}">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_time]" type="text" value="{:$row.sign_start_time?datetime($row.sign_start_time):''}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_time')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_time]" type="text" value="{:$row.sign_end_time?datetime($row.sign_end_time):''}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
@ -128,24 +199,24 @@
|
|||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{foreach name="statusList" item="vo"}
|
{foreach name="statusList" item="vo"}
|
||||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
<label for="row[status]-{$key}"><input id="row[status]-{$key}" disabled name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cancel_type')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Cancel_type')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- -->
|
||||||
|
<!-- <select id="c-cancel_type" class="form-control selectpicker" name="row[cancel_type]">-->
|
||||||
|
<!-- {foreach name="cancelTypeList" item="vo"}-->
|
||||||
|
<!-- <option value="{$key}" {in name="key" value="$row.cancel_type"}selected{/in}>{$vo}</option>-->
|
||||||
|
<!-- {/foreach}-->
|
||||||
|
<!-- </select>-->
|
||||||
|
|
||||||
<select id="c-cancel_type" class="form-control selectpicker" name="row[cancel_type]">
|
<!-- </div>-->
|
||||||
{foreach name="cancelTypeList" item="vo"}
|
<!-- </div>-->
|
||||||
<option value="{$key}" {in name="key" value="$row.cancel_type"}selected{/in}>{$vo}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
@ -188,66 +259,66 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="{$row.sale|htmlentities}">
|
<!-- <input id="c-sale" class="form-control" name="row[sale]" type="number" value="{$row.sale|htmlentities}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-views" class="form-control" name="row[views]" type="number" value="{$row.views|htmlentities}">
|
<!-- <input id="c-views" class="form-control" name="row[views]" type="number" value="{$row.views|htmlentities}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- -->
|
||||||
|
<!-- <select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">-->
|
||||||
|
<!-- {foreach name="addTypeList" item="vo"}-->
|
||||||
|
<!-- <option value="{$key}" {in name="key" value="$row.add_type"}selected{/in}>{$vo}</option>-->
|
||||||
|
<!-- {/foreach}-->
|
||||||
|
<!-- </select>-->
|
||||||
|
|
||||||
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
|
<!-- </div>-->
|
||||||
{foreach name="addTypeList" item="vo"}
|
<!-- </div>-->
|
||||||
<option value="{$key}" {in name="key" value="$row.add_type"}selected{/in}>{$vo}</option>
|
<!-- <div class="form-group">-->
|
||||||
{/foreach}
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>-->
|
||||||
</select>
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="{$row.add_id|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Feel')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- -->
|
||||||
|
<!-- <select id="c-feel" class="form-control selectpicker" name="row[feel]">-->
|
||||||
|
<!-- {foreach name="feelList" item="vo"}-->
|
||||||
|
<!-- <option value="{$key}" {in name="key" value="$row.feel"}selected{/in}>{$vo}</option>-->
|
||||||
|
<!-- {/foreach}-->
|
||||||
|
<!-- </select>-->
|
||||||
|
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="{$row.add_id|htmlentities}">
|
<!-- <input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="{$row.sign_num|htmlentities}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Feel')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-verification_num" class="form-control" name="row[verification_num]" type="number" value="{$row.verification_num|htmlentities}">-->
|
||||||
<select id="c-feel" class="form-control selectpicker" name="row[feel]">
|
<!-- </div>-->
|
||||||
{foreach name="feelList" item="vo"}
|
<!-- </div>-->
|
||||||
<option value="{$key}" {in name="key" value="$row.feel"}selected{/in}>{$vo}</option>
|
<!-- <div class="form-group">-->
|
||||||
{/foreach}
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Collect')}:</label>-->
|
||||||
</select>
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-collect" class="form-control" name="row[collect]" type="number" value="{$row.collect|htmlentities}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="{$row.sign_num|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-verification_num" class="form-control" name="row[verification_num]" type="number" value="{$row.verification_num|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Collect')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-collect" class="form-control" name="row[collect]" type="number" value="{$row.collect|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
@ -266,18 +337,18 @@
|
|||||||
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="{$row.reason|htmlentities}">
|
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="{$row.reason|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_time')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Auth_time')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_time]" type="text" value="{:$row.auth_time?datetime($row.auth_time):''}">
|
<!-- <input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_time]" type="text" value="{:$row.auth_time?datetime($row.auth_time):''}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Canceltime')}:</label>
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Canceltime')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
<input id="c-canceltime" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[canceltime]" type="text" value="{:$row.canceltime?datetime($row.canceltime):''}">
|
<!-- <input id="c-canceltime" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[canceltime]" type="text" value="{:$row.canceltime?datetime($row.canceltime):''}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
@ -44,3 +44,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script >
|
||||||
|
var cateListJson = {$cateListJson};
|
||||||
|
</script>
|
||||||
|
@ -41,6 +41,14 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('轮播图标题')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
@ -40,6 +40,15 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('轮播图标题')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
@ -6,7 +6,7 @@ use app\common\model\school\classes\ActivityDemo;
|
|||||||
use app\common\model\school\classes\ClassesLib;
|
use app\common\model\school\classes\ClassesLib;
|
||||||
use app\common\model\school\classes\Teacher as Teachermodel;
|
use app\common\model\school\classes\Teacher as Teachermodel;
|
||||||
/**
|
/**
|
||||||
* 活动接口
|
* 活动接口(已废弃)
|
||||||
*/
|
*/
|
||||||
class Activity extends Base
|
class Activity extends Base
|
||||||
{
|
{
|
||||||
|
297
application/api/controller/school/NewActivity.php
Normal file
297
application/api/controller/school/NewActivity.php
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\controller\school;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\school\activity\Cate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新活动接口
|
||||||
|
*/
|
||||||
|
class NewActivity extends Base
|
||||||
|
{
|
||||||
|
protected $noNeedLogin = ['cate_list',"activity_list","detail","add"];
|
||||||
|
protected $noNeedRight = '*';
|
||||||
|
|
||||||
|
protected $model = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化操作
|
||||||
|
* @access protected
|
||||||
|
*/
|
||||||
|
protected function _initialize()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->model = new \app\common\model\school\activity\Activity();
|
||||||
|
parent::_initialize();
|
||||||
|
|
||||||
|
//判断登录用户是否是员工
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ApiTitle( 活动分类列表)
|
||||||
|
* @ApiSummary(活动分类列表)
|
||||||
|
* @ApiMethod(GET)
|
||||||
|
* @ApiParams(name = "keywords", type = "string",required=false,description = "搜索关键字")
|
||||||
|
* @ApiParams(name = "page", type = "string",required=true,description = "页数")
|
||||||
|
* @ApiParams(name = "limit", type = "string",required=true,description = "条数")
|
||||||
|
* @ApiParams(name = "hot", type = "string",required=false,description = "状态搜索条件:-1=全部分类,0=非热门分类,1=热门分类")
|
||||||
|
* @ApiReturn({
|
||||||
|
*
|
||||||
|
*})
|
||||||
|
*/
|
||||||
|
public function cate_list()
|
||||||
|
{
|
||||||
|
$user_id = 0;
|
||||||
|
$user = $this->auth->getUser();//登录用户
|
||||||
|
if($user)$user_id = $user['id'];
|
||||||
|
$page = $this->request->get('page/d', 0); //页数
|
||||||
|
$limit = $this->request->get('limit/d', 0); //条数
|
||||||
|
$keywords = $this->request->get('keywords/s', ''); //搜索关键字
|
||||||
|
$hot = $this->request->get('hot/s', '-1'); //搜索关键字
|
||||||
|
// $type = $this->request->get('type/s', ''); //筛选学员和教练单
|
||||||
|
|
||||||
|
try{
|
||||||
|
//当前申请状态
|
||||||
|
$res = Cate::showList($page, $limit,$keywords,$hot);
|
||||||
|
// if($user_id =='670153'){
|
||||||
|
// file_put_contents("ceshi66.txt",(new AppointmentOrder())->getLastSql());
|
||||||
|
// }
|
||||||
|
}catch (\Exception $e){
|
||||||
|
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
$this->success('查询成功', $res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ApiTitle( 通用活动大索索列表)
|
||||||
|
* @ApiSummary(通用活动大索索列表)
|
||||||
|
* @ApiMethod(GET)
|
||||||
|
* @ApiParams(name = "keywords", type = "string",required=false,description = "搜索关键字")
|
||||||
|
* @ApiParams(name = "my", type = "string",required=true,description = "是否查自己(需登录) 1是 0否")
|
||||||
|
* @ApiParams(name = "page", type = "string",required=true,description = "页数")
|
||||||
|
* @ApiParams(name = "limit", type = "string",required=true,description = "条数")
|
||||||
|
* @ApiParams(name = "start_time", type = "int",required=false,description = "开始时间10位秒级时间戳")
|
||||||
|
* @ApiParams(name = "end_time", type = "int",required=false,description = "结束时间10位秒级时间戳")
|
||||||
|
* @ApiParams(name = "sign_start_time", type = "int",required=false,description = "报名开始时间10位秒级时间戳")
|
||||||
|
* @ApiParams(name = "sign_end_time", type = "int",required=false,description = "报名结束时间10位秒级时间戳")
|
||||||
|
* @ApiParams(name = "auth_status", type = "int",required=false,description = "审核状态:0=待审核,1=审核通过,2=审核不通过 ,不传查所有,可按多值逗号拼接")
|
||||||
|
* @ApiParams(name = "keyword", type = "string",required=false,description = "关键字搜索")
|
||||||
|
* @ApiParams(name = "province", type = "string",required=false,description = "省编号")
|
||||||
|
* @ApiParams(name = "city", type = "string",required=false,description = "市编号")
|
||||||
|
* @ApiParams(name = "district", type = "string",required=false,description = "县区编号")
|
||||||
|
* @ApiParams(name = "status", type = "string",required=false,description = "状态:1=未开始,2=报名中,3=待开始,4=进行中,5=已结束,-1=已取消 ,不传查所有,可按多值逗号拼接")
|
||||||
|
* @ApiParams(name = "recommend", type = "string",required=false,description = "平台推荐:0=否,1=是")
|
||||||
|
* @ApiParams(name = "hot", type = "string",required=false,description = "平台热门:0=否,1=是")
|
||||||
|
* @ApiParams(name = "new", type = "string",required=false,description = "平台最新:0=否,1=是")
|
||||||
|
* @ApiParams(name = "selfhot", type = "string",required=false,description = "机构热门:0=否,1=是")
|
||||||
|
* @ApiParams(name = "feel", type = "string",required=false,description = "是否免费:0=否,1=是")
|
||||||
|
* @ApiParams(name = "collect", type = "int",required=false,description = "是否专查我的收藏(需登录):1=是")
|
||||||
|
* @ApiParams(name = "order", type = "string",required=false,description = " normal=综合排序推薦優先,distance=距离优先,hot=熱門优先,new=平台最新优先,sale=銷量优先,views=浏览量优先,collect=收藏量优先")
|
||||||
|
* @ApiParams(name = "nearby", type = "string",required=false,description = "限制最大搜索距离(米)")
|
||||||
|
* @ApiParams(name = "latitude", type = "string",required=false,description = "latitude")
|
||||||
|
* @ApiParams(name = "longitude", type = "string",required=false,description = "longitude")
|
||||||
|
* @ApiReturn({
|
||||||
|
*
|
||||||
|
*})
|
||||||
|
*/
|
||||||
|
public function activity_list()
|
||||||
|
{
|
||||||
|
$user_id = 0;
|
||||||
|
$user = $this->auth->getUser();//登录用户
|
||||||
|
if($user)$user_id = $user['id'];
|
||||||
|
$params =[];
|
||||||
|
$params["my"] = $this->request->get('my/d', 0); //机构店铺id
|
||||||
|
$params["my_user_id"] = $user_id;
|
||||||
|
$params["collect"] = $this->request->get('collect/d', 0); //页数
|
||||||
|
$params["page"] = $this->request->get('page/d', 1); //页数
|
||||||
|
$params["limit"] = $this->request->get('limit/d', 10); //条数
|
||||||
|
$params["keywords"] = $this->request->get('keywords/s', ''); //搜索关键字
|
||||||
|
$params["shop_id"] = $this->request->get('shop_id/d', ''); //机构店铺id
|
||||||
|
|
||||||
|
$params["keyword"] = $this->request->get('keyword/s', ''); //机构店铺id
|
||||||
|
|
||||||
|
$params["address_type"] = $this->request->get('address_type/s', ''); //机构店铺id
|
||||||
|
$params["province"] = $this->request->get('province/s', ''); //机构店铺id
|
||||||
|
|
||||||
|
$params["classes_type"] = $this->request->get('classes_type/s', ''); //机构店铺id
|
||||||
|
|
||||||
|
$params["city"] = $this->request->get('city/s', ''); //机构店铺id
|
||||||
|
$params["district"] = $this->request->get('district/s', ''); //机构店铺id
|
||||||
|
$params["status"] = $this->request->get('status/s', '-2'); //机构店铺id
|
||||||
|
$params["recommend"] = $this->request->get('recommend/s', ''); //机构店铺id
|
||||||
|
$params["hot"] = $this->request->get('hot/s', ''); //机构店铺id
|
||||||
|
$params["new"] = $this->request->get('new/s', ''); //机构店铺id
|
||||||
|
$params["selfhot"] = $this->request->get('selfhot/s', ''); //机构店铺id
|
||||||
|
$params["feel"] = $this->request->get('feel/s', ''); //机构店铺id
|
||||||
|
|
||||||
|
$params["is_expire"] = $this->request->get('is_expire/d', 0); //机构店铺id
|
||||||
|
$params["is_sign_expire"] = $this->request->get('is_sign_expire/d', 0); //机构店铺id
|
||||||
|
|
||||||
|
|
||||||
|
$params["order"] = $this->request->get('order/s', ''); //机构店铺id
|
||||||
|
$params["nearby"] = $this->request->get('nearby/s', ''); //机构店铺id
|
||||||
|
$params["has_shop"] = $this->request->get('has_shop/d', ''); //主讲师用户id
|
||||||
|
|
||||||
|
$params["latitude"] = $this->request->get('latitude/s', ''); //机构店铺id
|
||||||
|
$params["longitude"] = $this->request->get('longitude/s', ''); //机构店铺id
|
||||||
|
|
||||||
|
|
||||||
|
$params["sign_start_time"] = $this->request->get('sign_start_time/d', ''); //主讲师用户id
|
||||||
|
$params["sign_end_time"] = $this->request->get('sign_end_time/d', ''); //机构店铺id
|
||||||
|
|
||||||
|
$params["start_time"] = $this->request->get('start_time/d', ''); //主讲师用户id
|
||||||
|
$params["end_time"] = $this->request->get('end_time/d', ''); //机构店铺id
|
||||||
|
|
||||||
|
$params["auth_status"] = $this->request->get('auth_status/s', ''); //机构店铺id
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// $type = $this->request->get('type/s', ''); //筛选学员和教练单
|
||||||
|
|
||||||
|
try{
|
||||||
|
//当前申请状态
|
||||||
|
$res = $this->model::getVaildList($params);
|
||||||
|
// if($user_id =='670153'){
|
||||||
|
// file_put_contents("ceshi66.txt",(new AppointmentOrder())->getLastSql());
|
||||||
|
// }
|
||||||
|
}catch (\Exception $e){
|
||||||
|
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
$this->success('查询成功', ["list"=>$res]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ApiTitle(活动详情接口)
|
||||||
|
* @ApiSummary(活动详情接口)
|
||||||
|
* @ApiMethod(GET)
|
||||||
|
* @ApiParams(name = "id", type = "int",required=true,description = "活动id")
|
||||||
|
* @ApiReturn({
|
||||||
|
|
||||||
|
*
|
||||||
|
*})
|
||||||
|
*/
|
||||||
|
public function detail(){
|
||||||
|
$id = $this->request->get('id/d','');
|
||||||
|
$user_id = 0;
|
||||||
|
$user = $this->auth->getUser();//登录用户
|
||||||
|
if($user)$user_id = $user['id'];
|
||||||
|
if(empty($id)){
|
||||||
|
$this->error(__('缺少必要参数'));
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$res = $this->model->detail($id,$user_id);
|
||||||
|
} catch (\Exception $e){
|
||||||
|
// Log::log($e->getMessage());
|
||||||
|
$this->error($e->getMessage(),['errcode'=>$e->getCode()]);
|
||||||
|
}
|
||||||
|
$this->success('获取成功', ['detail' => $res]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ApiTitle( 设置活动收藏和取消收藏)
|
||||||
|
* @ApiSummary(设置活动收藏和取消收藏)
|
||||||
|
* @ApiMethod(POST)
|
||||||
|
* @ApiParams(name = "id", type = "int",required=true,description = "活动id")
|
||||||
|
* @ApiParams(name = "is_collect", type = "int",required=true,description = "收藏操作:0取消收藏,1收藏")
|
||||||
|
* @ApiReturn({
|
||||||
|
*
|
||||||
|
*})
|
||||||
|
*/
|
||||||
|
public function collect(){
|
||||||
|
$user_id = 0;
|
||||||
|
$user = $this->auth->getUser();//登录用户
|
||||||
|
if($user)$user_id = $user['id'];
|
||||||
|
|
||||||
|
$id = $this->request->post('id/d', 0); //搜索关键字
|
||||||
|
$collect = $this->request->post('is_collect/d', 0); //搜索关键字
|
||||||
|
|
||||||
|
try{
|
||||||
|
$res = $this->model->collect($id,$user_id,$collect,'user',$user_id,true);
|
||||||
|
}catch (\Throwable $e){
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
$this->success('查询成功', $res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ApiTitle(活动添加)
|
||||||
|
* @ApiSummary(活动添加)
|
||||||
|
* @ApiMethod(POST)
|
||||||
|
* @ApiParams(name = "cate_ids", type = "string",required=true,description = "平台分类ids 多值逗号拼接")
|
||||||
|
* @ApiParams(name = "title", type = "string",required=true,description = "标题")
|
||||||
|
* @ApiParams(name = "sign_time", type = "string",required=true,description = "报名区间示例: 2025-04-08 00:01:00 - 2025-04-08 15:29:00")
|
||||||
|
* @ApiParams(name = "time", type = "string",required=true,description = "活动区间示例: 2025-04-09 00:01:00 - 2025-04-09 15:29:00")
|
||||||
|
* @ApiParams(name = "images", type = "string",required=true,description = "轮播图多值逗号拼接")
|
||||||
|
* @ApiParams(name = "address", type = "string",required=false,description = "地图定位地址")
|
||||||
|
* @ApiParams(name = "address_detail", type = "string",required=false,description = "手录详细地址")
|
||||||
|
* @ApiParams(name = "longitude", type = "string",required=false,description = "经度")
|
||||||
|
* @ApiParams(name = "latitude", type = "string",required=false,description = "纬度")
|
||||||
|
* @ApiParams(name = "content", type = "string",required=false,description = "活动详情")
|
||||||
|
* @ApiParams(name = "price", type = "string",required=false,description = "报名单价 0为免费")
|
||||||
|
* @ApiParams(name = "stock", type = "string",required=false,description = "活动限制人数")
|
||||||
|
* @ApiReturn({
|
||||||
|
*
|
||||||
|
*})
|
||||||
|
*/
|
||||||
|
public function add(){
|
||||||
|
$user_id = 0;
|
||||||
|
$user = $this->auth->getUser();//登录用户
|
||||||
|
if($user)$user_id = $user['id'];
|
||||||
|
$params = [];
|
||||||
|
$params["user_id"] = $user_id; //老师id
|
||||||
|
$params["cate_ids"] = $this->request->post('cate_ids/s', ''); //课程标签
|
||||||
|
|
||||||
|
$params["title"] = $this->request->post('title/s', ''); //老师id
|
||||||
|
$params["images"] = $this->request->post('images/s', ''); //老师id
|
||||||
|
|
||||||
|
$params["stock"] = $this->request->post('stock/d', 0); //核销次数
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
$params["address"] = $this->request->post('address/s', ''); //老师id
|
||||||
|
$params["address_detail"] = $this->request->post('address_detail/s', ''); //老师id
|
||||||
|
$params["longitude"] = $this->request->post('longitude/s', 0); //老师id
|
||||||
|
$params["latitude"] = $this->request->post('latitude/s', 0); //老师id
|
||||||
|
$params["content"] = $this->request->post('content/s', ''); //老师id
|
||||||
|
|
||||||
|
$params["price"] = $this->request->post('price/f', 0); //老师id
|
||||||
|
|
||||||
|
|
||||||
|
$params["sign_time"] = $this->request->post('sign_time/s', 0);
|
||||||
|
$params["time"] = $this->request->post('time/s', 0);
|
||||||
|
|
||||||
|
|
||||||
|
//classes_type
|
||||||
|
|
||||||
|
try{
|
||||||
|
$res = $this->model->add($params,$user_id,'user',$user_id,true);
|
||||||
|
}catch (\Throwable $e){
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
$this->success('添加成功', $res);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -241,6 +241,33 @@ $helpHooks = [
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//新活动事件钩子
|
||||||
|
$newactivityHooks = [
|
||||||
|
// 订单创建
|
||||||
|
'new_activity_auth_need_after' => [ // 活动审核提交
|
||||||
|
'app\\common\\listener\\activity\\ActivityHook'
|
||||||
|
],
|
||||||
|
'new_activity_auth_success_after' => [ // 活动审核通过后
|
||||||
|
'app\\common\\listener\\activity\\ActivityHook'
|
||||||
|
],
|
||||||
|
'new_activity_auth_fail_after' => [ // 活动审核失败后
|
||||||
|
'app\\common\\listener\\activity\\ActivityHook'
|
||||||
|
],
|
||||||
|
'new_activity_view_after' => [ // 活动触发浏览后
|
||||||
|
'app\\common\\listener\\activity\\ActivityHook'
|
||||||
|
],
|
||||||
|
'new_activity_collect_success_after' => [ // 活动收藏后
|
||||||
|
'app\\common\\listener\\activity\\ActivityHook'
|
||||||
|
],
|
||||||
|
'new_activity_collect_cancel_after' => [ // 活动取消收藏后
|
||||||
|
'app\\common\\listener\\activity\\ActivityHook'
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
//if (file_exists(ROOT_PATH . 'addons/shopro/listener/commission')) {
|
//if (file_exists(ROOT_PATH . 'addons/shopro/listener/commission')) {
|
||||||
// $defaultHooks = array_merge_recursive($defaultHooks, $commissionHooks);
|
// $defaultHooks = array_merge_recursive($defaultHooks, $commissionHooks);
|
||||||
@ -256,6 +283,9 @@ $defaultHooks = array_merge_recursive($defaultHooks, $activityOrderHooks);
|
|||||||
$defaultHooks = array_merge_recursive($defaultHooks, $helpHooks);
|
$defaultHooks = array_merge_recursive($defaultHooks, $helpHooks);
|
||||||
|
|
||||||
|
|
||||||
|
$defaultHooks = array_merge_recursive($defaultHooks, $newactivityHooks);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $defaultHooks;
|
return $defaultHooks;
|
||||||
|
88
application/common/listener/activity/ActivityHook.php
Normal file
88
application/common/listener/activity/ActivityHook.php
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
namespace app\common\listener\activity;
|
||||||
|
use app\common\model\manystore\Shop;
|
||||||
|
use app\common\model\school\classes\Visit;
|
||||||
|
use app\common\model\school\Message;
|
||||||
|
use app\common\model\school\MessageConfig;
|
||||||
|
use app\common\model\User;
|
||||||
|
|
||||||
|
class ActivityHook
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function newActivityViewAfter(&$params)
|
||||||
|
{
|
||||||
|
['activity' => $activity,"user_id"=>$user_id,"oper_type"=>$oper_type,"oper_id"=>$oper_id] = $params;
|
||||||
|
//访问记录
|
||||||
|
Visit::create([
|
||||||
|
"classes_lib_id"=>0,
|
||||||
|
"classes_activity_id"=>$activity["id"],
|
||||||
|
// "shop_id"=>$activity["shop_id"],
|
||||||
|
"status"=>'2',
|
||||||
|
"user_id"=>$user_id,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function newActivityCollectSuccessAfter(&$params)
|
||||||
|
{
|
||||||
|
['activity' => $activity,"user_id"=>$user_id,"oper_type"=>$oper_type,"oper_id"=>$oper_id] = $params;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function newActivityCollectCancelAfter(&$params)
|
||||||
|
{
|
||||||
|
['activity' => $activity,"user_id"=>$user_id,"oper_type"=>$oper_type,"oper_id"=>$oper_id] = $params;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function newActivityAuthNeedAfter(&$params)
|
||||||
|
{
|
||||||
|
['activity' => $activity,"user_id"=>$user_id,"oper_type"=>$oper_type,"oper_id"=>$oper_id] = $params;
|
||||||
|
|
||||||
|
|
||||||
|
//课程推送给老师
|
||||||
|
|
||||||
|
$mini_type = "activity_apply";
|
||||||
|
|
||||||
|
$to_id = $user_id;
|
||||||
|
$status ="activity";
|
||||||
|
|
||||||
|
$params=[
|
||||||
|
"event"=>"new_activity_auth_need_after",
|
||||||
|
"activity_id"=>$activity["id"],
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$param = [
|
||||||
|
"title" => $activity['title'],
|
||||||
|
"address"=>$activity["address"]."(".$activity["address_detail"].")",
|
||||||
|
"price" => $activity["price"],
|
||||||
|
"start_time" => date("Y-m-d H:i",$activity["start_time"]), //格式化日期格式 $order["start_time"], //格式化日期格式
|
||||||
|
"end_time" => date("Y-m-d H:i",$activity["end_time"]),
|
||||||
|
"sign_start_time" => date("Y-m-d H:i",$activity["sign_start_time"]), //格式化日期格式 $order["start_time"], //格式化日期格式
|
||||||
|
"sign_end_time" => date("Y-m-d H:i",$activity["sign_end_time"]),
|
||||||
|
"reason" => $activity['reason'],
|
||||||
|
];
|
||||||
|
|
||||||
|
//发给用户
|
||||||
|
(new MessageConfig)
|
||||||
|
->setTemplate($params["event"])
|
||||||
|
->setTemplateData($param)
|
||||||
|
->setToUid($to_id)
|
||||||
|
->setMessageStatus($status)
|
||||||
|
->setMessageMiniType($mini_type)
|
||||||
|
->setMessageParams($params)
|
||||||
|
->sendMessage();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1125
application/common/model/school/activity/Activity.php
Normal file
1125
application/common/model/school/activity/Activity.php
Normal file
File diff suppressed because it is too large
Load Diff
134
application/common/model/school/activity/Cate.php
Normal file
134
application/common/model/school/activity/Cate.php
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\school\activity;
|
||||||
|
|
||||||
|
use app\common\model\BaseModel;
|
||||||
|
use think\Model;
|
||||||
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
|
class Cate extends BaseModel
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'school_activity_cate';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = 'integer';
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = 'createtime';
|
||||||
|
protected $updateTime = 'updatetime';
|
||||||
|
protected $deleteTime = 'deletetime';
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
'status_text',
|
||||||
|
'hot_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
protected static function init()
|
||||||
|
{
|
||||||
|
self::afterInsert(function ($row) {
|
||||||
|
if (!$row['weigh']) {
|
||||||
|
$pk = $row->getPk();
|
||||||
|
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Status 1'), '2' => __('Status 2')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHotList()
|
||||||
|
{
|
||||||
|
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
|
||||||
|
$list = $this->getStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getHotTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
|
||||||
|
$list = $this->getHotList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**得到基础条件
|
||||||
|
* @param $status
|
||||||
|
* @param null $model
|
||||||
|
* @param string $alisa
|
||||||
|
*/
|
||||||
|
public static function getBaseWhere($whereData = [], $model = null, $alisa = '',$with = false)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!$model) {
|
||||||
|
$model = new static;
|
||||||
|
if ($alisa&&!$with) $model = $model->alias($alisa);
|
||||||
|
}
|
||||||
|
if ($alisa) $alisa = $alisa . '.';
|
||||||
|
$tableFields = (new static)->getTableFields();
|
||||||
|
foreach ($tableFields as $fields)
|
||||||
|
{
|
||||||
|
if(in_array($fields, ['status',"hot"]))continue;
|
||||||
|
// if (isset($whereData[$fields]) && $whereData[$fields]) $model = $model->where("{$alisa}{$fields}", '=', $whereData[$fields]);
|
||||||
|
|
||||||
|
if (isset($whereData[$fields]) && $whereData[$fields]){
|
||||||
|
if(is_array($whereData[$fields])){
|
||||||
|
$model = $model->where("{$alisa}{$fields}", $whereData[$fields][0], $whereData[$fields][1]);
|
||||||
|
}else{
|
||||||
|
$model = $model->where("{$alisa}{$fields}", '=', $whereData[$fields]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if (isset($whereData['status'])) $model = $model->where("{$alisa}status", 'in', $whereData['status']);
|
||||||
|
if (isset($whereData['keywords'])&&$whereData['keywords']) $model = $model->where("{$alisa}id|{$alisa}name", 'Like', "%{$whereData['keywords']}%");
|
||||||
|
if (isset($whereData['time'])&&$whereData['time']){
|
||||||
|
$model = $model->time($whereData['time']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($whereData['hot'])) $model = $model->where("{$alisa}hot", 'in', $whereData['hot']);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function showList($page, $limit,$keywords,$hot=null){
|
||||||
|
$field = ['*'];
|
||||||
|
|
||||||
|
|
||||||
|
$sort = "field(hot,'1','0') asc,weigh desc,id desc";
|
||||||
|
$serch_where = ['keywords'=>$keywords,"status"=>"1"];
|
||||||
|
if($hot==="0" || $hot==="1"){
|
||||||
|
$serch_where['hot'] = $hot;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (new self)->getBaseList($serch_where, $page, $limit,$sort,$field);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
12
application/common/model/school/activity/Order.php
Normal file
12
application/common/model/school/activity/Order.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\school\activity;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
class Order extends Model
|
||||||
|
{
|
||||||
|
// 表名
|
||||||
|
protected $name = 'school_activity_order';
|
||||||
|
|
||||||
|
}
|
12
application/common/model/school/activity/order/Detail.php
Normal file
12
application/common/model/school/activity/order/Detail.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\school\activity\order;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
class Detail extends Model
|
||||||
|
{
|
||||||
|
// 表名
|
||||||
|
protected $name = 'school_activity_order_detail';
|
||||||
|
|
||||||
|
}
|
211
application/common/model/school/activity/order/Order.php
Normal file
211
application/common/model/school/activity/order/Order.php
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\school\activity\order;
|
||||||
|
|
||||||
|
use app\common\model\school\activity\Activity;
|
||||||
|
use think\Model;
|
||||||
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
|
class Order extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'school_activity_order';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = 'integer';
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = 'createtime';
|
||||||
|
protected $updateTime = 'updatetime';
|
||||||
|
protected $deleteTime = 'deletetime';
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
'pay_type_text',
|
||||||
|
'status_text',
|
||||||
|
'before_status_text',
|
||||||
|
'server_status_text',
|
||||||
|
'canceltime_text',
|
||||||
|
'paytime_text',
|
||||||
|
'auth_time_text',
|
||||||
|
'reservation_time_text',
|
||||||
|
'finishtime_text',
|
||||||
|
'refundtime_text',
|
||||||
|
'auth_status_text',
|
||||||
|
'refundsendtime_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getPayTypeList()
|
||||||
|
{
|
||||||
|
return ['yue' => __('Pay_type yue'), 'wechat' => __('Pay_type wechat')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStatusList()
|
||||||
|
{
|
||||||
|
return ['-3' => __('Status -3'), '0' => __('Status 0'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '5' => __('Status 5'), '6' => __('Status 6'), '9' => __('Status 9')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBeforeStatusList()
|
||||||
|
{
|
||||||
|
return ['-3' => __('Before_status -3'), '0' => __('Before_status 0'), '2' => __('Before_status 2'), '3' => __('Before_status 3'), '4' => __('Before_status 4'), '6' => __('Before_status 6'), '9' => __('Before_status 9')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getServerStatusList()
|
||||||
|
{
|
||||||
|
return ['0' => __('Server_status 0'), '3' => __('Server_status 3'), '6' => __('Server_status 6')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAuthStatusList()
|
||||||
|
{
|
||||||
|
return ['0' => __('Auth_status 0'), '1' => __('Auth_status 1'), '2' => __('Auth_status 2')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getPayTypeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['pay_type']) ? $data['pay_type'] : '');
|
||||||
|
$list = $this->getPayTypeList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
|
||||||
|
$list = $this->getStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getBeforeStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['before_status']) ? $data['before_status'] : '');
|
||||||
|
$list = $this->getBeforeStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getServerStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['server_status']) ? $data['server_status'] : '');
|
||||||
|
$list = $this->getServerStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getCanceltimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['canceltime']) ? $data['canceltime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getPaytimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['paytime']) ? $data['paytime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getAuthTimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['auth_time']) ? $data['auth_time'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getReservationTimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['reservation_time']) ? $data['reservation_time'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getFinishtimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['finishtime']) ? $data['finishtime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getRefundtimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['refundtime']) ? $data['refundtime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getAuthStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['auth_status']) ? $data['auth_status'] : '');
|
||||||
|
$list = $this->getAuthStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getRefundsendtimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['refundsendtime']) ? $data['refundsendtime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setCanceltimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setPaytimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setAuthTimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setReservationTimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setFinishtimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setRefundtimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setRefundsendtimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function activity()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Activity::class, 'activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function detail()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(OrderDetail::class, 'activity_order_detail_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
70
application/common/model/school/activity/order/OrderCode.php
Normal file
70
application/common/model/school/activity/order/OrderCode.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\school\activity\order;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
|
class OrderCode extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'school_activity_order_code';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = 'integer';
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = 'createtime';
|
||||||
|
protected $updateTime = 'updatetime';
|
||||||
|
protected $deleteTime = 'deletetime';
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
'status_text',
|
||||||
|
'verificationtime_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusList()
|
||||||
|
{
|
||||||
|
return ['3' => __('Status 3'), '6' => __('Status 6')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
|
||||||
|
$list = $this->getStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getVerificationtimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['verificationtime']) ? $data['verificationtime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setVerificationtimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function order()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Order::class, 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('app\common\model\User', 'verification_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
182
application/common/model/school/activity/order/OrderDetail.php
Normal file
182
application/common/model/school/activity/order/OrderDetail.php
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\school\activity\order;
|
||||||
|
|
||||||
|
use app\common\model\school\activity\Activity;
|
||||||
|
use think\Model;
|
||||||
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
|
class OrderDetail extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'school_activity_order_detail';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = 'integer';
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = 'createtime';
|
||||||
|
protected $updateTime = 'updatetime';
|
||||||
|
protected $deleteTime = 'deletetime';
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
'start_time_text',
|
||||||
|
'end_time_text',
|
||||||
|
'sign_start_time_text',
|
||||||
|
'sign_end_time_text',
|
||||||
|
'recommend_text',
|
||||||
|
'hot_text',
|
||||||
|
'new_text',
|
||||||
|
'add_type_text',
|
||||||
|
'feel_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
protected static function init()
|
||||||
|
{
|
||||||
|
self::afterInsert(function ($row) {
|
||||||
|
if (!$row['weigh']) {
|
||||||
|
$pk = $row->getPk();
|
||||||
|
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getRecommendList()
|
||||||
|
{
|
||||||
|
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHotList()
|
||||||
|
{
|
||||||
|
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNewList()
|
||||||
|
{
|
||||||
|
return ['0' => __('New 0'), '1' => __('New 1')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAddTypeList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFeelList()
|
||||||
|
{
|
||||||
|
return ['0' => __('Feel 0'), '1' => __('Feel 1')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStartTimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getEndTimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getSignStartTimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getSignEndTimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getRecommendTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
|
||||||
|
$list = $this->getRecommendList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getHotTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
|
||||||
|
$list = $this->getHotList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getNewTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
|
||||||
|
$list = $this->getNewList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getAddTypeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
|
||||||
|
$list = $this->getAddTypeList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getFeelTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['feel']) ? $data['feel'] : '');
|
||||||
|
$list = $this->getFeelList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setStartTimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setEndTimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setSignStartTimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setSignEndTimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function order()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Order::class, 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function activity()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Activity::class, 'activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
109
application/common/model/school/activity/order/SettleLog.php
Normal file
109
application/common/model/school/activity/order/SettleLog.php
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\school\activity\order;
|
||||||
|
|
||||||
|
use app\common\model\user\withdrawal\UserwithdrawalLog;
|
||||||
|
use think\Model;
|
||||||
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
|
class SettleLog extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'school_activity_settle_log';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = 'integer';
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = 'createtime';
|
||||||
|
protected $updateTime = false;
|
||||||
|
protected $deleteTime = 'deletetime';
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
'status_text',
|
||||||
|
'settletime_text',
|
||||||
|
'canceltime_text',
|
||||||
|
'unfreezetime_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3'), '-1' => __('Status -1')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
|
||||||
|
$list = $this->getStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getSettletimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['settletime']) ? $data['settletime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getCanceltimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['canceltime']) ? $data['canceltime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getUnfreezetimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['unfreezetime']) ? $data['unfreezetime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setSettletimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setCanceltimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setUnfreezetimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function order()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Order::class, 'activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function log()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(UserwithdrawalLog::class, 'withdrawal_log_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function touser()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('app\common\model\User', 'to_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function payuser()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('app\common\model\User', 'pay_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
12
application/common/model/user/withdrawal/Log.php
Normal file
12
application/common/model/user/withdrawal/Log.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\user\withdrawal;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
class Log extends Model
|
||||||
|
{
|
||||||
|
// 表名
|
||||||
|
protected $name = 'user_withdrawal_log';
|
||||||
|
|
||||||
|
}
|
44
application/common/model/user/withdrawal/Userwithdrawal.php
Normal file
44
application/common/model/user/withdrawal/Userwithdrawal.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\user\withdrawal;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
use traits\model\SoftDelete;
|
||||||
|
|
||||||
|
class Userwithdrawal extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'user_withdrawal';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = 'integer';
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = 'createtime';
|
||||||
|
protected $updateTime = 'updatetime';
|
||||||
|
protected $deleteTime = 'deletetime';
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
105
application/common/model/user/withdrawal/UserwithdrawalLog.php
Normal file
105
application/common/model/user/withdrawal/UserwithdrawalLog.php
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\user\withdrawal;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class UserwithdrawalLog extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'user_withdrawal_log';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = 'integer';
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = 'createtime';
|
||||||
|
protected $updateTime = false;
|
||||||
|
protected $deleteTime = false;
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
'status_text',
|
||||||
|
'withdrawal_status_text',
|
||||||
|
'type_text',
|
||||||
|
'paytime_text',
|
||||||
|
'examinetime_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWithdrawalStatusList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Withdrawal_status 1'), '2' => __('Withdrawal_status 2'), '3' => __('Withdrawal_status 3')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTypeList()
|
||||||
|
{
|
||||||
|
return ['bank' => __('Type bank'), 'wechat' => __('Type wechat'), 'alipay' => __('Type alipay')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
|
||||||
|
$list = $this->getStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getWithdrawalStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['withdrawal_status']) ? $data['withdrawal_status'] : '');
|
||||||
|
$list = $this->getWithdrawalStatusList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getTypeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['type']) ? $data['type'] : '');
|
||||||
|
$list = $this->getTypeList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getPaytimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['paytime']) ? $data['paytime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getExaminetimeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['examinetime']) ? $data['examinetime'] : '');
|
||||||
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setPaytimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setExaminetimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
@ -6,8 +6,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
Table.api.init({
|
Table.api.init({
|
||||||
extend: {
|
extend: {
|
||||||
index_url: 'school/activity/activity/index' + location.search,
|
index_url: 'school/activity/activity/index' + location.search,
|
||||||
add_url: 'school/activity/activity/add',
|
add_url: 'school/activity/activity/add'+ location.search,
|
||||||
edit_url: 'school/activity/activity/edit',
|
edit_url: 'school/activity/activity/edit'+ location.search,
|
||||||
del_url: 'school/activity/activity/del',
|
del_url: 'school/activity/activity/del',
|
||||||
multi_url: 'school/activity/activity/multi',
|
multi_url: 'school/activity/activity/multi',
|
||||||
import_url: 'school/activity/activity/import',
|
import_url: 'school/activity/activity/import',
|
||||||
@ -31,11 +31,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
{field: 'user_id', title: __('User_id')},
|
{field: 'user_id', title: __('User_id')},
|
||||||
{field: 'title', title: __('Title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{field: 'title', title: __('Title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
{field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
{field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||||
{field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
// {field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
{field: 'cate_ids', title: __('Cate_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
// {field: 'cate_ids', title: __('Cate_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
{field: 'province', title: __('Province')},
|
|
||||||
{field: 'city', title: __('City')},
|
{field: 'cate_ids', title: __('Cate_ids'), searchList: cateListJson, formatter: Table.api.formatter.flag},
|
||||||
{field: 'district', title: __('District')},
|
// {field: 'province', title: __('Province')},
|
||||||
|
// {field: 'city', title: __('City')},
|
||||||
|
// {field: 'district', title: __('District')},
|
||||||
{field: 'address', title: __('Address'), operate: 'LIKE'},
|
{field: 'address', title: __('Address'), operate: 'LIKE'},
|
||||||
{field: 'address_detail', title: __('Address_detail'), operate: 'LIKE'},
|
{field: 'address_detail', title: __('Address_detail'), operate: 'LIKE'},
|
||||||
{field: 'longitude', title: __('Longitude'), operate: 'LIKE'},
|
{field: 'longitude', title: __('Longitude'), operate: 'LIKE'},
|
||||||
@ -150,6 +152,44 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
},
|
},
|
||||||
api: {
|
api: {
|
||||||
bindevent: function () {
|
bindevent: function () {
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on("dp.change", "#add-form .datetimerange", function () {
|
||||||
|
$(this).parent().prev().find("input").trigger("change");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("dp.change", "#add-form .datetimepicker", function () {
|
||||||
|
$(this).parent().prev().find("input").trigger("change");
|
||||||
|
});
|
||||||
|
$(document).on("dp.change", "#edit-form .datetimerange", function () {
|
||||||
|
$(this).parent().prev().find("input").trigger("change");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("dp.change", "#edit-form .datetimepicker", function () {
|
||||||
|
$(this).parent().prev().find("input").trigger("change");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('click', '.btn-changeuser', function (event) {
|
||||||
|
var url = $(this).attr('data-url');
|
||||||
|
if(!url) return false;
|
||||||
|
var title = $(this).attr('title');
|
||||||
|
var width = $(this).attr('data-width');
|
||||||
|
var height = $(this).attr('data-height');
|
||||||
|
// var ids = $(this).attr('data-id');
|
||||||
|
var area = [$(window).width() > 800 ? (width?width:'800px') : '95%', $(window).height() > 600 ? (height?height:'600px') : '95%'];
|
||||||
|
var options = {
|
||||||
|
shadeClose: false,
|
||||||
|
shade: [0.3, '#393D49'],
|
||||||
|
area: area,
|
||||||
|
callback:function(ret){//回调方法,需要在本页面Controller中增加方法监听且调用Fast.api.close(ret)传递结果;
|
||||||
|
Fast.api.close(ret);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Fast.api.open(url,title,options);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
Form.api.bindevent($("form[role=form]"));
|
Form.api.bindevent($("form[role=form]"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,11 +44,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
{field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
{field: 'log.id', title: __('Log.id')},
|
{field: 'log.id', title: __('Log.id')},
|
||||||
{field: 'log.price', title: __('Log.price'), operate:'BETWEEN'},
|
{field: 'log.price', title: __('Log.price'), operate:'BETWEEN'},
|
||||||
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
|
{field: 'touser.nickname', title: __('User.nickname'), operate: 'LIKE'},
|
||||||
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
|
{field: 'touser.realname', title: __('User.realname'), operate: 'LIKE'},
|
||||||
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
|
{field: 'touser.mobile', title: __('User.mobile'), operate: 'LIKE'},
|
||||||
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
{field: 'touser.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||||
{field: 'third.openname', title: __('Third.openname'), operate: 'LIKE'},
|
{field: 'payuser.nickname', title: __('User.nickname'), operate: 'LIKE'},
|
||||||
|
{field: 'payuser.realname', title: __('User.realname'), operate: 'LIKE'},
|
||||||
|
{field: 'payuser.mobile', title: __('User.mobile'), operate: 'LIKE'},
|
||||||
|
{field: 'payuser.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -64,6 +64,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
|
|
||||||
}},
|
}},
|
||||||
{field: 'type', title: __('Type'), searchList: {"in":__('Type in'),"out":__('Type out')}, formatter: Table.api.formatter.normal},
|
{field: 'type', title: __('Type'), searchList: {"in":__('Type in'),"out":__('Type out')}, formatter: Table.api.formatter.normal},
|
||||||
|
{field: 'title', title: __('轮播图标题'), operate: 'LIKE'},
|
||||||
{field: 'showtype', title: __('Showtype'), searchList: showtypeListJson, formatter: Table.api.formatter.normal},
|
{field: 'showtype', title: __('Showtype'), searchList: showtypeListJson, formatter: Table.api.formatter.normal},
|
||||||
{field: 'url', title: __('Url'), operate: 'LIKE', formatter: Table.api.formatter.url},
|
{field: 'url', title: __('Url'), operate: 'LIKE', formatter: Table.api.formatter.url},
|
||||||
{field: 'weigh', title: __('Weigh'), operate: false},
|
{field: 'weigh', title: __('Weigh'), operate: false},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user