@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ], |
| 58 | 58 | [ |
| 59 | 59 | 'options' => ['id' => 'batch_deletion', 'class'=>'btn btn-sm btn-danger'], |
| 60 | - 'label' => <?= $generator->generateString('Batch Deletion');?>, |
|
| 60 | + 'label' => <?= $generator->generateString('Batch Deletion'); ?>, |
|
| 61 | 61 | 'url' => 'javascript:void(0);', |
| 62 | 62 | ] |
| 63 | 63 | ]]); ?> |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | <?= "<?= " ?>$this->render('_search', ['model' => $searchModel]); ?> |
| 67 | 67 | </div> |
| 68 | 68 | </div> |
| 69 | -<?php if(!empty($generator->searchModelClass)): ?> |
|
| 69 | +<?php if (!empty($generator->searchModelClass)): ?> |
|
| 70 | 70 | <?= " <?php " . ($generator->indexWidgetType === 'grid' ? "// " : "") ?>echo $this->render('_search', ['model' => $searchModel]); ?> |
| 71 | 71 | <?php endif; ?> |
| 72 | 72 | <?= "<?= " ?>GridView::widget([ |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ?> |
| 103 | 103 | [ |
| 104 | 104 | 'class' => 'yii\grid\ActionColumn', |
| 105 | - 'header' => <?= $generator->generateString('Operation');?>, |
|
| 105 | + 'header' => <?= $generator->generateString('Operation'); ?>, |
|
| 106 | 106 | 'template' => '{view} {update} {delete}', |
| 107 | 107 | //'buttons' => [ |
| 108 | 108 | // 'update' => function ($url, $model, $key) { |
@@ -113,7 +113,8 @@ discard block |
||
| 113 | 113 | ], |
| 114 | 114 | ]); ?> |
| 115 | 115 | <?= "<?php " ?>Box::end(); ?> |
| 116 | - <?php else: ?> |
|
| 116 | + <?php else { |
|
| 117 | + : ?> |
|
| 117 | 118 | <?= "<?= " ?>ListView::widget([ |
| 118 | 119 | 'dataProvider' => $dataProvider, |
| 119 | 120 | 'layout' => "{items}\n{summary}\n{pager}", |
@@ -122,7 +123,9 @@ discard block |
||
| 122 | 123 | return Html::a(Html::encode($model-><?= $nameAttribute ?>), ['view', <?= $urlParams ?>]); |
| 123 | 124 | }, |
| 124 | 125 | ]) ?> |
| 125 | - <?php endif; ?><?= $generator->enablePjax ? '<?php Pjax::end(); ?>' : '' ?> |
|
| 126 | + <?php endif; |
|
| 127 | +} |
|
| 128 | +?><?= $generator->enablePjax ? '<?php Pjax::end(); ?>' : '' ?> |
|
| 126 | 129 | |
| 127 | 130 | </div> |
| 128 | 131 | </div> |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /* @var $this yii\web\View */ |
| 20 | 20 | /* @var $model <?= ltrim($generator->modelClass, '\\') ?> */ |
| 21 | 21 | |
| 22 | -$this->title = <?= $generator->generateString('Update '.Inflector::camel2words(StringHelper::basename($generator->modelClass)))?> . ': ' . $model-><?= $generator->getNameAttribute() ?>; |
|
| 22 | +$this->title = <?= $generator->generateString('Update ' . Inflector::camel2words(StringHelper::basename($generator->modelClass)))?> . ': ' . $model-><?= $generator->getNameAttribute() ?>; |
|
| 23 | 23 | $this->params['breadcrumbs'][] = ['label' => <?= $generator->generateString('Manage ' . Inflector::camel2words(StringHelper::basename($generator->modelClass))) ?>, 'url' => ['index']]; |
| 24 | 24 | $this->params['breadcrumbs'][] = ['label' => $model-><?= $generator->getNameAttribute() ?>, 'url' => ['view', <?= $urlParams ?>]]; |
| 25 | 25 | $this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
@@ -22,29 +22,29 @@ |
||
| 22 | 22 | |
| 23 | 23 | $this->createTable($this->tableName, [ |
| 24 | 24 | 'id' => $this->bigPrimaryKey(), |
| 25 | - 'paid' => $this->boolean()->defaultValue(false),//boolean 是否已付款 |
|
| 26 | - 'refunded' => $this->boolean()->defaultValue(false),//boolean 是否存在退款信息 |
|
| 27 | - 'reversed' => $this->boolean()->defaultValue(false),//boolean 订单是否撤销 |
|
| 28 | - 'channel' => $this->string(50)->notNull(),//付款渠道 |
|
| 29 | - 'order_no' => $this->string()->notNull(),//商户订单号,适配每个渠道对此参数的要求,必须在商户的系统内唯一 |
|
| 30 | - 'client_ip' => $this->ipAddress()->notNull(),//发起支付请求客户端的 IP 地址 |
|
| 31 | - 'amount' => $this->unsignedInteger()->notNull(),//订单总金额(必须大于 0),单位为对应币种的最小货币单位,人民币为分 |
|
| 32 | - 'amount_settle' => $this->unsignedInteger()->notNull(),//清算金额,单位为对应币种的最小货币单位,人民币为分。 |
|
| 33 | - 'currency' => $this->string(3)->notNull(),//3 位 ISO 货币代码,人民币为 cny 。 |
|
| 34 | - 'subject' => $this->string(32)->notNull(),//商品标题,该参数最长为 32 个 Unicode 字符 |
|
| 35 | - 'body' => $this->string(128)->notNull(),//商品描述信息,该参数最长为 128 个 Unicode 字符 |
|
| 25 | + 'paid' => $this->boolean()->defaultValue(false), //boolean 是否已付款 |
|
| 26 | + 'refunded' => $this->boolean()->defaultValue(false), //boolean 是否存在退款信息 |
|
| 27 | + 'reversed' => $this->boolean()->defaultValue(false), //boolean 订单是否撤销 |
|
| 28 | + 'channel' => $this->string(50)->notNull(), //付款渠道 |
|
| 29 | + 'order_no' => $this->string()->notNull(), //商户订单号,适配每个渠道对此参数的要求,必须在商户的系统内唯一 |
|
| 30 | + 'client_ip' => $this->ipAddress()->notNull(), //发起支付请求客户端的 IP 地址 |
|
| 31 | + 'amount' => $this->unsignedInteger()->notNull(), //订单总金额(必须大于 0),单位为对应币种的最小货币单位,人民币为分 |
|
| 32 | + 'amount_settle' => $this->unsignedInteger()->notNull(), //清算金额,单位为对应币种的最小货币单位,人民币为分。 |
|
| 33 | + 'currency' => $this->string(3)->notNull(), //3 位 ISO 货币代码,人民币为 cny 。 |
|
| 34 | + 'subject' => $this->string(32)->notNull(), //商品标题,该参数最长为 32 个 Unicode 字符 |
|
| 35 | + 'body' => $this->string(128)->notNull(), //商品描述信息,该参数最长为 128 个 Unicode 字符 |
|
| 36 | 36 | //'extra', |
| 37 | - 'time_paid' => $this->unixTimestamp(),//订单支付完成时的 Unix 时间戳。(银联支付成功时间为接收异步通知的时间) |
|
| 38 | - 'time_expire' => $this->unixTimestamp(),//订单失效时间 |
|
| 39 | - 'time_settle' => $this->unixTimestamp(),//订单清算时间,用 Unix 时间戳表示。(暂不生效) |
|
| 40 | - 'transaction_no' => $this->string(64),//支付渠道返回的交易流水号。 |
|
| 37 | + 'time_paid' => $this->unixTimestamp(), //订单支付完成时的 Unix 时间戳。(银联支付成功时间为接收异步通知的时间) |
|
| 38 | + 'time_expire' => $this->unixTimestamp(), //订单失效时间 |
|
| 39 | + 'time_settle' => $this->unixTimestamp(), //订单清算时间,用 Unix 时间戳表示。(暂不生效) |
|
| 40 | + 'transaction_no' => $this->string(64), //支付渠道返回的交易流水号。 |
|
| 41 | 41 | //'refunds',//退款详情列表 |
| 42 | - 'amount_refunded' => $this->unsignedInteger()->notNull(),//已退款总金额,单位为对应币种的最小货币单位,例如:人民币为分。 |
|
| 43 | - 'failure_code' => $this->string(),//订单的错误码 |
|
| 44 | - 'failure_msg' => $this->string(),//订单的错误消息的描述。 |
|
| 42 | + 'amount_refunded' => $this->unsignedInteger()->notNull(), //已退款总金额,单位为对应币种的最小货币单位,例如:人民币为分。 |
|
| 43 | + 'failure_code' => $this->string(), //订单的错误码 |
|
| 44 | + 'failure_msg' => $this->string(), //订单的错误消息的描述。 |
|
| 45 | 45 | 'metadata', |
| 46 | 46 | //'credential', |
| 47 | - 'description' => $this->string(255),//订单附加说明,最多 255 个 Unicode 字符。 |
|
| 47 | + 'description' => $this->string(255), //订单附加说明,最多 255 个 Unicode 字符。 |
|
| 48 | 48 | 'created_at' => $this->unixTimestamp(), |
| 49 | 49 | ], $tableOptions); |
| 50 | 50 | } |
@@ -21,18 +21,18 @@ |
||
| 21 | 21 | } |
| 22 | 22 | $this->createTable($this->tableName, [ |
| 23 | 23 | 'id' => $this->bigPrimaryKey(), |
| 24 | - 'amount' => $this->unsignedInteger()->notNull(),//退款金额大于 0, 单位为对应币种的最小货币单位,例如:人民币为分(如退款金额为 1 元,此处请填 100)。必须小于等于可退款金额,默认为全额退款。 |
|
| 25 | - 'succeed' => $this->boolean()->defaultValue(false),//退款是否成功。 |
|
| 26 | - 'status' => $this->string(10)->defaultValue('pending'),//退款状态(目前支持三种状态: pending: 处理中; succeeded: 成功; failed: 失败)。 |
|
| 27 | - 'time_succeed' => $this->unixTimestamp(),//退款成功的时间,用 Unix 时间戳表示。 |
|
| 28 | - 'description' => $this->string(255)->notNull(),//退款详情,最多 255 个 Unicode 字符。 |
|
| 29 | - 'failure_code' => $this->string(),//退款的错误码,详见 错误 中的错误码。 |
|
| 30 | - 'failure_msg' => $this->string(),//退款消息的描述。 |
|
| 24 | + 'amount' => $this->unsignedInteger()->notNull(), //退款金额大于 0, 单位为对应币种的最小货币单位,例如:人民币为分(如退款金额为 1 元,此处请填 100)。必须小于等于可退款金额,默认为全额退款。 |
|
| 25 | + 'succeed' => $this->boolean()->defaultValue(false), //退款是否成功。 |
|
| 26 | + 'status' => $this->string(10)->defaultValue('pending'), //退款状态(目前支持三种状态: pending: 处理中; succeeded: 成功; failed: 失败)。 |
|
| 27 | + 'time_succeed' => $this->unixTimestamp(), //退款成功的时间,用 Unix 时间戳表示。 |
|
| 28 | + 'description' => $this->string(255)->notNull(), //退款详情,最多 255 个 Unicode 字符。 |
|
| 29 | + 'failure_code' => $this->string(), //退款的错误码,详见 错误 中的错误码。 |
|
| 30 | + 'failure_msg' => $this->string(), //退款消息的描述。 |
|
| 31 | 31 | //'metadata', |
| 32 | - 'charge_id' => $this->unsignedBigInteger()->notNull(),//支付 charge 对象的 id |
|
| 33 | - 'charge_order_no',//商户订单号,这边返回的是 charge 对象中的 order_no 参数。 |
|
| 34 | - 'transaction_no' => $this->string(64),//支付渠道返回的交易流水号,部分渠道返回该字段为空。 |
|
| 35 | - 'funding_source' => $this->string(20),//微信及 QQ 类退款资金来源。取值范围: unsettled_funds :使用未结算资金退款; recharge_funds :微信-使用可用余额退款,QQ-使用可用现金账户资金退款。注:默认值 unsettled_funds ,该参数对于微信渠道的退款来说仅适用于微信老资金流商户使用,包括 wx 、 wx_pub 、 wx_pub_qr 、 wx_lite 、 wx_wap 、 wx_pub_scan 六个渠道;新资金流退款资金默认从基本账户中扣除。该参数仅在请求退款,传入该字段时返回。 |
|
| 32 | + 'charge_id' => $this->unsignedBigInteger()->notNull(), //支付 charge 对象的 id |
|
| 33 | + 'charge_order_no', //商户订单号,这边返回的是 charge 对象中的 order_no 参数。 |
|
| 34 | + 'transaction_no' => $this->string(64), //支付渠道返回的交易流水号,部分渠道返回该字段为空。 |
|
| 35 | + 'funding_source' => $this->string(20), //微信及 QQ 类退款资金来源。取值范围: unsettled_funds :使用未结算资金退款; recharge_funds :微信-使用可用余额退款,QQ-使用可用现金账户资金退款。注:默认值 unsettled_funds ,该参数对于微信渠道的退款来说仅适用于微信老资金流商户使用,包括 wx 、 wx_pub 、 wx_pub_qr 、 wx_lite 、 wx_wap 、 wx_pub_scan 六个渠道;新资金流退款资金默认从基本账户中扣除。该参数仅在请求退款,传入该字段时返回。 |
|
| 36 | 36 | //'extra', |
| 37 | 37 | 'created_at' => $this->unixTimestamp(), |
| 38 | 38 | ], $tableOptions); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | public function actionDelete($id) |
| 84 | 84 | { |
| 85 | 85 | $this->findModel($id)->delete(); |
| 86 | - Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Delete success.')); |
|
| 86 | + Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Delete success.')); |
|
| 87 | 87 | return $this->redirect(['index']); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | if (($model = Attachment::findOne($id)) !== null) { |
| 120 | 120 | return $model; |
| 121 | 121 | } else { |
| 122 | - throw new NotFoundHttpException (Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 122 | + throw new NotFoundHttpException(Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | 'attributes' => [ |
| 71 | 71 | ActiveRecord::EVENT_BEFORE_INSERT => 'user_id' |
| 72 | 72 | ], |
| 73 | - 'value' => function ($event) { |
|
| 73 | + 'value' => function($event) { |
|
| 74 | 74 | return Yii::$app->user->id; |
| 75 | 75 | } |
| 76 | 76 | ], |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $variables = []; |
| 30 | 30 | $variables['volumes'] = Yii::$app->getFilesystem()->getFilesystems(); |
| 31 | 31 | |
| 32 | - print_r($variables);exit; |
|
| 32 | + print_r($variables); exit; |
|
| 33 | 33 | return $this->renderTemplate('settings/assets/volumes/_index', $variables); |
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | \ No newline at end of file |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | { |
| 82 | 82 | if ($this->validate()) { |
| 83 | 83 | $user = $this->getUser(); |
| 84 | - if(AvatarHelper::save($user, $this->getOriginalImage())){ |
|
| 84 | + if (AvatarHelper::save($user, $this->getOriginalImage())) { |
|
| 85 | 85 | return true; |
| 86 | 86 | } else { |
| 87 | 87 | return false; |