提交 8f9d5842 作者: 毛细亚

bug 修改完成

上级 ed464ba7
<template> <template>
<!-- 开发模式触发区域 - 隐藏的点击区域 --> <!-- 开发模式触发区域 - 隐藏的点击区域 -->
<div class="debug-container"> <div class="debug-container">
<div class="dev-mode-trigger" @click="handleDevModeClick" title="开发模式触发区域"></div> <div class="dev-mode-console" @click="handleDevModeClick" title="开发模式触发区域"></div>
<div class="dev-mode-cookie" @click="cleanCookie" title="清除所有 cookie"></div> <div class="dev-mode-cookie" @click="cleanCookie" title="连续点击7次清除所有 cookie"></div>
</div> </div>
</template> </template>
<script> <script>
import devModeManager from '@/utils/devMode' import devModeManager from '@/utils/devMode'
import Cookies from 'js-cookie'
export default { export default {
name: 'Debug', name: 'Debug',
methods: { methods: {
...@@ -16,14 +15,8 @@ export default { ...@@ -16,14 +15,8 @@ export default {
devModeManager.handleClick() devModeManager.handleClick()
}, },
cleanCookie() { cleanCookie() {
// 清除所有 cookie // 调用 devModeManager 中的 handleCookieClearClick 方法
Cookies.remove('token') devModeManager.handleCookieClearClick()
Cookies.remove('userid')
Cookies.remove('corp_id')
Cookies.remove('cser_id')
Cookies.remove('accountSelect')
Cookies.remove('signData')
this.$message.success('清除所有 cookie 成功')
} }
} }
} }
...@@ -31,17 +24,22 @@ export default { ...@@ -31,17 +24,22 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.debug-container{ .debug-container{
width: 100%; width: 100%;
height: 5px; height: 50px;
position: absolute; position: absolute;
top: 0; bottom: 0;
left: 0; left: 0;
z-index: 999; z-index: 999;
} }
/* 开发模式触发区域 */ /* 开发模式触发区域 */
.dev-mode-trigger { .dev-mode-console {
position: absolute; width: 50px;
top: 0px; height: 20px;
left: 0px; background: transparent;
cursor: pointer;
z-index: 999;
user-select: none;
}
.dev-mode-cookie {
width: 50px; width: 50px;
height: 20px; height: 20px;
background: transparent; background: transparent;
...@@ -51,17 +49,11 @@ export default { ...@@ -51,17 +49,11 @@ export default {
} }
/* 开发环境下显示边框提示 */ /* 开发环境下显示边框提示 */
.dev-mode-trigger:hover { .dev-mode-console:hover {
background: rgba(0, 191, 138, 0.1); background: rgba(0, 191, 138, 0.1);
border-radius: 4px; border-radius: 4px;
} }
.dev-mode-cookie{
position: absolute;
top: 0px;
right: 0px;
width: 50px;
height: 20px;
}
.dev-mode-cookie:hover { .dev-mode-cookie:hover {
background: rgba(138, 2, 162, 0.1); background: rgba(138, 2, 162, 0.1);
border-radius: 4px; border-radius: 4px;
......
<template>
<div class="loading rowFlex allCenter">
<svg-icon icon-class="loading" class="loadingIcon" />
<p class="text">加载中</p>
</div>
</template>
<script>
export default {
data() {
return {
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.loading{
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 0;
.loadingIcon{
font-size: 24px;
animation: rotage linear 1s infinite;
}
.text{
color: #00bf8a;
font-size: 14px;
margin-left: 5px;
}
}
@keyframes rotage {
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}
</style>
\ No newline at end of file
...@@ -699,30 +699,12 @@ li { ...@@ -699,30 +699,12 @@ li {
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
p { p {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
margin: 0; margin: 0;
flex: 1; flex: 1;
} }
.el-button {
background: #3491FA;
border-color: #3491FA;
color: #fff;
&:hover {
background: #5BA8FC;
border-color: #5BA8FC;
}
&:disabled {
background: #f5f5f5;
border-color: #d9d9d9;
color: #bfbfbf;
}
}
} }
} }
} }
......
...@@ -43,7 +43,7 @@ class DevModeManager { ...@@ -43,7 +43,7 @@ class DevModeManager {
} }
} }
// 处理点击事件 // 处理点击事件 - 切换开发模式
handleClick() { handleClick() {
// 如果正在销毁VConsole,忽略点击事件 // 如果正在销毁VConsole,忽略点击事件
if (this.isDestroyingVConsole) { if (this.isDestroyingVConsole) {
...@@ -75,6 +75,66 @@ class DevModeManager { ...@@ -75,6 +75,66 @@ class DevModeManager {
}, this.resetTime) }, this.resetTime)
} }
// 新增:处理点击事件 - 清除cookie
handleCookieClearClick() {
// 初始化计数器变量和定时器
if (this.cookieClickCount === undefined) {
this.cookieClickCount = 0
this.cookieClickTimer = null
}
this.cookieClickCount++
console.log(`清除Cookie激活进度: ${this.cookieClickCount}/${this.maxClicks}`)
// 清除之前的定时器
if (this.cookieClickTimer) {
clearTimeout(this.cookieClickTimer)
}
// 如果达到指定次数,清除所有cookie
if (this.cookieClickCount >= this.maxClicks) {
this.clearAllCookies()
this.resetCookieClickCount()
return
}
// 设置重置定时器
this.cookieClickTimer = setTimeout(() => {
if (this.cookieClickCount > 0) {
console.log('清除Cookie激活超时,重置计数')
this.resetCookieClickCount()
}
}, this.resetTime)
}
// 新增:清除所有cookie
clearAllCookies() {
try {
const cookies = document.cookie.split(';')
for (let i = 0; i < cookies.length; i++) {
const cookie = cookies[i]
const eqPos = cookie.indexOf('=')
const name = eqPos > -1 ? cookie.substr(0, eqPos).trim() : cookie.trim()
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/'
}
console.log('🍪 已清除所有 cookie')
alert('已清除所有 cookie')
} catch (error) {
console.error('清除 cookie 失败:', error)
}
}
// 新增:重置cookie点击计数
resetCookieClickCount() {
this.cookieClickCount = 0
if (this.cookieClickTimer) {
clearTimeout(this.cookieClickTimer)
this.cookieClickTimer = null
}
}
// 重置点击计数 // 重置点击计数
resetClickCount() { resetClickCount() {
this.clickCount = 0 this.clickCount = 0
...@@ -174,6 +234,7 @@ class DevModeManager { ...@@ -174,6 +234,7 @@ class DevModeManager {
enabled: this.isDevMode, enabled: this.isDevMode,
environment: process.env.NODE_ENV, environment: process.env.NODE_ENV,
clickCount: this.clickCount, clickCount: this.clickCount,
cookieClickCount: this.cookieClickCount || 0,
maxClicks: this.maxClicks, maxClicks: this.maxClicks,
hasVConsole: !!this.vConsole, hasVConsole: !!this.vConsole,
isDestroyingVConsole: this.isDestroyingVConsole isDestroyingVConsole: this.isDestroyingVConsole
...@@ -183,6 +244,7 @@ class DevModeManager { ...@@ -183,6 +244,7 @@ class DevModeManager {
// 安全销毁方法 // 安全销毁方法
destroy() { destroy() {
this.resetClickCount() this.resetClickCount()
this.resetCookieClickCount()
this.disableDevMode() this.disableDevMode()
} }
} }
...@@ -198,6 +260,7 @@ if (typeof window !== 'undefined') { ...@@ -198,6 +260,7 @@ if (typeof window !== 'undefined') {
disable: () => devModeManager.disableDevMode(), disable: () => devModeManager.disableDevMode(),
status: () => devModeManager.getDevModeStatus(), status: () => devModeManager.getDevModeStatus(),
reset: () => devModeManager.resetClickCount(), reset: () => devModeManager.resetClickCount(),
clearCookies: () => devModeManager.clearAllCookies(),
destroy: () => devModeManager.destroy() destroy: () => devModeManager.destroy()
} }
......
...@@ -185,7 +185,7 @@ export default { ...@@ -185,7 +185,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("game", ["accountSelect", "gameTabActive"]), ...mapState("game", ["accountSelect"]),
}, },
mounted() { mounted() {
this.requestViolationList() this.requestViolationList()
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
@click="terminaProcess(item, index)" @click="terminaProcess(item, index)"
> >
<div class="terminaItem rowFlex spaceBetween columnCenter"> <div class="terminaItem rowFlex spaceBetween columnCenter">
<!-- <i :class=" item.showStep?'el-icon-bottom':'el-icon-right'"></i> --> <i :class=" item.showStep?'el-icon-arrow-down':'el-icon-arrow-right'" class="svgicon"></i>
<div class="terminaItemLeft"> <div class="terminaItemLeft">
<p><span class="label">新区角色:</span><span class="value">{{ item.role_name }}({{ item.server_name }})</span></p> <p><span class="label">新区角色:</span><span class="value">{{ item.role_name }}({{ item.server_name }})</span></p>
<p><span class="label">老区角色:</span><span class="value">{{ item.old_role_name }} ({{ item.old_server_name }}) </span></p> <p><span class="label">老区角色:</span><span class="value">{{ item.old_role_name }} ({{ item.old_server_name }}) </span></p>
...@@ -529,7 +529,7 @@ export default { ...@@ -529,7 +529,7 @@ export default {
width: calc(100% - 20px); width: calc(100% - 20px);
margin-left: 10px; margin-left: 10px;
position: relative; position: relative;
.el-icon-right,.el-icon-down{ .svgicon{
position: absolute; position: absolute;
bottom: 12px; bottom: 12px;
right: 2px; right: 2px;
......
...@@ -493,11 +493,9 @@ export default { ...@@ -493,11 +493,9 @@ export default {
this.handleClose() this.handleClose()
} else { } else {
this.loading = false this.loading = false
this.$message.error(res.message || '提交失败')
} }
} catch (error) { } catch (error) {
console.error('提交失败:', error) console.error('提交失败:', error)
this.$message.error('提交失败: ' + (error.message || '未知错误'))
this.loading = false this.loading = false
} finally { } finally {
this.loading = false this.loading = false
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
props: ['show', 'width', 'title', 'info'], props: ['show', 'width', 'title', 'info'],
computed: { computed: {
...mapState('game', ['accountSelect']), ...mapState('game', ['accountSelect']),
...mapState('user', [ 'cser_name','cser_id']) ...mapState('user', [ 'cser_name','cser_id','userInfo'])
}, },
data() { data() {
return { return {
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
} }
}, },
mounted() { mounted() {
console.log(this.info, 'info')
// this.gameMemberView() // this.gameMemberView()
this.searchHandleStatus() this.searchHandleStatus()
if (this.info) { if (this.info) {
...@@ -356,6 +357,7 @@ ...@@ -356,6 +357,7 @@
}) })
}, },
async submitForm() { async submitForm() {
console.log(this.info, 'info')
try { try {
let res = {} let res = {}
if (this.info && this.info.role_id) { if (this.info && this.info.role_id) {
......
...@@ -139,12 +139,12 @@ export default { ...@@ -139,12 +139,12 @@ export default {
} }
}, },
computed: { computed: {
...mapState('game', ['accountSelect', 'gameTabActive']), ...mapState('game', ['accountSelect']),
...mapState('user', ['isGameSystem', 'userInfo']) ...mapState('user', ['userInfo'])
}, },
watch: { watch: {
accountSelect(newVal, oldVal) { accountSelect(newVal, oldVal) {
if (newVal && newVal !== '' && this.gameTabActive == 9) { if (newVal && newVal !== '') {
this.pageInfo = { this.pageInfo = {
page: 0, page: 0,
page_size: 20, page_size: 20,
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
:model="formData" :model="formData"
:rules="rules" :rules="rules"
ref="formData" ref="formData"
label-position="top"
label-width="100px" label-width="100px"
> >
<el-form-item <el-form-item
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="vipToolsContent"> <div class="vipToolsContent">
<div class="gameList"> <div class="gameList">
<!-- VIP 自助工具 --> <!-- VIP 自助工具 -->
<div class="gameListItem rowFlex columnCenter spaceBetween"> <div class="gameListItem rowFlex columnCenter spaceBetween" v-if="false">
<p class="rowFlex columnCenter"> <p class="rowFlex columnCenter">
<img src="@/assets/icon/vipIcon.svg" alt="vipIcon" style="width: 16px;height: 16px;margin-right: 5px;"> <img src="@/assets/icon/vipIcon.svg" alt="vipIcon" style="width: 16px;height: 16px;margin-right: 5px;">
VIP自助工具</p> VIP自助工具</p>
...@@ -74,11 +74,13 @@ ...@@ -74,11 +74,13 @@
slot="reference" slot="reference"
type="text" type="text"
size="medium" size="medium"
style="margin-right: 10px;"
>礼包内容</el-button> >礼包内容</el-button>
</el-popover> </el-popover>
</p> </p>
<el-button <el-button
size="mini" size="mini"
type="primary"
@click="sendGameCode(items)" @click="sendGameCode(items)"
>发送礼包码</el-button> >发送礼包码</el-button>
</div> </div>
......
...@@ -28,18 +28,18 @@ ...@@ -28,18 +28,18 @@
<div class="rowFlex titleFixed columnCenter"> <div class="rowFlex titleFixed columnCenter">
<div class="num">{{ items.message.attachments.length > 1 ? `+${items.message.attachments.length - 1}条` : '' }}</div> <div class="num">{{ items.message.attachments.length > 1 ? `+${items.message.attachments.length - 1}条` : '' }}</div>
<!-- <el-button class="button rowFlex allCenter" :disabled="Boolean(setIntervalTimer)" @click.stop="sendMessage(items.message.attachments, items._id)">发送</el-button> -->
</div> </div>
<el-collapse-item title="" :name="items._id" class="contentItem"> <el-collapse-item title="" :name="items._id" class="contentItem">
<div v-for="(i, j) in items.message.attachments" :key="j"> <div v-for="(i, j) in items.message.attachments" :key="j">
<div> <div>
<div v-if="i.msgtype == 'text'" class="contentItemDetails rowFlex spaceBetween columnCenter"> <div v-if="i.msgtype == 'text'" class="contentItemDetails rowFlex spaceBetween columnCenter">
<div class="text">{{ i.text.content }}</div> <div class="text">{{ i.text.content }}</div>
<el-button class="sendButton rowFlex allCenter" :disabled="Boolean(setIntervalTimer)" @click.stop="sendMessageEdit(i, items._id)">发送</el-button> <el-button class="sendButton rowFlex allCenter" @click.stop="sendMessageEdit(i, items._id)">发送</el-button>
</div> </div>
<div v-if="i.msgtype == 'image'" class="contentItemDetails rowFlex spaceBetween columnCenter"> <div v-if="i.msgtype == 'image'" class="contentItemDetails rowFlex spaceBetween columnCenter">
<el-image class="image" :src="i.image.picurl" :preview-src-list="[i.image.picurl]" fit="contain"></el-image> <el-image class="image" :src="i.image.picurl" :preview-src-list="[i.image.picurl]" fit="contain"></el-image>
<el-button class="sendButton rowFlex allCenter" :disabled="Boolean(setIntervalTimer)" @click.stop="sendMessageEdit(i, items._id)">发送</el-button> <el-button class="sendButton rowFlex allCenter" @click.stop="sendMessageEdit(i, items._id)">发送</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -101,12 +101,11 @@ export default { ...@@ -101,12 +101,11 @@ export default {
} }
}, },
computed: { computed: {
...mapState('game', ['accountSelect', 'gameTabActive']), ...mapState('game', ['accountSelect']),
...mapState('user', ['setIntervalTimer'])
}, },
watch: { watch: {
accountSelect(newVal, oldVal) { accountSelect(newVal, oldVal) {
if (newVal && newVal !== '' && this.gameTabActive == 3) { if (newVal && newVal !== '') {
this.pageInfo = { this.pageInfo = {
page: 1, page: 1,
page_size: 100, page_size: 100,
...@@ -125,13 +124,6 @@ export default { ...@@ -125,13 +124,6 @@ export default {
// this.requestGroup() // this.requestGroup()
}, },
methods: { methods: {
...mapMutations('common', ['set_sendSkillMessage', 'set_isEditSkill']),
sendMessage: throttle(function(item, id) {
if (!this.setIntervalTimer) {
this.set_sendSkillMessage(item)
this.skillQuote(id, item.length)
}
}, 500),
handleDragStart(e, item, index) { handleDragStart(e, item, index) {
this.sortID._id = item._id this.sortID._id = item._id
this.dragging = item this.dragging = item
......
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
}, },
watch: { watch: {
accountSelect(newVal, oldVal) { accountSelect(newVal, oldVal) {
if (newVal && newVal !== '' && this.gameTabActive == 3) { if (newVal && newVal !== '') {
this.pageInfo = { this.pageInfo = {
page: 1, page: 1,
page_size: 20, page_size: 20,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论