diff --git a/components/emptyPage.vue b/components/emptyPage.vue index 0f2ba27..612c5ac 100644 --- a/components/emptyPage.vue +++ b/components/emptyPage.vue @@ -1,7 +1,7 @@ @@ -15,31 +15,36 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- - export default{ + export default { props: { title: { type: String, default: '暂无记录', }, + color: { + type: String, + default: "#999" + } }, } - + \ No newline at end of file diff --git a/pages/activity/presell/index.vue b/pages/activity/presell/index.vue index 54268e4..bc71290 100644 --- a/pages/activity/presell/index.vue +++ b/pages/activity/presell/index.vue @@ -4,45 +4,65 @@ + + + + + - + - + - + {{item.store_name}} - - ¥ - {{item.price}} - - - - - - 立即采购 - - + + ¥ + {{item.price}} + + + + + + 立即采购 + + - - - - - - 非常抱歉! - 供销农资春节期间暂停发货,年后恢复购买~ - - + + + + + + + + + + + 非常抱歉! + 供销农资春节期间暂停发货,年后恢复购买~ + + @@ -60,6 +80,7 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- + import emptyPage from '@/components/emptyPage.vue'; import { getSeckillIndexTime, getPresellList @@ -68,20 +89,32 @@ // #ifndef H5 import passwordPopup from '@/components/passwordPopup'; // #endif - import { configMap } from "@/utils"; - import { mapGetters } from "vuex"; - import { HTTP_REQUEST_URL } from '@/config/app'; -import { Toast } from '../../../libs/uniApi.js'; + import { + configMap + } from "@/utils"; + import { + mapGetters + } from "vuex"; + import { + HTTP_REQUEST_URL + } from '@/config/app'; + import { + Toast + } from '../../../libs/uniApi.js'; export default { - computed: configMap({statusBarHeight:0},mapGetters(['viewColor','keyColor'])), + computed: configMap({ + statusBarHeight: 0 + }, mapGetters(['viewColor', 'keyColor'])), components: { // #ifndef H5 passwordPopup, // #endif - home + home, + emptyPage }, data() { return { + keyword: '', //搜索关键字 domain: HTTP_REQUEST_URL, topImage: '', presellList: [], @@ -108,9 +141,9 @@ import { Toast } from '../../../libs/uniApi.js'; // #ifdef MP onShareAppMessage: function() { wx.showShareMenu({ - withShareTicket: true, - menus: ['shareAppMessage', 'shareTimeline'] - }) + withShareTicket: true, + menus: ['shareAppMessage', 'shareTimeline'] + }) return { title: '预售活动', path: 'pages/activity/presell/index', @@ -119,32 +152,41 @@ import { Toast } from '../../../libs/uniApi.js'; onShareTimeline: function() { return { title: '预售活动', - query: { - key: '' - }, - imageUrl: '' - } + query: { + key: '' + }, + imageUrl: '' + } }, // #endif onLoad() { this.getPresellProductList(); }, - methods: { + methods: { goBack: function() { uni.navigateBack(); }, + + // 搜索商品 + search() { + var that = this; + that.loadend = false; + that.page = 1; + that.presellList = []; + that.getPresellProductList(); + }, + getPresellProductList: function() { var that = this; var data = { page: that.page, limit: that.limit, - // type: that.active + keyword: that.keyword }; if (that.loadend) return; if (that.pageloading) return; this.pageloading = true getPresellList(data).then(res => { - // console.log(res); var presellList = res.data.list; var loadend = presellList.length < that.limit; that.page++; @@ -158,7 +200,7 @@ import { Toast } from '../../../libs/uniApi.js'; }, settimeList: function(item, index) { var that = this; - that.active = index + that.active = index that.type = that.active; that.loadend = false; that.page = 1; @@ -167,7 +209,7 @@ import { Toast } from '../../../libs/uniApi.js'; that.getPresellProductList(); }, goDetails(item) { - // if(!item.type) return this.$refs.tipspopupRef.open(); // type表示该活动是否能点击 + // if(!item.type) return this.$refs.tipspopupRef.open(); // type表示该活动是否能点击 uni.navigateTo({ url: '/pages/activity/presell_details/index?id=' + item.product_presell_id }) @@ -186,23 +228,28 @@ import { Toast } from '../../../libs/uniApi.js'; .container { min-height: 100vh; // background-color: var(--view-theme); - background-color: #fd552a; + background-color: #fd552a; } - .noCommodity{ + + .noCommodity { border-top: none; } + .flash-sale .header { width: 100%; position: relative; } - .flash-sale .main_count{ + + .flash-sale .main_count { position: relative; // top: -150rpx; - top: -50rpx; + top: -50rpx; } + .flash-sale .header .presellBg { width: 750rpx; } + .flash-sale .presellList { padding: 0 20rpx; bottom: 0; @@ -213,23 +260,28 @@ import { Toast } from '../../../libs/uniApi.js'; line-height: 80rpx; height: 80rpx; } + .flash-sale .presellList .priceTag { width: 75rpx; height: 70rpx; } + .flash-sale .presellList .priceTag image { opacity: 1; } + .flash-sale .presellList .priceTag image { width: 100%; height: 100%; } + .flash-sale .timeList { display: flex; justify-content: center; align-items: center; margin: 0 auto; } + .flash-sale .timeList .item { font-size: 20rpx; color: #666; @@ -237,16 +289,20 @@ import { Toast } from '../../../libs/uniApi.js'; box-sizing: border-box; width: 224rpx; } + .flash-sale .timeList .item .time { font-size: 26rpx; color: #AAAAAA; } + .flash-sale .timeList .item.on .time { color: var(--view-theme); font-weight: 700; - span{ + + span { position: relative; - &::after{ + + &::after { content: ''; display: inline-block; width: 100%; @@ -259,6 +315,7 @@ import { Toast } from '../../../libs/uniApi.js'; } } } + .activity { padding: 0 20rpx; border: 1px solid var(--view-theme); @@ -267,6 +324,7 @@ import { Toast } from '../../../libs/uniApi.js'; line-height: 40rpx; position: relative; } + .activity:before { content: ' '; position: absolute; @@ -280,6 +338,7 @@ import { Toast } from '../../../libs/uniApi.js'; margin-bottom: -6rpx; border-left-color: #fff; } + .activity:after { content: ' '; position: absolute; @@ -293,9 +352,11 @@ import { Toast } from '../../../libs/uniApi.js'; margin-bottom: -6rpx; border-right-color: #fff; } - .flash-sale .list{ + + .flash-sale .list { margin-top: 24rpx; } + .flash-sale .list .item { height: 238rpx; position: relative; @@ -305,68 +366,82 @@ import { Toast } from '../../../libs/uniApi.js'; border-radius: 20rpx; padding: 0 25rpx; } + .flash-sale .list .item .pictrue { width: 200rpx; height: 200rpx; border-radius: 10rpx; } + .flash-sale .list .item .pictrue image { width: 100%; height: 100%; border-radius: 10rpx; } + .flash-sale .list .item .text { width: 420rpx; font-size: 30rpx; color: #333; } + .flash-sale .list .item .text .name { width: 100%; color: #282828; font-weight: bold; font-size: 28rpx; } + .flash-sale .list .item .text .booking { font-size: 30rpx; color: #E93323; } + .flash-sale .list .item .text .booking .count { font-size: 24rpx; color: #E93323; } + .flash-sale .list .item .text .limit { font-size: 22rpx; color: #999; margin-bottom: 5rpx; } + .flash-sale .list .item .text .limit .limitPrice { margin-left: 10rpx; } + .flash-sale .list .item .text .progress { width: 392rpx; height: 74rpx; background-size: 100%; margin-top: 16rpx; - .presell_price{ + + .presell_price { float: left; width: 50%; text-align: center; line-height: 15px; padding: 8rpx 0; - .presell_text{ + + .presell_text { display: block; color: #FF4F00; font-size: 20rpx; } - .price{ + + .price { font-size: 26rpx; color: #FF4F00; - text{ + + text { font-weight: bold; } } } - .order_btn{ + + .order_btn { float: left; width: 50%; text-align: center; @@ -374,29 +449,38 @@ import { Toast } from '../../../libs/uniApi.js'; font-size: 26rpx; line-height: 76rpx; } - .unStartBtn{ + + .unStartBtn { float: left; width: 50%; text-align: center; color: #FFFFFF; font-size: 20rpx; padding: 8rpx 0; - text{ + + text { font-size: 22rpx; } } } - .tool-bar{ + + .tool-bar { display: flex; align-items: center; height: 40px; + + .v-input /deep/.u-button__text { + font-size: 28rpx !important; + } } - .fixed-head{ + + .fixed-head { position: absolute; left: 0; top: var(--status-bar-height); width: 100%; z-index: 10; + .icon-xiangzuo { margin-right: 40rpx; margin-left: 20rpx; @@ -404,69 +488,78 @@ import { Toast } from '../../../libs/uniApi.js'; color: #fff; } } - .card_price{ - font-size: 32rpx; - color: #FF8056; - .card_small{ - font-size: 26rpx; - } - } - .card_bottom{ - display: flex; - justify-content: space-between; - align-items: flex-end; - overflow: hidden; - width: 100%; - // height: 140rpx; - - .card_left{ - font-size: 24rpx; - color: #616161; - width: 240rpx; - // height: 96rpx; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; /* 指定显示三行 */ - overflow: hidden; - text-overflow: ellipsis; - } - .card_right{ - flex-shrink: 0; - background-color: #FF593C; - width: 160rpx; - height: 80rpx; - background: #FF593C; - box-shadow: 0rpx 4rpx 8rpx 0rpx #FF5435; - border-radius: 84rpx; - margin-bottom: 8rpx; - display: flex; - justify-content: center; - align-items: center; - color: #fff; - } - } - .popup_ref{ - width: 583rpx; - height: 393rpx; - background: #fff; - border-radius: 30rpx 30rpx 30rpx 30rpx; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - color: #FF8056; - .p_icon{ - width: 250rpx; - height: 140rpx; - } - .p_item1{ - font-size: 30rpx; - padding: 30rpx 0; - } - .p_item2{ - font-size: 28rpx; - width: 380rpx; - text-align: center; - } - } - + + .card_price { + font-size: 32rpx; + color: #FF8056; + + .card_small { + font-size: 26rpx; + } + } + + .card_bottom { + display: flex; + justify-content: space-between; + align-items: flex-end; + overflow: hidden; + width: 100%; + // height: 140rpx; + + .card_left { + font-size: 24rpx; + color: #616161; + width: 240rpx; + // height: 96rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + /* 指定显示三行 */ + overflow: hidden; + text-overflow: ellipsis; + } + + .card_right { + flex-shrink: 0; + background-color: #FF593C; + width: 160rpx; + height: 80rpx; + background: #FF593C; + box-shadow: 0rpx 4rpx 8rpx 0rpx #FF5435; + border-radius: 84rpx; + margin-bottom: 8rpx; + display: flex; + justify-content: center; + align-items: center; + color: #fff; + } + } + + .popup_ref { + width: 583rpx; + height: 393rpx; + background: #fff; + border-radius: 30rpx 30rpx 30rpx 30rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + color: #FF8056; + + .p_icon { + width: 250rpx; + height: 140rpx; + } + + .p_item1 { + font-size: 30rpx; + padding: 30rpx 0; + } + + .p_item2 { + font-size: 28rpx; + width: 380rpx; + text-align: center; + } + } + \ No newline at end of file