Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = KefuAccountRepair::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'reason' => $this->reason, 'register_time' => $this->register_time, 'security_question_one' => $this->security_question_one, 'security_question_two' => $this->security_question_two, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, 'progress' => $this->progress, 'status' => $this->status]);
     $query->andFilterWhere(['like', 'sn', $this->sn])->andFilterWhere(['like', 'account', $this->account])->andFilterWhere(['like', 'register_place', $this->register_place])->andFilterWhere(['like', 'recent_games', $this->recent_games])->andFilterWhere(['like', 'question_desc', $this->question_desc])->andFilterWhere(['like', 'bind_email', $this->bind_email])->andFilterWhere(['like', 'security_question_one_answer', $this->security_question_one_answer])->andFilterWhere(['like', 'security_question_two_answer', $this->security_question_two_answer])->andFilterWhere(['like', 'applicant_name', $this->applicant_name])->andFilterWhere(['like', 'applicant_phone', $this->applicant_phone])->andFilterWhere(['like', 'applicant_identity', $this->applicant_identity])->andFilterWhere(['like', 'applicant_email', $this->applicant_email])->andFilterWhere(['like', 'identity_front_base_url', $this->identity_front_base_url])->andFilterWhere(['like', 'identity_front_path', $this->identity_front_path])->andFilterWhere(['like', 'identity_back_base_url', $this->identity_back_base_url])->andFilterWhere(['like', 'identity_back_path', $this->identity_back_path]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use common\models\KefuAccountRepair;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model common\models\KefuAccountRepair */
$this->title = $model->sn;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'Kefu Account Repair'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="kefu-account-repair-view">

	<p>
		<?php 
echo Html::a(Yii::t('common', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
		<?php 
echo Html::a(Yii::t('common', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
	</p>

	<?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['sn', ['attribute' => 'account', 'value' => $model->user->username], ['attribute' => 'reason', 'value' => ArrayHelper::getValue(KefuAccountRepair::getReason(), $model->reason)], 'register_time:datetime', 'register_place', ['attribute' => 'recent_games', 'value' => $model->recentGames->name], 'question_desc:ntext', 'bind_email:email', ['attribute' => 'security_question_one', 'value' => $model->securityQuestionOne ? $model->securityQuestionOne->question : null], 'security_question_one_answer', ['attribute' => 'security_question_two', 'value' => $model->securityQuestionTwo ? $model->securityQuestionTwo->question : null], 'security_question_two_answer', 'applicant_name', 'applicant_phone', 'applicant_identity', 'applicant_email:email', ['attribute' => 'identity_front', 'format' => 'html', 'value' => Html::img(Yii::$app->glide->createSignedUrl(['glide/index', 'path' => $model->identity_front_path, 'w' => 200], true), ['class' => 'img-responsive'])], ['attribute' => 'identity_front', 'format' => 'html', 'value' => Html::img(Yii::$app->glide->createSignedUrl(['glide/index', 'path' => $model->identity_back_path, 'w' => 200], true), ['class' => 'img-responsive'])], 'created_at:datetime', 'updated_at:datetime', ['attribute' => 'progress', 'value' => ArrayHelper::getValue(KefuAccountRepair::getProgress(), $model->progress)], ['attribute' => 'status', 'value' => ArrayHelper::getValue(KefuAccountRepair::getStatus(), $model->status)]]]);
?>

</div>
Ejemplo n.º 3
0
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
	您在 <?php 
echo Yii::$app->formatter->asDatetime($kefuAccountRepair->created_at);
?>
 提交的资料我们已经收到,
</p>
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
	您的查询服务号为:<span style="color: red;"><?php 
echo $kefuAccountRepair->sn;
?>
</span>
</p>
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
	您的申诉原因: <?php 
echo \yii\helpers\ArrayHelper::getValue(KefuAccountRepair::getReason(), $kefuAccountRepair->reason);
?>
</p>

<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
	请您妥善保管,服务编号、查询密码为查询结果的凭证,遗失无法找回!
</p>

<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
	您可用通过以次服务号SN去官网客服中心查询处理进度.
</p>

<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
	<?php 
echo Yii::t('common', 'If you cannot click the link, please try pasting the text into your browser');
?>
Ejemplo n.º 4
0
 public function actionSixthEnd()
 {
     $session = \Yii::$app->session;
     $session->open();
     $model = new KefuAccountRepair();
     $model->progress = KefuAccountRepair::PROGRESS_NEW;
     $model->status = KefuAccountRepair::STATUS_IN_USE;
     if ($session['kefuAccountRepair.account'] != '') {
         $model->account = $session['kefuAccountRepair.account'];
         $model->reason = $session['kefuAccountRepair.reason'];
         $model->register_time = $session['kefuAccountRepair.register_time'];
         $model->register_place = $session['kefuAccountRepair.register_place'];
         $model->recent_games = $session['kefuAccountRepair.recent_games'];
         $model->question_desc = $session['kefuAccountRepair.question_desc'];
         $model->bind_email = $session['kefuAccountRepair.bind_email'];
         $model->security_question_one = $session['kefuAccountRepair.security_question_one'];
         $model->security_question_one_answer = $session['kefuAccountRepair.security_question_one_answer'];
         $model->security_question_two = $session['kefuAccountRepair.security_question_two'];
         $model->security_question_two_answer = $session['kefuAccountRepair.security_question_two_answer'];
         $model->applicant_name = $session['kefuAccountRepair.applicant_name'];
         $model->applicant_phone = $session['kefuAccountRepair.applicant_phone'];
         $model->applicant_identity = $session['kefuAccountRepair.applicant_identity'];
         $model->applicant_email = $session['kefuAccountRepair.applicant_email'];
         $model->identity_front = $session['kefuAccountRepair.applicant_identity_front'];
         $model->identity_back = $session['kefuAccountRepair.applicant_identity_back'];
         if ($model->save()) {
             //清空session中的account
             $session['kefuAccountRepair.account'] = '';
             $session['kefuAccountRepair.*'] = '';
             \Yii::$app->session->setFlash('success', '恭喜你,您的申诉单已经提交成功!');
             $model->sendEmail();
             return $this->render('sixth-end', ['model' => $model]);
         } else {
             \Yii::$app->session->setFlash('error', '非常抱歉,我们无法处理你提交的信息,请稍后重试!');
             return $this->render('sixth-end-error', []);
         }
     }
     return $this->render('sixth-end-error', []);
 }
Ejemplo n.º 5
0
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('common', 'Kefu Account Repair');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="kefu-account-repair-index">

	<?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

	<?php 
if (Yii::$app->user->can('administrator')) {
    ?>
		<p>
			<?php 
    echo Html::a(Yii::t('backend', 'Create {modelClass}', ['modelClass' => Yii::t('common', 'Kefu Account Repair')]), ['create'], ['class' => 'btn btn-success']);
    ?>
		</p>
	<?php 
}
?>


	<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'sn', ['attribute' => 'account', 'value' => function ($model) {
    return $model->user->username;
}], ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'reason', 'enum' => KefuAccountRepair::getReason()], 'register_time:datetime', 'created_at:datetime', ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'progress', 'enum' => KefuAccountRepair::getProgress()], ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'status', 'enum' => KefuAccountRepair::getStatus()], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
 /**
  * Finds the KefuAccountRepair model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return KefuAccountRepair the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = KefuAccountRepair::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Ejemplo n.º 7
0
		<div class="col-md-12">
			<?php 
echo $this->render('_menu_account_repair');
?>
		</div>
	</div>

	<div class="row">
		<div class="col-md-12">
			<div class="tag-box tag-box-v3">
				<div class="headline"><h3>选择申诉原因</h3></div>
				<?php 
$form = ActiveForm::begin();
?>
				<?php 
echo $form->field($model, 'reason')->dropDownList(\common\models\KefuAccountRepair::getReason());
?>
				<div class="form-group">
					<?php 
echo Html::submitButton('下一步', ['class' => 'btn btn-primary']);
?>
				</div>
				<?php 
ActiveForm::end();
?>
			</div>
		</div>
	</div>

</div>
Ejemplo n.º 8
0
?>

	<?php 
echo $form->field($model, 'applicant_email')->textInput(['maxlength' => true]);
?>

	<?php 
echo $form->field($model, 'identity_front')->widget(\trntv\filekit\widget\Upload::className(), ['url' => ['/file-storage/upload'], 'maxFileSize' => 5000000]);
?>

	<?php 
echo $form->field($model, 'identity_back')->widget(\trntv\filekit\widget\Upload::className(), ['url' => ['/file-storage/upload'], 'maxFileSize' => 5000000]);
?>

	<?php 
echo $form->field($model, 'progress')->dropDownList(KefuAccountRepair::getProgress());
?>

	<?php 
echo $form->field($model, 'status')->checkbox()->label(Yii::t('common', 'Active'));
?>

	<div class="form-group">
		<?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('common', 'Create') : Yii::t('common', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
	</div>

	<?php 
ActiveForm::end();
?>