wx.getUserProfile接口文档说明让人产生误解

小程序 文章 2021-03-31 12:02 136 0 全屏看文

wx.getUserProfile接口文档说明让人产生误解The wx.getUserProfile interface documentation is misleading

wx.getUserProfile接口文档说明让人产生误解

https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html

wx.getUserProfile(Object object)

desc 是声明获取用户个人信息后的用途,不超过30个字符

文档当中没有明确说明中文占几个字节 说的是字符 不管是中文还是英文除表情特殊字符以为 都应算一个字符 要么说明中文占几个字节

现在中文只是能输入15个字符而已按两个字节计算 您的文档说明应该是说不超过15个字符 而且15个字符根本不太够描述说明 字符的字面意思谁都是理解你能输入三十个字

https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html wx.getUserProfile (object object) desc is the purpose of acquiring user's personal information, which is no more than 30 characters. The document does not specify how many bytes Chinese occupies. It means that characters, whether Chinese or English, should be counted as one character except for special facial expression characters You can only input 15 characters in Chinese now. According to two bytes, your document description should be no more than 15 characters, and 15 characters are not enough to describe the literal meaning of the description characters. Everyone understands that you can input 30 characters

回答:

😮😮:

字符 字节 不一样的

跨商通:

desc都能研究出花来么?

一律写:‘业务需要’,反正肯定能过。目测就是写“XXXX”都能过。

你们的脑细胞真是多得没地方花啊。


Brother斌🎈:

好像在某个地方看到过写了desc一个中文占两个字符

-EOF-