Ver Fonte

添加编辑套餐,就生成小程序码

lizhen_gitee há 1 ano atrás
pai
commit
2f7011cc74
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      application/admin/controller/Package.php

+ 2 - 1
application/admin/controller/Package.php

@@ -160,13 +160,14 @@ class Package extends Backend
                 $row->validateFailException()->validate($validate);
             }
 
+            $oldrow = $row;
             $fileName = md5($ids);
             $fileUrl = '/uploads/package/'.$fileName.'.png';
             $params['mini_code']  = $fileUrl;
             $result = $row->allowField(true)->save($params);
             Db::commit();
 
-            $this->getMiniCode($ids,$row,$row['company_id']);
+            $this->getMiniCode($ids,$oldrow,$row['company_id']);
 
         } catch (ValidateException|PDOException|Exception $e) {
         Db::rollback();