作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

添加后台奖励金配置

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/UserController.php" afterPath="$PROJECT_DIR$/api/index/controller/UserController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/admin/controller/FeeController.php" afterPath="$PROJECT_DIR$/app/admin/controller/FeeController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/data/lang/zh-cn/admin_menu.php" afterPath="$PROJECT_DIR$/data/lang/zh-cn/admin_menu.php" />
</list>
<list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
... ... @@ -138,8 +133,8 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="327" />
<option name="y" value="114" />
<option name="x" value="384" />
<option name="y" value="100" />
<option name="width" value="1618" />
<option name="height" value="1023" />
</component>
... ... @@ -337,15 +332,15 @@
<workItem from="1575527294268" duration="10705000" />
<workItem from="1575543830603" duration="2980000" />
<workItem from="1575592067577" duration="15900000" />
<workItem from="1575615529386" duration="10434000" />
<workItem from="1575615529386" duration="10461000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="521831000" />
<option name="totallyTimeSpent" value="521858000" />
</component>
<component name="ToolWindowManager">
<frame x="327" y="114" width="1618" height="1023" extended-state="0" />
<frame x="384" y="100" width="1618" height="1023" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22978178" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/12/6
* Time: 18:50
*/
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
use think\Db;
use think\Validate;
class BountyController extends AdminBaseController
{
public function index()
{
$id = $this->request->param('id', 1, 'intval');
if ($this->request->isPost()) {
$param = $this->request->param();
$param['update_time'] = time();
$validate = new Validate([
'bounty'=>'require',
]);
$validate->message([
'bounty'=>'奖励金不能为空',
]);
if (!$validate->check($param)) {
$this->error($validate->getError());
}
Db::name('bounty')
->where('id', $id)
->update($param);
$this->success('更新成功');
} else {
$data = Db::name('bounty')
->where('id', $id)
->find();
$this->assign([
'data' => $data,
]);
return $this->fetch();
}
}
}
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<script type="text/html" id="photos-item-tpl">
<li id="saved-image{id}">
<input id="photo-{id}" type="hidden" name="images[]" value="{filepath}">
<img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"
onclick="imagePreviewDialog(this.src);">
<a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
<a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>
</li>
</script>
<div class="wrap js-check-wrap">
<form action="{:url('bounty/index')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<div class="row">
<div class="col-md-9">
<table class="table table-bordered">
<tr>
<th width="100">奖励金<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="bounty"
id="bounty" value="{$data.bounty}" placeholder="请输入奖励金"/>
<input type="hidden" name="id" value="{$data.id}">
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">更新</button>
</div>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function () {
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
$('.btn-cancel-thumbnail').click(function () {
$('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnail').val('');
});
$('.btn-cancel-video_thumbnail').click(function () {
$('#video_thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#video_thumbnail').val('');
});
});
</script>
</body>
</html>
... ...