|
@@ -106,7 +106,7 @@ class GeoConfirm extends Base |
|
@@ -106,7 +106,7 @@ class GeoConfirm extends Base |
|
106
|
* @param $id
|
106
|
* @param $id
|
|
107
|
* @return bool
|
107
|
* @return bool
|
|
108
|
*/
|
108
|
*/
|
|
109
|
- public static function sendConfirmMessage($id, $friend_id)
|
109
|
+ public static function sendConfirmMessage($id, $friend_id,$send = true)
|
|
110
|
{
|
110
|
{
|
|
111
|
$data = self::where(compact('id'))->first();
|
111
|
$data = self::where(compact('id'))->first();
|
|
112
|
$project_id = $data->project_id;
|
112
|
$project_id = $data->project_id;
|
|
@@ -127,13 +127,15 @@ class GeoConfirm extends Base |
|
@@ -127,13 +127,15 @@ class GeoConfirm extends Base |
|
127
|
'url' => 'https://oa.quanqiusou.cn/public-geo-confirm?token=' . $token
|
127
|
'url' => 'https://oa.quanqiusou.cn/public-geo-confirm?token=' . $token
|
|
128
|
];
|
128
|
];
|
|
129
|
$content = json_encode($content_array, JSON_UNESCAPED_UNICODE);
|
129
|
$content = json_encode($content_array, JSON_UNESCAPED_UNICODE);
|
|
130
|
- MessagePush::insert(compact('project_id', 'friend_id', 'type', 'content_type', 'content', 'send_time', 'updated_at', 'created_at'));
|
130
|
+ if($send == true){
|
|
|
|
131
|
+ $data->send_at = now();
|
|
|
|
132
|
+ $data->status = self::STATUS_RUNNING;
|
|
|
|
133
|
+ MessagePush::insert(compact('project_id', 'friend_id', 'type', 'content_type', 'content', 'send_time', 'updated_at', 'created_at'));
|
|
|
|
134
|
+ }
|
|
131
|
// 消息推送, 更新数据
|
135
|
// 消息推送, 更新数据
|
|
132
|
$data->confirm = '';
|
136
|
$data->confirm = '';
|
|
133
|
- $data->send_at = now();
|
|
|
|
134
|
$data->uniqid = $token;
|
137
|
$data->uniqid = $token;
|
|
135
|
- $data->status = self::STATUS_RUNNING;
|
|
|
|
136
|
$data->save();
|
138
|
$data->save();
|
|
137
|
- return $data;
|
139
|
+ return $content_array;
|
|
138
|
}
|
140
|
}
|
|
139
|
} |
141
|
} |