| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <template>
- <view class='goodList'>
- <block v-for="(item,index) in bastList" :key="index">
- <view @click="goDetail(item)" class='item acea-row row-between-wrapper' hover-class="none">
- <view class='pictrue'>
- <image :src='item.image'></image>
- <span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '1'">秒杀</span>
- <span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '2'">砍价</span>
- <span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '3'">拼团</span>
- </view>
- <view class='underline'>
- <view class='text'>
- <view class='line1'>
- <text v-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red">自营</text><span v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</span>
- {{item.store_name}}
- </view>
- <view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
- <view class='vip-money acea-row row-middle' v-if="item.vip_price && item.vip_price > 0">¥{{item.vip_price || 0}}
- <image src='../../static/images/vip.png'></image><text class='num'>已售{{item.sales}}{{item.unit_name}}</text>
- </view>
- <view class='vip-money acea-row row-middle' v-else><text class='num'>已售{{item.sales}}{{item.unit_name}}</text></view>
- </view>
- </view>
- <view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view>
- </view>
- </block>
- </view>
- </template>
- <script>
- import {mapGetters} from "vuex";
- import { goShopDetail } from '@/libs/order.js'
- import {initiateAssistApi} from '@/api/activity.js';
- export default {
- computed: mapGetters(['uid']),
- props: {
- status: {
- type: Number,
- default: 0,
- },
- bastList: {
- type: Array,
- default: function() {
- return [];
- }
- },
- isLogin:{
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- };
- },
- methods: {
- goDetail(item){
- goShopDetail(item, this.uid).then(res => {
- if (this.isLogin) {
- initiateAssistApi(item.activity_id).then(res => {
- let id = res.data.product_assist_set_id;
- uni.hideLoading();
- // #ifndef MP
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- // #endif
- // #ifdef MP
- openBargainSubscribe().then(res => {
- uni.hideLoading();
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- }).catch((err) => {
- uni.hideLoading();
- });
- // #endif
- }).catch((err) => {
- uni.showToast({
- title: err,
- icon: 'none'
- })
- });
- } else {
- // #ifdef H5 || APP-PLUS
- toLogin();
- // #endif
- // #ifdef MP
- this.$emit('isShowAuth', true);
- this.$emit('isAuto', true);
- // #endif
- }
- })
- }
-
- }
- }
- </script>
- <style scoped lang='scss'>
-
- .goodList .item {
- position: relative;
- padding-left: 30rpx;
- }
- .goodList .item .pictrue {
- width: 180rpx;
- height: 180rpx;
- position: relative;
- }
- .goodList .item .pictrue image {
- width: 100%;
- height: 100%;
- border-radius: 6rpx;
- }
- .goodList .item .pictrue .numPic {
- position: absolute;
- left: 7rpx;
- top: 7rpx;
- width: 50rpx;
- height: 50rpx;
- border-radius: 50%;
- }
- .goodList .item .underline {
- padding: 30rpx 30rpx 30rpx 0;
- border-bottom: 1px solid #f5f5f5;
- }
- .goodList .item:nth-last-child(1) .underline {
- border-bottom: 0;
- }
- .goodList .item .text {
- font-size: 30rpx;
- color: #222;
- width: 489rpx;
- }
- .goodList .item .text .money {
- font-size: 26rpx;
- font-weight: bold;
- margin-top: 50rpx;
- }
- .goodList .item .text .money .num {
- font-size: 34rpx;
- }
- .goodList .item .text .vip-money {
- font-size: 24rpx;
- color: #282828;
- font-weight: bold;
- margin-top: 15rpx;
- }
- .goodList .item .text .vip-money image {
- width: 46rpx;
- height: 21rpx;
- margin-left: 5rpx;
- }
- .goodList .item .text .vip-money .num {
- font-size: 22rpx;
- color: #aaa;
- font-weight: normal;
- margin: -2rpx 0 0 22rpx;
- }
- .goodList .item .iconfont {
- position: absolute;
- right: 30rpx;
- width: 50rpx;
- height: 50rpx;
- border-radius: 50%;
- font-size: 30rpx;
- bottom: 38rpx;
- }
- </style>
|