期望结果:{"errorcode":"0","errormsg":"登录成功","userid":"3092"}
实际接口返回的结果:{ "data": {
"expire_time": 1531985173,
"iset_paypsw": 1,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIzMDkyIiwiYWNjb3VudCI6Inl1cGVuZ0B4Y2xvdWQuY2MiLCJleHBpcmVfdGltZSI6MTUzMTk4NTE3M30.XZb_RZ7xhk9yCnFNl51u_qQbjIa7kI2MGPfIfDfwZS8",
"userid": "3092"
},
"errorcode": "0",
"errormsg": "登录成功"
}
两个结果都是字符串类型的,并非字典。我用字符串的 in 方法判断,会显示不在期望结果不在实际结果中


↙↙↙阅读原文可查看相关链接,并与作者交流