大前端
-
在 Yii 2 中基于 yii/db/ActiveQuery::joinWith() 关联声明查询数据,响应字段类型为字符串的分析解决
1、在 /qq/rests/article_category/StandardIndexAction.php 中 /* @var $modelClass /yii/db/BaseActiveRecord */ $modelClass = $this->modelClass; $query = $modelClass::find() ->joinWith('qqArticleCa…
-
在 Yii 2 中,更新模型时,当某字段不存在时,不更新模型(默认实现),当某字段存在,其值为空(赋值为属性的旧值)时,不更新模型的实现
1、GET http://api.channel-pub-api.localhost/qq/v1/qq-cw-apps/edit/148d4df6eba311e899f654ee75d2ebc1?group_id=spider ,响应如下,基于安全考虑,重置 Client Secret 为空字符串 { "code": 10000, &…
-
基于企鹅号的视频文件分片上传的实现流程,包含队列、文件切片、while 循环等
1、数据库结构的设计,一张资源表,一张企鹅号的视频文件分片上传表,一张企鹅号的事务表,结构如下: 28、asset:资源 Asset id 主键 channel_id 渠道ID channel_code 渠道代码,qq:企鹅号;wx:微信公众帐号 cha…
-
WordPress 4.9.8 的 SyntaxHighlighter 3.x 中出现 html 转义字符的解决,根源在于 Gutenberg 编辑器
1、WordPress 4.9.8 的 SyntaxHighlighter 3.x 中出现 html 转义字符,自动添加了换行标签等,如图1 图1 2、期望的格式应该是不出现 html 转义字符,如图2 图2 3、之前很长一段时间内皆是未出现 html 转义字符的,…
-
基于 Supervisor 运行控制台命令脚本,运行完毕 1 次之后,间隔 60 秒后再次运行控制台命令脚本的实现
1、配置文件 /channel-pub-api/build/c_files/etc/supervisord.d/yii-qq-transaction-video-sync.ini [program:yii-qq-transaction-video-sync] command = php /sobey/www/channel-pub-api/yii qq-transaction-vide…
-
在 Yii2 高级模板中基于 Yii2 队列扩展实现异步执行任务,附加事件处理器,在(每次成功执行作业后、在作业执行期间发生未捕获的异常时)
1、通过配置附加事件处理器,编辑 /environments/dev/common/config/main-local.php、/environments/prod/common/config/main-local.php,如图1 图1 'copyAssetQueue' => [ // 复制资源文件队列 'class' => '…
-
在 Yii2 高级模板中基于 Yii2 队列扩展实现异步执行任务
1、安装 Yii2 队列扩展,执行以下命令 composer require --prefer-dist yiisoft/yii2-queue 2、查看 composer.json,已经安装成功 "require": { "yiisoft/yii2-queue": "^2.1" }, 3…
-
执行 ./nginx -s reload 时,提示:nginx: [emerg] host not found in upstream “api.aims-api.localhost” in C:/nginx-1.10.1/conf/vhosts/aims.conf:14 的分析解决
1、执行 ./nginx -s reload 时,提示:nginx: [emerg] host not found in upstream “api.aims-api.localhost” in C:/nginx-1.10.1/conf/vhosts/aims.conf:14,如图1 图1 2、查看 C:/nginx-1.10.1/conf/…
-
在 LNMP 环境下,响应 No input file specified. 但文件是实际存在的分析与解决
1、http://wmpublish.mp.sztv.com.cn:8026/wx/robots.txt ,响应成功,表明 Nginx 的配置是正确的 User-agent: * Disallow: / 2、http://wmpublish.mp.sztv.com.cn:8026/v1/channel-app-sources?group_id=channel …
-
基于 yiisoft/yii2-app-advanced,在 GitHub 上新建仓库 yii2-app-advanced,UUID 的实现 (十)
1、在 Github 上搜索 yii2 uuid,选择 wartron/yii2-uuid,如图1 图1 2、基于 Composer 安装,报错 composer require wartron/yii2-uuid "*" ./composer.json has been updated Loading composer reposit…