Commit 5fef9311 by 杨明

众筹

1 parent f6309fc8
<!-- pages/tab/index/components/activityOverview/activityOverview.wxml --> <!-- pages/tab/index/components/activityOverview/activityOverview.wxml -->
<view> <view>
<wxs src="../index.wxs" module="fn"></wxs> <wxs src="./index.wxs" module="fn"></wxs>
<!-- 活动中 --> <!-- 活动中 -->
<view wx:if="{{textType == 1}}" class="active-overview"> <view wx:if="{{textType == 1}}" class="active-overview">
<block> <block>
......
var filterIntegral = function (e) {
return e && e.toLocaleString('en-US')
}
var mathABS = function (e) {
return Math.abs(e);
}
var formatNumber = function (e) {
return e / 1000 >= 1
? (e / 1000).toFixed(1) + "k"
: e;
}
var timeFilter = function(e, num) {
// num=1 活动已开始 num=2 活动未开始(当前时间小于活动开始时间显示去完成按钮)
var reg = getRegExp("-", "g");
e = e.replace(reg, '/')
return num == 1 ? getDate(e).getTime() == getDate().setHours(8, 0, 0, 0) : getDate(e).getTime() > getDate().getTime()
}
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports = {
filterIntegral: filterIntegral,
mathABS: mathABS,
formatNumber: formatNumber,
timeFilter: timeFilter,
getString:getString
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!