Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
zhiliang-light-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1cb94cb4
authored
2019-10-10 12:05:22 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改js,json等文件时候,只复制被修改文件,而非全文件覆盖.
1 parent
dd9d6ed0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
6 deletions
gulpfile.js
src/http/api.js
src/pages/auction-detail/auction-detail.js
src/pages/auction-detail/auction-detail.wxml
src/pages/auction-mine/auction-mine.js
src/pages/auction-mine/auction-mine.wxml
gulpfile.js
View file @
1cb94cb
...
...
@@ -6,6 +6,7 @@
var
path
=
require
(
'path'
);
var
gulp
=
require
(
'gulp'
);
var
changed
=
require
(
'gulp-changed'
);
var
sass
=
require
(
'gulp-sass'
);
var
rename
=
require
(
'gulp-rename'
);
var
imagemin
=
require
(
'gulp-imagemin'
);
...
...
@@ -46,6 +47,7 @@ var paths = {
imgFiles
:
'src/image/**/*'
,
scssFiles
:
'src/**/*.scss'
,
baseFiles
:
[
'src/**/*.{png,js,json,wxml,wxss,wxs,ts,woff2}'
,
'!src/assets/**/*'
,
'!src/image/**/*'
],
busFiles
:
[
'src/**/*.{js,json}'
,
'!src/assets/**/*'
,
'!src/image/**/*'
,
'!src/ui/**/*'
],
assetsDir
:
'src/assets'
,
assetsImgFiles
:
'src/assets/images/**/*.{png,jpg,jpeg,svg,gif}'
,
wxmlFiles
:
[
'src/**/*.wxml'
],
...
...
@@ -135,6 +137,12 @@ function sassCompile() {
.
pipe
(
gulp
.
dest
(
paths
.
dist
.
baseDir
))
}
// 复制业务文件 只复制修改过的文件
function
copyModifyFiles
()
{
return
gulp
.
src
(
paths
.
src
.
busFiles
)
.
pipe
(
changed
(
paths
.
dist
.
baseDir
))
.
pipe
(
gulp
.
dest
(
paths
.
dist
.
baseDir
));
}
// 复制基础文件
function
copyBasicFiles
()
{
...
...
@@ -152,7 +160,6 @@ function copyWXML() {
// 重写WXML 中 image 标签中的图片路径
function
wxmlImgRewrite
()
{
var
res
=
config
.
assetsCDN
+
config
.
qcloud
.
prefix
+
'/'
;
// console.log(res);
return
gulp
.
src
(
paths
.
src
.
wxmlFiles
)
// .pipe(replace('%ASSETS_IMG%/', res))
.
pipe
(
gulp
.
dest
(
paths
.
dist
.
baseDir
))
...
...
@@ -233,7 +240,8 @@ var watchHandler = function (type, file) {
var
tmp
=
file
.
replace
(
'src/'
,
'dist/'
);
del
([
tmp
]);
}
else
{
copyBasicFiles
();
// copyBasicFiles();
copyModifyFiles
();
// 复制修改过的业务文件
// copyWXML();
wxmlImgRewrite
();
}
...
...
src/http/api.js
View file @
1cb94cb
...
...
@@ -43,7 +43,7 @@ module.exports = {
auctionSubmit
:
'/auction/submit'
,
// post 拍卖出价提交
auctionRecordList
:
'/auction/record/list'
,
// post 拍卖出价列表
auctionRecordLast
:
'/auction/record/last'
,
// post 获得最高价 和列表
auctionMine
:
'/auction/member'
,
// post 我的拍卖产品
auctionMine
:
'/auction/member
/list
'
,
// post 我的拍卖产品
// 秒杀
seckillList
:
'/seckill/list'
,
// post 秒杀列表
...
...
src/pages/auction-detail/auction-detail.js
View file @
1cb94cb
...
...
@@ -172,6 +172,7 @@ Page({
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd hh:mm:ss"
);
element
.
memberPhone
=
element
.
memberPhone
.
substr
(
0
,
3
)
+
'****'
+
element
.
memberPhone
.
substr
(
7
);
});
priceInfo
=
[];
this
.
setData
({
priceInfo
:
priceInfo
,
maxPrice
:
result
.
maxPrice
||
0
,
...
...
src/pages/auction-detail/auction-detail.wxml
View file @
1cb94cb
...
...
@@ -47,6 +47,7 @@
<view class="t1">延时周期:{{productInfo.delayPeriod}}</view>
</view>
<view class="auction-table">
<view wx:if="{{priceInfo && priceInfo.length > 0}}">
<view class="tab">
<!-- 表头 -->
<view class="tab-item">
...
...
@@ -67,6 +68,8 @@
</view>
<view bindtap="onShowAuctionBidDetailHandler" class="tips">查看所有{{priceTotal}}次出价></view>
</view>
<view wx:else>大家都很矜持,该拍卖还未有人出价</view>
</view>
</view>
</view>
<!-- 按钮 -->
...
...
src/pages/auction-mine/auction-mine.js
View file @
1cb94cb
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
:
[]
})
},
// 拍卖列表
queryAuctionList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
url
:
app
.
api
.
auctionMine
,
data
:
{
page
:
this
.
data
.
page
,
size
:
this
.
data
.
size
,
}
}).
then
((
result
)
=>
{
if
(
!
result
)
return
;
if
(
!
result
.
list
)
return
;
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
({
...
...
src/pages/auction-mine/auction-mine.wxml
View file @
1cb94cb
...
...
@@ -4,7 +4,22 @@
<!-- <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="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="tt tit">{{item.auctionName}}</view>
<view class="tt t2">活动区域:{{item.district}}</view>
<view class="tt t3">{{item.dateStr}}</view>
<view class="tt t4 m1">{{item.dateStr}}</view>
<view class="tt t4">{{item.dateStr}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
...
...
Please
register
or
sign in
to post a comment