更新:冲突解决
commit
19e762187c
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
namespace app\controller\api;
|
||||||
|
|
||||||
|
use app\model\CouponMain;
|
||||||
|
use app\repository\CouponRepository;
|
||||||
|
use think\Collection;
|
||||||
|
use think\response\Json;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评论相关
|
||||||
|
*
|
||||||
|
* Class Consumer
|
||||||
|
* @package app\controller\api
|
||||||
|
*/
|
||||||
|
class Comment extends Base
|
||||||
|
{
|
||||||
|
protected $noNeedLogin = [
|
||||||
|
'',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -28,4 +28,5 @@ class Business extends Base
|
||||||
{
|
{
|
||||||
return $this->hasOne(self::class,"code","agency_code");
|
return $this->hasOne(self::class,"code","agency_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
use think\facade\Route;
|
use think\facade\Route;
|
||||||
|
|
||||||
|
Route::rule('account/loginByCode', "\\app\\controller\\api\\user@login");//用户登录
|
||||||
|
Route::rule('consumer/home', "\\app\\controller\\api\\Consumer@home");//首页列表(优惠券列表)
|
||||||
|
Route::rule('dic/getDisList', "\\app\\controller\\api\\dictionary@getDisList");//距离选项列表
|
||||||
|
Route::rule('dic/getBusinessTypeListByPid', "\\app\\controller\\api\\dictionary@getBusinessTypeList");//首页获取商家类型
|
||||||
|
Route::rule('dic/getCouponTypeList', "\\app\\controller\\api\\dictionary@getCouponTypeList");//首页获取优惠券类型
|
||||||
|
|
|
@ -90,13 +90,66 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<fieldset class="layui-elem-field layui-field-title site-title">
|
||||||
|
<legend><a >使用规则</a></legend>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">使用规则</label>
|
<label class="layui-form-label">每日领取总数</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<textarea name="item[using_rule]" cols="30" rows="10"></textarea>
|
<input class="layui-input" type="number" name="using_rule[day_total]" lay-verify="required|number" value=""/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">使用周期限制</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="checkbox" name="using_rule[cycle][1]" value="0" title="周一" />
|
||||||
|
<input type="checkbox" name="using_rule[cycle][2]" value="1" title="周二" />
|
||||||
|
<input type="checkbox" name="using_rule[cycle][3]" value="1" title="周三" />
|
||||||
|
<input type="checkbox" name="using_rule[cycle][4]" value="1" title="周四" />
|
||||||
|
<input type="checkbox" name="using_rule[cycle][5]" value="1" title="周五" />
|
||||||
|
<input type="checkbox" name="using_rule[cycle][6]" value="1" title="周六" />
|
||||||
|
<input type="checkbox" name="using_rule[cycle][0]" value="1" title="周天" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">每日时段限制</label>
|
||||||
|
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">开始时间</label>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" name="using_rule[day_start_time]" class="layui-input" id="using_rule_day_start_time" placeholder="HH:mm:ss">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">结束</label>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" name="using_rule[day_end_time]" class="layui-input" id="using_rule_day_end_time" placeholder="HH:mm:ss">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">单人日限制</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input class="layui-input" type="number" name="using_rule[person_day_total]" lay-verify="required|number" value=""/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">单人总限制</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input class="layui-input" type="number" name="using_rule[person_total]" lay-verify="required|number" value=""/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<fieldset class="layui-elem-field layui-field-title site-title">
|
||||||
|
<legend><a >处罚规则</a></legend>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">处罚规则</label>
|
<label class="layui-form-label">处罚规则</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
|
@ -170,4 +223,20 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="__MANAGER__/js/coupon/index.js?v={:mt_rand()}"></script>
|
<script src="__MANAGER__/js/coupon/index.js?v={:mt_rand()}"></script>
|
||||||
|
<script>
|
||||||
|
layui.use(['laydate'], function () {
|
||||||
|
laydate = layui.laydate;
|
||||||
|
//日期时间选择器
|
||||||
|
laydate.render({
|
||||||
|
elem: '#using_rule_day_start_time'
|
||||||
|
,type: 'time'
|
||||||
|
});
|
||||||
|
|
||||||
|
//日期时间选择器
|
||||||
|
laydate.render({
|
||||||
|
elem: '#using_rule_day_end_time'
|
||||||
|
,type: 'time'
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
Loading…
Reference in New Issue