正在显示
3 个修改的文件
包含
120 行增加
和
11 行删除
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <project version="4"> | 2 | <project version="4"> |
3 | <component name="ChangeListManager"> | 3 | <component name="ChangeListManager"> |
4 | - <list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment=""> | ||
5 | - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> | ||
6 | - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/UserController.php" afterPath="$PROJECT_DIR$/api/index/controller/UserController.php" /> | ||
7 | - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/admin/controller/FeeController.php" afterPath="$PROJECT_DIR$/app/admin/controller/FeeController.php" /> | ||
8 | - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/data/lang/zh-cn/admin_menu.php" afterPath="$PROJECT_DIR$/data/lang/zh-cn/admin_menu.php" /> | ||
9 | - </list> | 4 | + <list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment="" /> |
10 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | 5 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> |
11 | <option name="TRACKING_ENABLED" value="true" /> | 6 | <option name="TRACKING_ENABLED" value="true" /> |
12 | <option name="SHOW_DIALOG" value="false" /> | 7 | <option name="SHOW_DIALOG" value="false" /> |
@@ -138,8 +133,8 @@ | @@ -138,8 +133,8 @@ | ||
138 | </component> | 133 | </component> |
139 | <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> | 134 | <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> |
140 | <component name="ProjectFrameBounds"> | 135 | <component name="ProjectFrameBounds"> |
141 | - <option name="x" value="327" /> | ||
142 | - <option name="y" value="114" /> | 136 | + <option name="x" value="384" /> |
137 | + <option name="y" value="100" /> | ||
143 | <option name="width" value="1618" /> | 138 | <option name="width" value="1618" /> |
144 | <option name="height" value="1023" /> | 139 | <option name="height" value="1023" /> |
145 | </component> | 140 | </component> |
@@ -337,15 +332,15 @@ | @@ -337,15 +332,15 @@ | ||
337 | <workItem from="1575527294268" duration="10705000" /> | 332 | <workItem from="1575527294268" duration="10705000" /> |
338 | <workItem from="1575543830603" duration="2980000" /> | 333 | <workItem from="1575543830603" duration="2980000" /> |
339 | <workItem from="1575592067577" duration="15900000" /> | 334 | <workItem from="1575592067577" duration="15900000" /> |
340 | - <workItem from="1575615529386" duration="10434000" /> | 335 | + <workItem from="1575615529386" duration="10461000" /> |
341 | </task> | 336 | </task> |
342 | <servers /> | 337 | <servers /> |
343 | </component> | 338 | </component> |
344 | <component name="TimeTrackingManager"> | 339 | <component name="TimeTrackingManager"> |
345 | - <option name="totallyTimeSpent" value="521831000" /> | 340 | + <option name="totallyTimeSpent" value="521858000" /> |
346 | </component> | 341 | </component> |
347 | <component name="ToolWindowManager"> | 342 | <component name="ToolWindowManager"> |
348 | - <frame x="327" y="114" width="1618" height="1023" extended-state="0" /> | 343 | + <frame x="384" y="100" width="1618" height="1023" extended-state="0" /> |
349 | <editor active="true" /> | 344 | <editor active="true" /> |
350 | <layout> | 345 | <layout> |
351 | <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" /> | 346 | <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" /> |
app/admin/controller/BountyController.php
0 → 100644
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: Administrator | ||
5 | + * Date: 2019/12/6 | ||
6 | + * Time: 18:50 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace app\admin\controller; | ||
10 | + | ||
11 | + | ||
12 | +use cmf\controller\AdminBaseController; | ||
13 | +use think\Db; | ||
14 | +use think\Validate; | ||
15 | + | ||
16 | +class BountyController extends AdminBaseController | ||
17 | +{ | ||
18 | + public function index() | ||
19 | + { | ||
20 | + $id = $this->request->param('id', 1, 'intval'); | ||
21 | + if ($this->request->isPost()) { | ||
22 | + $param = $this->request->param(); | ||
23 | + $param['update_time'] = time(); | ||
24 | + $validate = new Validate([ | ||
25 | + 'bounty'=>'require', | ||
26 | + ]); | ||
27 | + $validate->message([ | ||
28 | + 'bounty'=>'奖励金不能为空', | ||
29 | + ]); | ||
30 | + if (!$validate->check($param)) { | ||
31 | + $this->error($validate->getError()); | ||
32 | + } | ||
33 | + Db::name('bounty') | ||
34 | + ->where('id', $id) | ||
35 | + ->update($param); | ||
36 | + $this->success('更新成功'); | ||
37 | + } else { | ||
38 | + $data = Db::name('bounty') | ||
39 | + ->where('id', $id) | ||
40 | + ->find(); | ||
41 | + $this->assign([ | ||
42 | + 'data' => $data, | ||
43 | + ]); | ||
44 | + return $this->fetch(); | ||
45 | + } | ||
46 | + } | ||
47 | +} |
1 | +<include file="public@header"/> | ||
2 | +</head> | ||
3 | +<body> | ||
4 | +<script type="text/html" id="photos-item-tpl"> | ||
5 | + <li id="saved-image{id}"> | ||
6 | + <input id="photo-{id}" type="hidden" name="images[]" value="{filepath}"> | ||
7 | + <img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;" | ||
8 | + onclick="imagePreviewDialog(this.src);"> | ||
9 | + <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a> | ||
10 | + <a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a> | ||
11 | + </li> | ||
12 | +</script> | ||
13 | +<div class="wrap js-check-wrap"> | ||
14 | + <form action="{:url('bounty/index')}" method="post" class="form-horizontal js-ajax-form margin-top-20"> | ||
15 | + <div class="row"> | ||
16 | + <div class="col-md-9"> | ||
17 | + <table class="table table-bordered"> | ||
18 | + <tr> | ||
19 | + <th width="100">奖励金<span class="form-required">*</span></th> | ||
20 | + <td> | ||
21 | + <input class="form-control" type="text" name="bounty" | ||
22 | + id="bounty" value="{$data.bounty}" placeholder="请输入奖励金"/> | ||
23 | + <input type="hidden" name="id" value="{$data.id}"> | ||
24 | + </td> | ||
25 | + </tr> | ||
26 | + </table> | ||
27 | + <div class="form-group"> | ||
28 | + <div class="col-sm-offset-2 col-sm-10"> | ||
29 | + <button type="submit" class="btn btn-primary js-ajax-submit">更新</button> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + </div> | ||
34 | + </form> | ||
35 | +</div> | ||
36 | +<script type="text/javascript" src="__STATIC__/js/admin.js"></script> | ||
37 | +<script type="text/javascript"> | ||
38 | + //编辑器路径定义 | ||
39 | + var editorURL = GV.WEB_ROOT; | ||
40 | +</script> | ||
41 | +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script> | ||
42 | +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script> | ||
43 | +<script type="text/javascript"> | ||
44 | + $(function () { | ||
45 | + | ||
46 | + editorcontent = new baidu.editor.ui.Editor(); | ||
47 | + editorcontent.render('content'); | ||
48 | + try { | ||
49 | + editorcontent.sync(); | ||
50 | + } catch (err) { | ||
51 | + } | ||
52 | + | ||
53 | + $('.btn-cancel-thumbnail').click(function () { | ||
54 | + $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png'); | ||
55 | + $('#thumbnail').val(''); | ||
56 | + }); | ||
57 | + | ||
58 | + $('.btn-cancel-video_thumbnail').click(function () { | ||
59 | + $('#video_thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png'); | ||
60 | + $('#video_thumbnail').val(''); | ||
61 | + }); | ||
62 | + | ||
63 | + | ||
64 | + }); | ||
65 | +</script> | ||
66 | +</body> | ||
67 | +</html> |
-
请 注册 或 登录 后发表评论