Commit 873f202d by member

fix: 先隐藏掉链接商品链接

parent 1bd87c65
...@@ -674,13 +674,10 @@ export default { ...@@ -674,13 +674,10 @@ export default {
}, },
methods: { methods: {
changeVisible() { changeVisible() {
if (!this.selectLinkObj.id) { this.$emit('linkSelect', {});
this.selectLinkObj = '';
}
this.transData();
this.$emit('update:linkVisible', false); this.$emit('update:linkVisible', false);
}, },
handlePaddGift(list) { handlePaddGift(list) {
// 拼接id // 拼接id
this.giftFlag = true; this.giftFlag = true;
this.giftName = list.proName; this.giftName = list.proName;
...@@ -1424,23 +1421,22 @@ export default { ...@@ -1424,23 +1421,22 @@ export default {
// 获取商品列表 // 获取商品列表
getGoodsList() { getGoodsList() {
var that = this var that = this;
var para = { var para = {
pageNum : that.currentPage, pageNum : this.currentPage,
searchparams: that.searchGoods || '', searchparams: this.searchGoods || '',
pageSize: that.pageSize, pageSize: this.pageSize,
// 品类 mallCategoryId: this.category || '',
mallCategoryId: that.category, tagId: this.classify || '',// 分类
tagId: that.classify,// 分类 requestProject: this.repProjectName
requestProject: that.repProjectName
}; };
// that.currentPage = 1; // that.currentPage = 1;
// that.pageSize = 10; // that.pageSize = 10;
// that.total = 50; // that.total = 50;
that.axios.post(that.baseUrl+'/api-mall/page-mall-goods',qs.stringify(para)) this.axios.post(that.baseUrl+'/api-mall/page-mall-goods', qs.stringify(para)).then((res) => {
.then((res) => {
var resData = res.data var resData = res.data
if (resData.errorCode == 0) { if (resData.errorCode == 0) {
that.goodsList = resData.result.result that.goodsList = resData.result.result
...@@ -1781,7 +1777,8 @@ export default { ...@@ -1781,7 +1777,8 @@ export default {
// 触发父组件方法,传递参数 // 触发父组件方法,传递参数
transData() { transData() {
this.$emit('linkSelect', this.selectLinkObj) this.$emit('linkSelect', this.selectLinkObj);
this.$emit('update:linkVisible', false);
this.resetAll(); this.resetAll();
}, },
......
<!--
/**
* 链接小工具组件(弹窗) by fairyly on 2018/06/15
* 组件调用
*/
<linktools :showType="showType" :linkToolsVisible="linkToolsVisible" @linkSelect="linkSelect"/>
import Linktools from 'components/linktools/linktools.vue'
// 链接小工具参数
linkToolsVisible: false, //显示参数
showType: 0, // 显示类型,插件默认0:显示全部 ,1: (底部导航);2: (公众号菜单:只有小程序的,没有h5)
// methods
// linktools
showLinkDialog() {
this.linkToolsVisible = true;
},
linkSelect(val) {
console.log(val)
// 关闭时隐藏
this.linkToolsVisible = false;
}
components: {linkId
Linktools
} coupCardId
-->
<template> <template>
<!-- 链接小工具 --> <!-- 链接小工具 -->
...@@ -674,13 +645,10 @@ export default { ...@@ -674,13 +645,10 @@ export default {
}, },
methods: { methods: {
changeVisible() { changeVisible() {
if (!this.selectLinkObj.id) { this.$emit('linkSelect', {});
this.selectLinkObj = '';
}
this.transData();
this.$emit('update:linkVisible', false); this.$emit('update:linkVisible', false);
}, },
handlePaddGift(list) { handlePaddGift(list) {
// 拼接id // 拼接id
this.giftFlag = true; this.giftFlag = true;
this.giftName = list.proName; this.giftName = list.proName;
...@@ -1424,23 +1392,22 @@ export default { ...@@ -1424,23 +1392,22 @@ export default {
// 获取商品列表 // 获取商品列表
getGoodsList() { getGoodsList() {
var that = this var that = this;
var para = { var para = {
pageNum : that.currentPage, pageNum : this.currentPage,
searchparams: that.searchGoods || '', searchparams: this.searchGoods || '',
pageSize: that.pageSize, pageSize: this.pageSize,
// 品类 mallCategoryId: this.category || '',
mallCategoryId: that.category, tagId: this.classify || '',// 分类
tagId: that.classify,// 分类 requestProject: this.repProjectName
requestProject: that.repProjectName
}; };
// that.currentPage = 1; // that.currentPage = 1;
// that.pageSize = 10; // that.pageSize = 10;
// that.total = 50; // that.total = 50;
that.axios.post(that.baseUrl+'/api-mall/page-mall-goods',qs.stringify(para)) this.axios.post(that.baseUrl+'/api-mall/page-mall-goods', qs.stringify(para)).then((res) => {
.then((res) => {
var resData = res.data var resData = res.data
if (resData.errorCode == 0) { if (resData.errorCode == 0) {
that.goodsList = resData.result.result that.goodsList = resData.result.result
...@@ -1781,7 +1748,8 @@ export default { ...@@ -1781,7 +1748,8 @@ export default {
// 触发父组件方法,传递参数 // 触发父组件方法,传递参数
transData() { transData() {
this.$emit('linkSelect', this.selectLinkObj) this.$emit('linkSelect', this.selectLinkObj);
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