Commit e74166bc authored by Mac's avatar Mac

分类的第二批修改

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