# mm-graphic-verify **Repository Path**: mory-lee/mm-graphic-verify ## Basic Information - **Project Name**: mm-graphic-verify - **Description**: No description available - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-26 - **Last Updated**: 2022-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: JavaScript, 图形验证, JS插件 ## README # mm-graphic-verify > A JS graphic verify project, that need to be used with another authentication service, you can visit [website of graphic verify service](https://verify.cloudcrowd.com.cn) to apply for an account. ## Installation Download this package, copy it into you project. ## Usage You need import `./verify.css` and `./verify.js` into you html file, just as below. ``` bash
``` When verifying success, you can get the successful token of `GraphicVerify` from the `GraphicVerify` object, like below. ``` bash
``` At the same time, you can define your own callback function, then, you can do what you want to do. ``` bash
``` Also, you may want to reset the `GraphicVerify`, and we provide a method to do that. ``` bash
``` ## Props | Property | Type | Default | Description | | :------: | ---- | ------- | ----------- | | apiAddr | String | https://verify.cloudcrowd.com.cn | api address | | webKey | String | - | website key | | verifyWidth | String, Number | image's width | `GraphicVerify` button's width | | border | String | 1px solid rgba(51, 51, 51, 0.25) | `GraphicVerify` button's border | | borderRadius | String | 4px | `GraphicVerify` button's border radius | | bgColor | String | rgba(255, 255, 255, 0.9) | `GraphicVerify` button's background color | | color | String | #333333 | `GraphicVerify` button's default color | | successColor | String | #1ca21c | `GraphicVerify` success color | | failureColor | String | #dd1010 | `GraphicVerify` failure color | | successCallback | fn | null | `GraphicVerify` verify success callback | ## Methods | Name | In Param Type | Description | | :------: | ---- | ----------- | | reset() | - | reset the `GraphicVerify` |