Authored by 孙凯

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

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