Commit 2a71abcb authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

parent 84a3c2ba
......@@ -1915,7 +1915,7 @@
width: 750rpx;
height: 1624rpx;
position: fixed;
top: 400rpx;
top: 220rpx;
left: 0rpx;
right: 0rpx;
bottom: 0rpx;
......
......@@ -11,7 +11,6 @@ import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import resList from '../../resconfig/resList'; //import API from '../../api';
import API from '../../api';
const { commonToast, getAuthUserInfo, navigateToOutside, getSystemInfo, getServerTime } = tbcc.tb;
let cardani;
const checkSystem = async () => {
const {
version
......@@ -108,6 +107,7 @@ Page({
},
onLoad(query) {
console.log("onLoad======>",query);
if (query) {
if (query.inviteId) {
app.inviteId = query.inviteId;
......@@ -243,6 +243,7 @@ Page({
// });
console.log(123)
try {
var canvas = await new Promise((r) => {
my.createCanvas({
id: 'canvas',
......@@ -269,7 +270,7 @@ Page({
FYGE.RENDERER_TYPE.CANVAS
);
var con = stage.addChild(new FYGE.Container())
con.y=stage.viewRect.y;
con.y = stage.viewRect.y;
//stage初始化
stage.addEventListener(FYGE.Event.INIT_STAGE, () => {
......@@ -286,7 +287,7 @@ Page({
var a = con.addChild(new FYGE.Lottie(whitedia))
a.play();
cardani = a;
// cardani = a;
//加个lottie
// this.eggBreak = stage.addChild(new FYGE.Lottie(egg_break))
// b.play();
......@@ -311,6 +312,9 @@ Page({
stage.flush();
FYGE.getRequestAnimationFrame()(loop);
}
} catch (e) {
}
},
onCanvasReady() {
console.log("oncanvasready========>");
......@@ -386,12 +390,7 @@ Page({
this.setData({
showani: "block"
});
if(cardani){
cardani.stop();
FYGE.Tween.removeTweens(cardani);
cardani.play(1,()=>{});
}
this.postMessage("playcardani", null);
// this.postMessage("playcardani", null);
},
/**
* 获取用户授权信息
......@@ -682,7 +681,7 @@ Page({
const shareaward = await API.getInviteAwardsList().catch(res => {
commonToast(res && res.message);
}) || {};
// console.log("邀请奖励", shareaward);
console.log("邀请奖励", shareaward);
const { success, data } = shareaward;
if (success) {
let { list, inviteCount } = data;
......@@ -692,12 +691,14 @@ Page({
// list[2].times = 30;
// list[3].times = 36;
// //
// inviteCount = 6;
// inviteCount = 4;
let nearchashare = 0;
let nearchaprize = "";
let prostartx = -438;
let proendx = 0;
let levelpro = 0;
let havesetpro = false;
for (let i = 0; i < list.length; i++) {
let idata = list[i];
......@@ -705,7 +706,7 @@ Page({
if (itimes >= inviteCount && nearchashare == 0) {//最近差多少
nearchashare = itimes - inviteCount;
if (!havesetpro) {
if (i == 0) {
prostartx = -438;
proendx = -410;
......@@ -713,17 +714,20 @@ Page({
} else if (i == 1) {
prostartx = -410;
proendx = nearchashare > 1 ? -300 : -275;
levelpro = nearchashare > 1 ? inviteCount / (itimes - 1) : 1;
levelpro = nearchashare > 1 ? inviteCount / (itimes - 1 - list[0].times) : 1;
} else if (i == 2) {
prostartx = -275;
proendx = nearchashare > 1 ? -165 : -138;
levelpro = nearchashare > 1 ? inviteCount / (itimes - 1) : 1;
levelpro = nearchashare > 1 ? inviteCount / (itimes - 1 - list[1].times) : 1;
} else if (i == 3) {
prostartx = -138;
proendx = nearchashare > 1 ? -28 : 0;
levelpro = nearchashare > 1 ? inviteCount / (itimes - 1) : 1;
levelpro = nearchashare > 1 ? inviteCount / (itimes - 1 - list[2].times) : 1;
}
havesetpro = true;
}
if (nearchashare != 0) {
let itype = Number(idata.type);
nearchaprize = ["抽碎片次数", "随机稀有碎片", "未收录碎片"][itype - 1];
......@@ -732,13 +736,17 @@ Page({
}
}
console.log(nearchashare,nearchaprize);
console.log(nearchashare, nearchaprize);
let sharepropos = '-438rpx 0rpx';
if (inviteCount >= list[list.length - 1].times) {
sharepropos = '0rpx orpx';
console.log("test23333333======>1")
sharepropos = '0rpx 0rpx';
} else {
console.log("test23333333======>2")
sharepropos = (proendx - prostartx) * levelpro + prostartx + 'rpx 0rpx';
}
console.log("test23333333======>", inviteCount, list[list.length - 1].times, proendx, prostartx, levelpro);
// let sharepro = inviteCount / list[list.length - 1].times;
// // console.log("代码暂存233====》",sharepro,inviteCount,list[list.length-1].times);
// if (sharepro > 1) sharepro = 1;
......@@ -868,7 +876,7 @@ Page({
async checkIsVip() {
const uvipinfo = await API.getVipInfo({
inviteId: app.inviteId,
shoesType:app.shoesType,
shoesType: app.shoesType,
}).catch(res => {
commonToast(res && res.message);
}) || {};
......
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