|
@@ -66,21 +66,7 @@ class Voucher extends Base{
|
|
|
$params['operator_id']=0;
|
|
|
$params['app_name']='youzanyun';
|
|
|
$data = Youzan::getData('promocode_delete',$params);
|
|
|
- if($data['code']!='200') return error($data['message']);
|
|
|
+ if(!isset($data['code'])|| $data['code']!='200') return error($data['message']??$data['gw_err_resp']['err_msg']);
|
|
|
return success($data['message']);
|
|
|
}
|
|
|
-
|
|
|
- public function refesh(){
|
|
|
- $params = $this->request->param([
|
|
|
- 'activity_type_group' => 2,
|
|
|
- 'time_line_status' => 0,
|
|
|
- 'page_num' => 1,
|
|
|
- 'page_size' => 20
|
|
|
- ]);
|
|
|
- $bool = Cache::get("voucher_list_params");
|
|
|
- if($bool) return error('一小时内只能刷新一次');
|
|
|
- Cache::set('voucher_list_params',$params,3600);
|
|
|
- event('voucher',$params);
|
|
|
- return success('稍后刷新页面');
|
|
|
- }
|
|
|
}
|