LyricTian / gin-admin

A lightweight, flexible, elegant and full-featured RBAC scaffolding based on GIN + GORM 2.0 + Casbin 2.0 + Wire DI.

Home Page:http://101.42.232.163:8040

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v8版本uint64类型ID前端接收的问题

chenyu1990 opened this issue · comments

目前js不支持大数,ID会丢失精度。
解决办法来自二楼

schema

ID        uint64    `json:"id,string"`                    // 唯一标识    

修改 tag

ID uint64 json:"id,string"

ID uint64 json:"id:string"后出现Parse request json failed: json: invalid use of ,string struct tag, trying to unmarshal "" into uint64,请问该如何解决

ID uint64 json:"id:string"后出现Parse request json failed: json: invalid use of ,string struct tag, trying to unmarshal "" into uint64,请问该如何解决

你这细心程度,当程序员,确实有点难。符号打错了