Commit fe271968 authored by Edwise's avatar Edwise 🍷

名称隐秘处理1

parent 9b79369c
...@@ -29,6 +29,7 @@ const checkSystem = async () => { ...@@ -29,6 +29,7 @@ const checkSystem = async () => {
} }
Page({ Page({
gameConfigList:{},
favoredStatus:false, favoredStatus:false,
data: { data: {
indexPrize: [{ indexPrize: [{
...@@ -179,10 +180,13 @@ Page({ ...@@ -179,10 +180,13 @@ Page({
* 获取用户授权信息 * 获取用户授权信息
*/ */
async getAuth() { async getAuth() {
my.showLoading();
const userInfo = await getAuthUserInfo().catch(err => { const userInfo = await getAuthUserInfo().catch(err => {
console.log('未授权成功', err); console.log('未授权成功', err);
my.hideLoading();
}); });
if (userInfo) { if (userInfo) {
my.hideLoading();
console.log('userInfo', userInfo); console.log('userInfo', userInfo);
const { const {
nickName, nickName,
...@@ -254,6 +258,7 @@ Page({ ...@@ -254,6 +258,7 @@ Page({
}) || {}; }) || {};
if (success) { if (success) {
this.gameConfigList = data.gameConfigList;
// my.hideLoading(); // my.hideLoading();
app.activityInfo = data; app.activityInfo = data;
this.judgeDoHelp(); this.judgeDoHelp();
...@@ -309,9 +314,11 @@ Page({ ...@@ -309,9 +314,11 @@ Page({
step: this.data.curGameStep step: this.data.curGameStep
}); });
if (success) { if (success) {
const winRate = this.gameConfigList[this.data.curGameStep-1].winRate*0.01;
const propsCD = this.gameConfigList[this.data.curGameStep-1].propsCD;
my.redirectTo({url:'/pages/pagegamemain/pagegamemain?'+ my.redirectTo({url:'/pages/pagegamemain/pagegamemain?'+
"step="+this.data.curGameStep+"&start="+data.joinGameStartTime+ "step="+this.data.curGameStep+"&start="+data.joinGameStartTime+
"&end="+data.joinGameEndTime+"&gl="+parseFloat(data.winRate)+"&toolcd="+data.propsCD}) "&end="+data.joinGameEndTime+"&gl="+winRate+"&toolcd="+propsCD})
my.hideLoading(); my.hideLoading();
} else { } else {
if (data && !data.isVip) { if (data && !data.isVip) {
......
...@@ -151,13 +151,13 @@ ...@@ -151,13 +151,13 @@
height: 40rpx; height: 40rpx;
opacity: 1; opacity: 1;
display: block; display: block;
left: 108rpx; left: 188rpx;
top: 8rpx; top: 8rpx;
position: absolute; position: absolute;
font-size: 26rpx; font-size: 26rpx;
color: rgba(0, 0, 0, 1); color: rgba(0, 0, 0, 1);
transform-origin: 0px 0px 0px; transform-origin: 0px 0px 0px;
text-align: center; text-align: left;
} }
.pagerank .ranktex .rankList .rankItem .itemranktemp{ .pagerank .ranktex .rankList .rankItem .itemranktemp{
width: 150rpx; width: 150rpx;
......
...@@ -13,6 +13,7 @@ const { ...@@ -13,6 +13,7 @@ const {
getSystemInfo getSystemInfo
} = tbcc.tb; } = tbcc.tb;
Page({ Page({
changeStr:'***',
data: { data: {
rankList: [], rankList: [],
myRankInfo: {}, myRankInfo: {},
...@@ -62,7 +63,7 @@ Page({ ...@@ -62,7 +63,7 @@ Page({
/**获取排行榜 */ /**获取排行榜 */
async getRankList() { async getRankList() {
const { let {
success, success,
data data
} = await API.getUserRankList().catch(r => { } = await API.getUserRankList().catch(r => {
...@@ -72,6 +73,18 @@ Page({ ...@@ -72,6 +73,18 @@ Page({
if (success) { if (success) {
my.hideLoading(); my.hideLoading();
let myrank = data.myRankInfo.rank >= 500 ? '500+' : data.myRankInfo.rank; let myrank = data.myRankInfo.rank >= 500 ? '500+' : data.myRankInfo.rank;
for(let i=0;i<data.list.length;i++){
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);
}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)
}
// substr
}
this.setData({ this.setData({
rankList: data.list, rankList: data.list,
myRankInfo: data.myRankInfo, myRankInfo: data.myRankInfo,
......
This diff is collapsed.
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