#绑定uid适配3*

This commit is contained in:
Rrrrrrray 2024-01-15 18:21:19 +08:00
parent 522e160546
commit 6d8a74e6ef
4 changed files with 6 additions and 6 deletions

View File

@ -95,7 +95,7 @@ export class user extends plugin {
/** 绑定uid */ /** 绑定uid */
saveUid () { saveUid () {
if (!this.e.msg) return if (!this.e.msg) return
let uid = this.e.msg.match(/[1|2|5-9][0-9]{8}/g) let uid = this.e.msg.match(/[1|2|3|5-9][0-9]{8}/g)
if (!uid) { if (!uid) {
this.reply('uid输入错误', false, { at: true }) this.reply('uid输入错误', false, { at: true })
return return

View File

@ -179,7 +179,7 @@ class GsCfg {
* @return uid 游戏uid * @return uid 游戏uid
*/ */
getRole (msg, filterMsg = '', isSr = false) { getRole (msg, filterMsg = '', isSr = false) {
let alias = msg.replace(/#|老婆|老公|[1|2|5-9][0-9]{8}/g, '').trim() let alias = msg.replace(/#|老婆|老公|[1|2|3|5-9][0-9]{8}/g, '').trim()
if (filterMsg) { if (filterMsg) {
alias = alias.replace(new RegExp(filterMsg, 'g'), '').trim() alias = alias.replace(new RegExp(filterMsg, 'g'), '').trim()
} }
@ -260,7 +260,7 @@ class GsCfg {
// 仅供内部调用 // 仅供内部调用
_getRole (msg, filterMsg = '', isSr = false) { _getRole (msg, filterMsg = '', isSr = false) {
let alias = msg.replace(/#|老婆|老公|[1|2|5-9][0-9]{8}/g, '').trim() let alias = msg.replace(/#|老婆|老公|[1|2|3|5-9][0-9]{8}/g, '').trim()
if (filterMsg) { if (filterMsg) {
alias = alias.replace(new RegExp(filterMsg, 'g'), '').trim() alias = alias.replace(new RegExp(filterMsg, 'g'), '').trim()
} }

View File

@ -197,7 +197,7 @@ export default class User extends base {
/** 绑定uid若有ck的话优先使用ck-uid */ /** 绑定uid若有ck的话优先使用ck-uid */
async bingUid () { async bingUid () {
let uid = this.e.msg.match(/[1|2|5-9][0-9]{8}/g) let uid = this.e.msg.match(/[1|2|3|5-9][0-9]{8}/g)
if (!uid) return if (!uid) return
uid = uid[0] uid = uid[0]
let user = await this.user() let user = await this.user()

View File

@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="shortcut icon" href="#" /> <link rel="shortcut icon" href="#" />
<link rel="stylesheet" type="text/css" href="{{pluResPath}}html/mysNews/mysNews.css"/> <link rel="stylesheet" type="text/css" href="{{pluResPath}}html/mysNews/mysNews.css"/>
<link rel="preload" href="{{pluResPath}}script/qrcode.min.js" as="script"/> <link rel="preload" href="{{pluResPath.replace('StarRail/', '')}}script/qrcode.min.js" as="script"/>
</head> </head>
<body> <body>
<svg style="display: none"> <svg style="display: none">
@ -123,7 +123,7 @@
<!-- <div class="logo">Created By Miao-Yunzai</div> --> <!-- <div class="logo">Created By Miao-Yunzai</div> -->
</div> </div>
</body> </body>
<script type="text/javascript" src="{{pluResPath}}script/qrcode.min.js"></script> <script type="text/javascript" src="{{pluResPath.replace('StarRail/', '')}}script/qrcode.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), { var qrcode = new QRCode(document.getElementById("qrcode"), {
text: "https://bbs.mihoyo.com/ys/article/{{data.post.post_id}}", // 内容可以是文字,链接,邮箱 text: "https://bbs.mihoyo.com/ys/article/{{data.post.post_id}}", // 内容可以是文字,链接,邮箱