|
@@ -194,7 +194,8 @@ class Cat extends Base
|
|
|
// $fund_code = isset($this->post['fund_code']) && $this->post['fund_code'] !== '' ? trim($this->post['fund_code']) : '';
|
|
|
|
|
|
$level = 1;
|
|
|
- if ($param['pid'] !== 0) {
|
|
|
+
|
|
|
+ if ($param['pid'] != 0) {
|
|
|
$levl = Db::name('cat')
|
|
|
->field('id,level,search')
|
|
|
->where(['id' => $param['pid']])
|
|
@@ -318,14 +319,14 @@ class Cat extends Base
|
|
|
if (empty($specs_id)) {
|
|
|
return error_show(1002, '参数specs_id不能为空');
|
|
|
}
|
|
|
- $token = isset($this->post['token']) && $this->post['token'] != '' ? trim($this->post['token']) : '';
|
|
|
- if ($token == '') {
|
|
|
- return error_show(105, '参数token不能为空');
|
|
|
- }
|
|
|
- $user = GetUserInfo($token);
|
|
|
- if (empty($user) || $user['code'] != 0) {
|
|
|
- return error_show(102, '创建人数据不存在');
|
|
|
- }
|
|
|
+// $token = isset($this->post['token']) && $this->post['token'] != '' ? trim($this->post['token']) : '';
|
|
|
+// if ($token == '') {
|
|
|
+// return error_show(105, '参数token不能为空');
|
|
|
+// }
|
|
|
+// $user = GetUserInfo($token);
|
|
|
+// if (empty($user) || $user['code'] != 0) {
|
|
|
+// return error_show(102, '创建人数据不存在');
|
|
|
+// }
|
|
|
|
|
|
$level = 1;
|
|
|
if ($pid !== 0) {
|
|
@@ -341,8 +342,8 @@ class Cat extends Base
|
|
|
} else {
|
|
|
$search = $temp . '_' . $cat_name;
|
|
|
}
|
|
|
- $createrid = isset($user['data']['id']) ? $user['data']['id'] : '';
|
|
|
- $creater = isset($user['data']['nickname']) ? $user['data']['nickname'] : '';
|
|
|
+ $createrid = $this->uid;//isset($user['data']['id']) ? $user['data']['id'] : '';
|
|
|
+ $creater = $this->uname;//isset($user['data']['nickname']) ? $user['data']['nickname'] : '';
|
|
|
//$level = isset($this->post['level']) && $this->post['level'] !=='' ? intval($this->post['level']) :'';
|
|
|
|
|
|
$weight = isset($this->post['weight']) && $this->post['weight'] !== '' ? intval($this->post['weight']) : '0';
|
|
@@ -368,8 +369,8 @@ class Cat extends Base
|
|
|
$jsp = json_encode($idinfo, JSON_UNESCAPED_UNICODE);
|
|
|
if ($strinfo) {
|
|
|
$order = ['order_code' => $id, 'status' => $status, 'action_remark' => '', 'action_type' => 'edit'];
|
|
|
- ActionLog::logAdd($this->post['token'], $order, 'sxd', $status, $order);
|
|
|
- ChangeLog::logAdd(7, $idinfo['id'], $jsp, $json, $this->post['token'], $this->post);
|
|
|
+ ActionLog::logAdd(['id'=>$createrid,'nickname'=>$creater], $order, 'sxd', $status, $order);
|
|
|
+ ChangeLog::logAdd(7, $idinfo['id'], $jsp, $json, ['id'=>$createrid,'nickname'=>$creater], $this->post);
|
|
|
$spc = [];
|
|
|
$vp = Db::name('cat_spec')->where(['cat_id' => $idinfo['id'], 'is_del' => 0])->find();
|
|
|
$str = '';
|
|
@@ -518,7 +519,7 @@ class Cat extends Base
|
|
|
->alias('a')
|
|
|
->leftJoin('specs b', 'b.id=a.specs_id')
|
|
|
->where(['a.cat_id' => $da['id'], 'a.is_del' => 0])
|
|
|
- ->field('a.specs_id,b.spec_name')
|
|
|
+ ->field('a.specs_id id,b.spec_name')
|
|
|
->select()
|
|
|
->toArray();
|
|
|
})
|