public function actionView($id)
 {
     $member = Member::findByPk(new \MongoId($id));
     $accountId = $this->getAccountId();
     if (empty($member)) {
         throw new BadRequestHttpException(Yii::t('member', 'invalid_member_id'));
     }
     $scoreHistory = ScoreHistory::getLastByMemberId($member->_id);
     $qrcode = Qrcode::getByTypeAndAssociated(Qrcode::TYPE_MEMBER, $member->_id, $accountId);
     $member = $member->toArray();
     $properties = ArrayHelper::toArray(MemberProperty::getAllByAccount($accountId));
     $mapPropertyDefault = ArrayHelper::map($properties, 'id', 'isDefault');
     foreach ($member['properties'] as &$property) {
         $property['isDefault'] = empty($mapPropertyDefault[$property['id']]) ? false : $mapPropertyDefault[$property['id']];
     }
     $member['qrcodeUrl'] = empty($qrcode->qiniuKey) ? '' : \Yii::$app->qrcode->getUrl($qrcode->qiniuKey);
     $member['scoreProvideTime'] = empty($scoreHistory->createdAt) ? '' : MongodbUtil::MongoDate2String($scoreHistory->createdAt);
     return $member;
 }