Browse Source

1.主页更多操作布局调整修改 2.主页分类商品布局调整修改 3.主页头部区域布局调整修改 4.主页分类商品添加收藏业务功能

master
dy-hu 8 months ago
parent
commit
23f8445e56
  1. 45
      components/canvasShow/basics/classifyHeader/app/index.vue
  2. 4
      components/canvasShow/basics/text.vue
  3. 6
      components/canvasShow/canvasShowPage.vue
  4. 8
      pages/tabbar/index/component/FixedHead.vue

45
components/canvasShow/basics/classifyHeader/app/index.vue

@ -23,14 +23,16 @@
<img class="img pic-img default-img" :src="item.image"
onerror="this.src='url(http://36.138.125.206:8081/ceres-local-file/image/default.png) no-repeat center';this.οnerrοr=null">
</div>
<image v-if="item.ifCollect === 1" class="collect-img" src="http://36.138.125.206:8081/ceres-local-file/image/prod_collect_active.png" @click.stop="onCollect(item, 0)"/>
<image v-else class="collect-img" src="http://36.138.125.206:8081/ceres-local-file/image/prod_collect_normal.png" @click.stop="onCollect(item, 1)"/>
<div class="product-swiper-info">
<div class="product-info-content">
<div class="product-name-row">
<label class="product-name">{{item.productName}}</label>
<image class="product-star"
<!-- <image class="product-star"
src="http://36.138.125.206:8081/ceres-local-file/image/icon_star.png">
</image>
<label class="product-star-text">3.5</label>
<label class="product-star-text">3.5</label>-->
</div>
<div class="product-sku-row" v-if="false">
<label class="product-sku-name">规格</label>
@ -98,6 +100,8 @@
</template>
<script>
const NET = require('../../../../../utils/request')
const API = require('../../../../../config/api')
import {
commonMixin
} from '../mixin'
@ -112,7 +116,33 @@
},
methods: {
//state10
onCollect(item, state){
let _this = this;
if (state === 1){
NET.request(API.collect, {
productId: parseInt(item.productId)
}, 'POST').then(res => {
// item.ifCollect = 1;
_this.$set(item, 'ifCollect', 1);
uni.showToast({
title: this.$t('common.collectsuccess'),
icon: "success"
})
})
}else {
NET.request(API.cancelCollect, {
ids: [item.productId]
}, 'PUT').then(res => {
// item.ifCollect = 0;
_this.$set(item, 'ifCollect', 0);
uni.showToast({
title: this.$t('common.cancelcollectsuccess'),
icon: "success"
})
})
}
}
}
}
</script>
@ -250,6 +280,15 @@
position: relative;
}
.collect-img {
width: 56rpx;
height: 56rpx;
position: absolute;
right: 35rpx;
top: 15rpx;
z-index: 999;
}
&-img {
width: 286upx;
height: 306upx;

4
components/canvasShow/basics/text.vue

@ -65,7 +65,9 @@
.btn-more{
position: absolute;
right: 0;
top: 10upx;
top: 30rpx;
margin-right: 30rpx;
color: #90919C;
}
}
}

6
components/canvasShow/canvasShowPage.vue

@ -8,6 +8,8 @@
:terminal="terminal"
:typeId="typeId"
:shopId="shopId"></com-header>
<!--类别分组-->
<com-classify-header v-if="item.type==='classify-header'"
:componentContent="item.componentContent"
:terminal="terminal"
@ -39,6 +41,7 @@
:terminal="terminal"
:typeId="typeId"
:shopId="shopId"></com-category-list>
<!--艺术风格-->
<com-product-group-list v-if="item.type==='productGroupList'"
:componentContent="item.componentContent"
:terminal="terminal"
@ -59,6 +62,7 @@
:terminal="terminal"
:typeId="typeId"
:shopId="shopId"></com-image-text-nav>
<!--新品推荐热销排行-->
<com-product v-if="item.type==='productList'"
ref="productPage"
:componentContent="item.componentContent"
@ -75,6 +79,8 @@
:terminal="terminal"
:typeId="typeId"
:shopId="shopId"></com-coupon>
<!--定制服务-->
<com-custom v-if="item.type==='custom'"
:componentContent="item.componentContent"
:terminal="terminal"

8
pages/tabbar/index/component/FixedHead.vue

@ -37,7 +37,7 @@
class="search_box"
@click="flyToService"
>
<image src="http://36.138.125.206:8081/ceres-local-file/image/service.png" />
<image src="http://36.138.125.206:8081/ceres-local-file/image/home_service.png" />
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
@ -50,7 +50,7 @@
}"
@click="flyToService"
>
<image src="http://36.138.125.206:8081/ceres-local-file/image/service.png" />
<image src="http://36.138.125.206:8081/ceres-local-file/image/home_service.png" />
</view>
<!-- #endif -->
</template>
@ -175,8 +175,8 @@ export default {
}
.search_box {
width: 60rpx;
height: 60rpx;
width: 48rpx;
height: 48rpx;
}
}
}

Loading…
Cancel
Save