正在显示
30 个修改的文件
包含
1483 行增加
和
10 行删除
@@ -46,13 +46,13 @@ class Center extends Backend | @@ -46,13 +46,13 @@ class Center extends Backend | ||
46 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | 46 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); |
47 | $total = $this->model | 47 | $total = $this->model |
48 | ->where($where) | 48 | ->where($where) |
49 | - ->where('id',4) | 49 | + ->where('id',5) |
50 | ->order($sort, $order) | 50 | ->order($sort, $order) |
51 | ->count(); | 51 | ->count(); |
52 | 52 | ||
53 | $list = $this->model | 53 | $list = $this->model |
54 | ->where($where) | 54 | ->where($where) |
55 | - ->where('id',4) | 55 | + ->where('id',5) |
56 | ->order($sort, $order) | 56 | ->order($sort, $order) |
57 | ->limit($offset, $limit) | 57 | ->limit($offset, $limit) |
58 | ->select(); | 58 | ->select(); |
application/admin/controller/Order.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\controller; | ||
4 | + | ||
5 | +use app\common\controller\Backend; | ||
6 | +/** | ||
7 | + * 导入订单管理 | ||
8 | + * | ||
9 | + * @icon fa fa-circle-o | ||
10 | + */ | ||
11 | +class Order extends Backend | ||
12 | +{ | ||
13 | + | ||
14 | + /** | ||
15 | + * Order模型对象 | ||
16 | + * @var \app\admin\model\Order | ||
17 | + */ | ||
18 | + protected $model = null; | ||
19 | + | ||
20 | + public function _initialize() | ||
21 | + { | ||
22 | + parent::_initialize(); | ||
23 | + $this->model = new \app\admin\model\Order; | ||
24 | + | ||
25 | + } | ||
26 | + | ||
27 | + /** | ||
28 | + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
29 | + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
30 | + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
31 | + */ | ||
32 | + /** | ||
33 | + * 查看 | ||
34 | + */ | ||
35 | + public function order($ids) | ||
36 | + { | ||
37 | + //设置过滤方法 | ||
38 | + $this->request->filter(['strip_tags']); | ||
39 | + if ($this->request->isAjax()) { | ||
40 | + //如果发送的来源是Selectpage,则转发到Selectpage | ||
41 | + if ($this->request->request('keyField')) { | ||
42 | + return $this->selectpage(); | ||
43 | + } | ||
44 | + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | ||
45 | + $total = $this->model | ||
46 | + ->where($where) | ||
47 | + ->where('r_id',$ids) | ||
48 | + ->order($sort, $order) | ||
49 | + ->count(); | ||
50 | + | ||
51 | + $list = $this->model | ||
52 | + ->where($where) | ||
53 | + ->where('r_id',$ids) | ||
54 | + ->order($sort, $order) | ||
55 | + ->limit($offset, $limit) | ||
56 | + ->select(); | ||
57 | + | ||
58 | + $list = collection($list)->toArray(); | ||
59 | + $result = array("total" => $total, "rows" => $list); | ||
60 | + | ||
61 | + return json($result); | ||
62 | + } | ||
63 | + $this->assignconfig("r_id",$ids); | ||
64 | + return $this->view->fetch(); | ||
65 | + } | ||
66 | + | ||
67 | +} |
application/admin/controller/Register.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\controller; | ||
4 | + | ||
5 | +use app\common\controller\Backend; | ||
6 | + | ||
7 | +/** | ||
8 | + * 会员注册 | ||
9 | + * | ||
10 | + * @icon fa fa-circle-o | ||
11 | + */ | ||
12 | +class Register extends Backend | ||
13 | +{ | ||
14 | + | ||
15 | + /** | ||
16 | + * Platform模型对象 | ||
17 | + * @var \app\admin\model\Platform | ||
18 | + */ | ||
19 | + protected $model = null; | ||
20 | + | ||
21 | + public function _initialize() | ||
22 | + { | ||
23 | + parent::_initialize(); | ||
24 | + $this->model = new \app\admin\model\Platform; | ||
25 | + | ||
26 | + } | ||
27 | + | ||
28 | + /** | ||
29 | + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
30 | + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
31 | + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
32 | + */ | ||
33 | + | ||
34 | + /** | ||
35 | + * 查看 | ||
36 | + */ | ||
37 | + public function index() | ||
38 | + { | ||
39 | + //设置过滤方法 | ||
40 | + $this->request->filter(['strip_tags']); | ||
41 | + if ($this->request->isAjax()) { | ||
42 | + //如果发送的来源是Selectpage,则转发到Selectpage | ||
43 | + if ($this->request->request('keyField')) { | ||
44 | + return $this->selectpage(); | ||
45 | + } | ||
46 | + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | ||
47 | + $total = $this->model | ||
48 | + ->where($where) | ||
49 | + ->where('id',4) | ||
50 | + ->order($sort, $order) | ||
51 | + ->count(); | ||
52 | + | ||
53 | + $list = $this->model | ||
54 | + ->where($where) | ||
55 | + ->where('id',4) | ||
56 | + ->order($sort, $order) | ||
57 | + ->limit($offset, $limit) | ||
58 | + ->select(); | ||
59 | + | ||
60 | + $list = collection($list)->toArray(); | ||
61 | + $result = array("total" => $total, "rows" => $list); | ||
62 | + | ||
63 | + return json($result); | ||
64 | + } | ||
65 | + return $this->view->fetch(); | ||
66 | + } | ||
67 | + | ||
68 | +} |
application/admin/controller/Registers.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\controller; | ||
4 | + | ||
5 | +use app\common\controller\Backend; | ||
6 | +use app\api\controller\Common; | ||
7 | +use Exception; | ||
8 | +use PhpOffice\PhpSpreadsheet\Cell\Coordinate; | ||
9 | +use PhpOffice\PhpSpreadsheet\Reader\Xlsx; | ||
10 | +use PhpOffice\PhpSpreadsheet\Reader\Xls; | ||
11 | +use PhpOffice\PhpSpreadsheet\Reader\Csv; | ||
12 | +use think\exception\PDOException; | ||
13 | +use app\admin\library\Auth; | ||
14 | +/** | ||
15 | + * 会员注册管理 | ||
16 | + * | ||
17 | + * @icon fa fa-circle-o | ||
18 | + */ | ||
19 | +class Registers extends Backend | ||
20 | +{ | ||
21 | + | ||
22 | + /** | ||
23 | + * Registers模型对象 | ||
24 | + * @var \app\admin\model\Registers | ||
25 | + */ | ||
26 | + protected $model = null; | ||
27 | + | ||
28 | + public function _initialize() | ||
29 | + { | ||
30 | + parent::_initialize(); | ||
31 | + $this->model = new \app\admin\model\Registers; | ||
32 | + | ||
33 | + } | ||
34 | + | ||
35 | + /** | ||
36 | + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
37 | + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
38 | + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
39 | + */ | ||
40 | + | ||
41 | + | ||
42 | + /** | ||
43 | + * 查看 | ||
44 | + */ | ||
45 | + public function index() | ||
46 | + { | ||
47 | + //当前是否为关联查询 | ||
48 | + $this->relationSearch = true; | ||
49 | + //设置过滤方法 | ||
50 | + $this->request->filter(['strip_tags', 'trim']); | ||
51 | + if ($this->request->isAjax()) | ||
52 | + { | ||
53 | + //如果发送的来源是Selectpage,则转发到Selectpage | ||
54 | + if ($this->request->request('keyField')) | ||
55 | + { | ||
56 | + return $this->selectpage(); | ||
57 | + } | ||
58 | + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | ||
59 | + $total = $this->model | ||
60 | + ->with(['user']) | ||
61 | + ->where($where) | ||
62 | + ->order($sort, $order) | ||
63 | + ->count(); | ||
64 | + | ||
65 | + $list = $this->model | ||
66 | + ->with(['user']) | ||
67 | + ->where($where) | ||
68 | + ->order($sort, $order) | ||
69 | + ->limit($offset, $limit) | ||
70 | + ->select(); | ||
71 | + | ||
72 | + foreach ($list as $row) { | ||
73 | + | ||
74 | + $row->getRelation('user')->visible(['nickname']); | ||
75 | + $row->user->nickname = \app\admin\model\User::emoji_decode($row->user->nickname); | ||
76 | + } | ||
77 | + $list = collection($list)->toArray(); | ||
78 | + $result = array("total" => $total, "rows" => $list); | ||
79 | + | ||
80 | + return json($result); | ||
81 | + } | ||
82 | + return $this->view->fetch(); | ||
83 | + } | ||
84 | + | ||
85 | + //通过 | ||
86 | + public function adopt($ids){ | ||
87 | + if ($ids) { | ||
88 | + $pk = $this->model->getPk(); | ||
89 | + $res = $this->model->where($pk, '=', $ids)->update(['status'=>1]);//已处理 | ||
90 | + if($res){ | ||
91 | + $this->success('成功'); | ||
92 | + }else{ | ||
93 | + $this->error('失败'); | ||
94 | + } | ||
95 | + | ||
96 | + } | ||
97 | + $this->error(__('Parameter %s can not be empty', 'ids')); | ||
98 | + } | ||
99 | + | ||
100 | + //拒绝 | ||
101 | + public function reject($ids){ | ||
102 | + if ($ids) { | ||
103 | + $pk = $this->model->getPk(); | ||
104 | + $res = $this->model->where($pk, '=', $ids)->update(['status'=>2]); | ||
105 | + if($res){ | ||
106 | + $this->success('成功'); | ||
107 | + }else{ | ||
108 | + $this->error('失败'); | ||
109 | + } | ||
110 | + | ||
111 | + } | ||
112 | + $this->error(__('Parameter %s can not be empty', 'ids')); | ||
113 | + } | ||
114 | + | ||
115 | + | ||
116 | + //导入 | ||
117 | + public function import(){ | ||
118 | + $file = $this->request->request('file'); | ||
119 | + if (!$file) { | ||
120 | + $this->error(__('Parameter %s can not be empty', 'file')); | ||
121 | + } | ||
122 | + $filePath = ROOT_PATH . DS . 'public' . DS . $file; | ||
123 | + if (!is_file($filePath)) { | ||
124 | + $this->error(__('No results were found')); | ||
125 | + } | ||
126 | + //实例化reader | ||
127 | + $ext = pathinfo($filePath, PATHINFO_EXTENSION); | ||
128 | + if (!in_array($ext, ['csv', 'xls', 'xlsx'])) { | ||
129 | + $this->error(__('Unknown data format')); | ||
130 | + } | ||
131 | + if ($ext === 'csv') { | ||
132 | + $file = fopen($filePath, 'r'); | ||
133 | + $filePath = tempnam(sys_get_temp_dir(), 'import_csv'); | ||
134 | + $fp = fopen($filePath, "w"); | ||
135 | + $n = 0; | ||
136 | + while ($line = fgets($file)) { | ||
137 | + $line = rtrim($line, "\n\r\0"); | ||
138 | + $encoding = mb_detect_encoding($line, ['utf-8', 'gbk', 'latin1', 'big5']); | ||
139 | + if ($encoding != 'utf-8') { | ||
140 | + $line = mb_convert_encoding($line, 'utf-8', $encoding); | ||
141 | + } | ||
142 | + if ($n == 0 || preg_match('/^".*"$/', $line)) { | ||
143 | + fwrite($fp, $line . "\n"); | ||
144 | + } else { | ||
145 | + fwrite($fp, '"' . str_replace(['"', ','], ['""', '","'], $line) . "\"\n"); | ||
146 | + } | ||
147 | + $n++; | ||
148 | + } | ||
149 | + fclose($file) || fclose($fp); | ||
150 | + | ||
151 | + $reader = new Csv(); | ||
152 | + } elseif ($ext === 'xls') { | ||
153 | + $reader = new Xls(); | ||
154 | + } else { | ||
155 | + $reader = new Xlsx(); | ||
156 | + } | ||
157 | + | ||
158 | + //导入文件首行类型,默认是注释,如果需要使用字段名称请使用name | ||
159 | + $importHeadType = isset($this->importHeadType) ? $this->importHeadType : 'comment'; | ||
160 | + $table = $this->model->getQuery()->getTable(); | ||
161 | + $database = \think\Config::get('database.database'); | ||
162 | + $fieldArr = []; | ||
163 | + $list = db()->query("SELECT COLUMN_NAME,COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ? AND TABLE_SCHEMA = ?", [$table, $database]); | ||
164 | + foreach ($list as $k => $v) { | ||
165 | + if ($importHeadType == 'comment') { | ||
166 | + $fieldArr[$v['COLUMN_COMMENT']] = $v['COLUMN_NAME']; | ||
167 | + } else { | ||
168 | + $fieldArr[$v['COLUMN_NAME']] = $v['COLUMN_NAME']; | ||
169 | + } | ||
170 | + } | ||
171 | + | ||
172 | + //加载文件 | ||
173 | + $insert = []; | ||
174 | + $order_flag = 0;//服务订单 | ||
175 | + try { | ||
176 | + if (!$PHPExcel = $reader->load($filePath)) { | ||
177 | + $this->error(__('Unknown data format')); | ||
178 | + } | ||
179 | + $currentSheet = $PHPExcel->getSheet(0); //读取文件中的第一个工作表 | ||
180 | + $allColumn = $currentSheet->getHighestDataColumn(); //取得最大的列号 | ||
181 | + $allRow = $currentSheet->getHighestRow(); //取得一共有多少行 | ||
182 | + $maxColumnNumber = Coordinate::columnIndexFromString($allColumn); | ||
183 | + $fields = []; | ||
184 | + for ($currentRow = 1; $currentRow <= 1; $currentRow++) { | ||
185 | + for ($currentColumn = 1; $currentColumn <= $maxColumnNumber; $currentColumn++) { | ||
186 | + $val = $currentSheet->getCellByColumnAndRow($currentColumn, $currentRow)->getValue(); | ||
187 | + $fields[] = $val; | ||
188 | + } | ||
189 | + } | ||
190 | + | ||
191 | + for ($currentRow = 2; $currentRow <= $allRow; $currentRow++) { | ||
192 | + $values = []; | ||
193 | + for ($currentColumn = 1; $currentColumn <= $maxColumnNumber; $currentColumn++) { | ||
194 | + $val = $currentSheet->getCellByColumnAndRow($currentColumn, $currentRow)->getValue(); | ||
195 | + $values[] = is_null($val) ? '' : $val; | ||
196 | + } | ||
197 | + $row = []; | ||
198 | + $temp = array_combine($fields, $values); | ||
199 | + foreach ($temp as $k => $v) { | ||
200 | + if (isset($fieldArr[$k]) && $k !== '') { | ||
201 | + $row[$fieldArr[$k]] = $v; | ||
202 | + } | ||
203 | + } | ||
204 | + if ($row) { | ||
205 | + //判断导入的数据是套餐订单还是服务订单 | ||
206 | + if(isset($row['order_sn'])){ | ||
207 | + $order_flag = 1;//套餐订单 | ||
208 | + } | ||
209 | + $insert[] = $row; | ||
210 | + } | ||
211 | + } | ||
212 | + } catch (Exception $exception) { | ||
213 | + $this->error($exception->getMessage()); | ||
214 | + } | ||
215 | + if (!$insert) { | ||
216 | + $this->error(__('No rows were updated')); | ||
217 | + } | ||
218 | + try { | ||
219 | + //是否包含admin_id字段 | ||
220 | + $has_admin_id = false; | ||
221 | + foreach ($fieldArr as $name => $key) { | ||
222 | + if ($key == 'admin_id') { | ||
223 | + $has_admin_id = true; | ||
224 | + break; | ||
225 | + } | ||
226 | + } | ||
227 | + if ($has_admin_id) { | ||
228 | + $auth = Auth::instance(); | ||
229 | + foreach ($insert as &$val) { | ||
230 | + if (!isset($val['admin_id']) || empty($val['admin_id'])) { | ||
231 | + $val['admin_id'] = $auth->isLogin() ? $auth->id : 0; | ||
232 | + } | ||
233 | + } | ||
234 | + } | ||
235 | + if($order_flag == 0){ | ||
236 | + //服务订单 | ||
237 | + | ||
238 | + }else{ | ||
239 | + //套餐订单 | ||
240 | + $orderModel = new \app\admin\model\Order(); | ||
241 | + var_dump($insert);exit; | ||
242 | + $orderModel->saveAll($insert); | ||
243 | + } | ||
244 | + } catch (PDOException $exception) { | ||
245 | + $msg = $exception->getMessage(); | ||
246 | + if (preg_match("/.+Integrity constraint violation: 1062 Duplicate entry '(.+)' for key '(.+)'/is", $msg, $matches)) { | ||
247 | + $msg = "导入失败,包含【{$matches[1]}】的记录已存在"; | ||
248 | + }; | ||
249 | + $this->error($msg); | ||
250 | + } catch (Exception $e) { | ||
251 | + $this->error($e->getMessage()); | ||
252 | + } | ||
253 | + | ||
254 | + $this->success(); | ||
255 | + } | ||
256 | +} |
application/admin/lang/zh-cn/order.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +return [ | ||
4 | + 'Id' => 'ID', | ||
5 | + 'R_id' => '注册VIP人员id', | ||
6 | + 'Order_sn' => '订单编号', | ||
7 | + 'Price' => '订单价格', | ||
8 | + 'Content' => '购买服务内容', | ||
9 | + 'Total_num' => '购买次数', | ||
10 | + 'Use_num' => '已使用次数', | ||
11 | + 'Not_use_num' => '未使用次数', | ||
12 | + 'Advice' => '所属顾问', | ||
13 | + 'Address' => '详细地址', | ||
14 | + 'Organization' => '归属机构', | ||
15 | + 'Pin_user' => '品拓人员', | ||
16 | + 'Mark' => '备注', | ||
17 | + 'Createtime' => '创建时间', | ||
18 | + 'Updatetime' => '更新时间' | ||
19 | +]; |
application/admin/lang/zh-cn/register.php
0 → 100644
application/admin/lang/zh-cn/registers.php
0 → 100644
application/admin/model/Order.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\model; | ||
4 | + | ||
5 | +use think\Model; | ||
6 | + | ||
7 | + | ||
8 | +class Order extends Model | ||
9 | +{ | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + // 表名 | ||
16 | + protected $name = 'order'; | ||
17 | + | ||
18 | + // 自动写入时间戳字段 | ||
19 | + protected $autoWriteTimestamp = 'int'; | ||
20 | + | ||
21 | + // 定义时间戳字段名 | ||
22 | + protected $createTime = 'createtime'; | ||
23 | + protected $updateTime = 'updatetime'; | ||
24 | + protected $deleteTime = false; | ||
25 | + | ||
26 | + // 追加属性 | ||
27 | + protected $append = [ | ||
28 | + | ||
29 | + ]; | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | +} |
application/admin/model/Registers.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\model; | ||
4 | + | ||
5 | +use think\Model; | ||
6 | + | ||
7 | + | ||
8 | +class Registers extends Model | ||
9 | +{ | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + // 表名 | ||
16 | + protected $name = 'registers'; | ||
17 | + | ||
18 | + // 自动写入时间戳字段 | ||
19 | + protected $autoWriteTimestamp = 'int'; | ||
20 | + | ||
21 | + // 定义时间戳字段名 | ||
22 | + protected $createTime = 'createtime'; | ||
23 | + protected $updateTime = 'updatetime'; | ||
24 | + protected $deleteTime = false; | ||
25 | + | ||
26 | + // 追加属性 | ||
27 | + protected $append = [ | ||
28 | + | ||
29 | + ]; | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + public function user() | ||
41 | + { | ||
42 | + return $this->belongsTo('User', 'uid', 'id', [], 'LEFT')->setEagerlyType(0); | ||
43 | + } | ||
44 | +} |
application/admin/validate/Order.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\validate; | ||
4 | + | ||
5 | +use think\Validate; | ||
6 | + | ||
7 | +class Order extends Validate | ||
8 | +{ | ||
9 | + /** | ||
10 | + * 验证规则 | ||
11 | + */ | ||
12 | + protected $rule = [ | ||
13 | + ]; | ||
14 | + /** | ||
15 | + * 提示消息 | ||
16 | + */ | ||
17 | + protected $message = [ | ||
18 | + ]; | ||
19 | + /** | ||
20 | + * 验证场景 | ||
21 | + */ | ||
22 | + protected $scene = [ | ||
23 | + 'add' => [], | ||
24 | + 'edit' => [], | ||
25 | + ]; | ||
26 | + | ||
27 | +} |
application/admin/validate/Register.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\validate; | ||
4 | + | ||
5 | +use think\Validate; | ||
6 | + | ||
7 | +class Register extends Validate | ||
8 | +{ | ||
9 | + /** | ||
10 | + * 验证规则 | ||
11 | + */ | ||
12 | + protected $rule = [ | ||
13 | + ]; | ||
14 | + /** | ||
15 | + * 提示消息 | ||
16 | + */ | ||
17 | + protected $message = [ | ||
18 | + ]; | ||
19 | + /** | ||
20 | + * 验证场景 | ||
21 | + */ | ||
22 | + protected $scene = [ | ||
23 | + 'add' => [], | ||
24 | + 'edit' => [], | ||
25 | + ]; | ||
26 | + | ||
27 | +} |
application/admin/validate/Registers.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace app\admin\validate; | ||
4 | + | ||
5 | +use think\Validate; | ||
6 | + | ||
7 | +class Registers extends Validate | ||
8 | +{ | ||
9 | + /** | ||
10 | + * 验证规则 | ||
11 | + */ | ||
12 | + protected $rule = [ | ||
13 | + ]; | ||
14 | + /** | ||
15 | + * 提示消息 | ||
16 | + */ | ||
17 | + protected $message = [ | ||
18 | + ]; | ||
19 | + /** | ||
20 | + * 验证场景 | ||
21 | + */ | ||
22 | + protected $scene = [ | ||
23 | + 'add' => [], | ||
24 | + 'edit' => [], | ||
25 | + ]; | ||
26 | + | ||
27 | +} |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | 9 | <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> |
10 | <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('free/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>--> | 10 | <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('free/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>--> |
11 | <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('free/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>--> | 11 | <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('free/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>--> |
12 | - <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('free/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> | 12 | + <!--<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('free/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>--> |
13 | <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('free/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a> | 13 | <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('free/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a> |
14 | <a href="javascript:;" class="btn btn-success btn-export {:$auth->check('free/export')?'':'hide'}" title="{:__('Export')}" id="btn-export-file"><i class="fa fa-download"></i> {:__('Export')}</a> | 14 | <a href="javascript:;" class="btn btn-success btn-export {:$auth->check('free/export')?'':'hide'}" title="{:__('Export')}" id="btn-export-file"><i class="fa fa-download"></i> {:__('Export')}</a> |
15 | 15 |
application/admin/view/order/add.html
0 → 100644
1 | +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('R_id')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-r_id" data-rule="required" data-source="r/index" class="form-control selectpage" name="row[r_id]" type="text" value=""> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + <input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value=""> | ||
13 | + </div> | ||
14 | + </div> | ||
15 | + <div class="form-group"> | ||
16 | + <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label> | ||
17 | + <div class="col-xs-12 col-sm-8"> | ||
18 | + <input id="c-price" data-rule="required" class="form-control" name="row[price]" type="text" value=""> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-content" data-rule="required" class="form-control" name="row[content]" type="text" value=""> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Total_num')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-total_num" data-rule="required" class="form-control" name="row[total_num]" type="number" value="0"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Use_num')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-use_num" data-rule="required" class="form-control" name="row[use_num]" type="number" value="0"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Not_use_num')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-not_use_num" data-rule="required" class="form-control" name="row[not_use_num]" type="number" value="0"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2">{:__('Advice')}:</label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + <input id="c-advice" data-rule="required" class="form-control" name="row[advice]" type="text" value=""> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + <div class="form-group"> | ||
52 | + <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label> | ||
53 | + <div class="col-xs-12 col-sm-8"> | ||
54 | + <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value=""> | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + <div class="form-group"> | ||
58 | + <label class="control-label col-xs-12 col-sm-2">{:__('Organization')}:</label> | ||
59 | + <div class="col-xs-12 col-sm-8"> | ||
60 | + <input id="c-organization" data-rule="required" class="form-control" name="row[organization]" type="text" value=""> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label class="control-label col-xs-12 col-sm-2">{:__('Pin_user')}:</label> | ||
65 | + <div class="col-xs-12 col-sm-8"> | ||
66 | + <input id="c-pin_user" data-rule="required" class="form-control" name="row[pin_user]" type="text" value=""> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + <div class="form-group"> | ||
70 | + <label class="control-label col-xs-12 col-sm-2">{:__('Mark')}:</label> | ||
71 | + <div class="col-xs-12 col-sm-8"> | ||
72 | + <input id="c-mark" data-rule="required" class="form-control" name="row[mark]" type="text" value=""> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="form-group layer-footer"> | ||
76 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
77 | + <div class="col-xs-12 col-sm-8"> | ||
78 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
79 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
80 | + </div> | ||
81 | + </div> | ||
82 | +</form> |
application/admin/view/order/edit.html
0 → 100644
1 | +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('R_id')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-r_id" data-rule="required" data-source="r/index" class="form-control selectpage" name="row[r_id]" type="text" value="{$row.r_id|htmlentities}"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + <input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="{$row.order_sn|htmlentities}"> | ||
13 | + </div> | ||
14 | + </div> | ||
15 | + <div class="form-group"> | ||
16 | + <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label> | ||
17 | + <div class="col-xs-12 col-sm-8"> | ||
18 | + <input id="c-price" data-rule="required" class="form-control" name="row[price]" type="text" value="{$row.price|htmlentities}"> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-content" data-rule="required" class="form-control" name="row[content]" type="text" value="{$row.content|htmlentities}"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Total_num')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-total_num" data-rule="required" class="form-control" name="row[total_num]" type="number" value="{$row.total_num|htmlentities}"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('Use_num')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <input id="c-use_num" data-rule="required" class="form-control" name="row[use_num]" type="number" value="{$row.use_num|htmlentities}"> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Not_use_num')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-not_use_num" data-rule="required" class="form-control" name="row[not_use_num]" type="number" value="{$row.not_use_num|htmlentities}"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2">{:__('Advice')}:</label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + <input id="c-advice" data-rule="required" class="form-control" name="row[advice]" type="text" value="{$row.advice|htmlentities}"> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + <div class="form-group"> | ||
52 | + <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label> | ||
53 | + <div class="col-xs-12 col-sm-8"> | ||
54 | + <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}"> | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + <div class="form-group"> | ||
58 | + <label class="control-label col-xs-12 col-sm-2">{:__('Organization')}:</label> | ||
59 | + <div class="col-xs-12 col-sm-8"> | ||
60 | + <input id="c-organization" data-rule="required" class="form-control" name="row[organization]" type="text" value="{$row.organization|htmlentities}"> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label class="control-label col-xs-12 col-sm-2">{:__('Pin_user')}:</label> | ||
65 | + <div class="col-xs-12 col-sm-8"> | ||
66 | + <input id="c-pin_user" data-rule="required" class="form-control" name="row[pin_user]" type="text" value="{$row.pin_user|htmlentities}"> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + <div class="form-group"> | ||
70 | + <label class="control-label col-xs-12 col-sm-2">{:__('Mark')}:</label> | ||
71 | + <div class="col-xs-12 col-sm-8"> | ||
72 | + <input id="c-mark" data-rule="required" class="form-control" name="row[mark]" type="text" value="{$row.mark|htmlentities}"> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="form-group layer-footer"> | ||
76 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
77 | + <div class="col-xs-12 col-sm-8"> | ||
78 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
79 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
80 | + </div> | ||
81 | + </div> | ||
82 | +</form> |
application/admin/view/order/order.html
0 → 100644
1 | +<div class="panel panel-default panel-intro"> | ||
2 | + {:build_heading()} | ||
3 | + | ||
4 | + <div class="panel-body"> | ||
5 | + <div id="myTabContent" class="tab-content"> | ||
6 | + <div class="tab-pane fade active in" id="one"> | ||
7 | + <div class="widget-body no-padding"> | ||
8 | + <div id="toolbar" class="toolbar"> | ||
9 | + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | ||
10 | + <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>--> | ||
11 | + <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('order/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>--> | ||
12 | + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> | ||
13 | + <!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('order/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>--> | ||
14 | + | ||
15 | + <!--<div class="dropdown btn-group {:$auth->check('order/multi')?'':'hide'}">--> | ||
16 | + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>--> | ||
17 | + <!--<ul class="dropdown-menu text-left" role="menu">--> | ||
18 | + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>--> | ||
19 | + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>--> | ||
20 | + <!--</ul>--> | ||
21 | + <!--</div>--> | ||
22 | + | ||
23 | + | ||
24 | + </div> | ||
25 | + <table id="table" class="table table-striped table-bordered table-hover table-nowrap" | ||
26 | + data-operate-edit="{:$auth->check('order/edit')}" | ||
27 | + data-operate-del="{:$auth->check('order/del')}" | ||
28 | + width="100%"> | ||
29 | + </table> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + | ||
33 | + </div> | ||
34 | + </div> | ||
35 | +</div> |
application/admin/view/register/edit.html
0 → 100644
1 | +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Thumbnail')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <div class="input-group"> | ||
7 | + <input id="c-thumbnail" data-rule="required" class="form-control" size="50" name="row[thumbnail]" type="text" value="{$row.thumbnail|htmlentities}"> | ||
8 | + <div class="input-group-addon no-border no-padding"> | ||
9 | + <span><button type="button" id="plupload-thumbnail" class="btn btn-danger plupload" data-input-id="c-thumbnail" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-thumbnail"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> | ||
10 | + <span><button type="button" id="fachoose-thumbnail" class="btn btn-primary fachoose" data-input-id="c-thumbnail" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span> | ||
11 | + </div> | ||
12 | + <span class="msg-box n-right" for="c-thumbnail"></span> | ||
13 | + </div> | ||
14 | + <ul class="row list-inline plupload-preview" id="p-thumbnail"></ul> | ||
15 | + </div> | ||
16 | + </div> | ||
17 | + | ||
18 | + <div class="form-group layer-footer"> | ||
19 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
20 | + <div class="col-xs-12 col-sm-8"> | ||
21 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
22 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
23 | + </div> | ||
24 | + </div> | ||
25 | +</form> |
application/admin/view/register/index.html
0 → 100644
1 | +<div class="panel panel-default panel-intro"> | ||
2 | + {:build_heading()} | ||
3 | + | ||
4 | + <div class="panel-body"> | ||
5 | + <div id="myTabContent" class="tab-content"> | ||
6 | + <div class="tab-pane fade active in" id="one"> | ||
7 | + <div class="widget-body no-padding"> | ||
8 | + <div id="toolbar" class="toolbar"> | ||
9 | + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | ||
10 | + <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('register/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>--> | ||
11 | + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('register/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a> | ||
12 | + <!--<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('register/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>--> | ||
13 | + <!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('register/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>--> | ||
14 | + | ||
15 | + <!--<div class="dropdown btn-group {:$auth->check('register/multi')?'':'hide'}">--> | ||
16 | + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>--> | ||
17 | + <!--<ul class="dropdown-menu text-left" role="menu">--> | ||
18 | + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>--> | ||
19 | + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>--> | ||
20 | + <!--</ul>--> | ||
21 | + <!--</div>--> | ||
22 | + | ||
23 | + | ||
24 | + </div> | ||
25 | + <table id="table" class="table table-striped table-bordered table-hover table-nowrap" | ||
26 | + data-operate-edit="{:$auth->check('register/edit')}" | ||
27 | + data-operate-del="{:$auth->check('register/del')}" | ||
28 | + width="100%"> | ||
29 | + </table> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + | ||
33 | + </div> | ||
34 | + </div> | ||
35 | +</div> |
application/admin/view/registers/add.html
0 → 100644
1 | +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Uid')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-uid" data-rule="required" class="form-control" name="row[uid]" type="number"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + <input id="c-status" data-rule="required" class="form-control" name="row[status]" type="number" value="0"> | ||
13 | + </div> | ||
14 | + </div> | ||
15 | + <div class="form-group"> | ||
16 | + <label class="control-label col-xs-12 col-sm-2">{:__('User_name')}:</label> | ||
17 | + <div class="col-xs-12 col-sm-8"> | ||
18 | + <input id="c-user_name" data-rule="required" class="form-control" name="row[user_name]" type="text"> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-province" data-rule="required" class="form-control" name="row[province]" type="text"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <div class='control-relative'><input id="c-city" data-rule="required" class="form-control" data-toggle="city-picker" name="row[city]" type="text"></div> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-district" data-rule="required" class="form-control" name="row[district]" type="text"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group layer-footer"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
49 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
50 | + </div> | ||
51 | + </div> | ||
52 | +</form> |
application/admin/view/registers/edit.html
0 → 100644
1 | +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | + | ||
3 | + <div class="form-group"> | ||
4 | + <label class="control-label col-xs-12 col-sm-2">{:__('Uid')}:</label> | ||
5 | + <div class="col-xs-12 col-sm-8"> | ||
6 | + <input id="c-uid" data-rule="required" class="form-control" name="row[uid]" type="number" value="{$row.uid|htmlentities}"> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="form-group"> | ||
10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label> | ||
11 | + <div class="col-xs-12 col-sm-8"> | ||
12 | + <input id="c-status" data-rule="required" class="form-control" name="row[status]" type="number" value="{$row.status|htmlentities}"> | ||
13 | + </div> | ||
14 | + </div> | ||
15 | + <div class="form-group"> | ||
16 | + <label class="control-label col-xs-12 col-sm-2">{:__('User_name')}:</label> | ||
17 | + <div class="col-xs-12 col-sm-8"> | ||
18 | + <input id="c-user_name" data-rule="required" class="form-control" name="row[user_name]" type="text" value="{$row.user_name|htmlentities}"> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="form-group"> | ||
22 | + <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label> | ||
23 | + <div class="col-xs-12 col-sm-8"> | ||
24 | + <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="form-group"> | ||
28 | + <label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label> | ||
29 | + <div class="col-xs-12 col-sm-8"> | ||
30 | + <input id="c-province" data-rule="required" class="form-control" name="row[province]" type="text" value="{$row.province|htmlentities}"> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="form-group"> | ||
34 | + <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label> | ||
35 | + <div class="col-xs-12 col-sm-8"> | ||
36 | + <div class='control-relative'><input id="c-city" data-rule="required" class="form-control" data-toggle="city-picker" name="row[city]" type="text" value="{$row.city|htmlentities}"></div> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-district" data-rule="required" class="form-control" name="row[district]" type="text" value="{$row.district|htmlentities}"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group layer-footer"> | ||
46 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
47 | + <div class="col-xs-12 col-sm-8"> | ||
48 | + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button> | ||
49 | + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
50 | + </div> | ||
51 | + </div> | ||
52 | +</form> |
application/admin/view/registers/index.html
0 → 100644
1 | +<div class="panel panel-default panel-intro"> | ||
2 | + {:build_heading()} | ||
3 | + | ||
4 | + <div class="panel-body"> | ||
5 | + <div id="myTabContent" class="tab-content"> | ||
6 | + <div class="tab-pane fade active in" id="one"> | ||
7 | + <div class="widget-body no-padding"> | ||
8 | + <div id="toolbar" class="toolbar"> | ||
9 | + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | ||
10 | + <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('registers/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>--> | ||
11 | + <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('registers/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>--> | ||
12 | + <!--<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('registers/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>--> | ||
13 | + <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('registers/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a> | ||
14 | + | ||
15 | + <!--<div class="dropdown btn-group {:$auth->check('registers/multi')?'':'hide'}">--> | ||
16 | + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>--> | ||
17 | + <!--<ul class="dropdown-menu text-left" role="menu">--> | ||
18 | + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>--> | ||
19 | + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>--> | ||
20 | + <!--</ul>--> | ||
21 | + <!--</div>--> | ||
22 | + | ||
23 | + | ||
24 | + </div> | ||
25 | + <table id="table" class="table table-striped table-bordered table-hover table-nowrap" | ||
26 | + data-operate-edit="{:$auth->check('registers/edit')}" | ||
27 | + data-operate-del="{:$auth->check('registers/del')}" | ||
28 | + width="100%"> | ||
29 | + </table> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + | ||
33 | + </div> | ||
34 | + </div> | ||
35 | +</div> |
@@ -38,7 +38,8 @@ class Index extends Api | @@ -38,7 +38,8 @@ class Index extends Api | ||
38 | "introduce": "http://mite.w.brotop.cn/uploads/20200107/e0bf0b8d402b5447575389b8bd57c225.png",//公司简介缩略图 | 38 | "introduce": "http://mite.w.brotop.cn/uploads/20200107/e0bf0b8d402b5447575389b8bd57c225.png",//公司简介缩略图 |
39 | "service": "http://mite.w.brotop.cn/uploads/20200107/b48a6582d12da1fdafce424afbb3384d.png",//服务介绍缩略图 | 39 | "service": "http://mite.w.brotop.cn/uploads/20200107/b48a6582d12da1fdafce424afbb3384d.png",//服务介绍缩略图 |
40 | "experience": "http://mite.w.brotop.cn/uploads/20200107/95539a1899f02bda4fe1920597affe37.png",//服务体验缩略图 | 40 | "experience": "http://mite.w.brotop.cn/uploads/20200107/95539a1899f02bda4fe1920597affe37.png",//服务体验缩略图 |
41 | - "center": "http://mite.w.brotop.cn/uploads/20200107/18e49cc54b697d369a143c9f1f369ac0.png"//会员中心缩略图 | 41 | + "register": "http://mite.w.brotop.cn/uploads/20200107/18e49cc54b697d369a143c9f1f369ac0.png"//会员注册缩略图 |
42 | + "center": "http://mite.w.brotop.cn/uploads/20200107/18e49cc54b697d369a143c9f1f369ac0.png"//个人中心缩略图 | ||
42 | } | 43 | } |
43 | } | 44 | } |
44 | }) | 45 | }) |
@@ -56,10 +57,12 @@ class Index extends Api | @@ -56,10 +57,12 @@ class Index extends Api | ||
56 | $introduce = Common::findWhereData('platform',['id'=>1],'id,thumbnail');//公司简介 | 57 | $introduce = Common::findWhereData('platform',['id'=>1],'id,thumbnail');//公司简介 |
57 | $service = Common::findWhereData('platform',['id'=>2],'id,thumbnail');//服务介绍 | 58 | $service = Common::findWhereData('platform',['id'=>2],'id,thumbnail');//服务介绍 |
58 | $experience = Common::findWhereData('platform',['id'=>3],'id,thumbnail');//服务体验 | 59 | $experience = Common::findWhereData('platform',['id'=>3],'id,thumbnail');//服务体验 |
59 | - $center = Common::findWhereData('platform',['id'=>4],'id,thumbnail');//会员中心 | 60 | + $register = Common::findWhereData('platform',['id'=>4],'id,thumbnail');//会员注册 |
61 | + $center = Common::findWhereData('platform',['id'=>5],'id,thumbnail');//个人中心 | ||
60 | $arr['thumbnail']['introduce'] = Common::absolutionUrlOne($introduce['thumbnail']); | 62 | $arr['thumbnail']['introduce'] = Common::absolutionUrlOne($introduce['thumbnail']); |
61 | $arr['thumbnail']['service'] = Common::absolutionUrlOne($service['thumbnail']); | 63 | $arr['thumbnail']['service'] = Common::absolutionUrlOne($service['thumbnail']); |
62 | $arr['thumbnail']['experience'] = Common::absolutionUrlOne($experience['thumbnail']); | 64 | $arr['thumbnail']['experience'] = Common::absolutionUrlOne($experience['thumbnail']); |
65 | + $arr['thumbnail']['register'] = Common::absolutionUrlOne($register['thumbnail']); | ||
63 | $arr['thumbnail']['center'] = Common::absolutionUrlOne($center['thumbnail']); | 66 | $arr['thumbnail']['center'] = Common::absolutionUrlOne($center['thumbnail']); |
64 | $this->success('成功',$arr); | 67 | $this->success('成功',$arr); |
65 | }else{ | 68 | }else{ |
@@ -5,6 +5,7 @@ namespace app\api\controller; | @@ -5,6 +5,7 @@ namespace app\api\controller; | ||
5 | use app\admin\model\Collection; | 5 | use app\admin\model\Collection; |
6 | use app\admin\model\Free; | 6 | use app\admin\model\Free; |
7 | use app\admin\model\Rcoupon; | 7 | use app\admin\model\Rcoupon; |
8 | +use app\admin\model\Registers; | ||
8 | use app\common\controller\Api; | 9 | use app\common\controller\Api; |
9 | use fast\Http; | 10 | use fast\Http; |
10 | use think\db\Query; | 11 | use think\db\Query; |
@@ -104,7 +105,12 @@ class User extends Api | @@ -104,7 +105,12 @@ class User extends Api | ||
104 | * @ApiParams (name="city", type="string", required=true, description="市") | 105 | * @ApiParams (name="city", type="string", required=true, description="市") |
105 | * @ApiParams (name="district", type="string", required=true, description="区") | 106 | * @ApiParams (name="district", type="string", required=true, description="区") |
106 | * @ApiParams (name="address", type="string", required=true, description="详细地址") | 107 | * @ApiParams (name="address", type="string", required=true, description="详细地址") |
107 | - * @ApiReturn() | 108 | + * @ApiReturn({ |
109 | + "code": 1, | ||
110 | + "msg": "成功", | ||
111 | + "time": "1578555060", | ||
112 | + "data": null | ||
113 | + }) | ||
108 | */ | 114 | */ |
109 | public function freeBook(){ | 115 | public function freeBook(){ |
110 | if($this->request->isPost()){ | 116 | if($this->request->isPost()){ |
@@ -128,4 +134,49 @@ class User extends Api | @@ -128,4 +134,49 @@ class User extends Api | ||
128 | $this->error('请求方式错误'); | 134 | $this->error('请求方式错误'); |
129 | } | 135 | } |
130 | } | 136 | } |
137 | + | ||
138 | + /** | ||
139 | + * @ApiTitle (会员注册) | ||
140 | + * @ApiSummary (会员注册) | ||
141 | + * @ApiMethod (POST) | ||
142 | + * @ApiRoute (/api/user/userRegister) | ||
143 | + * @ApiParams (name="user_name", type="string", required=true, description="姓名") | ||
144 | + * @ApiParams (name="mobile", type="number", required=true, description="手机号") | ||
145 | + * @ApiParams (name="province", type="string", required=true, description="省") | ||
146 | + * @ApiParams (name="city", type="string", required=true, description="市") | ||
147 | + * @ApiParams (name="district", type="string", required=true, description="区") | ||
148 | + * @ApiReturn({ | ||
149 | + "code": 1, | ||
150 | + "msg": "成功", | ||
151 | + "time": "1578555060", | ||
152 | + "data": null | ||
153 | + }) | ||
154 | + */ | ||
155 | + public function userRegister(){ | ||
156 | + if($this->request->isPost()){ | ||
157 | + $data = $this->request->post(); | ||
158 | + //验证表数据 | ||
159 | + $rule = config('verify.user_register'); | ||
160 | + $validate = new Validate($rule['rule'],$rule['msg']); | ||
161 | + if (!$validate->check($data)) { | ||
162 | + $this->error($validate->getError()); | ||
163 | + } | ||
164 | + | ||
165 | + $registersModel = new Registers(); | ||
166 | + $data['uid'] = $this->uid; | ||
167 | + //查询是否注册 | ||
168 | + $res1 = Common::findWhereData('registers',['uid'=>$this->uid],'id'); | ||
169 | + if($res1){ | ||
170 | + $this->error('你已经注册过'); | ||
171 | + } | ||
172 | + $res = $registersModel->create($data); | ||
173 | + if($res){ | ||
174 | + $this->success('成功'); | ||
175 | + }else{ | ||
176 | + $this->error('失败'); | ||
177 | + } | ||
178 | + }else{ | ||
179 | + $this->error('请求方式错误'); | ||
180 | + } | ||
181 | + } | ||
131 | } | 182 | } |
@@ -39,4 +39,22 @@ return [ | @@ -39,4 +39,22 @@ return [ | ||
39 | 'address.require' => '详细地址不能为空', | 39 | 'address.require' => '详细地址不能为空', |
40 | ] | 40 | ] |
41 | ], | 41 | ], |
42 | + //会员注册 | ||
43 | + 'user_register' => [ | ||
44 | + 'rule' => [ | ||
45 | + 'user_name' => 'require', | ||
46 | + 'mobile' => ['require','regex'=>'/^0?1[3|4|5|6|7|8|9][0-9]\d{8}$/'], | ||
47 | + 'province' => 'require', | ||
48 | + 'city' => 'require', | ||
49 | + 'district' => 'require', | ||
50 | + ], | ||
51 | + 'msg' => [ | ||
52 | + 'user_name.require'=> '姓名不能为空', | ||
53 | + 'mobile.require' => '手机号不能为空', | ||
54 | + 'mobile' => '手机号格式不正确', | ||
55 | + 'province.require' => '省不能为空', | ||
56 | + 'city.require' => '市不能为空', | ||
57 | + 'district.require' => '区不能为空', | ||
58 | + ] | ||
59 | + ], | ||
42 | ]; | 60 | ]; |
@@ -153,6 +153,7 @@ | @@ -153,6 +153,7 @@ | ||
153 | <div class="child collapse" id="个人中心接口"> | 153 | <div class="child collapse" id="个人中心接口"> |
154 | <a href="javascript:;" data-id="4" class="list-group-item">小程序登录</a> | 154 | <a href="javascript:;" data-id="4" class="list-group-item">小程序登录</a> |
155 | <a href="javascript:;" data-id="5" class="list-group-item">免费预约</a> | 155 | <a href="javascript:;" data-id="5" class="list-group-item">免费预约</a> |
156 | + <a href="javascript:;" data-id="6" class="list-group-item">会员注册</a> | ||
156 | </div> | 157 | </div> |
157 | </div> | 158 | </div> |
158 | </div> | 159 | </div> |
@@ -265,7 +266,8 @@ | @@ -265,7 +266,8 @@ | ||
265 | "introduce": "http://mite.w.brotop.cn/uploads/20200107/e0bf0b8d402b5447575389b8bd57c225.png",//公司简介缩略图 | 266 | "introduce": "http://mite.w.brotop.cn/uploads/20200107/e0bf0b8d402b5447575389b8bd57c225.png",//公司简介缩略图 |
266 | "service": "http://mite.w.brotop.cn/uploads/20200107/b48a6582d12da1fdafce424afbb3384d.png",//服务介绍缩略图 | 267 | "service": "http://mite.w.brotop.cn/uploads/20200107/b48a6582d12da1fdafce424afbb3384d.png",//服务介绍缩略图 |
267 | "experience": "http://mite.w.brotop.cn/uploads/20200107/95539a1899f02bda4fe1920597affe37.png",//服务体验缩略图 | 268 | "experience": "http://mite.w.brotop.cn/uploads/20200107/95539a1899f02bda4fe1920597affe37.png",//服务体验缩略图 |
268 | - "center": "http://mite.w.brotop.cn/uploads/20200107/18e49cc54b697d369a143c9f1f369ac0.png"//会员中心缩略图 | 269 | + "register": "http://mite.w.brotop.cn/uploads/20200107/18e49cc54b697d369a143c9f1f369ac0.png"//会员注册缩略图 |
270 | + "center": "http://mite.w.brotop.cn/uploads/20200107/18e49cc54b697d369a143c9f1f369ac0.png"//个人中心缩略图 | ||
269 | } | 271 | } |
270 | } | 272 | } |
271 | }</pre> | 273 | }</pre> |
@@ -873,7 +875,167 @@ | @@ -873,7 +875,167 @@ | ||
873 | <div class="tab-pane" id="sample5"> | 875 | <div class="tab-pane" id="sample5"> |
874 | <div class="row"> | 876 | <div class="row"> |
875 | <div class="col-md-12"> | 877 | <div class="col-md-12"> |
876 | - <pre id="sample_response5">无</pre> | 878 | + <pre id="sample_response5">{ |
879 | + "code": 1, | ||
880 | + "msg": "成功", | ||
881 | + "time": "1578555060", | ||
882 | + "data": null | ||
883 | + }</pre> | ||
884 | + </div> | ||
885 | + </div> | ||
886 | + </div><!-- #sample --> | ||
887 | + | ||
888 | + </div><!-- .tab-content --> | ||
889 | + </div> | ||
890 | + </div> | ||
891 | + </div> | ||
892 | + <div class="panel panel-default"> | ||
893 | + <div class="panel-heading" id="heading-6"> | ||
894 | + <h4 class="panel-title"> | ||
895 | + <span class="label label-primary">POST</span> | ||
896 | + <a data-toggle="collapse" data-parent="#accordion6" href="#collapseOne6"> 会员注册 <span class="text-muted">/api/user/userRegister</span></a> | ||
897 | + </h4> | ||
898 | + </div> | ||
899 | + <div id="collapseOne6" class="panel-collapse collapse"> | ||
900 | + <div class="panel-body"> | ||
901 | + | ||
902 | + <!-- Nav tabs --> | ||
903 | + <ul class="nav nav-tabs" id="doctab6"> | ||
904 | + <li class="active"><a href="#info6" data-toggle="tab">基础信息</a></li> | ||
905 | + <li><a href="#sandbox6" data-toggle="tab">在线测试</a></li> | ||
906 | + <li><a href="#sample6" data-toggle="tab">返回示例</a></li> | ||
907 | + </ul> | ||
908 | + | ||
909 | + <!-- Tab panes --> | ||
910 | + <div class="tab-content"> | ||
911 | + | ||
912 | + <div class="tab-pane active" id="info6"> | ||
913 | + <div class="well"> | ||
914 | + 会员注册 </div> | ||
915 | + <div class="panel panel-default"> | ||
916 | + <div class="panel-heading"><strong>Headers</strong></div> | ||
917 | + <div class="panel-body"> | ||
918 | + 无 | ||
919 | + </div> | ||
920 | + </div> | ||
921 | + <div class="panel panel-default"> | ||
922 | + <div class="panel-heading"><strong>参数</strong></div> | ||
923 | + <div class="panel-body"> | ||
924 | + <table class="table table-hover"> | ||
925 | + <thead> | ||
926 | + <tr> | ||
927 | + <th>名称</th> | ||
928 | + <th>类型</th> | ||
929 | + <th>必选</th> | ||
930 | + <th>描述</th> | ||
931 | + </tr> | ||
932 | + </thead> | ||
933 | + <tbody> | ||
934 | + <tr> | ||
935 | + <td>user_name</td> | ||
936 | + <td>string</td> | ||
937 | + <td>是</td> | ||
938 | + <td>姓名</td> | ||
939 | + </tr> | ||
940 | + <tr> | ||
941 | + <td>mobile</td> | ||
942 | + <td>number</td> | ||
943 | + <td>是</td> | ||
944 | + <td>手机号</td> | ||
945 | + </tr> | ||
946 | + <tr> | ||
947 | + <td>province</td> | ||
948 | + <td>string</td> | ||
949 | + <td>是</td> | ||
950 | + <td>省</td> | ||
951 | + </tr> | ||
952 | + <tr> | ||
953 | + <td>city</td> | ||
954 | + <td>string</td> | ||
955 | + <td>是</td> | ||
956 | + <td>市</td> | ||
957 | + </tr> | ||
958 | + <tr> | ||
959 | + <td>district</td> | ||
960 | + <td>string</td> | ||
961 | + <td>是</td> | ||
962 | + <td>区</td> | ||
963 | + </tr> | ||
964 | + </tbody> | ||
965 | + </table> | ||
966 | + </div> | ||
967 | + </div> | ||
968 | + <div class="panel panel-default"> | ||
969 | + <div class="panel-heading"><strong>正文</strong></div> | ||
970 | + <div class="panel-body"> | ||
971 | + 无 </div> | ||
972 | + </div> | ||
973 | + </div><!-- #info --> | ||
974 | + | ||
975 | + <div class="tab-pane" id="sandbox6"> | ||
976 | + <div class="row"> | ||
977 | + <div class="col-md-12"> | ||
978 | + <div class="panel panel-default"> | ||
979 | + <div class="panel-heading"><strong>参数</strong></div> | ||
980 | + <div class="panel-body"> | ||
981 | + <form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/userRegister" method="POST" name="form6" id="form6"> | ||
982 | + <div class="form-group"> | ||
983 | + <label class="control-label" for="user_name">user_name</label> | ||
984 | + <input type="string" class="form-control input-sm" id="user_name" required placeholder="姓名" name="user_name"> | ||
985 | + </div> | ||
986 | + <div class="form-group"> | ||
987 | + <label class="control-label" for="mobile">mobile</label> | ||
988 | + <input type="number" class="form-control input-sm" id="mobile" required placeholder="手机号" name="mobile"> | ||
989 | + </div> | ||
990 | + <div class="form-group"> | ||
991 | + <label class="control-label" for="province">province</label> | ||
992 | + <input type="string" class="form-control input-sm" id="province" required placeholder="省" name="province"> | ||
993 | + </div> | ||
994 | + <div class="form-group"> | ||
995 | + <label class="control-label" for="city">city</label> | ||
996 | + <input type="string" class="form-control input-sm" id="city" required placeholder="市" name="city"> | ||
997 | + </div> | ||
998 | + <div class="form-group"> | ||
999 | + <label class="control-label" for="district">district</label> | ||
1000 | + <input type="string" class="form-control input-sm" id="district" required placeholder="区" name="district"> | ||
1001 | + </div> | ||
1002 | + <div class="form-group"> | ||
1003 | + <button type="submit" class="btn btn-success send" rel="6">提交</button> | ||
1004 | + <button type="reset" class="btn btn-info" rel="6">重置</button> | ||
1005 | + </div> | ||
1006 | + </form> | ||
1007 | + </div> | ||
1008 | + </div> | ||
1009 | + <div class="panel panel-default"> | ||
1010 | + <div class="panel-heading"><strong>响应输出</strong></div> | ||
1011 | + <div class="panel-body"> | ||
1012 | + <div class="row"> | ||
1013 | + <div class="col-md-12" style="overflow-x:auto"> | ||
1014 | + <pre id="response_headers6"></pre> | ||
1015 | + <pre id="response6"></pre> | ||
1016 | + </div> | ||
1017 | + </div> | ||
1018 | + </div> | ||
1019 | + </div> | ||
1020 | + <div class="panel panel-default"> | ||
1021 | + <div class="panel-heading"><strong>返回参数</strong></div> | ||
1022 | + <div class="panel-body"> | ||
1023 | + 无 | ||
1024 | + </div> | ||
1025 | + </div> | ||
1026 | + </div> | ||
1027 | + </div> | ||
1028 | + </div><!-- #sandbox --> | ||
1029 | + | ||
1030 | + <div class="tab-pane" id="sample6"> | ||
1031 | + <div class="row"> | ||
1032 | + <div class="col-md-12"> | ||
1033 | + <pre id="sample_response6">{ | ||
1034 | + "code": 1, | ||
1035 | + "msg": "成功", | ||
1036 | + "time": "1578555060", | ||
1037 | + "data": null | ||
1038 | + }</pre> | ||
877 | </div> | 1039 | </div> |
878 | </div> | 1040 | </div> |
879 | </div><!-- #sample --> | 1041 | </div><!-- #sample --> |
@@ -888,7 +1050,7 @@ | @@ -888,7 +1050,7 @@ | ||
888 | 1050 | ||
889 | <div class="row mt0 footer"> | 1051 | <div class="row mt0 footer"> |
890 | <div class="col-md-6" align="left"> | 1052 | <div class="col-md-6" align="left"> |
891 | - Generated on 2020-01-08 14:47:17 </div> | 1053 | + Generated on 2020-01-09 15:33:04 </div> |
892 | <div class="col-md-6" align="right"> | 1054 | <div class="col-md-6" align="right"> |
893 | <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> | 1055 | <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> |
894 | </div> | 1056 | </div> |
@@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
8 | index_url: 'free/index' + location.search, | 8 | index_url: 'free/index' + location.search, |
9 | add_url: 'free/add', | 9 | add_url: 'free/add', |
10 | // edit_url: 'free/edit', | 10 | // edit_url: 'free/edit', |
11 | - del_url: 'free/del', | 11 | + // del_url: 'free/del', |
12 | import_url: 'free/import', | 12 | import_url: 'free/import', |
13 | multi_url: 'free/multi', | 13 | multi_url: 'free/multi', |
14 | table: 'free', | 14 | table: 'free', |
@@ -43,6 +43,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -43,6 +43,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
43 | url: $.fn.bootstrapTable.defaults.extend.index_url, | 43 | url: $.fn.bootstrapTable.defaults.extend.index_url, |
44 | pk: 'id', | 44 | pk: 'id', |
45 | sortName: 'id', | 45 | sortName: 'id', |
46 | + showExport: false,//隐藏导出 | ||
46 | columns: [ | 47 | columns: [ |
47 | [ | 48 | [ |
48 | {checkbox: true}, | 49 | {checkbox: true}, |
public/assets/js/backend/order.js
0 → 100644
1 | +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { | ||
2 | + | ||
3 | + var Controller = { | ||
4 | + order: function () { | ||
5 | + // 初始化表格参数配置 | ||
6 | + Table.api.init({ | ||
7 | + extend: { | ||
8 | + index_url: 'order/index' + location.search, | ||
9 | + add_url: 'order/add', | ||
10 | + edit_url: 'order/edit', | ||
11 | + del_url: 'order/del', | ||
12 | + multi_url: 'order/multi', | ||
13 | + // import_url: 'order/import', | ||
14 | + table: 'order', | ||
15 | + }, | ||
16 | + queryParams: function (params) { //自定义搜索条件 | ||
17 | + params.ids = Config.r_id;//将搜索过滤器和操作方法 都转为JSON字符串 | ||
18 | + return params; | ||
19 | + } | ||
20 | + }); | ||
21 | + | ||
22 | + var table = $("#table"); | ||
23 | + | ||
24 | + // 初始化表格 | ||
25 | + table.bootstrapTable({ | ||
26 | + url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
27 | + pk: 'id', | ||
28 | + sortName: 'id', | ||
29 | + showExport: false,//隐藏导出 | ||
30 | + columns: [ | ||
31 | + [ | ||
32 | + {checkbox: true}, | ||
33 | + {field: 'id', title: __('Id')}, | ||
34 | + {field: 'order_sn', title: __('Order_sn')}, | ||
35 | + {field: 'price', title: __('Price')}, | ||
36 | + {field: 'content', title: __('Content')}, | ||
37 | + {field: 'total_num', title: __('Total_num')}, | ||
38 | + {field: 'use_num', title: __('Use_num')}, | ||
39 | + {field: 'not_use_num', title: __('Not_use_num')}, | ||
40 | + {field: 'advice', title: __('Advice')}, | ||
41 | + {field: 'address', title: __('Address')}, | ||
42 | + {field: 'organization', title: __('Organization')}, | ||
43 | + {field: 'pin_user', title: __('Pin_user')}, | ||
44 | + {field: 'mark', title: __('Mark')}, | ||
45 | + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | ||
46 | + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | ||
47 | + ] | ||
48 | + ] | ||
49 | + }); | ||
50 | + | ||
51 | + // 为表格绑定事件 | ||
52 | + Table.api.bindevent(table); | ||
53 | + }, | ||
54 | + add: function () { | ||
55 | + Controller.api.bindevent(); | ||
56 | + }, | ||
57 | + edit: function () { | ||
58 | + Controller.api.bindevent(); | ||
59 | + }, | ||
60 | + api: { | ||
61 | + bindevent: function () { | ||
62 | + Form.api.bindevent($("form[role=form]")); | ||
63 | + } | ||
64 | + } | ||
65 | + }; | ||
66 | + return Controller; | ||
67 | +}); |
public/assets/js/backend/register.js
0 → 100644
1 | +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { | ||
2 | + | ||
3 | + var Controller = { | ||
4 | + index: function () { | ||
5 | + // 初始化表格参数配置 | ||
6 | + Table.api.init({ | ||
7 | + extend: { | ||
8 | + index_url: 'register/index' + location.search, | ||
9 | + // add_url: 'register/add', | ||
10 | + edit_url: 'register/edit', | ||
11 | + // del_url: 'register/del', | ||
12 | + multi_url: 'register/multi', | ||
13 | + table: 'register', | ||
14 | + } | ||
15 | + }); | ||
16 | + | ||
17 | + var table = $("#table"); | ||
18 | + | ||
19 | + // 初始化表格 | ||
20 | + table.bootstrapTable({ | ||
21 | + url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
22 | + pk: 'id', | ||
23 | + sortName: 'id', | ||
24 | + columns: [ | ||
25 | + [ | ||
26 | + {checkbox: true}, | ||
27 | + {field: 'id', title: __('Id')}, | ||
28 | + {field: 'thumbnail', title: __('Thumbnail'),events: Table.api.events.image, formatter: Table.api.formatter.image}, | ||
29 | + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | ||
30 | + // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | ||
31 | + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | ||
32 | + ] | ||
33 | + ] | ||
34 | + }); | ||
35 | + | ||
36 | + // 为表格绑定事件 | ||
37 | + Table.api.bindevent(table); | ||
38 | + }, | ||
39 | + add: function () { | ||
40 | + Controller.api.bindevent(); | ||
41 | + }, | ||
42 | + edit: function () { | ||
43 | + Controller.api.bindevent(); | ||
44 | + }, | ||
45 | + api: { | ||
46 | + bindevent: function () { | ||
47 | + Form.api.bindevent($("form[role=form]")); | ||
48 | + } | ||
49 | + } | ||
50 | + }; | ||
51 | + return Controller; | ||
52 | +}); |
public/assets/js/backend/registers.js
0 → 100644
1 | +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { | ||
2 | + | ||
3 | + var Controller = { | ||
4 | + index: function () { | ||
5 | + // 初始化表格参数配置 | ||
6 | + Table.api.init({ | ||
7 | + extend: { | ||
8 | + index_url: 'registers/index' + location.search, | ||
9 | + add_url: 'registers/add', | ||
10 | + // edit_url: 'registers/edit', | ||
11 | + // del_url: 'registers/del', | ||
12 | + import_url: 'registers/import', | ||
13 | + multi_url: 'registers/multi', | ||
14 | + table: 'registers', | ||
15 | + } | ||
16 | + }); | ||
17 | + | ||
18 | + var table = $("#table"); | ||
19 | + | ||
20 | + // 初始化表格 | ||
21 | + table.bootstrapTable({ | ||
22 | + url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
23 | + pk: 'id', | ||
24 | + sortName: 'id', | ||
25 | + showExport: false,//隐藏导出 | ||
26 | + columns: [ | ||
27 | + [ | ||
28 | + {checkbox: true}, | ||
29 | + {field: 'id', title: __('Id')}, | ||
30 | + {field: 'user.nickname', title: __('User.nickname')}, | ||
31 | + {field: 'user_name', title: __('User_name')}, | ||
32 | + {field: 'mobile', title: __('Mobile')}, | ||
33 | + {field: 'province', title: __('Province')}, | ||
34 | + {field: 'city', title: __('City')}, | ||
35 | + {field: 'district', title: __('District')}, | ||
36 | + {field: 'status', title: __('Status'),formatter: | ||
37 | + function(value,row,index){ | ||
38 | + var value1 = ''; | ||
39 | + if(row.status === 0){ | ||
40 | + value1 += '<span style="color:red">审核中</span>'; | ||
41 | + }else if(row.status === 1){ | ||
42 | + value1+= '<span style="color:green">通过</span>'; | ||
43 | + }else{ | ||
44 | + value1+= '<span style="color:darkred">未通过</span>'; | ||
45 | + } | ||
46 | + return value1; | ||
47 | + },searchList: { 0: __('审核中'), 1: __('通过'), 2: __('未通过')} | ||
48 | + }, | ||
49 | + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | ||
50 | + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,buttons:[ | ||
51 | + { | ||
52 | + name: 'detail', | ||
53 | + text: __('通过'), | ||
54 | + title: __('通过'), | ||
55 | + classname: 'btn btn-xs btn-primary btn-ajax', | ||
56 | + icon: 'fa fa-magic', | ||
57 | + url: 'registers/adopt', | ||
58 | + confirm: '确认通过?', | ||
59 | + success: function (data, ret) { | ||
60 | + $(".btn-refresh").trigger("click"); | ||
61 | + }, | ||
62 | + error: function (data, ret) { | ||
63 | + return false; | ||
64 | + }, | ||
65 | + visible: function (row) { | ||
66 | + if(row.status == 0 || row.status == 2){ | ||
67 | + return true; | ||
68 | + }else{ | ||
69 | + return false; | ||
70 | + } | ||
71 | + } | ||
72 | + }, | ||
73 | + { | ||
74 | + name: 'detail', | ||
75 | + text: __('拒绝'), | ||
76 | + title: __('拒绝'), | ||
77 | + classname: 'btn btn-xs btn-primary btn-ajax', | ||
78 | + icon: 'fa fa-magic', | ||
79 | + url: 'registers/reject', | ||
80 | + confirm: '确认拒绝?', | ||
81 | + success: function (data, ret) { | ||
82 | + $(".btn-refresh").trigger("click"); | ||
83 | + }, | ||
84 | + error: function (data, ret) { | ||
85 | + return false; | ||
86 | + }, | ||
87 | + visible: function (row) { | ||
88 | + if(row.status == 0 || row.status == 1){ | ||
89 | + return true; | ||
90 | + }else{ | ||
91 | + return false; | ||
92 | + } | ||
93 | + } | ||
94 | + }, | ||
95 | + { | ||
96 | + name: 'offline', | ||
97 | + text: '订单列表', | ||
98 | + title: '订单列表', | ||
99 | + icon: 'fa fa-list', | ||
100 | + classname: 'btn btn-xs btn-success btn-dialog', | ||
101 | + url: "order/order" | ||
102 | + }, | ||
103 | + ]} | ||
104 | + ] | ||
105 | + ] | ||
106 | + }); | ||
107 | + | ||
108 | + // 为表格绑定事件 | ||
109 | + Table.api.bindevent(table); | ||
110 | + }, | ||
111 | + add: function () { | ||
112 | + Controller.api.bindevent(); | ||
113 | + }, | ||
114 | + edit: function () { | ||
115 | + Controller.api.bindevent(); | ||
116 | + }, | ||
117 | + api: { | ||
118 | + bindevent: function () { | ||
119 | + Form.api.bindevent($("form[role=form]")); | ||
120 | + } | ||
121 | + } | ||
122 | + }; | ||
123 | + return Controller; | ||
124 | +}); |
156.4 KB
-
请 注册 或 登录 后发表评论