|
@@ -39,6 +39,10 @@ class Package extends Apic
|
|
|
|
|
|
//新增
|
|
|
public function add(){
|
|
|
+ //验证
|
|
|
+ if($this->auth->type != 1){
|
|
|
+ $this->error('只有门店老板才能设置');
|
|
|
+ }
|
|
|
$field = ['title','info','servicetype_id','images','days','price','oldprice','content','content_images'];
|
|
|
$data = request_post_hub($field);
|
|
|
|
|
@@ -53,6 +57,10 @@ class Package extends Apic
|
|
|
|
|
|
//上下架
|
|
|
public function changestatus(){
|
|
|
+ //验证
|
|
|
+ if($this->auth->type != 1){
|
|
|
+ $this->error('只有门店老板才能设置');
|
|
|
+ }
|
|
|
$id = input('id',0);
|
|
|
$status = Db::name('package')->where('id',$id)->value('status');
|
|
|
|
|
@@ -75,6 +83,10 @@ class Package extends Apic
|
|
|
|
|
|
//编辑
|
|
|
public function edit(){
|
|
|
+ //验证
|
|
|
+ if($this->auth->type != 1){
|
|
|
+ $this->error('只有门店老板才能设置');
|
|
|
+ }
|
|
|
$id = input('id','');
|
|
|
|
|
|
$check = Db::name('package')->where('id',$id)->where('company_id',$this->auth->company_id)->find();
|
|
@@ -93,6 +105,10 @@ class Package extends Apic
|
|
|
|
|
|
//删除
|
|
|
public function delete(){
|
|
|
+ //验证
|
|
|
+ if($this->auth->type != 1){
|
|
|
+ $this->error('只有门店老板才能设置');
|
|
|
+ }
|
|
|
$id = input('id','');
|
|
|
|
|
|
$check = Db::name('package')->where('id',$id)->where('company_id',$this->auth->company_id)->find();
|