7247f8c5 by simon

默认提交

1 parent 520483d3
......@@ -12,7 +12,6 @@
"pages/seckill-mine/seckill-mine",
"pages/seckill-detail/seckill-detail",
"pages/user-center/user-center",
"pages/scan-result/scan-result",
"pages/gift-shop/gift-shop",
......
......@@ -11,7 +11,7 @@
</swiper>
</view>
<scroll-view scroll-y="{{true}}" class="desc">
<text class="t1">产品特点:</text>
<!-- <text class="t1">产品特点:</text> -->
<text class="t2">
{{productInfo.productInfo}}
</text>
......
......@@ -4,6 +4,8 @@
$contentWidth:690px;
.page {
padding-bottom: $pageBottom;
.bgc {
background-color: #f8f8f8;
}
......@@ -54,20 +56,32 @@ $contentWidth:690px;
}
}
.cont {
position: relative;
height: 100%;
flex: 1;
// padding-right: 8px;
@extend .bb;
align-self: flex-start;
height: 160px;
.t1 {
align-self: center;
.up {}
.down {
position: absolute;
bottom: 0;
}
.tt {
padding: 4px 0;
width: 100%;
}
.t1 {
@include ellipsis(1);
font-size: 32px;
}
.t2 {
margin-top: 8px;
// font-size: 24px;
......
......@@ -15,9 +15,13 @@
<image class="image" mode="aspectFill" src="{{item.auctionImage && item.auctionImage[0] || ''}}" />
</view>
<view class="cont">
<view class="t1">{{item.auctionName}}</view>
<view class="t1 t2 t3">活动区域:{{item.district}}</view>
<view class="t1 t3">{{item.dateStr}}</view>
<view class="up">
<view class="tt t1">{{item.auctionName}}</view>
</view>
<view class="down">
<view class="tt t2 t3">活动区域:{{item.district}}</view>
<view class="tt t3">{{item.dateStr}}</view>
</view>
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn btn0">
未开始
......
import {
getBindtapData
} from '../../utils/util';
let Date = require('../../utils/date.js');
let app = getApp();
Page({
data: {},
data: {
authorizeVisible: false,
isInit: false,
total: 0,
page: 1,
size: 10,
dataList: [],
},
onShareAppMessage() {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onLoad(options) {},
onShow() {
},
onLoad(options) {
this.resetPage();
this.initData();
},
initData() {
this.querySeckillList();
},
// 到达底部
onReachBottom() {
if (this.data.dataList.length < this.data.total) {
this.setData({
page: this.data.page + 1
});
this.querySeckillList();
}
},
// 重置页面列表 点击搜索条件时需要
resetPage() {
this.setData({
page: 1,
dataList: []
})
},
/**
* 显示我的拍卖页
*/
onShowSeckillMineHandler() {
app.router.push({
path: "seckillMine"
})
},
/**
* 详情页面
*/
onDetailHandler(evt) {
let curData = getBindtapData(evt);
console.log("curData:", curData);
if (curData.status == 0 || curData.status == 1) {
if (curData.isCanDetail == 1) {
app.router.push({
path: "seckillDetail",
query: {
code: curData.seckillCode,
}
})
} else {
wx.showModal({
content: curData.reason || "您未达到进入条件",
showCancel: false,
success(res) {}
})
}
}
},
// 秒杀列表
querySeckillList() {
return new Promise((resolve, reject) => {
app.post({
url: app.api.seckillList,
data: {
page: this.data.page,
size: this.data.size,
}
}).then((result) => {
let dataList = result.list;
dataList.forEach(element => {
element.dateStr = new Date(element.startTime).toString("yyyy.MM.dd hh:mm") + " - " + new Date(element.endTime).toString("yyyy.MM.dd hh:mm");
});
dataList = this.data.dataList.concat(dataList);
this.setData({
dataList: dataList,
total: result.total,
isInit: true,
})
resolve();
})
})
},
// 隐藏蒙层
hideMask() {
this.setData({
......
{
"navigationBarTitleText": "demo"
"navigationBarTitleText": "秒杀活动"
}
......
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
$contentWidth:690px;
.page {
padding-bottom: $pageBottom;
.bgc {
background-color: #f8f8f8;
}
.bg {}
.main {
.top-space {
height: 0px;
}
.content {
position: relative;
// 我的按钮
.my-btn {
display: flex;
justify-content: flex-end;
.btn {
@include cb2(180px, 48px, 28px);
margin: 24px 24px 0 0;
}
}
// list
.list {
width: $contentWidth;
margin: 24px auto 0;
&-item {
@extend .bb;
padding: 30px 0;
display: flex;
justify-content: space-between;
align-items: center;
.prize {
margin: 0 20px;
border: solid 1PX #F0F0F0;
border-radius: 8px;
padding: 12px;
.image {
width: 120px;
height: 120px;
}
}
.cont {
position: relative;
height: 100%;
flex: 1;
// padding-right: 8px;
@extend .bb;
align-self: flex-start;
height: 160px;
.up {}
.down {
position: absolute;
bottom: 0;
}
.tt {
padding: 4px 0;
width: 100%;
}
.t1 {
@include ellipsis(1);
font-size: 32px;
}
.t2 {
margin-top: 8px;
// font-size: 24px;
// color: #999999;
}
.t3 {
font-size: 20px;
color: #999999;
// color: #3680EB;
}
}
.btn {
@include cb(120px, 48px, 24px);
margin: 0 16px 0 0;
align-self: flex-start;
}
.btn0 {
background-color: #fe9b28;
}
.btn1 {
background-color: #079815;
}
.btn2 {
background-color: #999999;
}
}
}
}
}
}
......
......@@ -4,7 +4,38 @@
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
<view class="content">
<!-- 我的拍卖按钮 -->
<view class="my-btn">
<view bindtap="onShowSeckillMineHandler" class="btn">我的秒杀</view>
</view>
<view class="list">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
<view class="prize">
<image class="image" mode="aspectFill" src="{{item.seckillImages && item.seckillImages[0] || ''}}" />
</view>
<view class="cont">
<view class="up">
<view class="tt t1">{{item.seckillName}}</view>
</view>
<view class="down">
<view class="tt t2 t3">活动区域:{{item.district}}</view>
<view class="tt t3">{{item.dateStr}}</view>
</view>
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn btn0">
未开始
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 1}}" data-data="{{item}}" data-index="{{index}}" class="btn btn1">
进行中
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 2}}" data-data="{{item}}" data-index="{{index}}" class="btn btn2">
已结束
</view>
</view>
</view>
</view>
<empty-tips-light inner-text="当前未有拍卖活动,敬请期待" wx:if="{{dataList.length <= 0 && isInit}}"></empty-tips-light>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
......