Commit 6a35ca75 authored by wildfirecode13's avatar wildfirecode13

1

parent d07987ea
...@@ -15,14 +15,14 @@ const apiList = { ...@@ -15,14 +15,14 @@ const apiList = {
login: { login: {
handle: 'login', handle: 'login',
method:'get', method:'get',
isShowLoading: true isShowLoading: false
}, },
// 获取游戏信息 // 获取游戏信息
getGameInfo: { getGameInfo: {
handle: 'getGameInfo', handle: 'getGameInfo',
method: 'get', method: 'get',
isShowLoading: true isShowLoading: false
}, },
// 埋点接口 // 埋点接口
...@@ -36,7 +36,7 @@ const apiList = { ...@@ -36,7 +36,7 @@ const apiList = {
drawLotteryPrize: { drawLotteryPrize: {
handle: 'lottery', handle: 'lottery',
method: 'get', method: 'get',
isShowLoading: true isShowLoading: false
}, },
// 获取大转盘所有奖品信息 // 获取大转盘所有奖品信息
...@@ -50,14 +50,14 @@ const apiList = { ...@@ -50,14 +50,14 @@ const apiList = {
doJoin: { doJoin: {
handle: 'doJoin', handle: 'doJoin',
method: 'get', method: 'get',
isShowLoading: true isShowLoading: false
}, },
// 完成游戏 // 完成游戏
gameOver: { gameOver: {
handle: 'gameOver', handle: 'gameOver',
method: 'get', method: 'get',
isShowLoading: true isShowLoading: false
}, },
// 观看视频发放雅顿币 // 观看视频发放雅顿币
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
"dependencies": { "dependencies": {
"@tbmp/mp-cloud-sdk": "*", "@tbmp/mp-cloud-sdk": "*",
"fyge-tbmini": "^1.3.7", "fyge-tbmini": "^1.3.7",
"mini-types": "^0.1.4",
"tans_lottie": "^1.0.4" "tans_lottie": "^1.0.4"
} }
} }
...@@ -12,14 +12,15 @@ const SHARE_CONFIG = { ...@@ -12,14 +12,15 @@ const SHARE_CONFIG = {
Page({ Page({
doShare() {my.showSharePanel();}, doShare() { my.showSharePanel(); },
data: { data: {
}, },
onLoad(query) { onLoad(query) {
// 页面加载 // 页面加载
this.getAuth(); this.getAuth();
console.info(`Page onLoad with query: ${JSON.stringify(query)}`); console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
this.inviteId = query.inviteId;
}, },
/** /**
* 获取用户授权信息 * 获取用户授权信息
...@@ -40,19 +41,30 @@ Page({ ...@@ -40,19 +41,30 @@ Page({
* 登录接口 * 登录接口
*/ */
async login() { async login() {
const { nickName, avatar,isFollow } = app; const { nickName, avatar, isFollow } = app;
const { success,data } = await API.login({ userNick: nickName, avatar,isFollow:true }).catch(res => { const { success, data } = await API.login({ userNick: nickName, avatar, isFollow: true }).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
if (success) { if (success) {
const {openId} = data; const { openId } = data;
app.openId=openId; app.openId = openId;
this.init(); this.init();
} }
}, },
init() { init() {
console.log('do init') console.log('do init');
//有的时候是首页弹出助力弹窗
//有的时候是有单独的落地页
//如果是首页弹出助力弹窗
if (this.inviteId) {
commonToast('首页助力类型,这是被邀请人页面')
}else{
commonToast('首页助力类型,这是邀请人页面')
}
//todo 如果需要弹出邀请结果弹窗
}, },
onReady() { onReady() {
// 页面加载完成 // 页面加载完成
...@@ -75,7 +87,7 @@ Page({ ...@@ -75,7 +87,7 @@ Page({
onReachBottom() { onReachBottom() {
// 页面被拉到底部 // 页面被拉到底部
}, },
/** /**
* 获取主接口 * 获取主接口
*/ */
...@@ -89,7 +101,7 @@ Page({ ...@@ -89,7 +101,7 @@ Page({
this.setData({ title, content, rule }); this.setData({ title, content, rule });
} }
}, },
/** /**
* 显示规则弹层 * 显示规则弹层
*/ */
...@@ -109,17 +121,17 @@ Page({ ...@@ -109,17 +121,17 @@ Page({
onShareAppMessage() { onShareAppMessage() {
// 返回自定义分享信息 // 返回自定义分享信息
let { let {
path, path,
...rest ...rest
} = SHARE_CONFIG; } = SHARE_CONFIG;
if (app.openId) { if (app.openId) {
path += '?inviteId=' + app.openId; path += '?inviteId=' + app.openId;
} }
console.log('path', path) console.log('path', path)
return { return {
...rest, ...rest,
path path
} }
} }
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment