npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

feedback-func

v1.0.24

Published

服务反馈对话框

Downloads

5

Readme

feedback tnpm version

一句话描述 一张截图

接入

install

tnpm install feedback-func

Simple Usage

let Feedback = require('feedback-func');
let Icon = require('*.svg');
let props = {
    userKey: window.__getUserId || '',
    corpKey: window.App && App.corpId || '',
    platform: 'dingtalk',
    eStr: window.App && App.feedbackEncryptStr || '',
    appCode: 'xteam',
    extension: {
        ua: navigator.userAgent,
        main_module: '欢行',
        module: '随手报',
        second_module: '随手报'
    },
    uploadScreen64Url: '/open/feedbackRpc/uploadScreenshotWithBase64.json',
    feedbackInfoUrl: '/open/feedbackRpc/uploadFeedbackInfo.jsonp',
    questionTypeUrl: '/open/feedbackRpc/taxiQuestionType.jsonp',
    isQuestionTypeOpen: 'y',
    title: '系统故障反馈',
    message: '欢行已为您截图,请描述您遇到的系统问题,服务台会尽快与您联系。政策问题请咨询1818-2,报销问题请咨询1818-8。',
    confirmText: '确定',
    cancelText: '取消',
    fadeTrans: true
}

<Feedback {...props}>
  <Icon />
</Feedback>

API

Feedback

通过子元素传入自定义的图标,如果没有子元素,则使用默认的图标

Props

locale

  • 描述:国际化(包括 zh-cn, en-us)
  • 类型:string
  • 默认:zh-cn
  • 必选:否

title

  • 描述:提示窗显示的标题
  • 类型:String
  • 默认:系统故障反馈
  • 必选:否

message

  • 描述:提示窗显示的内容
  • 类型:String
  • 默认:欢行已为您截图,请描述您遇到的系统问题,服务台会尽快与您联系。政策问题请咨询1818-2,报销问题请咨询1818-8。
  • 必选:否

confirmText

  • 描述:提示窗确定文案
  • 类型:String
  • 默认:确定
  • 必选:否

cancelText

  • 描述:提示窗取消文案
  • 类型:String
  • 默认:取消
  • 必选:否

questionTypeUrl

  • 描述:获取问题类型URL
  • 类型:String
  • 默认:''
  • 必选:否

isQuestionTypeOpen

  • 描述:获取问题类型开关
  • 类型:String
  • 默认:'y'
  • 必选:否

feedbackInfoUrl

  • 描述:提交反馈URL
  • 类型:String
  • 默认:''
  • 必选:是

uploadScreen64Url

  • 描述:上传图片URL
  • 类型:String
  • 默认:''
  • 必选:是

userKey

  • 描述:员工工号
  • 类型:string
  • 默认:``
  • 必选:是

corpKey

  • 描述:企业KEY
  • 类型:string
  • 默认:``
  • 必选:是

platform

  • 描述:平台
  • 类型:string。枚举,aliwork:内外,dingtalk:钉钉,alimail:云邮,btrip:阿里商旅
  • 默认:``
  • 必选:是

eStr

  • 描述:接口权限校验KEY
  • 类型:string。[一般可从当前页面中获取]
  • 默认:``
  • 必选:是

appCode

  • 描述:应用CODE
  • 类型:string
  • 默认:``
  • 必选:是

extension

  • 描述:扩展字段
  • 类型:object
{
  main_module: 主模块,如“欢行”
  module:子模块,如“差旅”
  second_module:子子模块:如“差旅申请”
}
  • 默认:``
  • 必选:否

fadeTrans

  • 描述:是否使用动画
  • 类型:bool

APIs

Links

上传图片接口

  • 入参:
imgData  图片内容的BASE64  string
  • 返回:
authKey    文件授权的KEY   string   
fileName   文件名         string
fileSize   文件大小       long

提交报障内容接口

  • 入参:
content     报障内容                 string   
authKey     上面接口返回的文件授权KEY  string   
extension   扩展字段                 string  该字段为JSON格式,用来放一个扩展内容,其中有几个内容是必传的 
                                                main_module: 主模块,如“欢行” 
                                                module:子模块,如“差旅” 
                                                second_module:子子模块:如“差旅申请”
userKey     员工工号                 string   
corpKey     企业KEY                  string   
platform    平台                     string  枚举,aliwork:内外,dingtalk:钉钉,alimail:云邮,btrip:阿里商旅
eStr        接口权限校验KEY           string  一般可从当前页面中获取
appCode     应用CODE                 string