appid沉在unityC#上,盟主可以直接修改玩家密码(后端仅在测试服上)
parent
3eb6ec9a98
commit
b2b5fb6057
|
|
@ -272,6 +272,9 @@ Protocol = {
|
|||
GET_BANK_HP = "group/get_bank_hp", --获取银行信息
|
||||
TAKE_BANK_HP = "group/take_bank_hp",
|
||||
SAVE_BANK_HP = "group/save_bake_hp",
|
||||
|
||||
--强制修改密码
|
||||
WEB_FG_RESET_PASSWORD = "group/group_reset_password",
|
||||
-------------- group-log---------------------
|
||||
-- 获取奖励日志
|
||||
WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ local PhoneBindView = import(".PhoneBindView")
|
|||
local PhonePasswordView = import(".PhonePasswordView")
|
||||
local WeChatView = import(".WeChatView")
|
||||
local UserEditView = import(".UserEditView")
|
||||
local IDPasswordAlone = import(".IDPasswordAlone")
|
||||
|
||||
local LobbyHeadView = {}
|
||||
|
||||
|
|
@ -78,6 +79,15 @@ function M:fill_user_info()
|
|||
pw_view:Show()
|
||||
end)
|
||||
|
||||
self:fill_item("iuo_retrieve", password, function()
|
||||
local _data_info = {}
|
||||
_data_info.only_retrieve = true
|
||||
local pw_view = IDPasswordAlone.new(_data_info, function()
|
||||
self:fill_user_info()
|
||||
end)
|
||||
pw_view:Show()
|
||||
end)
|
||||
|
||||
local invitation = self._user.invitation
|
||||
local item_invte = self.user_info:GetChild("item_invte")
|
||||
local ctr_invte = item_invte:GetController("c1")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,138 @@
|
|||
local IDPasswordAlone = {}
|
||||
|
||||
local M = IDPasswordAlone
|
||||
|
||||
--黑体字提示
|
||||
local Tips1 = { { "您正在修改用户的密码,修改完成后请及时告诉该用户密码已修改" }, { "您正在修改用户的密码,修改完成后请及时告诉该用户密码已修改" } }
|
||||
--红字提示
|
||||
local Tips1 = { { "注:请确认该用户是否是需要修改密码的用户" }, { "注:找回账号功能会删除现有账户,请勿随便使用" } }
|
||||
|
||||
function IDPasswordAlone.new(data, callback)
|
||||
setmetatable(M, { __index = BaseWindow })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = "IDPasswordAlone"
|
||||
self._callback = callback
|
||||
self._close_zone = false
|
||||
self._close_destroy = true
|
||||
self._data = data
|
||||
local url = "ui://NewGroup/win_id_password_alone"
|
||||
self:init(url)
|
||||
return self
|
||||
end
|
||||
|
||||
function M:init(url)
|
||||
BaseWindow.init(self, url)
|
||||
local text_id = self._view:GetChild("tex_phone")
|
||||
local tex_passwd = self._view:GetChild("tex_passwd")
|
||||
text_id.text = DataManager.SelfUser.account_id
|
||||
|
||||
local ctr_retrieve = self._view:GetController('retrieve')
|
||||
ctr_retrieve.onChanged:Set(function(context)
|
||||
if ctr_retrieve.selectedIndex == 0 then
|
||||
text_id.text = DataManager.SelfUser.account_id
|
||||
tex_passwd.text = ""
|
||||
else
|
||||
text_id.text = ""
|
||||
tex_passwd.text = ""
|
||||
end
|
||||
end)
|
||||
|
||||
local btn_ok = self._view:GetChild("btn_ok")
|
||||
btn_ok.onClick:Set(function()
|
||||
if ctr_retrieve.selectedIndex == 0 then
|
||||
self:Bind()
|
||||
else
|
||||
self:Retrieve()
|
||||
end
|
||||
end)
|
||||
|
||||
if self._data and self._data.only_retrieve then
|
||||
ctr_retrieve.selectedIndex = 1
|
||||
self._view:GetChild("btn_retrieve").visible = false
|
||||
self._view:GetChild("btn_close").visible = true
|
||||
self._close_zone = true
|
||||
end
|
||||
|
||||
if self._data and self._data.only_password then
|
||||
ctr_retrieve.selectedIndex = 0
|
||||
self._view:GetChild('tex_phone').touchable = false
|
||||
self._view:GetChild('tex_phone').text = string.format("%s(%d)", self._data.nick, self._data.uid)
|
||||
self._view:GetChild("btn_retrieve").visible = false
|
||||
self._view:GetChild("btn_close").visible = true
|
||||
self._close_zone = true
|
||||
end
|
||||
end
|
||||
|
||||
function M:Destroy()
|
||||
BaseWindow.Destroy(self)
|
||||
end
|
||||
|
||||
--绑定
|
||||
function M:Bind()
|
||||
local tex_passwd = self._view:GetChild("tex_passwd")
|
||||
local password = tex_passwd.text
|
||||
if string.len(password) < 6 then
|
||||
ViewUtil.ShowTips("请输入5位以上的密码")
|
||||
return
|
||||
end
|
||||
local flg_xiaozimu = false
|
||||
local flg_dazimu = false
|
||||
local fla_shuzi = false
|
||||
for i = 1, #password do
|
||||
local oneChar = string.sub(password, i, i)
|
||||
print("lingmeng Bind", oneChar, string.byte(oneChar))
|
||||
if string.byte(oneChar) >= 65 and string.byte(oneChar) <= 90 then
|
||||
flg_dazimu = true
|
||||
elseif string.byte(oneChar) >= 97 and string.byte(oneChar) <= 122 then
|
||||
flg_xiaozimu = true
|
||||
elseif string.byte(oneChar) >= 48 and string.byte(oneChar) <= 57 then
|
||||
fla_shuzi = true
|
||||
end
|
||||
end
|
||||
if not (flg_xiaozimu or flg_dazimu) then
|
||||
ViewUtil.ShowTips("密码必须包含字母")
|
||||
return
|
||||
end
|
||||
|
||||
local _data = {}
|
||||
|
||||
ViewUtil.ShowModalWait(self._root_view, "正在提交...")
|
||||
_data.password = password
|
||||
self._callback(_data)
|
||||
self:Destroy()
|
||||
end
|
||||
|
||||
--找回账号
|
||||
function M:Retrieve()
|
||||
local tex_phone = self._view:GetChild("tex_phone")
|
||||
local text_id = tex_phone.text
|
||||
local tex_passwd = self._view:GetChild("tex_passwd")
|
||||
local password = tex_passwd.text
|
||||
|
||||
local _data = {}
|
||||
|
||||
ViewUtil.ShowModalWait(self._root_view, "正在提交...")
|
||||
local loddyctr = ControllerManager.GetController(LoddyController)
|
||||
_data.password = password
|
||||
_data.id = tonumber(text_id)
|
||||
|
||||
loddyctr:RetrievePassword(_data, function(res)
|
||||
ViewUtil.CloseModalWait()
|
||||
if res.ReturnCode == 0 then
|
||||
PlayerPrefs.DeleteKey('session_id')
|
||||
ViewUtil.CloseModalWait()
|
||||
local _curren_msg = MsgWindow.new(self._root_view, "您的账号已经切换,请重新登录", MsgWindow.MsgMode.OnlyOk, nil, nil,
|
||||
{ closeZone = true })
|
||||
_curren_msg.onOk:Add(
|
||||
function()
|
||||
Application.Quit()
|
||||
end
|
||||
)
|
||||
_curren_msg:Show()
|
||||
else
|
||||
ViewUtil.ErrorTip(res.ReturnCode, "找回账号失败,请联系客服人员")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -7,6 +7,7 @@ local GroupSetTagView = import("../GroupSetTagView")
|
|||
local GroupSetMemberInfoDiaoduView = import('.GroupSetMemberInfoDiaoduView')
|
||||
local GroupPartnerBanPlaysView = import(".GroupPartnerBanPlaysView")
|
||||
local GroupPartnerRewardsView = import(".GroupPartnerRewardsView")
|
||||
local GourpIDPasswordAlone = import(".GourpIDPasswordAlone")
|
||||
|
||||
|
||||
-- 牌友圈成员体力值记录
|
||||
|
|
@ -497,7 +498,28 @@ function M:init(url)
|
|||
local btn_password = lst_mng:AddItemFromPool()
|
||||
btn_password.icon = "ui://NewGroup/mng_psw"
|
||||
btn_password.onClick:Set(function()
|
||||
|
||||
local data = {}
|
||||
data.only_password = true
|
||||
data.uid = member.uid
|
||||
data.nick = member.nick
|
||||
local IDPasswordAlone = GourpIDPasswordAlone.new(data, function(_data)
|
||||
fgCtr:FG_Reset_Password(self.group_id, member.uid, _data.password, function(res)
|
||||
ViewUtil.CloseModalWait()
|
||||
if self._is_destroy then
|
||||
return
|
||||
end
|
||||
if res.ReturnCode ~= 0 then
|
||||
ViewUtil.ErrorTip(res.ReturnCode, "修改密码失败")
|
||||
else
|
||||
ViewUtil.ErrorTip(res.ReturnCode, "修改密码成功")
|
||||
self:Destroy()
|
||||
if self.callBack1 then
|
||||
self.callBack1()
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
IDPasswordAlone:Show()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -22,7 +22,8 @@ public class PlatformAndroid :MonoBehaviour
|
|||
//Debug.LogError("初始化安卓==========");
|
||||
_player = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
|
||||
_activity = _player.GetStatic<AndroidJavaObject>("currentActivity");
|
||||
// Debug.LogError("===============");
|
||||
_activity.Call("__setapk", "wx5061040d45303a27");
|
||||
// Debug.LogError("===============");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ PlayerSettings:
|
|||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_ShowUnitySplashScreen: 0
|
||||
m_ShowUnitySplashScreen: 1
|
||||
m_ShowUnitySplashLogo: 1
|
||||
m_SplashScreenOverlayOpacity: 0
|
||||
m_SplashScreenAnimation: 2
|
||||
|
|
@ -252,7 +252,7 @@ PlayerSettings:
|
|||
clonedFromGUID: 00000000000000000000000000000000
|
||||
templatePackageId:
|
||||
templateDefaultScene:
|
||||
AndroidTargetArchitectures: 2
|
||||
AndroidTargetArchitectures: 1
|
||||
AndroidSplashScreenScale: 2
|
||||
androidSplashScreen: {fileID: 2800000, guid: 2baa80d4813f638468d8464d3f57c870, type: 3}
|
||||
AndroidKeystoreName: '{inproject}: smn.keystore'
|
||||
|
|
@ -776,7 +776,7 @@ PlayerSettings:
|
|||
platformArchitecture:
|
||||
iPhone: 1
|
||||
scriptingBackend:
|
||||
Android: 1
|
||||
Android: 0
|
||||
Standalone: 1
|
||||
iPhone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue