错误的入参:
rawData ===> "{\"nickName\":\"拥有你便是拥有一切\",\"gender\":1,\"language\":\"zh_CN\",\"city\":\"Zhangjiakou\",\"province\":\"Hebei\",\"country\":\"China\",\"avatarUrl\":\"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erl1w8oy6XV3EupfnwBwuhOkvdhhTOIdTcktib2TJduh97W3yicWI1SiaEBUwxUNXO8ahsQuqHzVuFgg/132\"}"
session_key ===> 88Ym6lJSmbdQnmuLo0zUlA==
signature ===> "3ca00ab833dbe5b0788ac8175f9ffe62e0aa8cec"
正确的入参:
rawData ===> {\"nickName\":\"拥有你便是拥有一切\",\"gender\":1,\"language\":\"zh_CN\",\"city\":\"Zhangjiakou\",\"province\":\"Hebei\",\"country\":\"China\",\"avatarUrl\":\"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erl1w8oy6XV3EupfnwBwuhOkvdhhTOIdTcktib2TJduh97W3yicWI1SiaEBUwxUNXO8ahsQuqHzVuFgg/132\"}
session_key ===> 88Ym6lJSmbdQnmuLo0zUlA==
signature ===> 3ca00ab833dbe5b0788ac8175f9ffe62e0aa8cec
!!!!!!! 注意:小程序表单提交的数据中首位两个双引号也作为了数据的一部分,在日志文件中使用数据时,固定思维主动过滤掉了首位双引号,所以单元测试通过。
SHA1入参的差异:
"xxxxxxxxxxxxx"
xxxxxxxxxxxxx
另外日志中打印的信息也具有提示作用,解决问题一定要沉心静气
期望签名:["3ca00ab833dbe5b0788ac8175f9ffe62e0aa8cec"],实际签名:[446a781a192cc80d19364403138fa7de87aa723b]
标签:DYAIOgq83erl1w8oy6XV3EupfnwBwuhOkvdhhTOIdTcktib2TJduh97W3yicWI1SiaEBUwxUNXO8ahsQ From: https://www.cnblogs.com/zno2/p/10570082.html