提交 60d6d02b 作者: 毛细亚

合并分支 'release' 到 'master'

更新侧边栏发送游戏

查看合并请求 !60
<!-- <!--
* @Author: maoxiya 937667504@qq.com * @Author: maoxiya 937667504@qq.com
* @Date: 2025-08-28 15:59:46 * @Date: 2025-08-28 15:59:46
* @LastEditors: maoxiya 937667504@qq.com * @LastEditors: 金多虾 937667504@qq.com
* @LastEditTime: 2025-09-02 09:51:24 * @LastEditTime: 2026-01-13 10:21:28
* @FilePath: /company_wx_frontend/src/views/works/component/chat/giftCodeDialog.vue * @FilePath: /company_wx_frontend/src/views/works/component/chat/giftCodeDialog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -54,6 +54,7 @@ export default { ...@@ -54,6 +54,7 @@ export default {
member_id: '', member_id: '',
username: '', username: '',
role_id: '', role_id: '',
recharge_total: 0,
role_name: '', role_name: '',
}, },
rules: { rules: {
...@@ -81,13 +82,14 @@ export default { ...@@ -81,13 +82,14 @@ export default {
handleMemberIdChange(value) { handleMemberIdChange(value) {
this.form.role_id = '' this.form.role_id = ''
this.form.role_name = '' this.form.role_name = ''
this.form.recharge_total = 0
const userInfo = this.bindGameUserList.find(item => item.value === value) const userInfo = this.bindGameUserList.find(item => item.value === value)
this.form.username = userInfo.label || userInfo.username this.form.username = userInfo.label || userInfo.username
this.form.member_id = value this.form.member_id = value
}, },
handleSelectionChange(roleInfo) { handleSelectionChange(roleInfo) {
console.log(roleInfo, 'roleInfo')
this.form.role_name = roleInfo.label || '' this.form.role_name = roleInfo.label || ''
this.form.recharge_total = roleInfo.recharge_total || 0
}, },
closeDialog() { closeDialog() {
this.$emit('update:dialogVisible', false) this.$emit('update:dialogVisible', false)
......
...@@ -170,6 +170,7 @@ export default { ...@@ -170,6 +170,7 @@ export default {
role_name: "", role_name: "",
role_id: "", role_id: "",
gift_package_id: "", gift_package_id: "",
recharge_total: undefined
}, },
loading: false, loading: false,
}; };
...@@ -188,6 +189,7 @@ export default { ...@@ -188,6 +189,7 @@ export default {
role_name: "", role_name: "",
role_id: "", role_id: "",
gift_package_id: "", gift_package_id: "",
recharge_total: undefined
}; };
}, },
computed: { computed: {
...@@ -215,6 +217,7 @@ export default { ...@@ -215,6 +217,7 @@ export default {
role_name: "", role_name: "",
role_id: "", role_id: "",
gift_package_id: "", gift_package_id: "",
recharge_total: undefined
}; };
}, },
sendVipGift() { sendVipGift() {
...@@ -336,11 +339,12 @@ export default { ...@@ -336,11 +339,12 @@ export default {
}, },
// 确定提交 // 确定提交
getGiftCodeSubmit(form) { getGiftCodeSubmit(form) {
const { member_id, role_id, username, role_name } = form; const { member_id, role_id, username, role_name ,recharge_total} = form;
this.giftCodeForm.username = username; this.giftCodeForm.username = username;
this.giftCodeForm.role_name = role_name; this.giftCodeForm.role_name = role_name;
this.giftCodeForm.member_id = member_id; this.giftCodeForm.member_id = member_id;
this.giftCodeForm.role_id = role_id; this.giftCodeForm.role_id = role_id;
this.giftCodeForm.recharge_total = recharge_total
this.sendGameCode(); this.sendGameCode();
}, },
sendGameCodeCopyDialog(items) { sendGameCodeCopyDialog(items) {
...@@ -375,6 +379,10 @@ export default { ...@@ -375,6 +379,10 @@ export default {
gift_package_id: this.giftCodeForm.gift_package_id, gift_package_id: this.giftCodeForm.gift_package_id,
user_type: 3, user_type: 3,
}; };
// 如果存在 recharge_total 则添加到请求参数中 表示是 角色礼包
if (this.giftCodeForm.recharge_total !== undefined && this.giftCodeForm.recharge_total !== null) {
data.recharge_total = this.giftCodeForm.recharge_total
}
const res = await sendGiftCode(data); const res = await sendGiftCode(data);
if (res.status_code === 1) { if (res.status_code === 1) {
this.$message.success("发送成功"); this.$message.success("发送成功");
...@@ -382,6 +390,7 @@ export default { ...@@ -382,6 +390,7 @@ export default {
} else { } else {
this.$message.error(res.msg || "发送失败"); this.$message.error(res.msg || "发送失败");
} }
this.giftCodeForm.recharge_total = undefined
this.loading = false; this.loading = false;
}, },
handleAccount() { handleAccount() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论