|
|
//login.js
|
|
|
import {GET, POST} from '../libs/request';
|
|
|
import {API_HOST, SERVICE_HOST} from '../libs/config';
|
|
|
import {API_HOST} from '../libs/config';
|
|
|
import {Encrypt} from '../libs/aes'
|
|
|
import {isStringEmpty} from './util'
|
|
|
import { logEvent,
|
...
|
...
|
@@ -38,7 +38,7 @@ function wechatLoginAction(callbackFunc) { |
|
|
jsCode: res.code,
|
|
|
miniapp_type: app.globalData.miniapp_type,
|
|
|
}
|
|
|
GET(SERVICE_HOST+'/wechat/', param)
|
|
|
GET(API_HOST+'/wechat/', param)
|
|
|
.then(data => {
|
|
|
if (data.code != 200) {
|
|
|
callbackFunc({
|
...
|
...
|
@@ -545,7 +545,7 @@ function decodePhoneNumber(iv, encryptedData, inviteCode, callbackFunc){ |
|
|
encryptedData: encryptedData,
|
|
|
iv: iv,
|
|
|
}
|
|
|
GET(SERVICE_HOST + '/wechat/', param)
|
|
|
GET(API_HOST + '/wechat/', param)
|
|
|
.then(data => {
|
|
|
if(data.data.phoneNumber!==''&&data.data.countryCode!=''){
|
|
|
BindMiniAppByAuto(data.data.phoneNumber, data.data.countryCode, inviteCode,
|
...
|
...
|
|