Commit 5a7606fe authored by zhangjinzhou's avatar zhangjinzhou

Merge branch 'jiaoneiqunuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into jiaoneiqunuan

parents 2fc53343 fe271968
......@@ -29,6 +29,7 @@ const checkSystem = async () => {
}
Page({
gameConfigList:{},
favoredStatus:false,
data: {
indexPrize: [{
......@@ -179,10 +180,13 @@ Page({
* 获取用户授权信息
*/
async getAuth() {
my.showLoading();
const userInfo = await getAuthUserInfo().catch(err => {
console.log('未授权成功', err);
my.hideLoading();
});
if (userInfo) {
my.hideLoading();
console.log('userInfo', userInfo);
const {
nickName,
......@@ -254,6 +258,7 @@ Page({
}) || {};
if (success) {
this.gameConfigList = data.gameConfigList;
// my.hideLoading();
app.activityInfo = data;
this.judgeDoHelp();
......@@ -309,9 +314,11 @@ Page({
step: this.data.curGameStep
});
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?'+
"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();
} else {
if (data && !data.isVip) {
......
......@@ -151,13 +151,13 @@
height: 40rpx;
opacity: 1;
display: block;
left: 108rpx;
left: 188rpx;
top: 8rpx;
position: absolute;
font-size: 26rpx;
color: rgba(0, 0, 0, 1);
transform-origin: 0px 0px 0px;
text-align: center;
text-align: left;
}
.pagerank .ranktex .rankList .rankItem .itemranktemp{
width: 150rpx;
......
......@@ -13,6 +13,7 @@ const {
getSystemInfo
} = tbcc.tb;
Page({
changeStr:'***',
data: {
rankList: [],
myRankInfo: {},
......@@ -62,7 +63,7 @@ Page({
/**获取排行榜 */
async getRankList() {
const {
let {
success,
data
} = await API.getUserRankList().catch(r => {
......@@ -72,6 +73,18 @@ Page({
if (success) {
my.hideLoading();
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({
rankList: data.list,
myRankInfo: data.myRankInfo,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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