8.21提交
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
.uni-pd {
|
||||
padding-left: 30upx;
|
||||
padding-top: 20upx;
|
||||
padding-bottom: 20upx;
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
.uni-padding-wrap{
|
||||
padding:0 30upx;
|
||||
}
|
||||
.uni-list-cell {
|
||||
position: relative;
|
||||
display: flex;
|
||||
margin-top: 5upx;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #FBFBFB;
|
||||
}
|
||||
.uni-label {
|
||||
width: 210upx;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
text-indent:20upx;
|
||||
}
|
||||
.uni-list-cell-db{
|
||||
flex: 1;
|
||||
padding-left: 20upx;
|
||||
}
|
||||
.uni-input {
|
||||
height: 50upx;
|
||||
flex: 1;
|
||||
}
|
||||
.uni-common-mt{
|
||||
margin-top:30upx;
|
||||
}
|
||||
.uni-btn-v{
|
||||
padding:10upx 0;
|
||||
}
|
||||
.btn {
|
||||
height: 100upx;
|
||||
border-width: 2upx;
|
||||
border-style: solid;
|
||||
border-color: rgb(162, 217, 192);
|
||||
background-color: rgba(162, 217, 192, 0.2);
|
||||
border-radius: 5upx;
|
||||
display:inline-block;
|
||||
margin-top: 20upx;
|
||||
text-align: center;
|
||||
line-height: 100upx;
|
||||
}
|
||||
.uni-center{
|
||||
text-align:center;
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
page {
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
/* 解决头条小程序字体图标不显示问题,因为头条运行时自动插入了span标签,且有全局字体 */
|
||||
/* #ifdef MP-TOUTIAO */
|
||||
text :not(view) {
|
||||
font-family: uniicons;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.uni-icon {
|
||||
font-family: uniicons;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.uni-bg-red {
|
||||
background-color: #F76260;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.uni-bg-green {
|
||||
background-color: #09BB07;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.uni-bg-blue {
|
||||
background-color: #007AFF;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.uni-container {
|
||||
flex: 1;
|
||||
padding: 15px;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.uni-padding-lr {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.uni-padding-tb {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.uni-header-logo {
|
||||
padding: 15px 15px;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 10upx;
|
||||
}
|
||||
|
||||
.uni-header-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.uni-hello-text {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.hello-text {
|
||||
color: #7A7E83;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.hello-link {
|
||||
color: #7A7E83;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.uni-panel {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.uni-panel-h {
|
||||
background-color: #ffffff;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
/*
|
||||
.uni-panel-h:active {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
*/
|
||||
.uni-panel-h-on {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.uni-panel-text {
|
||||
flex: 1;
|
||||
color: #000000;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.uni-panel-icon {
|
||||
margin-left: 15px;
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
transform: rotate(0deg);
|
||||
transition-duration: 0s;
|
||||
transition-property: transform;
|
||||
}
|
||||
|
||||
.uni-panel-icon-on {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.uni-navigate-item {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
border-top-style: solid;
|
||||
border-top-color: #f0f0f0;
|
||||
border-top-width: 1px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.uni-navigate-item:active {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.uni-navigate-text {
|
||||
flex: 1;
|
||||
color: #000000;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.uni-navigate-icon {
|
||||
margin-left: 15px;
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.uni-list-cell {
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-list-cell-pd {
|
||||
padding: 22upx 30upx;
|
||||
}
|
||||
|
||||
.flex-r {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.flex-c {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.a-i-c {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.j-c-c {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
flex-direction: row;
|
||||
padding: 10px;
|
||||
}
|
||||
+1706
File diff suppressed because it is too large
Load Diff
+108
@@ -0,0 +1,108 @@
|
||||
function formatTime(time) {
|
||||
if (typeof time !== 'number' || time < 0) {
|
||||
return time
|
||||
}
|
||||
|
||||
var hour = parseInt(time / 3600)
|
||||
time = time % 3600
|
||||
var minute = parseInt(time / 60)
|
||||
time = time % 60
|
||||
var second = time
|
||||
|
||||
return ([hour, minute, second]).map(function (n) {
|
||||
n = n.toString()
|
||||
return n[1] ? n : '0' + n
|
||||
}).join(':')
|
||||
}
|
||||
|
||||
|
||||
function formatTimeByDuration(result, timeShowBlock = 1) {
|
||||
let h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
|
||||
let m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
|
||||
let s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
|
||||
|
||||
if (timeShowBlock === 2)
|
||||
return result = h + ':' + m + ':' + s;
|
||||
else
|
||||
return result = m + ':' + s;
|
||||
}
|
||||
|
||||
function formatLocation(longitude, latitude) {
|
||||
if (typeof longitude === 'string' && typeof latitude === 'string') {
|
||||
longitude = parseFloat(longitude)
|
||||
latitude = parseFloat(latitude)
|
||||
}
|
||||
|
||||
longitude = longitude.toFixed(2)
|
||||
latitude = latitude.toFixed(2)
|
||||
|
||||
return {
|
||||
longitude: longitude.toString().split('.'),
|
||||
latitude: latitude.toString().split('.')
|
||||
}
|
||||
}
|
||||
var dateUtils = {
|
||||
UNITS: {
|
||||
'年': 31557600000,
|
||||
'月': 2629800000,
|
||||
'天': 86400000,
|
||||
'小时': 3600000,
|
||||
'分钟': 60000,
|
||||
'秒': 1000
|
||||
},
|
||||
humanize: function (milliseconds) {
|
||||
var humanize = '';
|
||||
for (var key in this.UNITS) {
|
||||
if (milliseconds >= this.UNITS[key]) {
|
||||
humanize = Math.floor(milliseconds / this.UNITS[key]) + key + '前';
|
||||
break;
|
||||
}
|
||||
}
|
||||
return humanize || '刚刚';
|
||||
},
|
||||
format: function (dateStr) {
|
||||
var date = this.parse(dateStr)
|
||||
var diff = Date.now() - date.getTime();
|
||||
if (diff < this.UNITS['天']) {
|
||||
return this.humanize(diff);
|
||||
}
|
||||
var _format = function (number) {
|
||||
return (number < 10 ? ('0' + number) : number);
|
||||
};
|
||||
return date.getFullYear() + '/' + _format(date.getMonth() + 1) + '/' + _format(date.getDay()) + '-' +
|
||||
_format(date.getHours()) + ':' + _format(date.getMinutes());
|
||||
},
|
||||
parse: function (str) { //将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象
|
||||
var a = str.split(/[^0-9]/);
|
||||
return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]);
|
||||
}
|
||||
};
|
||||
|
||||
function debounce(func, wait, immediate) {
|
||||
let timeout, result;
|
||||
|
||||
return function() {
|
||||
let context = this;
|
||||
let args = arguments;
|
||||
if (timeout) clearTimeout(timeout);
|
||||
|
||||
let later = function() {
|
||||
timeout = null;
|
||||
if (!immediate) result = func.apply(context, args);
|
||||
};
|
||||
|
||||
let callNow = immediate && !timeout;
|
||||
timeout = setTimeout(later, wait);
|
||||
if (callNow) result = func.apply(this, args);
|
||||
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
formatTime: formatTime,
|
||||
formatLocation: formatLocation,
|
||||
dateUtils: dateUtils,
|
||||
debounce: debounce,
|
||||
formatTimeByDuration: formatTimeByDuration
|
||||
}
|
||||
Reference in New Issue
Block a user