Authored by huangyi

渠道业务完成

... ... @@ -15,7 +15,8 @@ import {
YB_LAUNCH_APP,
YB_ENTER_FOREGROUND,
YB_ENTER_BACKGROUND,
YB_AWAKE_MP
YB_AWAKE_MP,
YB_MY_LOGIN
} from './libs/yas';
import router from './pages/zeroSell/router/router';
... ... @@ -100,6 +101,7 @@ App({
}
} else {
event.once('user-login-success', (userInfo) => {
yasReport(YB_MY_LOGIN, {LOGIN_TYPE: 4});
if (loginSuccess) {
loginSuccess(userInfo);
}
... ... @@ -116,7 +118,7 @@ App({
let that = this
let params = {};
yasReport(YB_ENTER_FOREGROUND, params, that)
if (that.globalData.hasReportAwakeAction==='false'){
if (!that.globalData.hasReportAwakeAction){
let pathParam = ""
if(options && options.query) {
for (var Key in options.query) {
... ... @@ -138,7 +140,7 @@ App({
PAGE_PATH: path
};
yasReport(YB_AWAKE_MP, params, this);
that.globalData.hasReportAwakeAction = 'true'
that.globalData.hasReportAwakeAction = true;
}
if (options && options.scene){
... ... @@ -308,7 +310,7 @@ App({
udid:'',
cid:'1',
mobileRegisterState:'',
hasReportAwakeAction: 'false',
hasReportAwakeAction: false,
defraudurl:'https://activity.yoho.cn/feature/45.html?title=防诈骗提醒',
miniapp_type: MINI_APP_TYPE,
union_type:'',//渠道号,大数据上传用
... ...
/* eslint-disable */
export default {
"domains": {
"api": "https://api.yoho.cn",
// "api": 'http://api-test2.dev.yohocorp.com',
"service": "https://api.yoho.cn",
"yas": "https://analysis.yohobuy.com/yas_mobile",
"report": "https://app.yoho.cn/collect/v3"
},
"appid": "wx7678b61d1e6702fe",
"payment_code": "45",
"private_key": "b43890b0a296ff3c7b8c260ca763980b",
"jump": {
"brand": "go.brand",
"detail": "go.detail",
"productpool": "go.poollist"
},
"mini_app_type": "29",
"client_type": "miniapp",
"business_line": "minappLuck",
"os_version": "yohobuy:h5",
"app_version": "2.8.3",
"app_build": "1032",
"mini_qr_type": 16
}
\ No newline at end of file
//export const API_HOST = 'https://api.yoho.cn';
//export const SERVICE_HOST = 'https://api.yoho.cn';
export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3';
export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile';
// 线上环境
export const API_HOST = 'https://api.yoho.cn';
export const SERVICE_HOST = 'https://api.yoho.cn';
export const ACTIVITY_HOST = 'https://action.yoho.cn';
// export const ACTIVITY_HOST = 'http://192.168.102.49:6006';
// export const ACTIVITY_HOST = 'http://172.16.10.53:6006'
export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com';
//export const ACTIVITY_HOST = 'https://action.yoho.cn';
// 测试环境
// export const API_HOST = 'http://api-test3.dev.yohocorp.com';
// export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
// export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com';
// export const API_HOST = 'http://dev-api.yohops.com:9999';
// export const SERVICE_HOST = 'http://dev-api.yohops.com:9999/';
... ... @@ -14,8 +14,6 @@ export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yo
// export const API_HOST = 'http://api-test1.yohops.com:9999';
// export const SERVICE_HOST = 'http://api-test1.yohops.com:9999/';
export const API_HOST = 'http://api-test3.dev.yohocorp.com';
export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
// export const API_HOST = 'http://api-test2.dev.yohocorp.com';
// export const SERVICE_HOST = 'http://api-test2.dev.yohocorp.com';
... ... @@ -24,9 +22,11 @@ export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yo
// export const API_HOST = 'https://apigray.yoho.cn';
// export const SERVICE_HOST = 'https://apigray.yoho.cn';
export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3';
export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile';
export const MINI_APP_TYPE = 29;
export const MINI_QR_TYPE = 16;
export const PAYMENT_CODE = '45';
export const OS_VERSION = 'yohobuy:h5';
... ... @@ -35,8 +35,3 @@ export const APP_BUILD = '1041';
export const PRIVATE_KEY = 'b43890b0a296ff3c7b8c260ca763980b';
export const CLIENT_TYPE = 'miniapp';
export const JUMP_BRAND = 'go.brand';
export const JUMP_DETAIL = 'go.detail';
export const JUMP_PRODUCTPOOL = 'go.poollist';
... ...
... ... @@ -8,18 +8,10 @@ import {
const event = global.event;
Page({
/**
* 页面的初始数据
*/
data: {
openType: 'getUserInfo'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function () {
this.checkUnionId();
event.on('wechat-login-success', this.loginSuccess);
event.on('wechat-login-callback', this.loginCallback);
... ... @@ -63,7 +55,6 @@ Page({
},
loginSuccess(params) {
console.log(params);
this.goReferer();
},
... ...
// component/login/login.js
import { getUserInfo, getPhoneNumber, checkUnionIdIsBind } from '../utils/login/login.js';
Component({
/**
... ...
... ... @@ -58,6 +58,23 @@ export default class EventEmitter {
return true;
}
one(type, listener) {
let events;
if (typeof listener !== 'function')
throw new Error('"listener" argument must be a function');
events = this._events;
console.log(events);
if (typeof events === 'undefined') {
events = this._events = Object.create(null);
this._eventsCount = 0;
}
events[type] = listener;
++this._eventsCount;
return this;
}
_addListener(type, listener, prepend) {
let events;
let existing;
... ...
... ... @@ -6,10 +6,12 @@ const login = new LoginService();
const loginPromise = toPromiseWX('login');
const saveLoginData = (loginData) => {
const app = getApp();
setStorageValueForKey('open_id', loginData.openid);
setStorageValueForKey('srd_session', loginData.srd_session);
if (loginData && loginData.unionid) {
setStorageValueForKey('union_id', loginData.unionid);
app && app.setWXUnionID(loginData.unionid);
}
}
... ...
... ... @@ -5,12 +5,12 @@
*
*/
import { GET } from '../../../libs/request';
import config from '../../../config.js';
import {API_HOST} from '../../../libs/config.js';
import regeneratorRuntime from '../../libs/regenerator-runtime/index.js';
export default class BaseService {
constructor() {
this.url = config.domains.service;
this.url = API_HOST;
}
async GET(params, options) {
... ...
import BaseService from './base-service.js';
import config from '../../../config.js';
import {MINI_APP_TYPE} from '../../../libs/config.js';
import regeneratorRuntime from '../../libs/regenerator-runtime/index.js';
const WECHAT_SMALLPROGRAM_ONLOGIN = 'wechat.smallProgram.onLogin';
... ... @@ -16,7 +16,7 @@ export default class LoginService extends BaseService {
return await this.GET({
method: WECHAT_SMALLPROGRAM_ONLOGIN,
jsCode: code,
miniapp_type: config.mini_app_type
miniapp_type: MINI_APP_TYPE
}, {
path: WechatPath
})
... ...
... ... @@ -110,23 +110,11 @@ Page(extend({},Toast,{
});
},
// calcPosition: function (i, dataVal) {
// let positionX, positionY;
// let index = i;
// let count = parseInt(dataVal, 10) + 1;
// let unit = 'px';
// positionX = -index * 80 + unit;
// positionY = -count * 80 + unit;
// return [positionX, positionY].join(' ');
// },
didSelectImage: function (e) {
let index = e.currentTarget.dataset.itemindex;
let graphicsCodeElement = this.data.graphicsCodeElement;
let elem = graphicsCodeElement[index];
let dataVal = (parseInt(elem.dataVal)) % 4 + 1;
// let position = this.calcPosition(index, elem.dataVal);
// elem.position = position;
elem.dataVal = dataVal;
this.setData({graphicsCodeElement});
},
... ... @@ -395,7 +383,6 @@ verifyBtnAction:function(){
bindBtnAction:function (needBind, callBackFun) {
let that = this
// console.log('phoneNumber,verifyCode', that.data.phoneNum, that.data.verifyCode)
if (!that.data.phoneNum) {
that.wetoast.toast({
title: '请输入有效手机号',
... ... @@ -416,7 +403,6 @@ bindBtnAction:function (needBind, callBackFun) {
}
bindAction(that.data.phoneNum, that.data.verifyCode, that.data.country_area, that.data.inviteCode, function (result) {
// console.log("result:",result)
if (result.message)
that.wetoast.toast({
title: result.message,
... ... @@ -425,7 +411,6 @@ bindBtnAction:function (needBind, callBackFun) {
});
if (result.succeed) {
//新人toast提示
if (result.is_register) {
that.showZanToast({ title:'欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收',success: function(){
that.redirectAction();
... ... @@ -433,6 +418,7 @@ bindBtnAction:function (needBind, callBackFun) {
} else {
that.redirectAction();
}
event.emit('user-login-success');
event.emit('wechat-login-success');
}
})
... ... @@ -451,13 +437,6 @@ redirectAction: function() {
url: '../webview/webview?url=' + that.data.h5back
})
} else {
// let prePage = getCurrentPages();
// that.newCustomerStorage();
// if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
// prePage[prePage.length - 2].bindPhoneNumComplete();
// }
// console.log("currentPage:", getCurrentPages())
wx.navigateBack({
delta: 2,
})
... ...
... ... @@ -70,7 +70,7 @@ Component({
show: true,
code: result.data.prizeCode
});
this.triggerEvent('gaincodesuccess', this.properties.actPrizeId);
} else {
this.setData({
error: true,
... ...
<swiper wx:if="{{list.length !== 0}}" indicator-dots="{{indicatorDots}}"
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" vertical="{{true}}" class="swiper" circular="{{true}}">
<block wx:for="{{list}}">
<block wx:for="{{list}}" wx:key="{{index}}">
<swiper-item>
<view class="avatar-item">
<image src="{{item.user_thumb || 'http://img12.static.yhbimg.com/sns/2018/08/02/15/0237a5305f921865764e8409fcffbd3299.png'}}" class="avatar-image"/>
... ...
... ... @@ -8,7 +8,7 @@
<view class="banner" bindtap="_jumpBanner" wx:if="{{bannerSrc != null && bannerSrc !== ''}}">
<image class="banner-img" src="{{bannerSrc}}"></image>
</view>
<block wx:for="{{list}}">
<block wx:for="{{list}}" wx:key="{{index}}">
<block wx:if="{{item.floor_type === 1}}">
<view >{{item.content}}</view>
</block>
... ...
... ... @@ -4,7 +4,7 @@
<text class="title">邀新团</text>
</view>
<view class="group-list">
<block wx:for="{{groupRecommendList}}">
<block wx:for="{{groupRecommendList}}" wx:key="{{index}}">
<group-recommend-cell product="{{item}}" bindhandlegroupdetail="groupDetail"></group-recommend-cell>
</block>
</view>
\ No newline at end of file
... ...
... ... @@ -13,7 +13,8 @@ Component({
properties: {
item: {
type: Object
}
},
tabIdx: String
},
/**
... ... @@ -53,6 +54,7 @@ Component({
});
} else {
router.go('detail', {
tabIdx: +this.data.tabIdx + 1,
actPrizeId: this.properties.item.act_prize_id
});
}
... ...
... ... @@ -4,11 +4,13 @@ Component({
properties: {
product: {
type: Object
}
},
tabIdx: String
},
methods: {
onClick() {
router.go('detail', {
tabIdx: +this.data.tabIdx + 1,
actPrizeId: this.properties.product.id
});
}
... ...
... ... @@ -5,12 +5,14 @@ Component({
properties: {
product: {
type: Object
}
},
tabIdx: String
},
methods: {
goDetail() {
router.go('detail', {
tabIdx: +this.data.tabIdx + 1,
actPrizeId: this.properties.product.id
});
}
... ...
<view class="product-item" bindtap="goDetail">
<product-item-header product="{{product}}"></product-item-header>
<product-item-status product="{{product}}"></product-item-status>
<product-item-status product="{{product}}" tab-idx="{{tabIdx}}"></product-item-status>
</view>
\ No newline at end of file
... ...
... ... @@ -21,7 +21,9 @@ import {formatImageUrl} from '../../utils/util'
import {jumpByUrl} from '../../libs/urlRoute';
import {
yasReport,
YB_PAGE_OPEN_L
YB_PAGE_OPEN_L,
YB_LUCK_DT_GDS_C,
YB_LUCK_DT_JOIN_C
} from '../../libs/yas';
const ACTIVITY = {
... ... @@ -59,6 +61,7 @@ Page(Object.assign({
* 页面的初始数据
*/
data: {
tabIdx: '',
show: false,
showAuth: false,
actPrizeId: '',
... ... @@ -122,10 +125,15 @@ Page(Object.assign({
data.shareUid = options.shareUid;
}
if (options.tabIdx) {
data.tabIdx = options.tabIdx;
}
if (options.actPrizeId) {
data.actPrizeId = options.actPrizeId;
}
if (options.scene && options.scene.length === 32) {
data.scene = options.scene;
}
... ... @@ -218,15 +226,10 @@ Page(Object.assign({
},
goToGroupMiniApp(e) {
yasReport(YB_LUCK_DT_GDS_C, {ACTIVITY_ID: this.data.actPrizeId, PRD_SKN: e.detail.product_skn, TAB_ID: this.data.tabIdx});
wx.navigateToMiniProgram({
appId: 'wx207f18be42db9028',
path: `pages/group/detail?productSkn=${e.detail.product_skn}&activityId=${e.detail.activity_id}&page_param=${e.detail.activity_id}`,
success(res) {
},
fail(error) {
}
path: `pages/group/detail?productSkn=${e.detail.product_skn}&activityId=${e.detail.activity_id}&page_param=${e.detail.activity_id}`
})
},
... ... @@ -468,7 +471,6 @@ Page(Object.assign({
})
})
.catch(error => {
console.log(error)
})
},
... ... @@ -539,6 +541,10 @@ Page(Object.assign({
let tab = e.target.dataset.index
router.go('index', {tabIndex: tab || 0,reload:0});
},
reportSuccess({detail}) {
yasReport(YB_LUCK_DT_JOIN_C, {ACTIVITY_ID: detail})
},
getUserInfo: function (e) {
var that = this;
if (e.detail.errMsg === 'getUserInfo:ok') {
... ...
<!--page/subPackage/pages/zeroSell/detail.wxml-->
<block wx:if="{{show}}">
<view class="header {{shareFlag || 'mt-header'}}" >
... ... @@ -13,7 +12,7 @@
<view class="code-list" animation="{{animation}}">
<view class="code-list-item-container">
<view class="code-list-item"><view class="content"></view></view>
<view class="code-list-item" wx:for="{{codeList}}" wx:if="{{index < 3}}">
<view class="code-list-item" wx:for="{{codeList}}" wx:if="{{index < 3}}" wx:key="{{index}}">
<view class="content">
<image class="thumb" mode="widthFix" src="{{item.user_thumb}}"></image>
<view class="text">
... ... @@ -36,9 +35,9 @@
<view class="line"></view>
<more wx:if="{{recommends.length > 0}}">
<block wx:for="{{recommends}}">
<block wx:for="{{recommends}}" wx:key="{{index}}">
<view class="product-item">
<product-item product="{{item}}"></product-item>
<product-item product="{{item}}" tab-idx="{{tabIdx - 1}}"></product-item>
</view>
</block>
</more>
... ... @@ -52,6 +51,7 @@
<view class="action-bar">
<action-bar wx:if="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}"
act-prize-id="{{actPrizeId}}" bindgetcode="changeActionStatus" bindshare="share"
bindgaincodesuccess="reportSuccess"
></action-bar>
<block wx:else>
... ...
... ... @@ -106,9 +106,7 @@ Page(Object.assign({
this._init();
}
new app.WeToast();
console.log(options.reload);
if(options && (Number(options.reload) !== 0)) {
console.log('执行了');
this._getResouceCode()
}
this._getBottomBanner();
... ... @@ -232,7 +230,6 @@ Page(Object.assign({
_getResouceCode() {
this.commonService.getResourceCode('194ffd46254d6ad20e6c538bea4d89d7')
.then(data => {
// console.log(data)
this.setData({
dialogSrc: formatImageUrl(data.src, 340 * app.globalData.systemInfo.pixelRatio, 340 * app.globalData.systemInfo.pixelRatio, 2),
dialogUrl: data.url
... ... @@ -240,7 +237,6 @@ Page(Object.assign({
this.dialog.showDialog();
})
.catch(error => {
console.log(error)
})
},
... ... @@ -254,7 +250,6 @@ Page(Object.assign({
})
})
.catch(error => {
console.log(error)
})
},
... ... @@ -287,7 +282,6 @@ Page(Object.assign({
let oldData = my_zero_list[type].data;
let key = `my_zero_list[${type}].data`;
let keyPage = `my_zero_list[${type}].page`;
console.log('执行了');
this.service.getMyList({type, page}).then(res => {
let data = []
if (res && res.code === 200) {
... ... @@ -315,7 +309,6 @@ Page(Object.assign({
let oldData = my_zero_list[type].data;
let key = `my_zero_list[${type}].data`;
let keyPage = `my_zero_list[${type}].page`;
console.log('执行了');
this.service.getMyList({ type, page }).then(res => {
let data = []
if (res && res.code === 200) {
... ... @@ -512,7 +505,6 @@ Page(Object.assign({
},
loginError(error) {
console.log(error);
router.go('bindPhoneNumber');
},
... ...
... ... @@ -5,7 +5,7 @@
<image class="topgif" src="./images/yoluck.gif"/>
<view class="productList">
<block wx:for="{{list[0].products}}" wx:key="{{item.id}}">
<product-item product="{{item}}" class="product"></product-item>
<product-item product="{{item}}" class="product" tab-idx="{{tabIndex}}"></product-item>
</block>
</view>
</tabs-pane>
... ... @@ -13,7 +13,7 @@
<tabs-pane name="即将开始">
<view class="productList">
<block wx:for="{{list[1].products}}" wx:key="{{item.id}}">
<product-item product="{{item}}" class="product"></product-item>
<product-item product="{{item}}" class="product" tab-idx="{{tabIndex}}"></product-item>
</block>
</view>
</tabs-pane>
... ... @@ -21,7 +21,7 @@
<tabs-pane name="已结束">
<view class="productList">
<block wx:for="{{list[2].products}}" wx:key="{{item.id}}">
<product-item product="{{item}}" class="product"></product-item>
<product-item product="{{item}}" class="product" tab-idx="{{tabIndex}}"></product-item>
</block>
</view>
</tabs-pane>
... ... @@ -37,8 +37,8 @@
</view>
</block>
<block wx:else>
<block wx:for="{{my_zero_list[0].data}}">
<prize-item item="{{item}}" bindshare="share"></prize-item>
<block wx:for="{{my_zero_list[0].data}}" wx:key="{{index}}">
<prize-item item="{{item}}" bindshare="share" tab-idx="{{tabIndex}}"></prize-item>
</block>
</block>
<view class="title-view">
... ... @@ -50,19 +50,14 @@
</view>
</block>
<block wx:else>
<block wx:for="{{my_zero_list[1].data}}">
<prize-item item="{{item}}" bindshare="share"></prize-item>
<block wx:for="{{my_zero_list[1].data}}" wx:key="{{index}}">
<prize-item item="{{item}}" bindshare="share" tab-idx="{{tabIndex}}"></prize-item>
</block>
</block>
</block>
<block wx:else>
<login theme="light" openType="{{openType}}"></login>
</block>
<!-- <view class="productList">
<block wx:for="{{list[2].products}}" wx:key="{{item.id}}">
<product-item product="{{item}}" class="product"></product-item>
</block>
</view> -->
</tabs-pane>
<block wx:if="{{tabIndex !== 3}}">
<view class="list-foot-blank">{{footText}}</view>
... ... @@ -74,16 +69,6 @@
</view>
</block>
<!-- <view class="bottom-bar">
<block wx:if="{{isLogin}}">
<view bindtap="goMyList">我的抽奖码</view>
</block>
<block wx:else>
<button class="bottom-btn" plain="true" hover-class="none" open-type="{{!hasUnionID ? 'getUserInfo':'getPhoneNumber'}}" bindgetphonenumber="getPhoneNumber" bindgetuserinfo='getUserInfo'>我的抽奖码</button>
</block>
</view> -->
<import src="../../vendors/zanui/toast/index.wxml"/>
<template is="zan-toast" data="{{zanToast}}"/>
... ... @@ -96,4 +81,3 @@ url="{{dialogUrl}}"
></dialog>
<import src="../../vendors/zanui/actionsheet/index.wxml" />
<template is="zan-actionsheet" data="{{...actionsheet}}" />
<!-- <quickNavigation id="quickNavigation" isShowIndicator="{{false}}" isShowShopCart="{{false}}" marginBottom="{{190}}"></quickNavigation> -->
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@ class CommonService extends Service {
})
.catch(error => {
reject(error)
})
});
})
}
... ...
... ... @@ -10,13 +10,10 @@ class Service {
_get(path, data) {
let method = path ? this.url + path : API_HOST;
console.log(`request => ${data.method || method} =>`, data);
return GET(method, data).then(result => {
if (result.code !== 200) {
console.error(`response => ${data.method || method} =>`, result);
} else {
console.log(`response => ${data.method || method} =>`, result);
}
return result
});
... ... @@ -25,13 +22,10 @@ class Service {
_post(path, data) {
let method = path ? this.url + path : API_HOST;
console.log(`request => ${data.method || method} =>`, data);
return POST(method, data).then(result => {
if (result.code !== 200) {
console.error(`response => ${data.method || method} =>`, result);
} else {
console.log(`response => ${data.method || method} =>`, result);
}
return result;
});
... ...
//login.js
import {GET, POST} from '../libs/request';
import {API_HOST, SERVICE_HOST} from '../libs/config';
import {Encrypt} from '../libs/aes'
import {isStringEmpty} from './util'
import { yasReport,
YB_MY_LOGIN,
YB_PAGE_OPEN_L,
YB_REGISTER_SUCCESS,
} from '../libs/yas.js'
import {
yasReport,
YB_REGISTER_SUCCESS
} from '../libs/yas.js'
//获取应用实例
var app = getApp()
... ... @@ -53,8 +50,6 @@ function wechatLoginAction(callbackFunc) {
app.setOpenID(responseData.openid);
//如果unionID不存在(未使用过任何有货微信产品的全新用户),调用getUnionID函数,再次获取unionID
//对于已经授权过的用户,拿到unionid之后获取一次userinfo更新个人信息.
let params = { LOGIN_TYPE: 4, PV_ID: PV_ID, };
yasReport(YB_MY_LOGIN, params);
//当unionId为空或者头像为空时,调用微信接口获取用户信息
if (!isStringEmpty(responseData.unionid)) {
... ... @@ -356,8 +351,7 @@ function checkVerifyCode(phoneNumb, verifyCode, areaCode, inviteCode, callbackFu
app.setSessionkey(data.data.session_key);
app.setUserInfo(userInfo);
sendWeChatUserData(userInfo.uid, app.globalData.userInfo.nickName, app.globalData.userInfo.avatarUrl);
// console.log("登录成功:", userInfo)
if (data.data.is_register !== undefined && data.data.is_register !== null && data.data.is_register === 0 ) {
if (data.data.nFlag === 'Y') {
let logParams = {
YB_REGISTER_SUCCESS: 5,
};
... ... @@ -458,17 +452,21 @@ function autoSignin(mobile, verifyCode, areaCode, inviteCode, callbackFunc) {
userInfo.profile = data.data.profile;
app.setSessionkey(data.data.session_key);
app.setUserInfo(userInfo);
if (data.data.is_register !== undefined && data.data.is_register !== null && data.data.is_register === 0) {
let params = {
succeed: true,
code: data.code,
message:data.message,
};
if (data.data.nFlag === 'Y') {
params.is_register = true;
let logParams = {
YB_REGISTER_SUCCESS: 5,
};
yasReport(YB_REGISTER_SUCCESS, logParams);
}
callbackFunc({
succeed: true,
code: data.code,
message:data.message,
});
callbackFunc(params);
}else{
callbackFunc({
succeed: false,
... ... @@ -554,7 +552,7 @@ function BindMiniAppByAuto(mobile, countryCode, inviteCode, callbackFunc){
app.setSessionkey(data.data.session_key)
app.updateUid(data.data.uid)
sendWeChatUserData(data.data.uid, app.globalData.userInfo.nickName, app.globalData.userInfo.avatarUrl);
if (data.data.is_register !== undefined && data.data.is_register !== null && data.data.is_register === 0) {
if (data.data.nFlag === 'Y') {
let logParams = {
YB_REGISTER_SUCCESS: 5,
};
... ...