Commit f74d7465 by member

修改商品主功能bug

parent 40a2f3ee
...@@ -670,11 +670,7 @@ export default { ...@@ -670,11 +670,7 @@ export default {
this.giftFlag = false; this.giftFlag = false;
var that = this var that = this
var host = window.location.origin; var host = window.location.origin;
if (host.indexOf('localhost') != '-1') { this.baseUrl = host.indexOf('localhost') != '-1' ? 'http://gicdev.demogic.com' : host;
that.baseUrl = 'http://gicdev.demogic.com';
}else {
that.baseUrl = host
}
}, },
methods: { methods: {
changeVisible() { changeVisible() {
...@@ -799,13 +795,14 @@ export default { ...@@ -799,13 +795,14 @@ export default {
} }
// 获取二级列表数据 // 获取二级列表数据
that.getLinksList(selectOneItem.linkId,2) that.getLinksList(selectOneItem.linkId, 2)
} }
}, },
// twoLevelValueChange (二级选择,保存选择类型) // twoLevelValueChange (二级选择,保存选择类型)
twoLevelValueChange(e) { twoLevelValueChange(e) {
console.log(e);
if (e == 'product_category_link') { // 商品分类链接 if (e == 'product_category_link') { // 商品分类链接
this.middleGoodId = e; this.middleGoodId = e;
this.goodType = 10; this.goodType = 10;
...@@ -820,11 +817,16 @@ export default { ...@@ -820,11 +817,16 @@ export default {
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
this.goodsTreeVisible = false; this.goodsTreeVisible = false;
this.pageId = null; this.pageId = null;
} else if (e == 1) {
this.goodType = 1;
this.threeLevelVisible = false;
this.goodsTreeVisible = false;
this.threeLeveloneVisible = true;
} else { } else {
this.threeLevelVisible = false; this.threeLevelVisible = false;
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
this.goodsTreeVisible = false; this.goodsTreeVisible = false;
} }
var that = this var that = this
this.goodsLinksVisible = false; this.goodsLinksVisible = false;
...@@ -895,6 +897,7 @@ export default { ...@@ -895,6 +897,7 @@ export default {
this.getGoodsLink(); this.getGoodsLink();
} else if (this.goodType == 11) { } else if (this.goodType == 11) {
// 商品自定义页面 // 商品自定义页面
this.threeLevelVisible = true;
this.getGoodsPage(); this.getGoodsPage();
} else { } else {
// 判断三级中下拉/下拉树形/搜索下拉 // 判断三级中下拉/下拉树形/搜索下拉
...@@ -1809,7 +1812,7 @@ export default { ...@@ -1809,7 +1812,7 @@ export default {
}, },
// 获取一级列表 // 获取一级列表
getLinksList(parentId,num,twoType) { getLinksList(parentId, num, twoType) {
var that = this; var that = this;
// 如果不传传的显示类型,设置 // 如果不传传的显示类型,设置
twoType = twoType ? twoType : ''; twoType = twoType ? twoType : '';
......
<!--
/**
* 链接小工具组件(弹窗) 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>
<!-- 链接小工具 --> <!-- 链接小工具 -->
...@@ -640,11 +670,7 @@ export default { ...@@ -640,11 +670,7 @@ export default {
this.giftFlag = false; this.giftFlag = false;
var that = this var that = this
var host = window.location.origin; var host = window.location.origin;
if (host.indexOf('localhost') != '-1') { this.baseUrl = host.indexOf('localhost') != '-1' ? 'http://gicdev.demogic.com' : host;
that.baseUrl = 'http://gicdev.demogic.com';
}else {
that.baseUrl = host
}
}, },
methods: { methods: {
changeVisible() { changeVisible() {
...@@ -769,13 +795,14 @@ export default { ...@@ -769,13 +795,14 @@ export default {
} }
// 获取二级列表数据 // 获取二级列表数据
that.getLinksList(selectOneItem.linkId,2) that.getLinksList(selectOneItem.linkId, 2)
} }
}, },
// twoLevelValueChange (二级选择,保存选择类型) // twoLevelValueChange (二级选择,保存选择类型)
twoLevelValueChange(e) { twoLevelValueChange(e) {
console.log(e);
if (e == 'product_category_link') { // 商品分类链接 if (e == 'product_category_link') { // 商品分类链接
this.middleGoodId = e; this.middleGoodId = e;
this.goodType = 10; this.goodType = 10;
...@@ -790,11 +817,16 @@ export default { ...@@ -790,11 +817,16 @@ export default {
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
this.goodsTreeVisible = false; this.goodsTreeVisible = false;
this.pageId = null; this.pageId = null;
} else if (e == 1) {
this.goodType = 1;
this.threeLevelVisible = false;
this.goodsTreeVisible = false;
this.threeLeveloneVisible = true;
} else { } else {
this.threeLevelVisible = false; this.threeLevelVisible = false;
this.threeLeveloneVisible = true; this.threeLeveloneVisible = true;
this.goodsTreeVisible = false; this.goodsTreeVisible = false;
} }
var that = this var that = this
this.goodsLinksVisible = false; this.goodsLinksVisible = false;
...@@ -865,6 +897,7 @@ export default { ...@@ -865,6 +897,7 @@ export default {
this.getGoodsLink(); this.getGoodsLink();
} else if (this.goodType == 11) { } else if (this.goodType == 11) {
// 商品自定义页面 // 商品自定义页面
this.threeLevelVisible = true;
this.getGoodsPage(); this.getGoodsPage();
} else { } else {
// 判断三级中下拉/下拉树形/搜索下拉 // 判断三级中下拉/下拉树形/搜索下拉
...@@ -1779,7 +1812,7 @@ export default { ...@@ -1779,7 +1812,7 @@ export default {
}, },
// 获取一级列表 // 获取一级列表
getLinksList(parentId,num,twoType) { getLinksList(parentId, num, twoType) {
var that = this; var that = this;
// 如果不传传的显示类型,设置 // 如果不传传的显示类型,设置
twoType = twoType ? twoType : ''; twoType = twoType ? twoType : '';
......
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