Commit 6a35ca75 authored by wildfirecode13's avatar wildfirecode13

1

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