123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440 |
- <template>
- <view class="model-6">
- <view :style="{backgroundColor:editablePageConfig.editable_page_config_content.back_color}" class="goods-list" :class="editablePageConfig.editable_page_config_content.show_format==2?'single-column':'double-column'">
- <view class="goods-item margin-bottom" v-for="(goods,index) in editablePageConfig.editable_page_config_content.goods_list" :key="index" @click="productClick(goods.goods_id)">
- <view class="goods-img">
- <image mode="aspectFit" class="img" :src="goods.goods_image">
- <view class="goods-tag-img" v-if="editablePageConfig.editable_page_config_content['if_show_goods_icon']==1 && editablePageConfig.editable_page_config_content['goods_icon']!=''">
- <image mode="aspectFit" class="img" :src="editablePageConfig.editable_page_config_content.goods_icon" />
- </view>
- </view>
- <view class="info-wrap">
- <view class="name-wrap">
- <view class="goods-name">{{goods.goods_name}}</view>
- </view>
- <view class="pro-info">
- <view class="delete-price" v-if="goods['goods_marketprice']>0">
- <text class="unit">¥</text>{{parseFloat(goods.goods_marketprice)}}
- </view>
- <view class="delete-price" v-if="goods['goods_price']>goods['goods_promotion_price']">
- <text class="unit">¥</text>{{parseFloat(goods.goods_price)}}
- </view>
- <view class="sale">{{goods.goods_salenum}}人已购</view>
- </view>
- <view class="lineheight-clear">
- <view class="discount-price">
- <text class="unit">¥</text>
- <text class="price">{{parseFloat(goods.goods_promotion_price)}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'Model6',
- data () {
- return {}
- },
- props: ['editablePageConfig','editablePage'],
- components: {
- },
- computed: {
- },
- methods: {
- productClick(goods_id) {
- uni.navigateTo({url: '/pages/home/goodsdetail/Goodsdetail?goods_id='+goods_id })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .model-6 .goods-list{
- border-radius:5px;
- }
- .model-6 .goods-list.single-column .goods-item {
- padding:13px;
- background:#fff;
- margin:5px 0;
- border-radius:5px;
- display:flex;
- position:relative;
- }
- .model-6 .goods-list.single-column .goods-item:first-child{
- margin-top: 0;
- }
- .model-6 .goods-list.single-column .goods-item:last-child{
- margin-bottom: 0;
- }
- .model-6 .goods-list.single-column .goods-item .goods-img {
- width:90px;
- height:90px;
- overflow:hidden;
- border-radius:5px;
- margin-right:10px;
- background:#e5e5e5;
- display:flex;
- justify-content:center;
- align-items:center;
- }
- .model-6 .goods-list.single-column .goods-item .goods-img .img {
- width: 100%;
- height: 100%;
- }
- .model-6 .goods-list.single-column .goods-item .goods-tag {
- color:#fff;
- line-height:1;
- padding:4px 6px;
- position:absolute;
- border-top-left-radius:5px;
- border-bottom-right-radius:5px;
- top:13px;
- left:13px;
- font-size:12px;
- background: #FF4544
- }
- .model-6 .goods-list.single-column .goods-item .goods-tag-img {
- position: absolute;
- border-top-left-radius: 5px;
- width: 40px;
- height: 40px;
- top: 13px;
- left: 13px;
- z-index: 5;
- overflow: hidden;
- margin: 0;
- }
- .model-6 .goods-list.single-column .goods-item .goods-tag-img .tag-wrap{
- background: #eee;
- font-size: 12px;
- padding: 5px;
- text-align: center;
- color: #999;
- }
- .model-6 .goods-list.single-column .goods-item .goods-tag-img .img {
- width: 100%;
- height: 100%;
- }
- .model-6 .goods-list.single-column .goods-item .info-wrap {
- flex:1;
- display:flex;
- flex-direction:column;
- }
- .model-6 .goods-list.single-column .goods-item .name-wrap {
- flex:1;
- }
- .model-6 .goods-list.single-column .goods-item .goods-name {
- font-size:14px;
- line-height:1.3;
- overflow:hidden;
- text-overflow:ellipsis;
- display:-webkit-box;
- -webkit-line-clamp:2;
- -webkit-box-orient:vertical;
- }
- .model-6 .goods-list.single-column .goods-item .discount-price {
- display:inline-block;
- font-weight:bold;
- line-height:1;
- margin-top:8px;
- color:#f44;
- }
- .model-6 .goods-list.single-column .goods-item .discount-price .unit {
- font-size:12px;
- }
- .model-6 .goods-list.single-column .goods-item .pro-info {
- display:flex;
- margin-top:8px;
- }
- .model-6 .goods-list.single-column .goods-item .pro-info .delete-price {
- text-decoration:line-through;
- flex:1;
- font-size:12px;
- line-height:1;
- color:#999;
- }
- .model-6 .goods-list.single-column .goods-item .pro-info .sale {
- font-size:12px;
- line-height:1;
- color:#999;
- }
- .model-6 .goods-list.single-column .goods-item .pro-info .sale {
- font-size:12px;
- }
- .model-6 .goods-list.single-column .goods-item .pro-info > view {
- line-height:1;
- }
- .model-6 .goods-list.single-column .goods-item .pro-info > view:nth-child(2) {
- text-align:right;
- }
- .model-6 .goods-list.single-column .goods-item .member-price-tag {
- display:inline-block;
- width:30px;
- line-height:1;
- margin-left:3px;
- }
- .model-6 .goods-list.single-column .goods-item .member-price-tag image {
- width:100%;
- }
- .model-6 .goods-list.double-column {
- display:flex;
- flex-wrap:wrap;
- margin: 0;
- padding: 0;
- }
- .model-6 .goods-list.double-column .goods-item {
- flex:1;
- position:relative;
- background:#fff;
- flex-basis:48%;
- max-width:calc((100% - 15px) / 2);
- margin-right:15px;
- margin-bottom:10px;
- border-radius:5px;
- }
- .model-6 .goods-list.double-column .goods-item:nth-child(2n) {
- margin-right:0;
- }
- .model-6 .goods-list.double-column .goods-item .goods-img {
- position:relative;
- height:0;
- overflow:hidden;
- padding-top:100%;
- border-top-left-radius:5px;
- border-top-right-radius:5px;
- background-color:#E8E8E8;
- }
- .model-6 .goods-list.double-column .goods-item .goods-img .img {
- position:absolute;
- top:50%;
- left:50%;
- transform:translate(-50%,-50%);
- width: 100%;
- height: 100%;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag {
- color:#fff;
- line-height:1;
- padding:4px 8px;
- position:absolute;
- border-bottom-right-radius:5px;
- top:0;
- left:0;
- font-size:12px;
- background: #FF4544;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img {
- position: absolute;
- border-top-left-radius: 5px;
- width: 40px;
- height: 40px;
- top: 0;
- left: 0;
- z-index: 5;
- overflow: hidden;
- margin: 0;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img .tag-wrap{
- background: #eee;
- font-size: 12px;
- padding: 5px;
- text-align: center;
- color: #999;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img .tag-wrap{
- background: #eee;
- font-size: 12px;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img .img {
- width: 100%;
- height: 100%;
- }
- .model-6 .goods-list.double-column .goods-item .info-wrap {
- padding:0 13px 13px 13px;
- }
- .model-6 .goods-list.double-column .goods-item .goods-name {
- font-size:14px;
- line-height:1.3;
- overflow:hidden;
- text-overflow:ellipsis;
- display:-webkit-box;
- -webkit-line-clamp:2;
- -webkit-box-orient:vertical;
- margin-top:10px;
- }
- .model-6 .goods-list.double-column .goods-item .discount-price {
- display:inline-block;
- font-weight:bold;
- line-height:1;
- margin-top:8px;
- color:#f44;
- font-size: 14px;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info {
- display:flex;
- margin-top:8px;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info .delete-price {
- text-decoration:line-through;
- flex:1;
- font-size:12px;
- line-height:1;
- color:#999;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info .sale {
- font-size:12px;
- line-height:1;
- color:#999;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info .delete-price .unit {
- margin-right:3px;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info > view {
- line-height:1;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info > view:nth-child(2) {
- text-align:right;
- }
- .model-6 .goods-list.double-column .goods-item .member-price-tag {
- display:inline-block;
- width:30px;
- line-height:1;
- margin-left:3px;
- }
- .model-6 .goods-list.double-column .goods-item .member-price-tag image {
- width:100%;
- }
- .model-6 .goods-list.double-column {
- display:flex;
- flex-wrap:wrap;
- margin: 0;
- padding: 0;
- }
- .model-6 .goods-list.double-column .goods-item {
- flex:1;
- position:relative;
- background:#fff;
- flex-basis:48%;
- max-width:calc((100% - 15px) / 2);
- margin-right:15px;
- margin-bottom:10px;
- border-radius:5px;
- }
- .model-6 .goods-list.double-column .goods-item:nth-child(2n) {
- margin-right:0;
- }
- .model-6 .goods-list.double-column .goods-item .goods-img {
- position:relative;
- height:0;
- overflow:hidden;
- padding-top:100%;
- border-top-left-radius:5px;
- border-top-right-radius:5px;
- background-color:#E8E8E8;
- }
- .model-6 .goods-list.double-column .goods-item .goods-img .img {
- position:absolute;
- top:50%;
- left:50%;
- transform:translate(-50%,-50%);
- width: 100%;
- height: 100%;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag {
- color:#fff;
- line-height:1;
- padding:4px 8px;
- position:absolute;
- border-bottom-right-radius:5px;
- top:0;
- left:0;
- font-size:12px;
- background: #FF4544;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img {
- position: absolute;
- border-top-left-radius: 5px;
- width: 40px;
- height: 40px;
- top: 0;
- left: 0;
- z-index: 5;
- overflow: hidden;
- margin: 0;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img .tag-wrap{
- background: #eee;
- font-size: 12px;
- padding: 5px;
- text-align: center;
- color: #999;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img .tag-wrap{
- background: #eee;
- font-size: 12px;
- }
- .model-6 .goods-list.double-column .goods-item .goods-tag-img .img {
- width: 100%;
- height: 100%;
- }
- .model-6 .goods-list.double-column .goods-item .info-wrap {
- padding:0 13px 13px 13px;
- }
- .model-6 .goods-list.double-column .goods-item .goods-name {
- font-size:14px;
- line-height:1.3;
- overflow:hidden;
- text-overflow:ellipsis;
- display:-webkit-box;
- -webkit-line-clamp:2;
- -webkit-box-orient:vertical;
- margin-top:10px;
- }
- .model-6 .goods-list.double-column .goods-item .discount-price {
- display:inline-block;
- font-weight:bold;
- line-height:1;
- margin-top:8px;
- color:#f44;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info {
- display:flex;
- margin-top:8px;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info .delete-price {
- text-decoration:line-through;
- flex:1;
- font-size:12px;
- line-height:1;
- color:#999;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info .sale {
- font-size:12px;
- line-height:1;
- color:#999;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info .delete-price .unit {
- margin-right:3px;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info > view {
- line-height:1;
- }
- .model-6 .goods-list.double-column .goods-item .pro-info > view:nth-child(2) {
- text-align:right;
- }
- .model-6 .goods-list.double-column .goods-item .member-price-tag {
- display:inline-block;
- width:30px;
- line-height:1;
- margin-left:3px;
- }
- .model-6 .goods-list.double-column .goods-item .member-price-tag image {
- width:100%;
- }
- </style>
|