Browse Source

双十二活动

wangxiaoming 6 years ago
parent
commit
984ce6c90a

File diff suppressed because it is too large
+ 167 - 122
tooth/clearing.html


BIN
tooth/images/product/huo_banber_1.jpg


BIN
tooth/images/product/huo_banber_2.jpg


BIN
tooth/images/product/huo_banber_3.jpg


BIN
tooth/images/product/huo_banber_4.jpg


BIN
tooth/images/product/huo_banber_5.jpg


BIN
tooth/images/product/huo_desc_01.jpg


BIN
tooth/images/product/huo_desc_02.jpg


BIN
tooth/images/product/huo_desc_03.jpg


BIN
tooth/images/product/huo_desc_04.jpg


BIN
tooth/images/product/huo_desc_05.jpg


BIN
tooth/images/product/huo_desc_06.jpg


BIN
tooth/images/product/huo_desc_07.jpg


+ 30 - 0
tooth/js/main.js

@@ -128,6 +128,36 @@ Date.prototype.format = function(fmt)
   fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));   
   return fmt;   
 }
+
+/**
+ * 根据formatter字符串转换时间字符串
+ * 月(M)、日(d)、小时(h)、分(m)、秒(s) 占位符个数需要和时间字符串匹配
+ * @param  {string} dateStr 时间字符串 如:"2015-11-12"
+ * @param  {string} fmt     格式化字符串 如:"yyyy-MM-dd"
+ * @return {Date}           标准时间
+ * author: shaojiasong 2015-12-29
+ */
+function parseDate(dateStr,fmt){
+    if(!dateStr || !fmt || (dateStr.length != fmt.length)) {
+        throw new Error("转换时间时发生错误,时间字符串与格式字符串不匹配!");
+    }
+        //排除特殊字符,避免正则发生错误
+        fmt = fmt.replace(/([\^\$\.\*\+\?\=\!\:\|\\\/\(\)\[\]\{\}])/ig,"\\$1");
+    function getReg(str){
+        var cfmt = fmt;
+        cfmt = cfmt.replace(new RegExp(str+"+","g"),function(full){ return "("+full+")";}) || "";
+        return cfmt.replace(/[yMdhmsS]/g,"\\d"); 
+    }
+    var year   = parseInt((new RegExp(getReg("y")).exec(dateStr)[1])) || 0;
+    var month  = parseInt((new RegExp(getReg("M")).exec(dateStr)[1])) - 1 || 0;
+    var day    = parseInt((new RegExp(getReg("d")).exec(dateStr)[1])) || 0;
+    var hour   = parseInt((new RegExp(getReg("h")).exec(dateStr)[1])) || 0;
+    var minute = parseInt((new RegExp(getReg("m")).exec(dateStr)[1])) || 0;
+    var second = parseInt((new RegExp(getReg("s")).exec(dateStr)[1])) || 0;
+
+    return new Date(year,month,day,hour,minute,second);
+}
+
 //计算月份差
 function getMonthNumber(date1,date2){
   //默认格式为"2010-01-01",根据自己需要改格式和方法

+ 1 - 1
tooth/pro-details.html

@@ -39,7 +39,7 @@
 				<div class="index-banner" style="display: none;"></div>
 
 				<div class="my-content-padded">
-					<ul class="mui-table-view my-view-no" style="border-bottom:1px solid rgba(0,0,0,.1);">
+					<ul class="mui-table-view my-view-no" style="border-bottom:1px solid rgba(0,0,0,.1);margin-bottom: 10px;">
 						<li style="padding:0;">
 							<div class="pro-details-name" style="padding:15px 0 0 0;"></div>
 						</li>