Commit 96d25d31 authored by Edwise's avatar Edwise 🍷

版本过低

parent e8f63d73
......@@ -94,7 +94,7 @@
transform-origin: 0px 0px 0px;
}
.invitelistmodal .inviteList .inviteItem .inviteId{
width: 300rpx;
width: 380rpx;
height: 40rpx;
opacity: 1;
display: block;
......
......@@ -12,6 +12,7 @@ const {
getUserAddress,
setClipboard
} = tbcc.tb;
const changeStr = '***'
Component({
props: {},
data: {
......@@ -48,9 +49,9 @@ Component({
let len = data.list[i].userNick.length;
let str = data.list[i].userNick;
if(len<=4){
data.list[i].userNick = str.substr(0,0)+this.changeStr+str.substr(len-1,len-1);
data.list[i].userNick = str.substr(0,0)+changeStr+str.substr(len-1,len-1);
}else{
data.list[i].userNick = str.substr(0,Math.floor((len-3)/2))+this.changeStr+str.substr(len-Math.floor((len-3)/2)-1,len-1)
data.list[i].userNick = str.substr(0,Math.floor((len-3)/2))+changeStr+str.substr(len-Math.floor((len-3)/2)-1,len-1)
}
}
console.log(data.list);
......
......@@ -31,6 +31,7 @@ const checkSystem = async () => {
}
Page({
tbVersionOk: false,
gameConfigList: {},
favoredStatus: false,
goVip: false,
......@@ -72,6 +73,10 @@ Page({
},
navigateToOutsideGoodsDetail(e) {
if (!this.tbVersionOk) {
commonToast("为保证活动正常参与,请升级淘宝版本");
return;
}
const {
item
} = e.target.dataset;
......@@ -106,7 +111,11 @@ Page({
checkSystem().then(r => {
if (r) {
this.tbVersionOk = true;
this.getAuth();
} else {
this.tbVersionOk = false;
commonToast("为保证活动正常参与,请升级淘宝版本");
}
})
// this.getAuth();
......@@ -250,7 +259,7 @@ Page({
inviteStep: app.step
}).catch(res => {
// my.hideLoading();
if (res.code == "220003") {
if (res && res.code && res.code == "220003") {
this.getRankPrize();
} else {
commonToast(res && res.message);
......@@ -278,7 +287,7 @@ Page({
}) || {};
if (success) {
const nowTime = await getServerTime().catch(() => { });
const nowTime = await getServerTime().catch(() => {});
if (nowTime && data.startTime > nowTime) {
my.hideLoading();
my.showToast({
......@@ -378,6 +387,10 @@ Page({
canOpenGamePage: false,
/**进入游戏页面 */
async openGamePage() {
if (!this.tbVersionOk) {
commonToast("为保证活动正常参与,请升级淘宝版本");
return;
}
if (!this.start) {
commonToast("活动已结束")
return;
......@@ -422,15 +435,19 @@ Page({
},
/**打开弹窗 */
openModal(e) {
if (!this.tbVersionOk) {
commonToast("为保证活动正常参与,请升级淘宝版本");
return;
}
console.log(e);
const {
item
} = e.target.dataset;
if (!this.start && item == 'inviteList') {
commonToast("活动已结束")
return;
}
if (!this.start && item != 'rule') return;
// if (!this.start && item == 'inviteList') {
// commonToast("活动已结束")
// return;
// }
// if (!this.start && item != 'rule') return;
this.setData({
modalStatus: modalType[item] || 0
});
......@@ -443,6 +460,10 @@ Page({
},
/**点击跳转页面 */
navigateTo(e) {
if (!this.tbVersionOk) {
commonToast("为保证活动正常参与,请升级淘宝版本");
return;
}
const {
item
} = e.target.dataset;
......@@ -500,7 +521,7 @@ Page({
console.log("hhahahha")
if (!success) {
if (data && !data.isVip) {
commonToast("3s入会,即可为好友助力", 1500, () => {
commonToast("3s入会,即可进行PK", 1500, () => {
navigateToOutside(data.url);
})
} else if (data && data.isVip) {
......@@ -514,6 +535,10 @@ Page({
},
//检测上局的状态
async checkLastGameStat(data) {
if (!this.tbVersionOk) {
commonToast("为保证活动正常参与,请升级淘宝版本");
return;
}
//纯本地的
// let key = 'jn_' + app.openId + '_gamedata';
// let lgamedata = await new Promise((res, rej) => {
......@@ -549,26 +574,34 @@ Page({
// }
// }
console.log("上局状态",data);
console.log("上局状态", data);
//服务器的
let { joinGameStartTime, joinGameEndTime, toolStartTime, toolEndTime, winRate, propsCD ,step} = data;
let {
joinGameStartTime,
joinGameEndTime,
toolStartTime,
toolEndTime,
winRate,
propsCD,
step
} = data;
if (joinGameStartTime && joinGameEndTime) {
let nowTime = await getServerTime().catch(() => { });
if(!nowTime){
let nowTime = await getServerTime().catch(() => {});
if (!nowTime) {
nowTime = Date.now();
}
let toolcd = Math.ceil(propsCD);
let tooless = Math.ceil((toolEndTime-nowTime)/1000);
if(tooless<0){
let tooless = Math.ceil((toolEndTime - nowTime) / 1000);
if (tooless < 0) {
tooless = 0;
}
let querystr = "step=" + step + "&start=" + joinGameStartTime +
"&end=" + joinGameEndTime + "&gl=" + winRate + "&toolcd=" + toolcd+"&tooless="+tooless;
"&end=" + joinGameEndTime + "&gl=" + winRate + "&toolcd=" + toolcd + "&tooless=" + tooless;
if (nowTime && joinGameEndTime > nowTime) {//上局未结束,继续游戏
if (nowTime && joinGameEndTime > nowTime) { //上局未结束,继续游戏
querystr += "&laststat=go";
} else {//上局结束,未结算,去结算
} else { //上局结束,未结算,去结算
querystr += "&laststat=over";
}
my.redirectTo({
......
......@@ -313,8 +313,8 @@ const resList = {
},
'3ee62d6c-3e44-470b-b2a5-fb805ec6a6c3': {
name: 'mainBG',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/mainBG.c7698e5dba4494258624138e18429842bb37e85f.png',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/mainBG.677d8c562ee2f8a1fc9aef7830b7fd7e1f3604f9.jpg',
uuid: '3ee62d6c-3e44-470b-b2a5-fb805ec6a6c3'
},
'f3909518-193e-49eb-a1cd-357c4f83d796': {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,11 +7,11 @@
"totalPage": -12361727.86125888,
"list": [
{
"userNick": "1111",
"userNick": "111ythtyjhytj1",
"createTime": "1602482660574"
},
{
"userNick": "2222",
"userNick": "2222tyjtyjytjtyjtyjtyjtyjtyj",
"createTime": "1602485660574"
},
{
......
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