作者 lyh

变更数据

@@ -42,7 +42,7 @@ class GeoConfirmLogic extends BaseLogic @@ -42,7 +42,7 @@ class GeoConfirmLogic extends BaseLogic
42 public function saveConfirmContent($param) 42 public function saveConfirmContent($param)
43 { 43 {
44 try { 44 try {
45 - $wechat = $param['wechat'] ?? true; 45 + $wechat = $param['wechat'] ?? 1;
46 unset($param['wechat']); 46 unset($param['wechat']);
47 $info = $this->model->read(['project_id' => $param['project_id'],'type' => $param['type']]); 47 $info = $this->model->read(['project_id' => $param['project_id'],'type' => $param['type']]);
48 if($info === false){ 48 if($info === false){
@@ -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,$send = true) 109 + public static function sendConfirmMessage($id, $friend_id,$send = 1)
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,7 +127,7 @@ class GeoConfirm extends Base @@ -127,7 +127,7 @@ 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 - if($send == true){ 130 + if($send){
131 $data->send_at = now(); 131 $data->send_at = now();
132 $data->status = self::STATUS_RUNNING; 132 $data->status = self::STATUS_RUNNING;
133 MessagePush::insert(compact('project_id', 'friend_id', 'type', 'content_type', 'content', 'send_time', 'updated_at', 'created_at')); 133 MessagePush::insert(compact('project_id', 'friend_id', 'type', 'content_type', 'content', 'send_time', 'updated_at', 'created_at'));