Authored by 孙凯

修改时间显示的问题 review by hongmo

@@ -62,9 +62,8 @@ export default class TransferShipmentCell extends Component { @@ -62,9 +62,8 @@ export default class TransferShipmentCell extends Component {
62 if (!data) { 62 if (!data) {
63 return null; 63 return null;
64 } 64 }
65 -  
66 let sku = data.productSku?data.productSku:0;//sku 65 let sku = data.productSku?data.productSku:0;//sku
67 - let createTimeStr= data.createTime?data.createTime:0;//下单时间 66 + let createTimeStr=data.createTime?data.createTime:0;//下单时间
68 let createTime= format(parseInt(createTimeStr)) 67 let createTime= format(parseInt(createTimeStr))
69 let isOvertime = data.isOvertime ? data.isOvertime : 'N';//是否超期 68 let isOvertime = data.isOvertime ? data.isOvertime : 'N';//是否超期
70 let checkBoxLableColor = isOvertime=='Y' ? 'red' : 'black'; 69 let checkBoxLableColor = isOvertime=='Y' ? 'red' : 'black';
@@ -164,7 +163,7 @@ export default class TransferShipmentCell extends Component { @@ -164,7 +163,7 @@ export default class TransferShipmentCell extends Component {
164 } 163 }
165 164
166 let {width, height} = Dimensions.get('window'); 165 let {width, height} = Dimensions.get('window');
167 -let fontSize = width<375 ? 13 : 15; 166 +let fontSize = width<375 ? 12 : 14;
168 167
169 const styles = StyleSheet.create({ 168 const styles = StyleSheet.create({
170 container: { 169 container: {
@@ -5,15 +5,7 @@ export function getLastDay() { @@ -5,15 +5,7 @@ export function getLastDay() {
5 return moment().subtract(1, 'days').format('YYYY-M-D'); 5 return moment().subtract(1, 'days').format('YYYY-M-D');
6 } 6 }
7 7
8 -export function add0(m){return m<10?'0'+m:m }  
9 export function format(shijianchuo) 8 export function format(shijianchuo)
10 { 9 {
11 -var time = new Date(shijianchuo);  
12 -var y = time.getFullYear();  
13 -var m = time.getMonth()+1;  
14 -var d = time.getDate();  
15 -var h = time.getHours();  
16 -var mm = time.getMinutes();  
17 -var s = time.getSeconds();  
18 -return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm)+':'+add0(s); 10 + return new Date(parseInt(shijianchuo) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ");
19 } 11 }