From 84e76971cd0f6a10deb68f7ac116b9726efe660c Mon Sep 17 00:00:00 2001 From: wenzl Date: Wed, 25 Oct 2017 10:39:13 +0800 Subject: [PATCH] add json tag --- js/js.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/js.go b/js/js.go index e3c5fcb..c720178 100644 --- a/js/js.go +++ b/js/js.go @@ -18,10 +18,10 @@ type Js struct { // Config 返回给用户jssdk配置信息 type Config struct { - AppID string - TimeStamp int64 - NonceStr string - Signature string + AppID string `json:"app_id"` + Timestamp int64 `json:"timestamp"` + NonceStr string `json:"nonce_str"` + Signature string `json:"signature"` } // resTicket 请求jsapi_tikcet返回结果 @@ -56,7 +56,7 @@ func (js *Js) GetConfig(uri string) (config *Config, err error) { config.AppID = js.AppID config.NonceStr = nonceStr - config.TimeStamp = timestamp + config.Timestamp = timestamp config.Signature = sigStr return }