Browse Source

活动详情H5页面修改;

dongbw 8 years ago
parent
commit
447d80fe8d

+ 15 - 0
donate-service/src/main/java/com/uas/service/donate/util/DateFormatUtils.java

@@ -0,0 +1,15 @@
+package com.uas.service.donate.util;
+
+import org.apache.commons.lang3.time.FastDateFormat;
+
+/**
+ * 日期工具类
+ * dongbw 2018年1月3日 11:39:46引入
+ */
+public class DateFormatUtils {
+
+	public static final FastDateFormat DATETIME_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
+	
+	public static final FastDateFormat DATE_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd");
+
+}

+ 78 - 0
donate-service/src/main/java/com/uas/service/donate/util/PathUtils.java

@@ -0,0 +1,78 @@
+package com.uas.service.donate.util;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+
+/**
+ * 路径
+ * 
+ * @author yingp
+ *
+ */
+public class PathUtils {
+
+	private static String classPath;
+
+	private static String appPath;
+
+	private static String filePath;
+
+	/**
+	 * classes文件目录
+	 * 
+	 * @return
+	 */
+	public static String getClassPath() {
+		if (classPath == null)
+			setClassPath();
+		return classPath;
+	}
+
+	/**
+	 * 应用程序目录
+	 * 
+	 * @return
+	 */
+	public static String getAppPath() {
+		if (appPath == null)
+			setAppPath();
+		return appPath;
+	}
+
+	/**
+	 * 日志、附件文件等存放目录,与程序同级
+	 * 
+	 * @return
+	 */
+	public static String getFilePath() {
+		if (filePath == null)
+			setFilePath();
+		return filePath;
+	}
+
+	private static void setClassPath() {
+		Class<?> objClass = ContextUtils.getApplicationContext().getClass();
+		String strRealPath = objClass.getClassLoader().getResource("").getFile();
+		try {
+			strRealPath = URLDecoder.decode(strRealPath, "UTF-8");
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		File objFile = new File(strRealPath);
+		classPath = objFile.getParent() + File.separator;
+		if (classPath.contains("/")) {
+			classPath = "/" + classPath;
+		}
+	}
+
+	private static void setAppPath() {
+		File file = new File(getClassPath());
+		appPath = file.getParent() + File.separator;
+	}
+
+	private static void setFilePath() {
+		File file = new File(getAppPath());
+		filePath = file.getParent() + File.separator;
+	}
+}

+ 1 - 1
donate-service/src/main/webapp/resources/js/mobile/controllers/MobileActivityDetailCtrl.js

@@ -34,8 +34,8 @@ define([ 'app/app' ], function(app) {
                         }
                         $scope.inActivity = data !== null && !angular.isUndefined(data.record);
                     });
+                    $scope.isAuthed = null !== userUU;
                 });
-                $scope.isAuthed = null !== userUU;
             }
         };
         init();

+ 6 - 7
donate-service/src/main/webapp/resources/view/mobile/mobile_activity_detail.html

@@ -281,20 +281,16 @@
         <!-- 3.2.1.1 活动在开始兑奖奖时间到结束兑奖时间之间,中奖 -未领取 -->
         <div class="footer" ng-if="isAuthed && inActivity &&  serveTime > activity.receiveStartTime
                 && serveTime < activity.receiveEndTime && activityRecord.isGetAward == 1 && activityRecord.status == 1">
-            <p>兑奖日期
+            <p>登录PC页面领取
                 <span ng-bind="activity.receiveStartTime | date:'yyyy-MM-dd'"></span>至
                 <span ng-bind="activity.receiveEndTime | date:'yyyy-MM-dd'"></span>
             </p>
-            <a data-toggle="modal" data-target="#layer">领奖</a>
+            <!--<a data-toggle="modal" data-target="#layer">领奖</a>-->
         </div>
         <!-- 3.2.1.2 活动在开始兑奖奖时间到结束兑奖时间之间,中奖 -已领取 -->
         <div class="footer" ng-if="isAuthed && inActivity &&  serveTime > activity.receiveStartTime
                 && serveTime < activity.receiveEndTime && activityRecord.isGetAward == 1 && activityRecord.status == 2">
-            <p>兑奖日期
-                <span ng-bind="activity.receiveStartTime | date:'yyyy-MM-dd'"></span>至
-                <span ng-bind="activity.receiveEndTime | date:'yyyy-MM-dd'"></span>
-            </p>
-            <span class="tip hasGet" title="奖品已领取">已领奖</span>
+            已领取<!--<span class="tip hasGet" title="奖品已领取">已领奖</span>-->
         </div>
         <!-- 3.2.2 活动在开始兑奖奖时间到结束兑奖时间之间,未中奖 -->
         <div class="footer" ng-if="isAuthed && inActivity && serveTime > activity.receiveStartTime
@@ -311,6 +307,9 @@
         </div>
     </div>
 </div>
+<!-- 消息提示框  Start-->
+<toaster-container
+        toaster-options="{'position-class': 'toast-top-center'}"></toaster-container>
 <script>
     $('html').css('fontSize',$(window).width()/750 * 100);
     //    点击切换