正在显示
1 个修改的文件
包含
3 行增加
和
5 行删除
@@ -96,9 +96,6 @@ class Index extends Api | @@ -96,9 +96,6 @@ class Index extends Api | ||
96 | { | 96 | { |
97 | $UserId = $this->IsToken($this->request->header()); | 97 | $UserId = $this->IsToken($this->request->header()); |
98 | $params = $this->request->param(); | 98 | $params = $this->request->param(); |
99 | - dump($params['Battery']); | ||
100 | - var_dump($params['Battery']); | ||
101 | - die; | ||
102 | if ($params['type'] == 1) { | 99 | if ($params['type'] == 1) { |
103 | $data = [ | 100 | $data = [ |
104 | 'user_id' => $UserId, | 101 | 'user_id' => $UserId, |
@@ -112,7 +109,8 @@ class Index extends Api | @@ -112,7 +109,8 @@ class Index extends Api | ||
112 | 'address_con' => $params['address_con'], | 109 | 'address_con' => $params['address_con'], |
113 | 'mobile' => $params['mobile'], | 110 | 'mobile' => $params['mobile'], |
114 | 'hours' => $params['hours'], | 111 | 'hours' => $params['hours'], |
115 | - 'Battery' => $params['Battery'], | 112 | +// 'Battery' => $params['Battery'], |
113 | + 'Battery' => htmlspecialchars($params['Battery']), | ||
116 | ]; | 114 | ]; |
117 | $Res = Db::name('stor')->insert($data); | 115 | $Res = Db::name('stor')->insert($data); |
118 | $StorID = Db::name('stor')->where('user_id', $UserId)->value('id'); | 116 | $StorID = Db::name('stor')->where('user_id', $UserId)->value('id'); |
@@ -129,7 +127,7 @@ class Index extends Api | @@ -129,7 +127,7 @@ class Index extends Api | ||
129 | 'address_con' => $params['address_con'], | 127 | 'address_con' => $params['address_con'], |
130 | 'mobile' => $params['mobile'], | 128 | 'mobile' => $params['mobile'], |
131 | 'hours' => $params['hours'], | 129 | 'hours' => $params['hours'], |
132 | - 'Battery' => $params['Battery'], | 130 | + 'Battery' => htmlspecialchars($params['Battery']), |
133 | ]; | 131 | ]; |
134 | $Res = Db::name('stor')->where('id', $params['id'])->update($data); | 132 | $Res = Db::name('stor')->where('id', $params['id'])->update($data); |
135 | } | 133 | } |
-
请 注册 或 登录 后发表评论