Skip to content

Commit 1c546a2

Browse files
Merge pull request #137 from Authing/fix-getPhone
fix(miniapp): update getPhone function
2 parents 24369a0 + 77276a2 commit 1c546a2

File tree

8 files changed

+1672
-29
lines changed

8 files changed

+1672
-29
lines changed

examples/miniapp-wx/miniapp/miniprogram_npm/@authing/miniapp-jsencrypt/index.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/miniapp-wx/miniapp/miniprogram_npm/@authing/miniapp-sm2encrypt/index.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/miniapp-wx/miniapp/miniprogram_npm/@authing/miniapp-wx/index.js

Lines changed: 1650 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/miniapp-wx/miniapp/miniprogram_npm/@authing/miniapp-wx/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/miniapp-wx/miniapp/miniprogram_npm/jsbn/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/miniapp-wx/miniapp/pages/index/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { encryptFunction } from '@authing/miniapp-sm2encrypt'
88

99
const authing = new Authing({
1010
appId: '630ed3137dd6f2fd7001da24',
11-
host: 'https://test-auth-zhaoyiming.authing.cn',
11+
host: 'https://test-auth-zhaoyiming.pre.authing.cn',
1212
userPoolId: '62e221f85f5ac5cc47037a39',
1313
encryptFunction
1414
})
@@ -69,7 +69,7 @@ Page({
6969
async sendSms () {
7070
// 指定 channel 为 CHANNEL_LOGIN,发送登录所用的验证码
7171
const res = await authing.sendSms({
72-
phoneNumber: '13100000000',
72+
phoneNumber: '13126919251',
7373
phoneCountryCode: '+86',
7474
channel: 'CHANNEL_LOGIN'
7575
})
@@ -81,8 +81,8 @@ Page({
8181
const res = await authing.loginByPassCode({
8282
passCodePayload: {
8383
// 手机收到的短信验证码
84-
passCode: '5671',
85-
phone: '13100000000',
84+
passCode: '845603',
85+
phone: '13126919251',
8686
phoneCountryCode: '+86'
8787
},
8888
options: {

packages/miniapp/scripts/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const webpackConfigs = modes.reduce((configs, mode) => {
2626
const options = {
2727
__authing_move_src_mode__: 'wx',
2828
__authing_move_mode__: mode,
29-
compilerMode: watch ? 'none': 'production'
29+
compilerMode: watch ? 'none': 'none'
3030
}
3131
return configs.concat(getWebpackConfig(options))
3232
}, [])

packages/miniapp/src/Authing.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,6 @@ export class Authing {
574574
return returnError(getPhoneError)
575575
}
576576

577-
if (getPhoneRes.phone_info) {
578-
return returnSuccess(getPhoneRes.phone_info)
579-
}
580-
581-
return returnError(getPhoneRes)
577+
return returnSuccess(getPhoneRes)
582578
}
583579
}

0 commit comments

Comments
 (0)