Commit a5242a7a authored by zhengke's avatar zhengke

修改积分

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