This commit is contained in:
aozhiwei 2022-05-05 18:50:38 +08:00
parent c24d5178de
commit 753c278e07
7 changed files with 13 additions and 5 deletions

View File

@ -13,7 +13,7 @@ class Ranking(object):
'url': 'webapp/index.php?c=Ranking&a=rankingList',
'params': [
_common.ReqHead(),
['type', 0, '排行榜类型 1积分榜']
['type', 0, '排行榜类型 1积分榜 10:战斗时间']
],
'response': [
_common.RspHead(),

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
import _common
class User(object):

View File

@ -109,6 +109,7 @@ class UserInfo(object):
def __init__(self):
self.fields = [
['activated', 0, '是否已激活'],
['rename_count', 0, '改名次数'],
['account_id', '', '账号id'],
['name', '', '用户名字'],
['head_id', 0, '头像id'],

View File

@ -44,6 +44,7 @@ CREATE TABLE `t_user` (
`first_fight` int(11) NOT NULL DEFAULT '0' COMMENT '是否首战',
`last_season_id` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次赛季id',
`activated` int(11) NOT NULL DEFAULT '0' COMMENT '是否已激活',
`rename_count` int(11) NOT NULL DEFAULT '0' COMMENT '改名次数',
`activatetime` int(11) NOT NULL DEFAULT '0' COMMENT '激活时间',
`already_guide` int(11) NOT NULL DEFAULT '0' COMMENT '已引导',
`head_list` mediumblob COMMENT '拥有的头像列表',

View File

@ -193,7 +193,10 @@ class BagController extends BaseAuthedController {
return;
}
$this->_updateUserInfo(array(
'name' => $name
'name' => $name,
'rename_count' => function () {
return 'rename_count + 1';
}
));
}

View File

@ -226,7 +226,10 @@ class UserController extends BaseAuthedController {
'sex' => $sex,
'head_id' => $headId,
'head_frame' => $headFrame,
'activated' => 1
'activated' => 1,
'rename_count' => function () {
return 'rename_count + 1';
}
));
Hero::addTryHero($heroMeta, $heroCfg[1]);
$propertyChgService = new services\PropertyChgService();

View File

@ -25,6 +25,7 @@ class User extends BaseModel {
{
return array(
'activated' => $row['activated'],
'rename_count' => $row['rename_count'],
'account_id' => $row['account_id'],
'name' => $row['name'],
'sex' => $row['sex'],
@ -50,6 +51,7 @@ class User extends BaseModel {
{
return array(
'activated' => $row['activated'],
'rename_count' => $row['rename_count'],
'account_id' => $row['account_id'],
'name' => $row['name'],
'sex' => $row['sex'],