|
@@ -488,7 +488,7 @@ class Api
|
|
|
$actionname = $this->request->action();
|
|
|
|
|
|
if(strtolower($actionname) == 'givegifttoyou'){
|
|
|
- return true;
|
|
|
+ //return true;
|
|
|
}
|
|
|
|
|
|
$data = [
|
|
@@ -507,7 +507,7 @@ class Api
|
|
|
protected function request_log_update($log_result){
|
|
|
$actionname = $this->request->action();
|
|
|
if(strtolower($actionname) == 'givegifttoyou'){
|
|
|
- return true;
|
|
|
+ //return true;
|
|
|
}
|
|
|
|
|
|
if(defined('API_REQUEST_ID')) { //记录app正常返回结果
|
|
@@ -608,5 +608,21 @@ class Api
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ // 返回执行日期所在周的第一天(周一)日期
|
|
|
+ public function firstOfWeek($date) {
|
|
|
+ $now = strtotime($date); //当时的时间戳
|
|
|
+ $number = date("w",$now); //当时是周几
|
|
|
+ $number = $number == 0 ? 7 : $number; //如遇周末,将0换成7
|
|
|
+ $diff_day = $number - 1; //求到周一差几天
|
|
|
+ return date("Ymd",$now - ($diff_day * 60 * 60 * 24));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数字转化
|
|
|
+ */
|
|
|
+ public function changeW($val) {
|
|
|
+ return $val > 10000 ? round($val/10000,2)."w":$val;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|