提交 854d7fbc 作者: 毛细亚

feat: 优化礼包码复制和发送功能

上级 984481d3
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div v-if="item.gift_package_group_name ">分组: {{ item.gift_package_group_name }}</div> <div v-if="item.gift_package_group_name ">分组: {{ item.gift_package_group_name }}</div>
<div>礼包名称: {{ item.gift_package_name }}</div> <div>礼包名称: {{ item.gift_package_name }}</div>
<div>发送时间: {{ item.send_time }}</div> <div>发送时间: {{ item.send_time }}</div>
<div>礼包码: {{ item.code }}</div> <div class="giftCodeText">{{ item.code }}</div>
<div>领取角色: <span v-if="item.role_name">{{ item.role_name }}</span> <span v-else>-</span> </div> <div>领取角色: <span v-if="item.role_name">{{ item.role_name }}</span> <span v-else>-</span> </div>
<div>W 账号: {{ item.username || '-' }}</div> <div>W 账号: {{ item.username || '-' }}</div>
<div class="rowFlex spaceBetween columnCenter gift-sender"> <div class="rowFlex spaceBetween columnCenter gift-sender">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<script> <script>
import { getRoleSendingCodeList } from '@/api/works' import { getRoleSendingCodeList } from '@/api/works'
import { debounce } from '@/utils/index' import { debounce,copyText, sendChatMessage} from '@/utils/index'
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
name: 'roleGift', name: 'roleGift',
...@@ -78,11 +78,9 @@ export default { ...@@ -78,11 +78,9 @@ export default {
} }
}, 500), }, 500),
handleCopy(code) { handleCopy(code) {
this.$copyText(code).then(() => { console.log(code, 'code')
this.$message.success('复制成功') copyText('giftCodeText', this)
}).catch(() => { sendChatMessage(code, 'text')
this.$message.error('复制失败')
})
} }
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div v-if="item.gift_package_group_name">分组: {{ item.gift_package_group_name }}</div> <div v-if="item.gift_package_group_name">分组: {{ item.gift_package_group_name }}</div>
<div>礼包名称: {{ item.gift_package_name }}</div> <div>礼包名称: {{ item.gift_package_name }}</div>
<div>发送时间: {{ item.send_time }}</div> <div>发送时间: {{ item.send_time }}</div>
<div>礼包码: {{ item.code }}</div> <div class="giftCodeText">礼包码: {{ item.code }}</div>
<div>领取角色: <span v-if="item.role_name && item.role_name != 0">{{ item.role_name }}</span> <span <div>领取角色: <span v-if="item.role_name && item.role_name != 0">{{ item.role_name }}</span> <span
v-else>-</span> v-else>-</span>
</div> </div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论