Authored by 肖亚东

删除无用代码以及手机号登录修改

//app.js
import objectAssign from './vendors/object-assign';
import {WeToast} from './vendors/toast/wetoast';
import { APP_ID, API_HOST, SERVICE_HOST, MINI_APP_TYPE} from './libs/config';
import { APP_ID, API_HOST, MINI_APP_TYPE} from './libs/config';
import {GET, POST} from './libs/request';
import md5 from './vendors/md5';
var mta = require('./vendors/mta_analysis.js')
... ...
'use strict'
import {LOG_EVENT_HOST, API_HOST, SERVICE_HOST } from '../libs/config';
import {LOG_EVENT_HOST, API_HOSTAPI_HOST } from '../libs/config';
import { UPLOAD_LOG} from '../libs/request';
import { getYHStorageSync } from '../utils/util';
... ...
//****** 线上环境url,提交代码务必检查确认 ******
// export const API_HOST = 'https://api.yoho.cn';
// export const SERVICE_HOST = 'https://api.yoho.cn';
// export const YOHOBUY_HOST = 'https://m.yohobuy.com';
// export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3';
// export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile';
... ... @@ -10,9 +9,8 @@
// *********测试3环境*********
export const API_HOST = 'http://api-test3.dev.yohocorp.com';
export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
export const YOHOBUY_HOST = 'http://m.yohobuy.com';
export const ACTIVITY_HOST = 'http://192.168.102.49:6006';
export const ACTIVITY_HOST = 'http://192.168.102.49 :6006';
export const YOHOOD_HOST = 'http://yohood.test.yoho.cn';
... ...
import Promise from '../vendors/es6-promise';
import { API_HOST, SERVICE_HOST } from './config';
import { API_HOST } from './config';
import { GET, POST } from './request';
import { getYHStorageSync } from '../utils/util';
... ...
import Promise from '../vendors/es6-promise';
import { API_HOST, SERVICE_HOST } from './config';
import { API_HOST } from './config';
import { GET, POST } from './request';
// import {
// logEvent,
... ...
import {API_HOST, YOHOOD_HOST, SERVICE_HOST} from '../../libs/config';
import {API_HOST, YOHOOD_HOST } from '../../libs/config';
import {GET, POST} from '../../libs/request';
import { getUnionID } from '../../utils/login';
import { applyActivity } from '../../utils/activity';
... ...
// 逛文章详情
import { YOHOOD_HOST, API_HOST, SERVICE_HOST } from '../../libs/config';
import { YOHOOD_HOST, API_HOST } from '../../libs/config';
import { GET, POST } from '../../libs/request';
import util from '../../utils/util';
import { getQRCodeSource } from '../../libs/miniQRCodeRoute.js'
... ...
// pages/choosecountry/choosecountry.js
'use strict';
import { API_HOST, SERVICE_HOST } from '../../libs/config';
import { API_HOST } from '../../libs/config';
import { GET, POST } from '../../libs/request';
import { getVerifyKey, bindAction, decodePhoneNumber, getUnionID, decodeUnionId, openAuthorizeSettings} from '../../utils/login';
... ...
// 逛文章详情
import { YOHOOD_HOST, API_HOST, SERVICE_HOST } from '../../libs/config';
import { YOHOOD_HOST, API_HOST } from '../../libs/config';
import { GET, POST } from '../../libs/request';
import util from '../../utils/util';
import WxParse from '../../vendors/wxParse/wxParse';
... ...
// components/Dialog/dialog.js
import {
logEvent,
YB_TO_OPEN_APP_C,
YB_OPEN_APP_RESULT_L
} from '../../libs/analytics.js'
import { API_HOST, SERVICE_HOST } from '../../libs/config';
import { GET, POST } from '../../libs/request';
import { postFormId } from '../../libs/formIdCollectRequest';
let app = getApp();
... ...
... ... @@ -74,7 +74,10 @@ Page({
},
onShow: function() {
//Do some when page show.
let isLogin = app.isLogin() ? true : false;
this.setData({
isLogin,
})
},
fetchTicketInfo() {
... ...
//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,
... ...