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 🙏

© 2026 – Pkg Stats / Ryan Hefner

flag-ui-sendconfirm

v0.0.21

Published

短信发送确认通用组件

Readme

短信发送确认通用组件

针对一信通平台短信发送确认的通用组件

安装

npm i --save flag-ui-sendconfirm

依赖

 1. vue
 2. element-ui
 3. vue的prototype上需要注入$http(axios)提供接口调用

使用说明

引入

import sendConfirm from 'flag-ui-sendconfirm'

组件概况

组件参数说明

|传入参数 | 类型 |是否必填|默认 | 说明 | |:-------------------|:-------|:-----:|:------:|:----------------------------------------| |urls |Object |是 |null |发送接口的地址。详见下述样例。 |params |Object |是 |null |发送参数,包含发送信息,接收者 |


详细参数说明

{
    //接口url地址
    urls: {
       trySend: '/try-send', //获取发送反馈信息
        send: '/send', //发送
        noticeSubExt: '/notice/sub-extend/get',  //通知子扩展接入号获取
        noticeAdd: '/notice/add'  //通知新增
    },
    //输入的发送参数
    params: {
        appId: SMS_APP_ID,//业务应用ID
        productId:1, //产品ID
        mediaId: '',//素材ID
        mediaType: '',
        scheduleTime: '',//预约发送时间
        sendObject: { //发送对象
            contactsExcludeList: [], //排除的通讯录组列表
            contactsGroupList: [], //要发送的通讯录组列表
            mdn: '',//手机号码
            mdnFile: '',//号码文件地址
            rmRepeat: 1 //是否去处重复发送对象:1 是  0 否	
        },
        sendSource: '',  //1 平台 2 接口
        sendType: '1', //发送类型:1   立即发送  2  预约发送
        signPosition: '1', //0  签名前置  1  签名后置
        text: 'test msg content', //短信文本
        textTemplateId: "0", //模板ID

       "effectTime": "", //生效时间
        "expireTime": "", //失效时间
        "name": "", 	  //通知名称
        "allSubmitMdn": "", //总提交人数
        "allSubmitNum": ""  //总提交条数
        "subExtend": "",   //子扩展号
        "isResend": false  //是否一键重发
    }
}

传出参数说明

组件事件说明

|事件 | 说明 | |:-------------:|:------------------| |back|用户点击上一步时,触发此事件| |success|用户发送成功之后,触发此事件|


示例

<template>
    <send-confirm :urls="urls" :params="params" @success="onSuccess"
                  @back="onBack"></send-confirm>
</template>
<script type="text/ecmascript-6">
    import sendConfirm from './sendConfirm.vue';

    //短信appid
    const SMS_APP_ID = "16011210241410005432";

    export default {
        data() {
            return {
                urls: {
                    trySend: '/try-send',
                    send: '/send',
                    noticeSubExt: '/notice/sub-extend/get',
                    noticeAdd: '/notice/add'
                },
                params: {} /*{
                 appId: SMS_APP_ID,
                 mediaId: '',
                 mediaType: '',
                 scheduleTime: '',
                 sendObject: {
                 contactsExcludeList: [],
                 contactsGroupList: [],
                 mdn: '',
                 mdnFile: '',
                 rmRepeat: 1
                 },
                 sendSource: '',
                 sendType: '1',
                 signPosition: '1',
                 text: 'test msg content',
                 textTemplateId: "0",
                 subExtend: "",
                 isResend: false
                 }*/
            }
        },
        components: {sendConfirm},
        methods: {
            onSuccess() {
                this.$router.push('/')
            },
            onBack() {
                history.back();
            }
        },
        beforeRouteEnter(to, from, next) {
            next(vm => {
                if (to.meta.data) {
                    //keep-alive时,替换params属性,以触发子组件的重新加载
                    vm.params = JSON.parse(JSON.stringify(to.meta.data));
                }
            })
        }
    }
</script>

组件变更记录

  • 2017-09-25 success事件回调参数:{trySendRes,sendRes}