Commit a5242a7a authored by zhengke's avatar zhengke

修改积分

parent 2487ad1f
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<div class="_block" v-for="item in ClassifyGoodsList"> <div class="_block" v-for="item in ClassifyGoodsList">
<el-row class="tit"> <el-row class="tit">
<div> <div>
<img src="../../assets/img/ps/shafa.png" alt=""> <img :src="item.typeIcon" alt="">
<p>{{item.typeName}}</p> <p>{{item.typeName}}</p>
</div> </div>
</el-row> </el-row>
...@@ -86,6 +86,26 @@ export default { ...@@ -86,6 +86,26 @@ export default {
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.ClassifyGoodsList = res.data.data; this.ClassifyGoodsList = res.data.data;
var num = 0;
this.ClassifyGoodsList.forEach(x=>{
if(x.list.length<8){
num=8-x.list.length;
}else{
num=0;
}
var obj = {
Id:'',
Images:'',
Price:'',
name:'',
typeIcon:'',
typeId:'',
typeName:''
}
for(var i=0;i<num;i++){
x.list.push(obj);
}
})
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -98,6 +118,27 @@ export default { ...@@ -98,6 +118,27 @@ export default {
this.apiJavaPost('/api/goodsMarket/getActivityClassifyGoods',{},res=>{ this.apiJavaPost('/api/goodsMarket/getActivityClassifyGoods',{},res=>{
if(res.data.resultCode==1){ if(res.data.resultCode==1){
this.dataList = res.data.data; this.dataList = res.data.data;
var num=0;
this.dataList.forEach(x=>{
if(x.list.length<6){
num=6-x.list.length;
}else{
num=0;
}
var obj = {
Description:'',
Id:'',
Images:'',
Price:'',
activityId:'',
activityImg:'',
activityName:'',
name:''
}
for(var i=0;i<num;i++){
x.list.push(obj);
}
})
}else{ }else{
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
border: 1px solid rgba(236, 236, 236, 1); border: 1px solid rgba(236, 236, 236, 1);
border-right: none; border-right: none;
border-top: none; border-top: none;
cursor: pointer;
} }
.commodity2 .commodity2_right .r_item>div img{ .commodity2 .commodity2_right .r_item>div img{
max-height: 150px; max-height: 150px;
...@@ -58,6 +57,9 @@ ...@@ -58,6 +57,9 @@
.commodity2 .r_item_img_box{ .commodity2 .r_item_img_box{
height: 175px; height: 175px;
} }
.comCanClick{
cursor: pointer;
}
</style> </style>
<template> <template>
<el-row class="commodity2"> <el-row class="commodity2">
...@@ -71,12 +73,12 @@ ...@@ -71,12 +73,12 @@
<el-row> <el-row>
<template v-for="item in data.list"> <template v-for="item in data.list">
<el-col :span="6" class="r_item"> <el-col :span="6" class="r_item">
<div @click="goDetail(item.Id)"> <div @click="goDetail(item.Id)" :class="{'comCanClick':item.Id}">
<div class="r_item_img_box"> <div class="r_item_img_box">
<img :src="item.Images.split(',')[0]" alt=""> <img :src="item.Images.split(',')[0]" alt="">
</div> </div>
<p>{{item.name}}</p> <p>{{item.name}}</p>
<p>¥ {{item.Price}}积分</p> <p v-if="item.Price">¥ {{item.Price}}积分</p>
</div> </div>
</el-col> </el-col>
</template> </template>
...@@ -97,7 +99,9 @@ export default { ...@@ -97,7 +99,9 @@ export default {
methods:{ methods:{
//跳转详情页面 //跳转详情页面
goDetail: function (id) { goDetail: function (id) {
this.$router.push({ path: 'productDetail', query: {id: id}}) if(id){
this.$router.push({ path: 'productDetail', query: {id: id}})
}
}, },
goList: function (type) { goList: function (type) {
this.$router.push({path: 'productList', query: {type: type}}) this.$router.push({path: 'productList', query: {type: type}})
......
...@@ -124,7 +124,6 @@ export default { ...@@ -124,7 +124,6 @@ export default {
}, },
//跳转详情页面 //跳转详情页面
goDetail: function (id) { goDetail: function (id) {
console.log(id);
if(id){ if(id){
this.$router.push({ path: 'productDetail', query: {id: id}}) this.$router.push({ path: 'productDetail', query: {id: id}})
} }
......
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