fix: 修改 卡密兑换商品

This commit is contained in:
zhangds 2024-04-03 15:43:55 +08:00
parent 8b7c4b5783
commit d90f947c3b
2 changed files with 42 additions and 30 deletions

View File

@ -295,13 +295,19 @@
if (goodsDetail.available != 1) {
return this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
}
/* 卡密商品直接兑换 */
if (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2 && this.backAble) {
if (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2) {
/* 当只有一个卡密商品、为线上查看卡密且只能兑换一次时执行 */
if (!this.backAble && this.goodsDetail.restrict == 1) {
return this.surexchangeBtn();
} else {
this.maskshow = true;
this.popboxshow = true;
this.popboxtype = '兑换';
return;
}
}
/* 当只有一个卡密商品、为线上查看卡密且只能兑换一次时执行 */
if (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2 && !this.backAble && this.goodsDetail.restrict == 1) {

View File

@ -343,13 +343,19 @@
if (goodsDetail.available != 1) {
return this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
}
/* 卡密商品直接兑换 */
if (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2 && this.backAble) {
if (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2) {
/* 当只有一个卡密商品、为线上查看卡密且只能兑换一次时执行 */
if (!this.backAble && this.goodsDetail.restrict == 1) {
return this.surexchangeBtn();
} else {
this.maskshow = true;
this.popboxshow = true;
this.popboxtype = '兑换';
return;
}
}
/* 当只有一个卡密商品、为线上查看卡密且只能兑换一次时执行 */
if (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2 && !this.backAble && this.goodsDetail.restrict == 1) {