appserver接口调用生成验证码图片展示不了

bug问题 · cyx_20180320 · 于 1年前 发布 · 931 次阅读

iVBORw0KGgoAAAANSUhEUgAAAIIAAAAeCAIAAABvxVGSAAARX0lEQVRogc2aeXxTVdrHf0lu0uxJkzRt2tB0oxRqgbIVsGzKVgQFwQ19RwYU3BgHHVxGHF9eFRQdGRSVTV543UXBERgGEURAQGgJUNrSUtqmTZs2bbYmafZk/jjh9jZdhL5+1N8ft0+e85x7zz3fPOe556Ysu78B3VRZaj2813DxbGtTgxtAaoZkwaLsybNSu0f+bnXp7Pmjew8dP3DEbrERz1u7tuSOHPrbjqo3UTGfa6sc760932x0Zw2WXym3E2fFBevLK05LZLyRNyf96iO8MV25dPno3kNH9x5qazYz/UNG5P1uGSAGw+G9hr+vKlYnCz/YN4PisqcN3sVsvXi29feJ4cqly/oTZ13tzhMHv2+s7SG5AcxddM+vPKobUieGM8dMrz17JhyKFEzS8OI4AIaNSbhwppW0sjmsgsnJv80Yf04Ul/vBunf7CIhXKQpnTv61htMfsckfvy+07vmz4VAEQCgYIc4X/zFuxp1pukzp2MmaN3dOHjJc+ZsNs09xudw+WiUy6a3zijhU7PL7/5ex25Leb0VPtO/zq7Y2L7HrrjiIEW+Of2btmOpyW8uZIAC/L0SypB9qcliSZUqm8QuK4vUwHRSXGjVp3LQ7Z7HYbG36gF/2ikZQWgS72/1W9AaOHzTSruoKO4BwOPLp0ZLdD1bbHVE8cXzO/EXZi5bncij2jV4mWaZscliI0VuM2+sS8cU3emYAvLg42mZzOMPGjpg8Z1rhzCliqQTAS0tXrt7yRj9O26PEBrlLZ88xiC/rXOgvA6lP1h7nYHqiGCouWmmX0+GvLLXu31IfDIYoxoz7vKFPNlXUXLa/unnCjV6YMEDv2eD2up7f/uSkvKnzJ9x3oyenuBSAjMEDb1s4b0LRLTKFnG769xffKNUq+mOj1ZOiEDCNG5VLZxcb5AAICS2C4WCo+lCx4USps9nCl4ri0zUDZxaosrU9dmcCYNosu7/B7QrcPnIPM3pS0YA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ddDb0SEJLpXAdMvwiGIgIjO4YPPkJczZs7q3X3ieXsapCACLZHFZVqE0VvQ1mHvSjNhDdUB4IGsxN6crkWgsh0Q+ZXAKN2EMfOUFWuovv1lqpMAcOXpxb0L029Fyi+y3CQJJsZMLorTAwRQjtK3oIQJsqYdGHa3f81/PkSEig25MSU+HqCDuL1WPT9WeDjQrFBzkEQ3yQQ3u6R/LORfwjWEyjuwgAtbyDCnOC7BBlE0Dmh4MXjPcQT4+9+oPBYOQB0Gn9tAHAVBOvybABEOhbqaFDnRyTQN/aG4mg10HxZQBIKgBoUyWo2lqJQQBYrIpFH67tsfveJ5cRAMwjABmaHEjG9dUGoV7TkR/1kHlnHnu7d965CIDeGNAy24UAkqW+IDtEsgEyf28M0P1/WHtTrSOSLotemwAgDHh+EdC5MkhCmipZPPnphxo6FOj5O0jxZUGvAwCVHYVBGESyObi2hCoVVmZREXdwXMIQMaZseA/AP29bCiBcHYnPMpHZp5WrKqY9MncEqs5sYM4+7UG+yUaF0HseEPHORewZInmNmxhCeUePYaQqmO3CKAOgbwYA/gM4SXjS2iSk6wAAAABJRU5ErkJggg==

共收到 16 条回复
Terry#11年前 0 个赞

这个就是图片编码,自己去看demo:http://demo.fancyecommerce.com/#/customer/account/register

我通过在线转图片不行呀

apphtml5访问时倒是可以,appserver调用接口反而不行

后面看到了,要gif格式的

但是每次调用注册接口都会返回这个报错信息:我是先调用获取验证码接口的

Terry#91年前 0 个赞

@cyx_20180320 #8楼 返回的图片,读出来验证的四位数字,将验证码填写上去。

是将返回的图片读出来的验证码四位数字填上去的呀

11楼 已删除.
Terry#121年前 0 个赞

你要注意一个问题:验证码访问一次就会失效,如果进行了第二次访问,第一次的验证码就会失效。

其他的自己看文档琢磨解决吧,调整自己的姿势。

看了下,通过接口调用的时候好像生成的验证码没存储到captcha_session_key里面,但是通过html5访问就有生成captcha_session_key

我是使用谷歌的插件postman做的接口测试

Terry#151年前 0 个赞

@cyx_20180320 [#13楼](#comment13)

1.api是没有session的。

2.http://demo.fancyecommerce.com/#/customer/account/register

这个功能是没有问题的,具体原因自己排查。

有问题就说重点,没有重点就去找重点,这里拒绝聊天的方式讨论问题,没有闲情。

3.仔细看文档:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-server-api-captcha.html

appserver实现了一个类似session的功能,原理是通过: fecshop-uuid:37389c42-25e3-11e8-a904-00163e0049cb

每个用户有一个唯一的UUID,第一次访问后,在response header中会返回这个,然后,后面的每次数据发送,都需要带上这个值

http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-server-api-captcha.html

其他的详细参看:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-server.html

文档都说清楚了。

Terry#161年前 0 个赞

1.appserver端是有演示的,既然演示没有问题,说明功能没有问题

2.功能没有问题,就是你自己的姿势问题

3.仔细看appserer文档,先琢磨明白了原理,在测试:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-server.html

4.appserver端,对接的是客户端(VUE),因此,对接比较繁琐,各种参数要求比较多,仔细看文档,了解清楚了原理,出现问题才能知道问题出在哪里。

这样可以用在小程序上么?

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics