!130 修复 仅绑定星铁时 `*删除ck` 报错:删除失败,当前的UID无CK信息
* 修复 仅绑定星铁时 `*删除ck` 报错:删除失败,当前的UID无CK信息 * update plugins/genshin/model/user.js. * update
This commit is contained in:
parent
27737dfe0d
commit
1c374e9d77
|
@ -34,7 +34,7 @@ export class user extends plugin {
|
||||||
fnc: 'myCk'
|
fnc: 'myCk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#?删除(ck|cookie)$',
|
reg: '^#?(原神|星铁)?删除(ck|cookie)$',
|
||||||
fnc: 'delCk'
|
fnc: 'delCk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -140,6 +140,7 @@ export default class User extends base {
|
||||||
msg.push(
|
msg.push(
|
||||||
'星穹铁道支持:',
|
'星穹铁道支持:',
|
||||||
'【*uid】当前绑定ck uid列表',
|
'【*uid】当前绑定ck uid列表',
|
||||||
|
'【*删除ck】删除当前绑定ck',
|
||||||
'【*体力】体力信息',
|
'【*体力】体力信息',
|
||||||
'【*面板】【*更新面板】面板信息'
|
'【*面板】【*更新面板】面板信息'
|
||||||
)
|
)
|
||||||
|
@ -150,9 +151,16 @@ export default class User extends base {
|
||||||
|
|
||||||
/** 删除绑定ck */
|
/** 删除绑定ck */
|
||||||
async delCk () {
|
async delCk () {
|
||||||
|
let game;
|
||||||
|
if (this.e.game) {
|
||||||
|
game = this.e.game;
|
||||||
|
} else {
|
||||||
|
game = 'gs';
|
||||||
|
}
|
||||||
|
//判断是原神还是星铁
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
// 获取当前uid
|
// 获取当前uid
|
||||||
let uidData = user.getUidData('', this.e)
|
let uidData = user.getUidData('' , game=game, this.e)
|
||||||
if (!uidData || uidData.type !== 'ck' || !uidData.ltuid) {
|
if (!uidData || uidData.type !== 'ck' || !uidData.ltuid) {
|
||||||
return `删除失败:当前的UID${uidData?.uid}无CK信息`
|
return `删除失败:当前的UID${uidData?.uid}无CK信息`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue