提交 7ba8f0f0 编写于 作者: C chenruilong

fix: 微信授权手机号登录没有邀请码字段

上级 8eb8a39a
......@@ -26,18 +26,22 @@ const {
* 微信授权手机号登录
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-weixin-mobile
* @param {Object} params
* @param {String} params.loginCode 微信登录返回的code
* @param {String} params.phoneCode 微信手机号返回的code
* @param {String} params.inviteCode 邀请码
* @returns
*/
module.exports = async function (params = {}) {
const schema = {
phoneCode: 'string'
phoneCode: 'string',
inviteCode: {
type: 'string',
required: false
}
}
this.middleware.validate(params, schema)
const { phoneCode } = params
const { phoneCode, inviteCode } = params
const weixinApi = initWeixin.call(this)
let mobile
......@@ -99,6 +103,7 @@ module.exports = async function (params = {}) {
...extraData
},
isThirdParty: false,
type
type,
inviteCode
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册