Commit 40a2f3ee by member

链接小工具修复错误提示

parent a79f4a9c
...@@ -412,6 +412,7 @@ import GoodsTree from './goods-tree'; ...@@ -412,6 +412,7 @@ import GoodsTree from './goods-tree';
// import axios from 'axios' // import axios from 'axios'
import qs from 'qs'; import qs from 'qs';
import { setTimeout } from 'timers';
export default { export default {
name: 'links-tool', name: 'links-tool',
...@@ -1505,221 +1506,224 @@ export default { ...@@ -1505,221 +1506,224 @@ export default {
// 确认操作 // 确认操作
confirmLinkSelect() { confirmLinkSelect() {
var that = this setTimeout(_ => {
// 如果选择 h5 判断选择的链接 var that = this;
if (that.oneLevelTypeValue == 5) {
if (!that.h5linkObj.name.trim() || !that.h5linkObj.url.trim()) { // 如果选择 h5 判断选择的链接
that.$message.error({ if (that.oneLevelTypeValue == 5) {
duration: 1000, if (!that.h5linkObj.name.trim() || !that.h5linkObj.url.trim()) {
message: "请填写链接内容" that.$message.error({
}) duration: 1000,
message: "请填写链接内容"
})
return;
}
if (!!that.h5linkObj.share && that.h5linkObj.shareWebType == 1 && !that.h5linkObj.shareUrl) {
that.$message.error({
duration: 1000,
message: "请填写分享链接"
})
return;
}
that.selectLinkObj.conditionType = that.h5linkObj.conditionType;
that.selectLinkObj.name = that.h5linkObj.name;
that.selectLinkObj.url = that.h5linkObj.url;// +'?'+that.h5linkObj.fixParam+'&'+that.h5linkObj.dynamicPara;
// 去掉固定参数 20180912 that.h5linkObj.fixParam
that.selectLinkObj.params = '';
if (!!that.dynamicList.length) {
let h5DataList = JSON.parse(JSON.stringify(that.dynamicList))
h5DataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = h5DataList
}
that.selectLinkObj.share = (that.h5linkObj.share== true? 1:0)
if (!!that.h5linkObj.share) {
that.selectLinkObj.shareWebType = that.h5linkObj.shareWebType;
if (that.h5linkObj.shareWebType == 1) {
that.selectLinkObj.shareUrl = that.h5linkObj.shareUrl
}
}
// that.selectLinkObj.fixParam = that.h5linkObj.fixParam;
// that.selectLinkObj.dynamicPara = that.h5linkObj.dynamicPara;
// 触发父组件方法,传递参数
that.transData();
return; return;
} }
if (!!that.h5linkObj.share && that.h5linkObj.shareWebType == 1 && !that.h5linkObj.shareUrl) {
that.$message.error({ // 如果是第三方小程序
duration: 1000, if (that.oneLevelTypeValue == 7) {
message: "请填写分享链接" if (!this.twoLevelValue) {
that.$message.error({
duration: 1000,
message: "请选择第三方小程序"
})
}
// const reg = /^(http|https|www)(:\/\/)?.[A-Za-z]+.[A-Za-z]+.*/;
// if (!reg.test(this.thirdObj.pagePath)) {
// this.$message.error({
// duration: 1000,
// message: "输入的网址不合法!"
// })
// return;
// }
this.twoLevelOptions.forEach(v => {
if (v.value === this.twoLevelValue) {
that.selectLinkObj.name = v.label;
that.selectLinkObj.appid = v.value;
// that.selectLinkObj.id = selectOneItem.linkId;
// that.selectLinkObj.id = v.id;
}
}) })
this.selectLinkObj.pagePath = this.thirdObj.pagePath;
that.selectLinkObj.params = ''
if (!!that.dynamicList.length) {
let thirdDataList = JSON.parse(JSON.stringify(that.dynamicList))
thirdDataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = thirdDataList
}
// 触发父组件方法,传递参数
that.transData();
return; return;
} }
that.selectLinkObj.conditionType = that.h5linkObj.conditionType;
that.selectLinkObj.name = that.h5linkObj.name;
that.selectLinkObj.url = that.h5linkObj.url;// +'?'+that.h5linkObj.fixParam+'&'+that.h5linkObj.dynamicPara;
// 去掉固定参数 20180912 that.h5linkObj.fixParam
that.selectLinkObj.params = '';
if (!!that.dynamicList.length) {
let h5DataList = JSON.parse(JSON.stringify(that.dynamicList))
h5DataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = h5DataList
}
that.selectLinkObj.share = (that.h5linkObj.share== true? 1:0) // 如果选择的自定义页面
if (!!that.h5linkObj.share) { if (that.oneLevelTypeValue == 6) {
that.selectLinkObj.shareWebType = that.h5linkObj.shareWebType; if (!that.twoLevelValue.trim()) {
if (that.h5linkObj.shareWebType == 1) { that.$message.error({
that.selectLinkObj.shareUrl = that.h5linkObj.shareUrl duration: 1000,
message: "请选择自定义页面"
})
return;
} }
// 触发父组件方法,传递参数
that.transData();
return;
} }
// that.selectLinkObj.fixParam = that.h5linkObj.fixParam; // 确定是会员功能 然后看是那个类型的
// that.selectLinkObj.dynamicPara = that.h5linkObj.dynamicPara; if (this.linkId == 27) {
// 触发父组件方法,传递参数 if (this.visibleType == 8) {
that.transData(); // 优惠券
return; if (this.chooseFlag) {
} this.selectLinkObj.name = '积分商城/' + this.cardName;
this.selectLinkObj.id = this.giftType;
// 如果是第三方小程序 this.selectLinkObj.params = {
if (that.oneLevelTypeValue == 7) { integralMallProId: this.cardUrl
if (!this.twoLevelValue) { };
that.$message.error({ this.transData();
duration: 1000, return;
message: "请选择第三方小程序" } else {
}) this.$message.warning({
} duration: 1000,
// const reg = /^(http|https|www)(:\/\/)?.[A-Za-z]+.[A-Za-z]+.*/; message: "请选择卡券!"
// if (!reg.test(this.thirdObj.pagePath)) { })
// this.$message.error({ return false;
// duration: 1000, }
// message: "输入的网址不合法!" } else if (this.visibleType == 9) {
// }) // 礼品
// return; if (this.giftFlag) {
// } this.selectLinkObj.name = '积分商城/' + this.giftName;
this.twoLevelOptions.forEach(v => { this.selectLinkObj.id = this.giftType;
if (v.value === this.twoLevelValue) { this.selectLinkObj.params = {
that.selectLinkObj.name = v.label; integralMallProId: this.giftUrl
that.selectLinkObj.appid = v.value; };
// that.selectLinkObj.id = selectOneItem.linkId; this.transData();
// that.selectLinkObj.id = v.id; return;
} else {
this.$message.warning({
duration: 1000,
message: "请选择礼品!"
})
return false;
}
} }
})
this.selectLinkObj.pagePath = this.thirdObj.pagePath;
that.selectLinkObj.params = ''
if (!!that.dynamicList.length) {
let thirdDataList = JSON.parse(JSON.stringify(that.dynamicList))
thirdDataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = thirdDataList
} }
// 触发父组件方法,传递参数
that.transData();
return;
}
// 如果选择的自定义页面 if (this.linkId == 16) {
if (that.oneLevelTypeValue == 6) { if ( this.goodType == 10) {
if (!that.twoLevelValue.trim()) { // 商品分类链接
that.$message.error({ this.selectLinkObj.name = '商品分类链接/' + this.tagName;
duration: 1000, this.selectLinkObj.id = this.middleGoodId;
message: "请选择自定义页面"
})
return;
}
// 触发父组件方法,传递参数
that.transData();
return;
}
// 确定是会员功能 然后看是那个类型的
if (this.linkId == 27) {
if (this.visibleType == 8) {
// 优惠券
if (this.chooseFlag) {
this.selectLinkObj.name = '积分商城/' + this.cardName;
this.selectLinkObj.id = this.giftType;
this.selectLinkObj.params = { this.selectLinkObj.params = {
integralMallProId: this.cardUrl tagid: this.cardUrl,
title: this.tagName
}; };
this.transData(); console.log(this.cardUrl);
return; if (this.cardUrl) {
} else { this.transData();
this.$message.warning({ } else {
duration: 1000, this.$message.error({
message: "请选择卡券!" duration: 1000,
}) message: "请选择链接"
});
}
return false; return false;
} } else if (this.goodType == 11) {
} else if (this.visibleType == 9) { this.selectLinkObj.name = '商城自定义页面/' + this.pageName;
// 礼品 this.selectLinkObj.id = this.middleGoodId;
if (this.giftFlag) {
this.selectLinkObj.name = '积分商城/' + this.giftName;
this.selectLinkObj.id = this.giftType;
this.selectLinkObj.params = { this.selectLinkObj.params = {
integralMallProId: this.giftUrl pageId: this.pageId,
title: this.pageName
}; };
this.transData(); if (this.pageId) {
return; this.transData();
} else { } else {
this.$message.warning({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择礼品!" message: "请选择链接"
}) });
}
return false; return false;
} }
} if (!this.twoLevelValue) {
}
if (this.linkId == 16) {
if ( this.goodType == 10) {
// 商品分类链接
this.selectLinkObj.name = '商品分类链接/' + this.tagName;
this.selectLinkObj.id = this.middleGoodId;
this.selectLinkObj.params = {
tagid: this.cardUrl,
title: this.tagName
};
if (this.cardUrl) {
this.transData();
} else {
this.$message.error({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择链接" message: "请选择链接"
}); });
} }
}
// 如果门店签到
if(that.twoLevelSelectValue == 'sign'){
if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false;
}
return false; return false;
} else if (this.goodType == 11) { }
this.selectLinkObj.name = '商城自定义页面/' + this.pageName; // 如果是商品分类
this.selectLinkObj.id = this.middleGoodId; if(that.twoLevelSelectValue == 'goodsCate'){
this.selectLinkObj.params = { if(!that.checkTwoLevel(that.twoLevelSelectValue)){
pageId: this.pageId, return false;
title: this.pageName
};
if (this.pageId) {
this.transData();
} else {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
} }
return false; return false;
} }
if (!this.twoLevelValue) { // 分享有赏
if (this.linkId === 'yueshi') {
this.selectLinkObj.id = this.linkId;
this.selectLinkObj.name = '分享有赏';
this.$emit('linkSelect', this.selectLinkObj);
this.$emit('update:linkVisible', false);
this.resetAll();
return;
}
if (!!this.selectLinkObj.name && !!this.selectLinkObj.id) {
// 触发父组件方法,传递参数
this.transData();
} else {
this.$message.error({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择链接" message: "请选择链接"
}); })
}
}
// 如果门店签到
if(that.twoLevelSelectValue == 'sign'){
if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false;
}
return false;
}
// 如果是商品分类
if(that.twoLevelSelectValue == 'goodsCate'){
if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false;
} }
return false; });
}
// 分享有赏
if (this.linkId === 'yueshi') {
this.selectLinkObj.id = this.linkId;
this.selectLinkObj.name = '分享有赏';
this.$emit('linkSelect', this.selectLinkObj);
this.$emit('update:linkVisible', false);
this.resetAll();
return;
}
if (!!this.selectLinkObj.name && !!this.selectLinkObj.id) {
// 触发父组件方法,传递参数
this.transData();
} else {
this.$message.error({
duration: 1000,
message: "请选择链接"
})
}
}, },
getMallId(item) { getMallId(item) {
...@@ -1799,10 +1803,9 @@ export default { ...@@ -1799,10 +1803,9 @@ export default {
// 触发父组件方法,传递参数 // 触发父组件方法,传递参数
transData() { transData() {
console.log(this.selectLinkObj);
this.$emit('linkSelect', this.selectLinkObj); this.$emit('linkSelect', this.selectLinkObj);
this.$emit('update:linkVisible', false); this.$emit('update:linkVisible', false);
// this.resetAll(); this.resetAll();
}, },
// 获取一级列表 // 获取一级列表
......
<template> <template>
<!-- 链接小工具 --> <!-- 链接小工具 -->
<div class="link-tools-contain"> <div class="link-tools-contain">
...@@ -383,6 +382,7 @@ import GoodsTree from './goods-tree'; ...@@ -383,6 +382,7 @@ import GoodsTree from './goods-tree';
// import axios from 'axios' // import axios from 'axios'
import qs from 'qs'; import qs from 'qs';
import { setTimeout } from 'timers';
export default { export default {
name: 'links-tool', name: 'links-tool',
...@@ -1476,221 +1476,224 @@ export default { ...@@ -1476,221 +1476,224 @@ export default {
// 确认操作 // 确认操作
confirmLinkSelect() { confirmLinkSelect() {
var that = this setTimeout(_ => {
// 如果选择 h5 判断选择的链接 var that = this;
if (that.oneLevelTypeValue == 5) {
if (!that.h5linkObj.name.trim() || !that.h5linkObj.url.trim()) { // 如果选择 h5 判断选择的链接
that.$message.error({ if (that.oneLevelTypeValue == 5) {
duration: 1000, if (!that.h5linkObj.name.trim() || !that.h5linkObj.url.trim()) {
message: "请填写链接内容" that.$message.error({
}) duration: 1000,
message: "请填写链接内容"
})
return;
}
if (!!that.h5linkObj.share && that.h5linkObj.shareWebType == 1 && !that.h5linkObj.shareUrl) {
that.$message.error({
duration: 1000,
message: "请填写分享链接"
})
return;
}
that.selectLinkObj.conditionType = that.h5linkObj.conditionType;
that.selectLinkObj.name = that.h5linkObj.name;
that.selectLinkObj.url = that.h5linkObj.url;// +'?'+that.h5linkObj.fixParam+'&'+that.h5linkObj.dynamicPara;
// 去掉固定参数 20180912 that.h5linkObj.fixParam
that.selectLinkObj.params = '';
if (!!that.dynamicList.length) {
let h5DataList = JSON.parse(JSON.stringify(that.dynamicList))
h5DataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = h5DataList
}
that.selectLinkObj.share = (that.h5linkObj.share== true? 1:0)
if (!!that.h5linkObj.share) {
that.selectLinkObj.shareWebType = that.h5linkObj.shareWebType;
if (that.h5linkObj.shareWebType == 1) {
that.selectLinkObj.shareUrl = that.h5linkObj.shareUrl
}
}
// that.selectLinkObj.fixParam = that.h5linkObj.fixParam;
// that.selectLinkObj.dynamicPara = that.h5linkObj.dynamicPara;
// 触发父组件方法,传递参数
that.transData();
return; return;
} }
if (!!that.h5linkObj.share && that.h5linkObj.shareWebType == 1 && !that.h5linkObj.shareUrl) {
that.$message.error({ // 如果是第三方小程序
duration: 1000, if (that.oneLevelTypeValue == 7) {
message: "请填写分享链接" if (!this.twoLevelValue) {
that.$message.error({
duration: 1000,
message: "请选择第三方小程序"
})
}
// const reg = /^(http|https|www)(:\/\/)?.[A-Za-z]+.[A-Za-z]+.*/;
// if (!reg.test(this.thirdObj.pagePath)) {
// this.$message.error({
// duration: 1000,
// message: "输入的网址不合法!"
// })
// return;
// }
this.twoLevelOptions.forEach(v => {
if (v.value === this.twoLevelValue) {
that.selectLinkObj.name = v.label;
that.selectLinkObj.appid = v.value;
// that.selectLinkObj.id = selectOneItem.linkId;
// that.selectLinkObj.id = v.id;
}
}) })
this.selectLinkObj.pagePath = this.thirdObj.pagePath;
that.selectLinkObj.params = ''
if (!!that.dynamicList.length) {
let thirdDataList = JSON.parse(JSON.stringify(that.dynamicList))
thirdDataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = thirdDataList
}
// 触发父组件方法,传递参数
that.transData();
return; return;
} }
that.selectLinkObj.conditionType = that.h5linkObj.conditionType;
that.selectLinkObj.name = that.h5linkObj.name;
that.selectLinkObj.url = that.h5linkObj.url;// +'?'+that.h5linkObj.fixParam+'&'+that.h5linkObj.dynamicPara;
// 去掉固定参数 20180912 that.h5linkObj.fixParam
that.selectLinkObj.params = '';
if (!!that.dynamicList.length) {
let h5DataList = JSON.parse(JSON.stringify(that.dynamicList))
h5DataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = h5DataList
}
that.selectLinkObj.share = (that.h5linkObj.share== true? 1:0) // 如果选择的自定义页面
if (!!that.h5linkObj.share) { if (that.oneLevelTypeValue == 6) {
that.selectLinkObj.shareWebType = that.h5linkObj.shareWebType; if (!that.twoLevelValue.trim()) {
if (that.h5linkObj.shareWebType == 1) { that.$message.error({
that.selectLinkObj.shareUrl = that.h5linkObj.shareUrl duration: 1000,
message: "请选择自定义页面"
})
return;
} }
// 触发父组件方法,传递参数
that.transData();
return;
} }
// that.selectLinkObj.fixParam = that.h5linkObj.fixParam; // 确定是会员功能 然后看是那个类型的
// that.selectLinkObj.dynamicPara = that.h5linkObj.dynamicPara; if (this.linkId == 27) {
// 触发父组件方法,传递参数 if (this.visibleType == 8) {
that.transData(); // 优惠券
return; if (this.chooseFlag) {
} this.selectLinkObj.name = '积分商城/' + this.cardName;
this.selectLinkObj.id = this.giftType;
// 如果是第三方小程序 this.selectLinkObj.params = {
if (that.oneLevelTypeValue == 7) { integralMallProId: this.cardUrl
if (!this.twoLevelValue) { };
that.$message.error({ this.transData();
duration: 1000, return;
message: "请选择第三方小程序" } else {
}) this.$message.warning({
} duration: 1000,
// const reg = /^(http|https|www)(:\/\/)?.[A-Za-z]+.[A-Za-z]+.*/; message: "请选择卡券!"
// if (!reg.test(this.thirdObj.pagePath)) { })
// this.$message.error({ return false;
// duration: 1000, }
// message: "输入的网址不合法!" } else if (this.visibleType == 9) {
// }) // 礼品
// return; if (this.giftFlag) {
// } this.selectLinkObj.name = '积分商城/' + this.giftName;
this.twoLevelOptions.forEach(v => { this.selectLinkObj.id = this.giftType;
if (v.value === this.twoLevelValue) { this.selectLinkObj.params = {
that.selectLinkObj.name = v.label; integralMallProId: this.giftUrl
that.selectLinkObj.appid = v.value; };
// that.selectLinkObj.id = selectOneItem.linkId; this.transData();
// that.selectLinkObj.id = v.id; return;
} else {
this.$message.warning({
duration: 1000,
message: "请选择礼品!"
})
return false;
}
} }
})
this.selectLinkObj.pagePath = this.thirdObj.pagePath;
that.selectLinkObj.params = ''
if (!!that.dynamicList.length) {
let thirdDataList = JSON.parse(JSON.stringify(that.dynamicList))
thirdDataList.forEach(function(ele,index){
delete ele.editAble;
delete ele.selectKey;
delete ele.inputValue;
})
that.selectLinkObj.params = thirdDataList
} }
// 触发父组件方法,传递参数
that.transData();
return;
}
// 如果选择的自定义页面 if (this.linkId == 16) {
if (that.oneLevelTypeValue == 6) { if ( this.goodType == 10) {
if (!that.twoLevelValue.trim()) { // 商品分类链接
that.$message.error({ this.selectLinkObj.name = '商品分类链接/' + this.tagName;
duration: 1000, this.selectLinkObj.id = this.middleGoodId;
message: "请选择自定义页面"
})
return;
}
// 触发父组件方法,传递参数
that.transData();
return;
}
// 确定是会员功能 然后看是那个类型的
if (this.linkId == 27) {
if (this.visibleType == 8) {
// 优惠券
if (this.chooseFlag) {
this.selectLinkObj.name = '积分商城/' + this.cardName;
this.selectLinkObj.id = this.giftType;
this.selectLinkObj.params = { this.selectLinkObj.params = {
integralMallProId: this.cardUrl tagid: this.cardUrl,
title: this.tagName
}; };
this.transData(); console.log(this.cardUrl);
return; if (this.cardUrl) {
} else { this.transData();
this.$message.warning({ } else {
duration: 1000, this.$message.error({
message: "请选择卡券!" duration: 1000,
}) message: "请选择链接"
});
}
return false; return false;
} } else if (this.goodType == 11) {
} else if (this.visibleType == 9) { this.selectLinkObj.name = '商城自定义页面/' + this.pageName;
// 礼品 this.selectLinkObj.id = this.middleGoodId;
if (this.giftFlag) {
this.selectLinkObj.name = '积分商城/' + this.giftName;
this.selectLinkObj.id = this.giftType;
this.selectLinkObj.params = { this.selectLinkObj.params = {
integralMallProId: this.giftUrl pageId: this.pageId,
title: this.pageName
}; };
this.transData(); if (this.pageId) {
return; this.transData();
} else { } else {
this.$message.warning({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择礼品!" message: "请选择链接"
}) });
}
return false; return false;
} }
} if (!this.twoLevelValue) {
}
if (this.linkId == 16) {
if ( this.goodType == 10) {
// 商品分类链接
this.selectLinkObj.name = '商品分类链接/' + this.tagName;
this.selectLinkObj.id = this.middleGoodId;
this.selectLinkObj.params = {
tagid: this.cardUrl,
title: this.tagName
};
if (this.cardUrl) {
this.transData();
} else {
this.$message.error({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择链接" message: "请选择链接"
}); });
} }
}
// 如果门店签到
if(that.twoLevelSelectValue == 'sign'){
if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false;
}
return false; return false;
} else if (this.goodType == 11) { }
this.selectLinkObj.name = '商城自定义页面/' + this.pageName; // 如果是商品分类
this.selectLinkObj.id = this.middleGoodId; if(that.twoLevelSelectValue == 'goodsCate'){
this.selectLinkObj.params = { if(!that.checkTwoLevel(that.twoLevelSelectValue)){
pageId: this.pageId, return false;
title: this.pageName
};
if (this.pageId) {
this.transData();
} else {
this.$message.error({
duration: 1000,
message: "请选择链接"
});
} }
return false; return false;
} }
if (!this.twoLevelValue) { // 分享有赏
if (this.linkId === 'yueshi') {
this.selectLinkObj.id = this.linkId;
this.selectLinkObj.name = '分享有赏';
this.$emit('linkSelect', this.selectLinkObj);
this.$emit('update:linkVisible', false);
this.resetAll();
return;
}
if (!!this.selectLinkObj.name && !!this.selectLinkObj.id) {
// 触发父组件方法,传递参数
this.transData();
} else {
this.$message.error({ this.$message.error({
duration: 1000, duration: 1000,
message: "请选择链接" message: "请选择链接"
}); })
}
}
// 如果门店签到
if(that.twoLevelSelectValue == 'sign'){
if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false;
}
return false;
}
// 如果是商品分类
if(that.twoLevelSelectValue == 'goodsCate'){
if(!that.checkTwoLevel(that.twoLevelSelectValue)){
return false;
} }
return false; });
}
// 分享有赏
if (this.linkId === 'yueshi') {
this.selectLinkObj.id = this.linkId;
this.selectLinkObj.name = '分享有赏';
this.$emit('linkSelect', this.selectLinkObj);
this.$emit('update:linkVisible', false);
this.resetAll();
return;
}
if (!!this.selectLinkObj.name && !!this.selectLinkObj.id) {
// 触发父组件方法,传递参数
this.transData();
} else {
this.$message.error({
duration: 1000,
message: "请选择链接"
})
}
}, },
getMallId(item) { getMallId(item) {
...@@ -1770,10 +1773,9 @@ export default { ...@@ -1770,10 +1773,9 @@ export default {
// 触发父组件方法,传递参数 // 触发父组件方法,传递参数
transData() { transData() {
console.log(this.selectLinkObj);
this.$emit('linkSelect', this.selectLinkObj); this.$emit('linkSelect', this.selectLinkObj);
this.$emit('update:linkVisible', false); this.$emit('update:linkVisible', false);
// this.resetAll(); this.resetAll();
}, },
// 获取一级列表 // 获取一级列表
......
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