Commit d85f3e84 by member

fix: 修改新增链接判断是否选中链接

parent 020b8e10
...@@ -791,11 +791,13 @@ export default { ...@@ -791,11 +791,13 @@ export default {
this.threeLevelVisible = true; this.threeLevelVisible = true;
this.threeLeveloneVisible = false; this.threeLeveloneVisible = false;
this.goodsTreeVisible = true; this.goodsTreeVisible = true;
this.cardUrl = null;
} else if (e == 'mall_customize_page') { // 自定义页面 } else if (e == 'mall_customize_page') { // 自定义页面
this.goodType = 11; this.goodType = 11;
this.threeLevelVisible = true; this.threeLevelVisible = true;
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
this.goodsTreeVisible = false; this.goodsTreeVisible = false;
this.pageId = null;
} else { } else {
this.threeLevelVisible = true; this.threeLevelVisible = true;
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
...@@ -1644,8 +1646,15 @@ export default { ...@@ -1644,8 +1646,15 @@ export default {
mallProTagId: this.cardUrl, mallProTagId: this.cardUrl,
name: this.tagName name: this.tagName
}; };
if (this.cardUrl) {
this.transData(); this.transData();
return; } else {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
}
return false;
} else if (this.goodType == 11) { } else if (this.goodType == 11) {
this.selectLinkObj.name = '商城自定义页面/' + this.pageName; this.selectLinkObj.name = '商城自定义页面/' + this.pageName;
this.selectLinkObj.id = this.linkId; this.selectLinkObj.id = this.linkId;
...@@ -1653,17 +1662,25 @@ export default { ...@@ -1653,17 +1662,25 @@ export default {
pageId: this.pageId, pageId: this.pageId,
name: this.pageName name: this.pageName
}; };
if (this.pageId) {
this.transData(); this.transData();
return; } else {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
}
return false;
}
if (!this.twoLevelValue) {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
} }
} }
// 如果门店签到 // 如果门店签到
console.log("门店签到:",that.twoLevelSelectValue)
// console.log(that.checkTwoLevel(that.twoLevelSelectValue))
if(that.twoLevelSelectValue == 'sign'){ if(that.twoLevelSelectValue == 'sign'){
// console.log("///////",that.checkTwoLevel(that.twoLevelSelectValue))
if(!that.checkTwoLevel(that.twoLevelSelectValue)){ if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false; return false;
} }
...@@ -1676,11 +1693,11 @@ export default { ...@@ -1676,11 +1693,11 @@ export default {
} }
return false; return false;
} }
if (!!that.selectLinkObj.name && !!that.selectLinkObj.id) { if (!!this.selectLinkObj.name && !!this.selectLinkObj.id) {
// 触发父组件方法,传递参数 // 触发父组件方法,传递参数
that.transData(); this.transData();
} else { } else {
that.$message.error({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择链接" message: "请选择链接"
}) })
...@@ -1689,7 +1706,6 @@ export default { ...@@ -1689,7 +1706,6 @@ export default {
}, },
getMallId(item) { getMallId(item) {
console.log(item);
this.tagName = item.tagName; this.tagName = item.tagName;
this.cardUrl = item.mallProTagId; this.cardUrl = item.mallProTagId;
}, },
...@@ -1883,8 +1899,6 @@ export default { ...@@ -1883,8 +1899,6 @@ export default {
}) })
}) })
.catch(function (error) { .catch(function (error) {
console.log(error);
// that.toLogin()
that.$message.error({ that.$message.error({
duration: 1000, duration: 1000,
message: error.message message: error.message
......
...@@ -761,11 +761,13 @@ export default { ...@@ -761,11 +761,13 @@ export default {
this.threeLevelVisible = true; this.threeLevelVisible = true;
this.threeLeveloneVisible = false; this.threeLeveloneVisible = false;
this.goodsTreeVisible = true; this.goodsTreeVisible = true;
this.cardUrl = null;
} else if (e == 'mall_customize_page') { // 自定义页面 } else if (e == 'mall_customize_page') { // 自定义页面
this.goodType = 11; this.goodType = 11;
this.threeLevelVisible = true; this.threeLevelVisible = true;
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
this.goodsTreeVisible = false; this.goodsTreeVisible = false;
this.pageId = null;
} else { } else {
this.threeLevelVisible = true; this.threeLevelVisible = true;
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
...@@ -1614,8 +1616,15 @@ export default { ...@@ -1614,8 +1616,15 @@ export default {
mallProTagId: this.cardUrl, mallProTagId: this.cardUrl,
name: this.tagName name: this.tagName
}; };
if (this.cardUrl) {
this.transData(); this.transData();
return; } else {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
}
return false;
} else if (this.goodType == 11) { } else if (this.goodType == 11) {
this.selectLinkObj.name = '商城自定义页面/' + this.pageName; this.selectLinkObj.name = '商城自定义页面/' + this.pageName;
this.selectLinkObj.id = this.linkId; this.selectLinkObj.id = this.linkId;
...@@ -1623,17 +1632,25 @@ export default { ...@@ -1623,17 +1632,25 @@ export default {
pageId: this.pageId, pageId: this.pageId,
name: this.pageName name: this.pageName
}; };
if (this.pageId) {
this.transData(); this.transData();
return; } else {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
}
return false;
}
if (!this.twoLevelValue) {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
} }
} }
// 如果门店签到 // 如果门店签到
console.log("门店签到:",that.twoLevelSelectValue)
// console.log(that.checkTwoLevel(that.twoLevelSelectValue))
if(that.twoLevelSelectValue == 'sign'){ if(that.twoLevelSelectValue == 'sign'){
// console.log("///////",that.checkTwoLevel(that.twoLevelSelectValue))
if(!that.checkTwoLevel(that.twoLevelSelectValue)){ if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false; return false;
} }
...@@ -1646,11 +1663,11 @@ export default { ...@@ -1646,11 +1663,11 @@ export default {
} }
return false; return false;
} }
if (!!that.selectLinkObj.name && !!that.selectLinkObj.id) { if (!!this.selectLinkObj.name && !!this.selectLinkObj.id) {
// 触发父组件方法,传递参数 // 触发父组件方法,传递参数
that.transData(); this.transData();
} else { } else {
that.$message.error({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择链接" message: "请选择链接"
}) })
...@@ -1659,7 +1676,6 @@ export default { ...@@ -1659,7 +1676,6 @@ export default {
}, },
getMallId(item) { getMallId(item) {
console.log(item);
this.tagName = item.tagName; this.tagName = item.tagName;
this.cardUrl = item.mallProTagId; this.cardUrl = item.mallProTagId;
}, },
...@@ -1853,8 +1869,6 @@ export default { ...@@ -1853,8 +1869,6 @@ export default {
}) })
}) })
.catch(function (error) { .catch(function (error) {
console.log(error);
// that.toLogin()
that.$message.error({ that.$message.error({
duration: 1000, duration: 1000,
message: error.message message: error.message
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment