作者 刘朕
1 个管道 的构建 通过 耗费 0 秒

渠道关闭提示页面,字段管理优化

... ... @@ -125,6 +125,9 @@ class OrderOptionController extends AdminBaseController
}
$post['values'] = str_replace(',', ',', trim($post['values']));
}
if(empty($post['is_show'])) {
$post['is_show'] = 0;
}
$result = $this->order_option_model->addOption($post);
if (!$result) {
$this->error('添加失败');
... ... @@ -186,6 +189,9 @@ class OrderOptionController extends AdminBaseController
}
$post['values'] = str_replace(',', ',', trim($post['values']));
}
if(empty($post['is_show'])) {
$post['is_show'] = 0;
}
$result = $this->order_option_model->editOption($post);
if (!$result) {
$this->error('修改失败');
... ...
... ... @@ -17,6 +17,7 @@ class OrderOptionValidate extends Validate
'name' => 'require',
'icon' => 'require',
'sort' => 'require|number|between:1,11',
'is_show' => 'in:0,1',
];
protected $message = [
... ... @@ -25,6 +26,7 @@ class OrderOptionValidate extends Validate
'sort.require' => '类型不能为空',
'sort.number' => '类型必须为数字',
'sort.between' => '类型值必须在1-11之间',
'is_show.between' => '用户是否可见值必须在0-1之间',
];
// protected $scene = [
... ...
... ... @@ -148,6 +148,7 @@ class OrderController extends HomeBaseController
$orderInfo['options'] = json_decode($orderInfo['options'],true);
foreach ($orderInfo['options'] as $k=>$v) {
$optionsInfo = $this->singleData($this->option_table,['id'=>$v['id']]);
if($optionsInfo['is_show'] == 1) {
$v['name'] = $optionsInfo['name'];
$v['html'] = $this->form_model($v);
if($k <= 5) {
... ... @@ -160,6 +161,7 @@ class OrderController extends HomeBaseController
$orderInfo['groupD'][] = $v;
}
}
}
$this->assign('orderInfo',$orderInfo);
return $this->fetch();
}
... ...
... ... @@ -52,7 +52,7 @@ class RegisterController extends HomeBaseController
if(!empty($token)) {
$channel = Db::name('Channel')->where(['token'=>$token,'delete_time'=>0])->find();
if(!$channel) {
$this->error('该渠道已停止注册');
return $this->fetch(":close");
}
Session::set('channel',$channel['id']);
}
... ...
... ... @@ -44,6 +44,16 @@
<p class="help-block">多取值范围之间用英文逗号隔开</p>
</td>
</tr>
<tr>
<th>用户是否可见<span class="form-required">*</span></th>
<td>
<div class="checkbox">
<label>
<input type="checkbox" name="is_show" value="1" checked> 可见
</label>
</div>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
... ...
... ... @@ -45,6 +45,16 @@
<p class="help-block">多取值范围之间用英文逗号隔开</p>
</td>
</tr>
<tr>
<th>用户是否可见<span class="form-required">*</span></th>
<td>
<div class="checkbox">
<label>
<input type="checkbox" name="is_show" value="1" <eq name="is_show" value="1">checked</eq>> 可见
</label>
</div>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
... ...
... ... @@ -42,6 +42,7 @@
<th>字段名称</th>
<th>字段类型</th>
<th>取值范围(部分类型使用)</th>
<th>用户是否可见</th>
<th width="130">更新时间</th>
<th width="130">发布时间</th>
<th width="90">操作</th>
... ... @@ -57,6 +58,7 @@
<td>{$vo.name}</td>
<td>{$typeList[$vo.sort]}</td>
<td><if condition="$vo['sort'] eq 4 or $vo['sort'] eq 5 or $vo['sort'] eq 7">{$vo.values}</if></td>
<td><eq name="vo.is_show" value="0"></eq><eq name="vo.is_show" value="1"></eq></td>
<td>{:date('Y-m-d H:i',$vo.create_time)}</td>
<td>{:date('Y-m-d H:i',$vo.update_time)}</td>
<td>
... ... @@ -73,6 +75,7 @@
<th>字段名称</th>
<th>字段类型</th>
<th>取值范围(部分类型使用)</th>
<th>用户是否可见</th>
<th width="130">更新时间</th>
<th width="130">发布时间</th>
<th width="90">操作</th>
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<include file="public@head_common"/>
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/augly.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/pay/my_pay.css" />
<title>渠道注册</title>
<style type="text/css">
.public_title {
text-align: center;
color: #222222;
font-size: .36rem;
font-weight: bold;
line-height: .6rem;
}
.public_word {
text-align: center;
color: #666666;
font-size: .3rem;
line-height: .6rem;
}
.btn {
margin-top: 0.2rem;
}
</style>
</head>
<body>
<div class="header">
<div class="return">
<span class="back_href">
<i class="iconfont icon-jiantou-copy"></i>返回
</span>
</div>
渠道注册
</div>
<div class="test_num"></div>
<div class="header_place"></div>
<!--banner-->
<div class="banner">
<img src="__TMPL__/public/mobile/images/banner@2x_14.png" />
</div>
<div class="see_order">
<div class="public_title">对不起,该注册通道已关闭</div>
<div class="public_word">请您用其他方式注册</div>
<div class="btn">
返回首页
</div>
</div>
<div class="bottom_icon position_a">
<img src="__TMPL__/public/mobile/images/biglogo@2x.png" class="bottom_img" />
<p class="bottom_text">{$site_info.site_name}</p>
</div>
<script src="__TMPL__/public/mobile/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/mobile/js/swiper-4.3.5.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$('.btn').click(function(){
window.location.href = "{:url('portal/Index/index')}";
});
$('.return').click(function(){
window.location.href = "{:url('portal/Index/index')}";
});
</script>
</body>
</html>
\ No newline at end of file
... ...