提交 f1131306 作者: 施汉文

合并分支 'release' 到 'master'

新增礼包类型

查看合并请求 !64
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
role_name: "", role_name: "",
role_id: "", role_id: "",
gift_package_id: "", gift_package_id: "",
recharge_total: undefined recharge_total: undefined,
}, },
loading: false, loading: false,
}; };
...@@ -189,7 +189,7 @@ export default { ...@@ -189,7 +189,7 @@ export default {
role_name: "", role_name: "",
role_id: "", role_id: "",
gift_package_id: "", gift_package_id: "",
recharge_total: undefined recharge_total: undefined,
}; };
}, },
computed: { computed: {
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
methods: { methods: {
initGiftCodeForm() { initGiftCodeForm() {
const username = this.bindGameUserList.find( const username = this.bindGameUserList.find(
(item) => item.member_id === this.accountSelect (item) => item.member_id === this.accountSelect,
).username; ).username;
this.giftCodeForm = { this.giftCodeForm = {
member_id: this.accountSelect, member_id: this.accountSelect,
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
role_name: "", role_name: "",
role_id: "", role_id: "",
gift_package_id: "", gift_package_id: "",
recharge_total: undefined recharge_total: undefined,
}; };
}, },
sendVipGift() { sendVipGift() {
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
handleFlowerLinkSuccess(url) { handleFlowerLinkSuccess(url) {
if (url) { if (url) {
this.sendChatMessage(url, "text"); this.sendChatMessage(url, "text");
this.$message.success('发送成功') this.$message.success("发送成功");
} }
}, },
// 发送举报申诉自助链接 // 发送举报申诉自助链接
...@@ -339,12 +339,12 @@ export default { ...@@ -339,12 +339,12 @@ export default {
}, },
// 确定提交 // 确定提交
getGiftCodeSubmit(form) { getGiftCodeSubmit(form) {
const { member_id, role_id, username, role_name ,recharge_total} = 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.giftCodeForm.recharge_total = recharge_total;
this.sendGameCode(); this.sendGameCode();
}, },
sendGameCodeCopyDialog(items) { sendGameCodeCopyDialog(items) {
...@@ -353,7 +353,7 @@ export default { ...@@ -353,7 +353,7 @@ export default {
this.game_name = items.name; this.game_name = items.name;
this.initGiftCodeForm(); this.initGiftCodeForm();
this.giftCodeForm.gift_package_id = items.id; this.giftCodeForm.gift_package_id = items.id;
if (items.package_type == 3) { if (items.package_type == 3 || items.package_type == 5) {
this.dialogVisible = true; this.dialogVisible = true;
} else { } else {
this.sendGameCode(); this.sendGameCode();
...@@ -379,9 +379,12 @@ export default { ...@@ -379,9 +379,12 @@ 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 则添加到请求参数中 表示是 角色礼包 // 如果存在 recharge_total 则添加到请求参数中 表示是 角色礼包
if (this.giftCodeForm.recharge_total !== undefined && this.giftCodeForm.recharge_total !== null) { if (
data.recharge_total = this.giftCodeForm.recharge_total 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) {
...@@ -390,13 +393,13 @@ export default { ...@@ -390,13 +393,13 @@ export default {
} else { } else {
this.$message.error(res.msg || "发送失败"); this.$message.error(res.msg || "发送失败");
} }
this.giftCodeForm.recharge_total = undefined this.giftCodeForm.recharge_total = undefined;
this.loading = false; this.loading = false;
}, },
handleAccount() { handleAccount() {
if (this.bindGameUserList.length > 0) { if (this.bindGameUserList.length > 0) {
const account = this.bindGameUserList.find( const account = this.bindGameUserList.find(
(item) => item.member_id == this.accountSelect (item) => item.member_id == this.accountSelect,
); );
if (account) { if (account) {
return true; return true;
...@@ -423,13 +426,13 @@ export default { ...@@ -423,13 +426,13 @@ export default {
} else { } else {
} }
const username = this.bindGameUserList.find( const username = this.bindGameUserList.find(
(item) => item.member_id == this.accountSelect (item) => item.member_id == this.accountSelect,
).username; ).username;
passwardEncryption({ member_id: this.accountSelect }) passwardEncryption({ member_id: this.accountSelect })
.then((res) => { .then((res) => {
this.sendChatMessage( this.sendChatMessage(
`${str}${item.url} \n账号:${username} \n密码:${res.data.password}`, `${str}${item.url} \n账号:${username} \n密码:${res.data.password}`,
"text" "text",
); );
}) })
.catch((err) => { .catch((err) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论