2.0.2 • Published 2 years ago

zik-response v2.0.2

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

installation

npm install zik-response

useage

import { successResponse, failResponse } from 'zik-response'  

ajax.get(url, {params: ...})  
    .then(resp => {  
        successResponse(resp)  
            .then(data => {  
                // data 是取回的数据  
                // todo...  
            })  
            .catch((msg, resp) => {  
                // msg 返回的错误信息, resp 消息体  
                // todo...  
            })
    })  
    .catch(error => {  
        // failResponse 返回一个对象,包含错误提示信息及error对象  
        let obj = failResponse(error)  
        // todo...  
    })

版本更新

2.0 版本支持单点登录

2.0.2

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago