承接 onmotion/yii2-page-assessments 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

onmotion/yii2-page-assessments

Composer 安装命令:

composer require onmotion/yii2-page-assessments

包简介

Page assessment feature for your Yii2 application based on Vue2.

README 文档

README

The page assessment (polls) module for Yii2 framework based on Vue2.

Language: English, Русский

Latest Stable Version Total Downloads Monthly Downloads License

Fluent view:

fluent

Static (embeded in a page) view:

static

Installation

Just run:

composer require onmotion/yii2-page-assessments

or add

"onmotion/yii2-page-assessments": "*"

to the require section of your composer.json file.

apply migration:

php yii migrate --migrationPath=@vendor/onmotion/yii2-page-assessments/migrations

Usage

You must add to your config:

'modules' => [
    //...
    'assessments' => [
        'class' => 'onmotion\assessments\Module',
    ],
    //...
],

Then you can use the widget somewhere on the page:

Example:

echo \onmotion\assessments\widget\AssessmentWidget::widget([
    'fluent' => false, // static or fluent view
   // 'timeout' => 1500 // timeout bafore appearance.
    'questions' => [
        'Is this page helpful?', // simple question
        [
            'title' => 'What do you think about it?',
            'maxValue' => 6, 
          //  'allowComment' => true // allow optional comment
            'allowComment' => [1, 2, 3], // allow comment only if value is 1, 2 or 3.
          //  'model' => (new SomeActiveRecordModel),
          //  'repeat' => true, // whether to force repeat the question
          //  'afterVoteText' => [  // show comment after got a vote (string || array)
          //                    1 => 'It\'s ok! 👌',
          //                    2 => 'Could be better 😎',
          //                    3 => 'So so...',
          //                    4 => 'Very good!',
          //                    5 => 'Perfect!',
          //                ]
        ]
    ]
]);

Options

option type default description
fluent bool false fluent or static view
questions string || array see example
timeout integer 1500 timeout bafore appearance
model (optional) ActiveRecord null Attach Model::class info with primary key
icons array [] custom icons

Events

assessment.show - when an assessment item appears.

assessment.end - when all questions are completed.

document.addEventListener('assessment.show', function (e) {
    console.log(e.detail);
}, false);

You can change icons as you want, for example:

echo \onmotion\assessments\widget\AssessmentWidget::widget([
            'fluent' => true,
            'questions' => $questions,
            'icons' => [
                    1 => '<span class="assessment-icon"><span class="assessment-icon__angry"></span></span>',
                    2 => '<span class="assessment-icon"><span class="assessment-icon__sad"></span></span>',
                    3 => '<span class="assessment-icon"><span class="assessment-icon__thinking"></span></span>',
                    4 => '<span class="assessment-icon"><span class="assessment-icon__happy"></span></span>',
                    5 => '<span class="assessment-icon"><span class="assessment-icon__in-love"></span></span>',
            ]
        ]);

icons

onmotion/yii2-page-assessments 适用场景与选型建议

onmotion/yii2-page-assessments 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 1.09k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2018 年 09 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「module」 「extension」 「widget」 「Rating」 「votes」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 onmotion/yii2-page-assessments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 onmotion/yii2-page-assessments 我们能提供哪些服务?
定制开发 / 二次开发

基于 onmotion/yii2-page-assessments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-12