Commit e74166bc authored by Mac's avatar Mac

分类的第二批修改

parent cc30d5bc
......@@ -110,7 +110,8 @@ export default {
sku: {},
showSku: false,
showAuth: false,
u: {}
u: {},
IsEducation:0,
};
},
components: {
......@@ -123,6 +124,9 @@ export default {
} else {
this.scrollHeight += ')';
}
this.IsEducation = uni.getStorageSync('basedata')
? (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation?uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation:0)
:0;
},
mounted() {
this.CategoryIdsList = [];
......@@ -164,7 +168,11 @@ export default {
this.init();
},
clickHandler(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
if(this.IsEducation==1){
uni.navigateTo({ url: '/pages/school/courseInfo?GoodsId='+item.id });
}else{
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
}
},
init() {
this.CategoryIdsList = [];
......@@ -172,9 +180,15 @@ export default {
this.msg.CategoryIds = this.CategoryIdsList.join(',');
this.isover = false;
this.loading = true;
let url
if(this.IsEducation==1){
url='/api/AppletSchool/GetAppletCoursePageList'
}else{
url='/api/AppletGoods/GetAppletGoodsPageListForZY'
}
this.request2(
{
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
url: url,
data: this.msg
},
res => {
......@@ -184,9 +198,11 @@ export default {
res.data.pageData.forEach(x=>{
x.marketingLogo = JSON.parse(x.marketingLogo)
x.totalStock = 0;
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
if(x.attr && x.attr.length>0){
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
}
})
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
......
......@@ -96,10 +96,14 @@ export default {
loading: false,
tid: 0,
active: 0,
IsEducation:0,
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.IsEducation = uni.getStorageSync('basedata')
? (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation?uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation:0)
:0;
},
mounted() {
this.init();
......@@ -114,14 +118,25 @@ export default {
this.active=i
},
clickHandler(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
if(this.IsEducation==1){
uni.navigateTo({ url: '/pages/school/courseInfo?GoodsId='+item.id });
}else{
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
}
},
init() {
this.isover = false;
this.loading = true;
let url
if(this.IsEducation==1){
url='/api/AppletSchool/GetAppletCoursePageList'
}else{
url='/api/AppletGoods/GetAppletGoodsPageListForZY'
}
this.request2(
{
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
url: url,
data: this.msg
},
res => {
......@@ -131,9 +146,12 @@ export default {
res.data.pageData.forEach(x=>{
x.marketingLogo = JSON.parse(x.marketingLogo)
x.totalStock = 0;
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
if(x.attr && x.attr.length>0){
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
}
})
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
......
......@@ -124,6 +124,7 @@ export default {
showSku: false,
showAuth:false,
u:{},
IsEducation:0,
};
},
components: {
......@@ -132,6 +133,9 @@ export default {
created() {
this.mainColor = this.$uiConfig.mainColor;
this.activeStyle = `background:${this.mainColor};`;
this.IsEducation = uni.getStorageSync('basedata')
? (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation?uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation:0)
:0;
},
mounted() {
this.init();
......@@ -159,14 +163,24 @@ export default {
this.init();
},
clickHandler(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
if(this.IsEducation==1){
uni.navigateTo({ url: '/pages/school/courseInfo?GoodsId='+item.id });
}else{
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
}
},
init() {
this.isover = false;
this.loading = true;
let url
if(this.IsEducation==1){
url='/api/AppletSchool/GetAppletCoursePageList'
}else{
url='/api/AppletGoods/GetAppletGoodsPageListForZY'
}
this.request2(
{
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
url: url,
data: this.msg
},
res => {
......@@ -176,9 +190,11 @@ export default {
res.data.pageData.forEach(x=>{
x.marketingLogo = JSON.parse(x.marketingLogo)
x.totalStock = 0;
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
if(x.attr && x.attr.length>0){
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
}
})
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
......
......@@ -113,10 +113,14 @@ export default {
OrderBy:1,
UserId:0,
},
IsEducation:0,
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.IsEducation = uni.getStorageSync('basedata')
? (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation?uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation:0)
:0;
},
mounted() {
this.CategoryIdsList=[];
......@@ -150,7 +154,11 @@ export default {
this.init();
},
clickHandler(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
if(this.IsEducation==1){
uni.navigateTo({ url: '/pages/school/courseInfo?GoodsId='+item.id });
}else{
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
}
},
computSecondHeight() {
const query = uni.createSelectorQuery().in(this);
......@@ -167,9 +175,15 @@ export default {
this.msg.CategoryIds=this.CategoryIdsList.join(',');
this.isover = false;
this.loading = true;
let url
if(this.IsEducation==1){
url='/api/AppletSchool/GetAppletCoursePageList'
}else{
url='/api/AppletGoods/GetAppletGoodsPageListForZY'
}
this.request2(
{
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
url: url,
data: this.msg
},
res => {
......@@ -179,9 +193,11 @@ export default {
res.data.pageData.forEach(x=>{
x.marketingLogo = JSON.parse(x.marketingLogo)
x.totalStock = 0;
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
if(x.attr && x.attr.length>0){
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
}
})
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
......
......@@ -134,7 +134,8 @@ export default {
sku: {},
showSku: false,
showAuth: false,
u: {}
u: {},
IsEducation:0,
};
},
components: {
......@@ -147,6 +148,9 @@ export default {
} else {
this.scrollHeight += ")";
}
this.IsEducation = uni.getStorageSync('basedata')
? (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation?uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation:0)
:0;
},
mounted() {
this.CategoryIdsList=[];
......@@ -188,7 +192,11 @@ export default {
this.init();
},
clickHandler(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
if(this.IsEducation==1){
uni.navigateTo({ url: '/pages/school/courseInfo?GoodsId='+item.id });
}else{
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id });
}
},
init() {
this.CategoryIdsList=[];
......@@ -196,9 +204,15 @@ export default {
this.msg.CategoryIds=this.CategoryIdsList.join(',');
this.isover = false;
this.loading = true;
let url
if(this.IsEducation==1){
url='/api/AppletSchool/GetAppletCoursePageList'
}else{
url='/api/AppletGoods/GetAppletGoodsPageListForZY'
}
this.request2(
{
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
url: url,
data: this.msg
},
res => {
......@@ -208,9 +222,11 @@ export default {
res.data.pageData.forEach(x=>{
x.marketingLogo = JSON.parse(x.marketingLogo)
x.totalStock = 0;
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
if(x.attr && x.attr.length>0){
x.attr.forEach(j=>{
x.totalStock+=j.stock
})
}
})
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
......
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