246f1a71 by simon

默认提交

1 parent 78606409
......@@ -77,7 +77,6 @@ var lazyspriteConfig = {
// Log for output msg.
function log() {
return;
var data = Array.prototype.slice.call(arguments);
gutil.log.apply(false, data);
}
......@@ -251,15 +250,15 @@ function watch(cb) {
});
watcher
.on('change', function (file) {
// log(gutil.colors.yellow(file) + ' is changed');
log(gutil.colors.yellow(file) + ' is changed');
watchHandler('changed', file);
})
.on('add', function (file) {
// log(gutil.colors.yellow(file) + ' is added');
log(gutil.colors.yellow(file) + ' is added');
watchHandler('add', file);
})
.on('unlink', function (file) {
// log(gutil.colors.yellow(file) + ' is deleted');
log(gutil.colors.yellow(file) + ' is deleted');
watchHandler('removed', file);
});
......
{
"pages": [
"pages/index/index",
"pages/auction-list/auction-list",
"pages/auction-mine/auction-mine",
"pages/auction-detail/auction-detail",
"pages/auction-bid-detail/auction-bid-detail",
"pages/seckill-list/seckill-list",
"pages/seckill-mine/seckill-mine",
"pages/seckill-detail/seckill-detail",
"pages/user-center/user-center",
"pages/index/index",
"pages/scan-result/scan-result",
"pages/gift-shop/gift-shop",
"pages/gift-detail/gift-detail",
......
/**
* ------------------------------------------------------------------
* Sass Minxins
*
* 参考收集:
* https://github.com/twbs/bootstrap-sass/tree/master/assets/stylesheets/bootstrap/mixins
* ------------------------------------------------------------------
*
*/
// 居中按钮样式
@mixin btn-center($width, $height) {
width: $width;
......@@ -122,7 +112,19 @@
font-size: $fontSize;
border-radius: 8px;
background-color: #3680EB;
}
// 通用按钮
@mixin cb2($width:320px, $height:84px, $fontSize:32px) {
position: relative;
width: $width;
height: $height;
line-height: $height;
text-align: center;
font-size: $fontSize;
border-radius: 8px;
color: #3680EB;
border: solid 1PX #3680EB;
}
......
/**
* ------------------------------------------------------------------
* 支持文件
* 需要引用的地方均需要加上这个支持文件
*
* ------------------------------------------------------------------
*
*/
@import "mixins";
......
/**
* ------------------------------------------------------------------
* 原子类
*
* ------------------------------------------------------------------
*
*/
@import "support";
@import "support";
// // Margin
// .u-mt-smaller {
......@@ -204,48 +197,52 @@
.bis {
background-repeat: no-repeat;
background-size: 100% 100%;
}
.bis {
background-repeat: no-repeat;
background-size: 100% 100%;
}
//flex 布局和 子元素 对其方式
.fl {
display: flex;
}
//flex 布局和 子元素 对其方式
.fl {
display: flex;
}
.fj {
display: flex;
justify-content: space-between;
}
.fj {
display: flex;
justify-content: space-between;
}
.fje {
.fje {
display: flex;
justify-content: flex-end;
}
//水平和垂直居中
.fcc {
display: flex;
justify-content: center;
align-items: center;
}
// 为元素设定的宽度和高度决定了元素的边框盒。
.bb {
box-sizing: border-box;
}
// 满屏
.fullp {
width: 100%;
height: 100%;
}
.shadow {
//水平和垂直居中
.fcc {
display: flex;
justify-content: center;
align-items: center;
}
// 为元素设定的宽度和高度决定了元素的边框盒。
.bb {
box-sizing: border-box;
}
// 满屏
.fullp {
width: 100%;
height: 100%;
}
.shadow {
box-shadow: 0 6px 18px 0 rgba(0, 0, 0, 0.10);
border-radius: 8px;
}
.linear {
background-image: linear-gradient(to right, #1bade8, #3680EB);
}
......
/**
* ------------------------------------------------------------------
* Sass 变量
*
* ------------------------------------------------------------------
*
*/
// // Margin
// $marginTopSmaller: 20px;
......
......@@ -35,9 +35,26 @@ module.exports = {
signInfo: '/sign/info', // post 签到信息 用户注册接口
sign: '/sign', // post 签到动作 用户注册接口
signRecord: '/sign/record', // post 签到记录 用户注册接口
saveOpenid:'/member/save/subscription/openid', //保存 openid
saveOpenid: '/member/save/subscription/openid', //保存 openid
// 拍卖
auctionList: '/auction/list', // post 拍卖列表
auctionDetail: '/auction/detail', // post 获得秒杀产品详细信息
auctionSubmit: '/auction/submit', // post 拍卖出价提交
auctionRecordList: '/auction/record/list', // post 拍卖出价列表
auctionRecordLast: '/auction/record/last', // post 获得最高价 和列表
auctionMine: '/auction/member', // post 我的拍卖产品
// 秒杀
seckillList: '/seckill/list', // post 秒杀列表
seckillDetail: '/seckill/detail', // post 秒杀详情
member: '/member', // post 秒杀收件人信息获取
seckillSubmit: '/seckill/submit', // post 提交秒杀订单
seckillMine: '/seckill/member', // post 我的秒杀产品
areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询
uploadFile: '/kdapi/file/upload' //上传图片通用接口
// websocket 链接
}
......
......@@ -4,14 +4,52 @@ import {
let app = getApp();
Page({
data: {},
data: {
authorizeVisible: false,
productInfo: {},
navBackTimeout: 0,
},
onShareAppMessage() {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onLoad(options) {},
onLoad(options) {
this.queryAuctionDetail(options.code);
},
onShow() {},
/**
* 秒杀详情
*/
queryAuctionDetail(code) {
let _this = this;
return new Promise((resolve, reject) => {
app.post({
url: app.api.auctionDetail,
data: {
auctionCode: code
}
}).then((result) => {
this.setData({
productInfo: result
})
// wx.setNavigationBarTitle({
// title: result.auctionName || "拍卖活动"
// })
resolve();
}).catch((err) => {
clearTimeout(_this.data.navBackTimeout);
_this.data.navBackTimeout = setTimeout(() => {
wx.navigateBack({
delta: 1
});
}, 1000);
});
})
},
// 隐藏蒙层
hideMask() {
this.setData({
......
{
"navigationBarTitleText": "拍卖活动列表"
"navigationBarTitleText": "拍卖活动"
}
......
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
$contentWidth:690px;
.page {
.bgc {}
padding-bottom: $pageBottom;
.bgc {}
.bg {}
.main {
.top-space {
height: 0px;
}
.content {
position: relative;
min-height: 1000px;
// 产品图片
.img-wrap {
$imgWidth: 750px;
$imgHeight: 480px;
width: $imgWidth;
height: $imgHeight;
border: 1PX solid #F0F0F0;
border-radius: 4px;
@extend .bb;
.swiper {
width: $imgWidth;
height: $imgHeight;
.swiper-image {
width: $imgWidth;
height: $imgHeight;
}
}
}
// 价格栏
.func {
position: relative;
$funcHei: 120px;
height: $funcHei;
display: flex;
justify-content: space-between;
background-color: #f2f2f2;
.arrow {
top: 0;
left: 450px;
position: absolute;
width: 0;
height: 0;
border: $funcHei/2 solid transparent;
border-left-color: #f2f2f2;
}
&-ele {
display: flex;
font-size: 22px;
@extend .bb;
.prize {
color: #cb3939;
font-size: 52px;
font-weight: bold;
}
}
&-left {
align-items: center;
color: #333333;
padding-left: 24px;
font-size: 20px;
.t1 {
margin-left: 20px;
margin-top: 36px;
align-self: flex-start;
}
.t2 {}
.line-th {
text-decoration: line-through;
}
}
&-right {
text-align: right;
@extend .linear;
width: 300px;
height: $funcHei;
.bg {}
@include border-right-radius(4px);
color: #ffffff;
padding-right: 24px;
align-content: center;
flex-wrap: wrap;
.main {
.top-space {
height: 0px;
.t1 {
width: 100%;
font-size: 20px;
padding: 4px 0;
}
.date {
// width: 100%;
font-size: 22px;
}
}
}
// 描述
.desc {
position: relative;
font-size: 26px;
color: #666666;
width: $contentWidth;
margin: 0 auto;
.refresh-btn {
@include cb2(160px, 48px, 24px);
position: absolute;
right: 0;
top: 0;
}
&-tit {
font-size: 36px;
font-weight: bold;
color: #333333;
margin: 24px 0 10px;
width: 520px;
@include ellipsis(1);
}
&-t1 {
margin-top: 12px;
}
}
// 线
.line {
width: $contentWidth;
margin: 24px auto;
height: 1PX;
background-color: #666666;
opacity: 0.5;
}
// 拍卖详情
.auction {
width: $contentWidth;
margin: 24px auto 0;
font-size: 24px;
&-desc {
color: #666666;
display: flex;
flex-wrap: wrap;
.content {
position: relative;
.t1 {
width: 50%;
padding: 6px 0;
// @extend .bb;
}
}
&-table {
@extend .bb;
padding: 24px 0 24px 40px;
background-color: #f8f8f8;
border-radius: 8px;
margin-top: 24px;
font-size: 22px;
.tab {
&-item {
display: flex;
justify-content: space-between;
.item {
text-align: center;
height: 32px;
line-height: 32px;
margin: 6px 0;
@extend .bb;
padding: 0 6px;
}
.item1 {
width: 72px;
@extend .fcc;
.block {
width: 72px;
height: 32px;
line-height: 32px;
@extend .linear;
color: #ffffff;
border-radius: 4px;
}
}
.item2 {
width: 200px;
}
.item3 {
width: 120px;
}
.item4 {
flex: 1;
}
}
&-item2 {
color: #c9c9c9;
.item1 {
.block {
background: #c9c9c9;
}
}
}
}
.tips {
color: #3680EB;
margin-top: 32px;
}
}
}
}
// 提交按钮
.submit-btn {
@include cb(560px, 84px);
@extend .linear;
margin: 72px auto 0;
}
}
}
......
......@@ -4,7 +4,85 @@
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content">auction-list</view>
<view class="content">
<!-- 产品图 -->
<view class="img-wrap">
<swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{productInfo.auctionImage}}" wx:key="{{index}}">
<swiper-item>
<image class="swiper-image" src="{{item}}" mode="aspectFill" />
</swiper-item>
</block>
</swiper>
</view>
<!-- 价格栏 -->
<view class="func">
<view class="arrow"></view>
<view class="func-ele func-left">
<text class="prize">¥5</text>
<text class="t1">当前价格</text>
</view>
<view class="func-ele func-right">
<text class="t1">拍卖进行中</text>
<text class="t1 date">时间时间</text>
</view>
</view>
<!-- 描述 -->
<view class="desc">
<view class="refresh-btn">刷新价格</view>
<view class="desc-tit">标题</view>
<view class="desc-t1">描述</view>
<view class="desc-t1">活动区域</view>
</view>
<!-- 线 -->
<view class="line"></view>
<!-- 拍卖详情 -->
<view class="auction">
<view class="auction-desc">
<view class="t1">产品原价:280元</view>
<view class="t1">起拍价:280元</view>
<view class="t1">最小价格幅度:280元</view>
<view class="t1">延时周期:5分钟</view>
</view>
<view class="auction-table">
<view class="tab">
<view class="tab-item">
<view class="item item1">状态</view>
<view class="item item2">竞拍者</view>
<view class="item item3">出价</view>
<view class="item item4">时间</view>
</view>
<view class="tab-item">
<view class="item item1">
<view class="block">领先</view>
</view>
<view class="item item2">xxx123</view>
<view class="item item3">¥150</view>
<view class="item item4">2019.10.02 10:36:12</view>
</view>
<view class="tab-item tab-item2">
<view class="item item1">
<view class="block">领先</view>
</view>
<view class="item item2">xxx123</view>
<view class="item item3">¥150</view>
<view class="item item4">2019.10.02 10:36:12</view>
</view>
<view class="tab-item tab-item2">
<view class="item item1">
<view class="block">领先</view>
</view>
<view class="item item2">xxx123</view>
<view class="item item3">¥150</view>
<view class="item item4">2019.10.02 10:36:12</view>
</view>
</view>
<view class="tips">查看所有n次出价></view>
</view>
</view>
</view>
<!-- 按钮 -->
<view class="submit-btn">我要出价</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
......
import {
getBindtapData
} from '../../utils/util';
let Date = require('../../utils/date.js');
let app = getApp();
Page({
data: {},
data: {
authorizeVisible: 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.queryAuctionList();
},
// 到达底部
onReachBottom() {
if (this.data.dataList.length < this.data.total) {
this.setData({
page: this.data.page + 1
});
this.queryAuctionList();
}
},
// 重置页面列表 点击搜索条件时需要
resetPage() {
this.setData({
page: 1,
dataList: []
})
},
/**
* 详情页面
*/
onDetailHandler(evt) {
let curData = getBindtapData(evt);
console.log("curData:", curData);
if (curData.status == 0 || curData.status == 1) {
app.router.push({
path: "auctionDetail",
query: {
code: curData.auctionCode,
title: curData.auctionName
}
})
}
},
// 拍卖列表
queryAuctionList() {
return new Promise((resolve, reject) => {
app.post({
url: app.api.auctionList,
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
})
resolve();
})
})
},
// 隐藏蒙层
hideMask() {
this.setData({
......
{
"navigationBarTitleText": "拍卖活动列表"
"navigationBarTitleText": "拍卖活动"
}
......
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
$contentWidth:690px;
.page {
.bgc {}
.bgc {
background-color: #f8f8f8;
}
.bg {}
.main {
.top-space {
height: 0px;
}
.content {
position: relative;
.bg {}
// 我的按钮
.my-btn {
display: flex;
justify-content: flex-end;
.main {
.top-space {
height: 0px;
.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 24px;
.image {
width: 120px;
height: 120px;
}
}
.content {
.cont {
position: relative;
height: 100%;
flex: 1;
padding-right: 8px;
@extend .bb;
.t1 {
align-self: center;
padding: 4px 0;
width: 100%;
}
.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,33 @@
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content">auction-list</view>
<view class="content">
<!-- 我的拍卖按钮 -->
<view class="my-btn">
<view 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.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>
<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>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
......
......@@ -12,8 +12,8 @@
</view>
<view class="cont">
<view class="t1">{{item.prizeName}}</view>
<view class="t1 t2">190701-190714</view>
<view class="t1 t3">{{item.activityName}}</view>
<view class="t1 t2">{{item.activityName}}</view>
<view class="t1 t3">推广积分第一名</view>
</view>
<view bindtap="onReceiveHandler" wx:if="{{item.acceptType == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn">领取</view>
<view wx:if="{{item.acceptType == 1}}" class="btn">已领取</view>
......
import {
getBindtapData
} from '../../utils/util';
let app = getApp();
Page({
data: {},
onShareAppMessage() {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onLoad(options) {},
// 隐藏蒙层
hideMask() {
this.setData({
authorizeVisible: false,
})
},
// 子组件事件
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
// 隐藏弹窗
case "_evt_hide_mask":
this.hideMask();
break;
default:
break;
}
},
})
{
"navigationBarTitleText": "demo"
}
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
import {
getBindtapData
} from '../../utils/util';
let app = getApp();
Page({
data: {},
onShareAppMessage() {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onLoad(options) {},
// 隐藏蒙层
hideMask() {
this.setData({
authorizeVisible: false,
})
},
// 子组件事件
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
// 隐藏弹窗
case "_evt_hide_mask":
this.hideMask();
break;
default:
break;
}
},
})
{
"navigationBarTitleText": "demo"
}
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
import {
getBindtapData
} from '../../utils/util';
let app = getApp();
Page({
data: {},
onShareAppMessage() {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onLoad(options) {},
// 隐藏蒙层
hideMask() {
this.setData({
authorizeVisible: false,
})
},
// 子组件事件
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
// 隐藏弹窗
case "_evt_hide_mask":
this.hideMask();
break;
default:
break;
}
},
})
{
"navigationBarTitleText": "demo"
}
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
......@@ -7,7 +7,7 @@ $contentWidth: 690px;
padding-bottom: $pageBottom;
.bgc {
background-color: #131413;
// background-color: #131413;
}
.bg {}
......
......@@ -26,6 +26,11 @@ const routerPath = {
auctionDetail: '/pages/auction-detail/auction-detail', // 拍卖活动详情
auctionBidDetail: '/pages/auction-bid-detail/auction-bid-detail', // 拍卖出价详情
// 秒杀
seckillList: '/pages/seckill-list/seckill-list', // 秒杀活动列表
seckillMine: '/pages/seckill-mine/seckill-mine', // 我的秒杀订单
seckillDetail: '/pages/seckill-detail/seckill-detail', // 秒杀活动详情
webview: '/pages/webview/webview',
example: '/pages/example/example',
more: '/pages/more/more',
......