1.0.7 • Published 9 years ago

fei_test_npm_hello v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
9 years ago

#fei_test_npm_hello

Install

$ npm install fei_test_npm_hello

#1、测试组件

var Hello=require('fei_test_npm_hello').Hello;
Hello('msg123');

#2、上传组件引用

var WeuiUploadFileOnceMore=require('fei_test_npm_hello').WeuiUploadFileOnceMore;

##属性说明

id:React.PropTypes.string.isRequired,//整个容器id
maxCount:React.PropTypes.number.isRequired,//这个是一个可选项。限制上传图片数量 注意:-1表示不限制。
multiple:React.PropTypes.bool.isRequired,//是不是多选文件 true/false
url:React.PropTypes.string.isRequired,//上传地址
change:React.PropTypes.func.isRequired,//改变获得  chang(data)

##注意事项:需要相应后台上传图片的api:

微信认证api:weixin/customer/config
上传图片api:pub/file/upload
删除图片api:pub/file/delete

##例子:

<WeuiUploadFileOnceMore id="voucher" change={this.voucherClick.bind(THIS)} multiple={false} url={window.app.apiHost+"pub/file/upload"} imgJia={"1"} maxCount={1} imgurl={this.state.getData.faceImg} setFaceImgAudit={THIS.state.faceImgAudit}/>

###回调方法:

voucherClick(data,e){
    let THIS = this;
    // 头像图片上传,获取对应的key
    if(data.resultCode == "60001" || data.resultCode==0){
      THIS.setState({pianoFilepathKey:data.data.key});
    }else{
      $.alert(data.resultMsg,"提示");
    }
  }
1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago