抖音增加平台
This commit is contained in:
parent
786f4e8f06
commit
e2ed13145a
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class Douyin
|
|||
$this->id = $this->_id();
|
||||
$this->os = $os;
|
||||
$this->token = $this->_token('', $os);
|
||||
Log::info("抖音 token:{$this->token} \n\n"); ;
|
||||
Log::info("抖音 token:{$this->token},os:{{$this->os}} \n\n"); ;
|
||||
}
|
||||
|
||||
public function login()
|
||||
|
@ -568,14 +568,13 @@ class Douyin
|
|||
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);
|
||||
curl_close($ch);
|
||||
if ($this->os == 5) {
|
||||
echo "抖音 订单url:{$url} \n\n";
|
||||
echo "抖音 body:{$body} \n\n";
|
||||
}
|
||||
if (!in_array($method, ['GET', 'POST'])) {
|
||||
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$header = substr($body, 0, $header_size);
|
||||
|
|
Loading…
Reference in New Issue