public function actionDelete()
 {
     $data = Yii::$app->request->post();
     if (isset($data['myphone']) && isset($data['friendphone'])) {
         $u1 = Users::find()->where(['phone' => $data['myphone']])->one();
         $u2 = Users::find()->where(['phone' => $data['friendphone']])->one();
         if (!Friends::findAll(['myid' => $u1['id'], 'friendid' => $u2['id']]) && !Friends::findAll(['myid' => $u2['id'], 'friendid' => $u1['id']])) {
             return array('flag' => 0, 'msg' => 'is already not friend!');
         }
         Friends::deleteAll('myid = :myid and friendid = :friendid or myid = :friendid and friendid = :myid', [':myid' => $u1['id'], ':friendid' => $u2['id']]);
         $easeclient = new Easeapi('YXA6halokJDEEeWMRgvYONLZPQ', 'YXA6pswnZbss8mj351XE3oxuRYm6cek', '13022660999', 'allpeopleleague', 'file');
         $result = json_decode($easeclient->curl('/users/' . $u1->id . '/contacts/users/' . $u2->id, '', 'DELETE'), true);
         return array('flag' => 1, 'msg' => 'delete friend success!');
     } else {
         return array('flag' => 0, 'msg' => 'arg not enough!');
     }
 }