1cb94cb4 by simon

修改js,json等文件时候,只复制被修改文件,而非全文件覆盖.

1 parent dd9d6ed0
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
6 6
7 var path = require('path'); 7 var path = require('path');
8 var gulp = require('gulp'); 8 var gulp = require('gulp');
9 var changed = require('gulp-changed');
9 var sass = require('gulp-sass'); 10 var sass = require('gulp-sass');
10 var rename = require('gulp-rename'); 11 var rename = require('gulp-rename');
11 var imagemin = require('gulp-imagemin'); 12 var imagemin = require('gulp-imagemin');
...@@ -46,6 +47,7 @@ var paths = { ...@@ -46,6 +47,7 @@ var paths = {
46 imgFiles: 'src/image/**/*', 47 imgFiles: 'src/image/**/*',
47 scssFiles: 'src/**/*.scss', 48 scssFiles: 'src/**/*.scss',
48 baseFiles: ['src/**/*.{png,js,json,wxml,wxss,wxs,ts,woff2}', '!src/assets/**/*', '!src/image/**/*'], 49 baseFiles: ['src/**/*.{png,js,json,wxml,wxss,wxs,ts,woff2}', '!src/assets/**/*', '!src/image/**/*'],
50 busFiles: ['src/**/*.{js,json}', '!src/assets/**/*', '!src/image/**/*', '!src/ui/**/*'],
49 assetsDir: 'src/assets', 51 assetsDir: 'src/assets',
50 assetsImgFiles: 'src/assets/images/**/*.{png,jpg,jpeg,svg,gif}', 52 assetsImgFiles: 'src/assets/images/**/*.{png,jpg,jpeg,svg,gif}',
51 wxmlFiles: ['src/**/*.wxml'], 53 wxmlFiles: ['src/**/*.wxml'],
...@@ -135,6 +137,12 @@ function sassCompile() { ...@@ -135,6 +137,12 @@ function sassCompile() {
135 .pipe(gulp.dest(paths.dist.baseDir)) 137 .pipe(gulp.dest(paths.dist.baseDir))
136 } 138 }
137 139
140 // 复制业务文件 只复制修改过的文件
141 function copyModifyFiles() {
142 return gulp.src(paths.src.busFiles)
143 .pipe(changed(paths.dist.baseDir))
144 .pipe(gulp.dest(paths.dist.baseDir));
145 }
138 146
139 // 复制基础文件 147 // 复制基础文件
140 function copyBasicFiles() { 148 function copyBasicFiles() {
...@@ -152,7 +160,6 @@ function copyWXML() { ...@@ -152,7 +160,6 @@ function copyWXML() {
152 // 重写WXML 中 image 标签中的图片路径 160 // 重写WXML 中 image 标签中的图片路径
153 function wxmlImgRewrite() { 161 function wxmlImgRewrite() {
154 var res = config.assetsCDN + config.qcloud.prefix + '/'; 162 var res = config.assetsCDN + config.qcloud.prefix + '/';
155 // console.log(res);
156 return gulp.src(paths.src.wxmlFiles) 163 return gulp.src(paths.src.wxmlFiles)
157 // .pipe(replace('%ASSETS_IMG%/', res)) 164 // .pipe(replace('%ASSETS_IMG%/', res))
158 .pipe(gulp.dest(paths.dist.baseDir)) 165 .pipe(gulp.dest(paths.dist.baseDir))
...@@ -233,7 +240,8 @@ var watchHandler = function (type, file) { ...@@ -233,7 +240,8 @@ var watchHandler = function (type, file) {
233 var tmp = file.replace('src/', 'dist/'); 240 var tmp = file.replace('src/', 'dist/');
234 del([tmp]); 241 del([tmp]);
235 } else { 242 } else {
236 copyBasicFiles(); 243 // copyBasicFiles();
244 copyModifyFiles(); // 复制修改过的业务文件
237 // copyWXML(); 245 // copyWXML();
238 wxmlImgRewrite(); 246 wxmlImgRewrite();
239 } 247 }
......
...@@ -43,7 +43,7 @@ module.exports = { ...@@ -43,7 +43,7 @@ module.exports = {
43 auctionSubmit: '/auction/submit', // post 拍卖出价提交 43 auctionSubmit: '/auction/submit', // post 拍卖出价提交
44 auctionRecordList: '/auction/record/list', // post 拍卖出价列表 44 auctionRecordList: '/auction/record/list', // post 拍卖出价列表
45 auctionRecordLast: '/auction/record/last', // post 获得最高价 和列表 45 auctionRecordLast: '/auction/record/last', // post 获得最高价 和列表
46 auctionMine: '/auction/member', // post 我的拍卖产品 46 auctionMine: '/auction/member/list', // post 我的拍卖产品
47 47
48 // 秒杀 48 // 秒杀
49 seckillList: '/seckill/list', // post 秒杀列表 49 seckillList: '/seckill/list', // post 秒杀列表
......
...@@ -172,6 +172,7 @@ Page({ ...@@ -172,6 +172,7 @@ Page({
172 element.recordTime = new Date(element.recordTime).toString("yyyy.MM.dd hh:mm:ss"); 172 element.recordTime = new Date(element.recordTime).toString("yyyy.MM.dd hh:mm:ss");
173 element.memberPhone = element.memberPhone.substr(0, 3) + '****' + element.memberPhone.substr(7); 173 element.memberPhone = element.memberPhone.substr(0, 3) + '****' + element.memberPhone.substr(7);
174 }); 174 });
175 priceInfo = [];
175 this.setData({ 176 this.setData({
176 priceInfo: priceInfo, 177 priceInfo: priceInfo,
177 maxPrice: result.maxPrice || 0, 178 maxPrice: result.maxPrice || 0,
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
47 <view class="t1">延时周期:{{productInfo.delayPeriod}}</view> 47 <view class="t1">延时周期:{{productInfo.delayPeriod}}</view>
48 </view> 48 </view>
49 <view class="auction-table"> 49 <view class="auction-table">
50 <view wx:if="{{priceInfo && priceInfo.length > 0}}">
50 <view class="tab"> 51 <view class="tab">
51 <!-- 表头 --> 52 <!-- 表头 -->
52 <view class="tab-item"> 53 <view class="tab-item">
...@@ -67,6 +68,8 @@ ...@@ -67,6 +68,8 @@
67 </view> 68 </view>
68 <view bindtap="onShowAuctionBidDetailHandler" class="tips">查看所有{{priceTotal}}次出价></view> 69 <view bindtap="onShowAuctionBidDetailHandler" class="tips">查看所有{{priceTotal}}次出价></view>
69 </view> 70 </view>
71 <view wx:else>大家都很矜持,该拍卖还未有人出价</view>
72 </view>
70 </view> 73 </view>
71 </view> 74 </view>
72 <!-- 按钮 --> 75 <!-- 按钮 -->
......
1 import { 1 import {
2 getBindtapData 2 getBindtapData
3 } from '../../utils/util'; 3 } from '../../utils/util';
4 let Date = require('../../utils/date.js');
4 5
5 let app = getApp(); 6 let app = getApp();
6 Page({ 7 Page({
7 data: {}, 8 data: {
9 authorizeVisible: false,
10 total: 0,
11 page: 1,
12 size: 10,
13 dataList: [],
14 },
8 onShareAppMessage() {}, 15 onShareAppMessage() {},
9 showAuth() { 16 showAuth() {
10 this.setData({ 17 this.setData({
11 authorizeVisible: true 18 authorizeVisible: true
12 }) 19 })
13 }, 20 },
14 onLoad(options) {}, 21 onShow() {
22
23 },
24 onLoad(options) {
25 this.resetPage();
26 this.initData();
27 },
28 initData() {
29 this.queryAuctionList();
30 },
31
32 // 到达底部
33 onReachBottom() {
34 if (this.data.dataList.length < this.data.total) {
35 this.setData({
36 page: this.data.page + 1
37 });
38 this.queryAuctionList();
39 }
40 },
41
42 // 重置页面列表 点击搜索条件时需要
43 resetPage() {
44 this.setData({
45 page: 1,
46 dataList: []
47 })
48 },
49
50 // 拍卖列表
51 queryAuctionList() {
52 return new Promise((resolve, reject) => {
53 app.post({
54 url: app.api.auctionMine,
55 data: {
56 page: this.data.page,
57 size: this.data.size,
58 }
59 }).then((result) => {
60 if (!result) return;
61 if (!result.list) return;
62 let dataList = result.list;
63 dataList.forEach(element => {
64 element.dateStr = new Date(element.startTime).toString("yyyy.MM.dd hh:mm") + " - " + new Date(element.endTime).toString("yyyy.MM.dd hh:mm");
65 });
66 dataList = this.data.dataList.concat(dataList);
67 this.setData({
68 dataList: dataList,
69 total: result.total
70 })
71 resolve();
72 })
73 })
74 },
75
15 // 隐藏蒙层 76 // 隐藏蒙层
16 hideMask() { 77 hideMask() {
17 this.setData({ 78 this.setData({
......
...@@ -4,7 +4,22 @@ ...@@ -4,7 +4,22 @@
4 <!-- <view class="app__top-shadow"></view> --> 4 <!-- <view class="app__top-shadow"></view> -->
5 <view class="app__content main"> 5 <view class="app__content main">
6 <view class="top-space"></view> 6 <view class="top-space"></view>
7 <view class="content">我的竞拍订单</view> 7 <view class="content">
8 <view class="list">
9 <view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
10 <view class="prize">
11 <image class="image" mode="aspectFill" src="{{item.auctionImage && item.auctionImage[0] || ''}}" />
12 </view>
13 <view class="cont">
14 <view class="tt tit">{{item.auctionName}}</view>
15 <view class="tt t2">活动区域:{{item.district}}</view>
16 <view class="tt t3">{{item.dateStr}}</view>
17 <view class="tt t4 m1">{{item.dateStr}}</view>
18 <view class="tt t4">{{item.dateStr}}</view>
19 </view>
20 </view>
21 </view>
22 </view>
8 </view> 23 </view>
9 </view> 24 </view>
10 <van-popup show="{{ authorizeVisible }}"> 25 <van-popup show="{{ authorizeVisible }}">
......