Commit 96d25d31 authored by Edwise's avatar Edwise 🍷

版本过低

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