Compare commits
No commits in common. "786f4e8f064fee2e941534f58bc70e40e14678b8" and "a1067ea50dbbf4b6a50862652cfa0b464396ceb4" have entirely different histories.
786f4e8f06
...
a1067ea50d
|
@ -71,18 +71,18 @@ class IndexController extends base
|
|||
// 跟进提醒
|
||||
$followMessage = 0;
|
||||
$followOrderId = '';
|
||||
// if ($request->admin->id > 1) {
|
||||
// $start = strtotime(date('Y-m-d')) * 1000;
|
||||
// $end = strtotime(date('Y-m-d', strtotime('+1 days'))) * 1000;
|
||||
// $followMessageList = Orders::where(['admin_id' => $request->admin->id])
|
||||
// ->whereBetween('next_follow', [$start, $end])
|
||||
// ->field(['id'])
|
||||
// ->select();
|
||||
// $followMessage = count($followMessageList);
|
||||
// if ($followMessage) {
|
||||
// $followOrderId = $followMessageList[0]['id'];
|
||||
// }
|
||||
// }
|
||||
if ($request->admin->id > 1) {
|
||||
$start = strtotime(date('Y-m-d')) * 1000;
|
||||
$end = strtotime(date('Y-m-d', strtotime('+1 days'))) * 1000;
|
||||
$followMessageList = Orders::where(['admin_id' => $request->admin->id])
|
||||
->whereBetween('next_follow', [$start, $end])
|
||||
->field(['id'])
|
||||
->select();
|
||||
$followMessage = count($followMessageList);
|
||||
if ($followMessage) {
|
||||
$followOrderId = $followMessageList[0]['id'];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->success(['new' => $new ?? 0, 'follow' => $follow, 'back' => $backs, 'order_write_off' => $orderWriteOff, 'follow_message' => $followMessage, 'follow_order_id' => $followOrderId]);
|
||||
}
|
||||
|
|
|
@ -489,12 +489,8 @@ class Douyin
|
|||
|
||||
public function _cookie($data = '')
|
||||
{
|
||||
$key = 'Douyin:cookie';
|
||||
if ($this->os == 5) {
|
||||
$key = 'Douyin:cookie-' . $this->os;
|
||||
}
|
||||
if ($data) Redis::set($key, $data);
|
||||
return Redis::get($key);
|
||||
if ($data) Redis::set('Douyin:cookie', $data);
|
||||
return Redis::get('Douyin:cookie');
|
||||
}
|
||||
|
||||
public function _id($id = '')
|
||||
|
@ -553,7 +549,7 @@ class Douyin
|
|||
'Content-type: application/json'
|
||||
];
|
||||
if ($method == 'GET' || $method == 'POST') {
|
||||
$header[] = 'x-secsdk-csrf-token: ' . $this->_token('', $this->os);
|
||||
$header[] = 'x-secsdk-csrf-token: ' . $this->_token();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
} else {
|
||||
curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||
|
@ -562,16 +558,12 @@ class Douyin
|
|||
$header[] = 'x-secsdk-csrf-request: 1';
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
|
||||
curl_setopt($ch, CURLOPT_COOKIE, $this->_cookie(''));
|
||||
curl_setopt($ch, CURLOPT_COOKIE, $this->_cookie());
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
|
||||
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiePath);
|
||||
if ($method == 'POST') {
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||
|
||||
// if ($this->os == 5) {
|
||||
// curl_setopt($ch, CURLOPT_COOKIE, $this->_cookie());
|
||||
// }
|
||||
}
|
||||
|
||||
$body = curl_exec($ch);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue