}
182 188
 
183 189
     private void initBanner(){
190
+        if(TextUtils.isEmpty(images[0]) && TextUtils.isEmpty(images[1])){
191
+            banner.setVisibility(View.GONE);
192
+            return;
193
+        }
184 194
         banner.setVisibility(View.VISIBLE);
195
+
185 196
         banner.setPages(new CBViewHolderCreator<NetworkImageHolderView>() {
186 197
             @Override
187 198
             public NetworkImageHolderView createHolder() {
@@ -219,7 +230,6 @@ public class TabRecentPhotoFragment extends BaseFragment implements SwipeRefresh
219 230
             protected void onPreExecute() {
220 231
                 super.onPreExecute();
221 232
                 scrollListener.setLoading(true);
222
-//                swipeRefreshLayout.setRefreshing(true);
223 233
             }
224 234
 
225 235
             @Override
@@ -293,14 +303,13 @@ public class TabRecentPhotoFragment extends BaseFragment implements SwipeRefresh
293 303
 
294 304
     @Override
295 305
     public void onItemClick(int position) {
296
-        new FullScreenImgPopup(getActivity(),bannerBeanList.get(position).url).showPopupWindow();
306
+        new FullScreenImgPopup(getActivity(),images[position]).showPopupWindow();
297 307
     }
298 308
 
299 309
     public class NetworkImageHolderView implements Holder<String> {
300 310
         private ImageView imageView;
301 311
         @Override
302 312
         public View createView(Context context) {
303
-            //你可以通过layout文件来创建,也可以像我一样用代码创建,不一定是Image,任何控件都可以进行翻页
304 313
             imageView = new ImageView(context);
305 314
             imageView.setScaleType(ImageView.ScaleType.FIT_XY);
306 315
             return imageView;

+ 4 - 39
app/src/main/java/ai/pai/client/services/MyLocationService.java

@@ -71,13 +71,7 @@ public class MyLocationService extends Service {
71 71
         destroyLocation();
72 72
     }
73 73
 
74
-    /**
75
-     * 初始化定位
76
-     *
77
-     * @since 2.8.0
78
-     * @author hongming.wang
79
-     *
80
-     */
74
+
81 75
     private void initLocation(){
82 76
         if(locationClient!=null){
83 77
             return;
@@ -91,12 +85,7 @@ public class MyLocationService extends Service {
91 85
         status = 0;
92 86
     }
93 87
 
94
-    /**
95
-     * 默认的定位参数
96
-     * @since 2.8.0
97
-     * @author hongming.wang
98
-     *
99
-     */
88
+
100 89
     private AMapLocationClientOption getDefaultOption(){
101 90
         AMapLocationClientOption mOption = new AMapLocationClientOption();
102 91
         mOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);//可选,设置定位模式,可选的模式有高精度、仅设备、仅网络。默认为高精度模式
@@ -112,9 +101,6 @@ public class MyLocationService extends Service {
112 101
         return mOption;
113 102
     }
114 103
 
115
-    /**
116
-     * 定位监听
117
-     */
118 104
     AMapLocationListener locationListener = new AMapLocationListener() {
119 105
         @Override
120 106
         public void onLocationChanged(AMapLocation loc) {
@@ -125,13 +111,6 @@ public class MyLocationService extends Service {
125 111
     };
126 112
 
127 113
 
128
-    /**
129
-     * 开始定位
130
-     *
131
-     * @since 2.8.0
132
-     * @author hongming.wang
133
-     *
134
-     */
135 114
     private void startLocation(){
136 115
         if(status==1){
137 116
             return;
@@ -144,13 +123,6 @@ public class MyLocationService extends Service {
144 123
         status = 1;
145 124
     }
146 125
 
147
-    /**
148
-     * 停止定位
149
-     *
150
-     * @since 2.8.0
151
-     * @author hongming.wang
152
-     *
153
-     */
154 126
     private void stopLocation(){
155 127
         if(status == 2){
156 128
             return;
@@ -160,13 +132,6 @@ public class MyLocationService extends Service {
160 132
         status = 2;
161 133
     }
162 134
 
163
-    /**
164
-     * 销毁定位
165
-     *
166
-     * @since 2.8.0
167
-     * @author hongming.wang
168
-     *
169
-     */
170 135
     private void destroyLocation(){
171 136
         if (null != locationClient) {
172 137
             locationClient.onDestroy();
@@ -184,7 +149,7 @@ private void reportLocationWhenTourMode(double lat, double lon){
184 149
     repeatTime = 0;
185 150
     lastLat = lat;
186 151
     lastLon = lon;
187
-    if(Preferences.getInstance(this).isTourMode()|| BuildConfig.DEBUG){
152
+    if(Preferences.getInstance(this).isTourMode()){
188 153
         HashMap<String,String> params = new HashMap<String,String>();
189 154
         String userId = Preferences.getInstance(this).getUserId();
190 155
         if(userId.length()==0){
@@ -194,7 +159,7 @@ private void reportLocationWhenTourMode(double lat, double lon){
194 159
         params.put("lon",String.valueOf(lon));
195 160
         params.put("lat",String.valueOf(lat));
196 161
         new HttpPostTask(this,params).executeOnExecutor(ThreadExecutor.getInstance().getExecutor(), UrlContainer.GEO_LOCATION_URL);
197
-        LogHelper.d("czy","reportLocationWhenTourMode lat = "+lat+"lon="+lon);
162
+        LogHelper.dfile("czy","上报经纬度位置 lat = "+lat+"lon="+lon);
198 163
     }
199 164
 }
200 165
 

+ 1 - 1
app/src/main/java/ai/pai/client/utils/UrlContainer.java

@@ -84,5 +84,5 @@ public class UrlContainer {
84 84
 
85 85
     public static final String GEO_LOCATION_URL = HOST_URL+"geo/submit";
86 86
     //TODO
87
-    public static final String TOUR_INFO_URL = HOST_URL +"tg/info";
87
+    public static final String TOUR_INFO_URL = HOST_URL +"pai2/tginfo";
88 88
 }

+ 1 - 1
common/src/main/java/com/android/common/utils/LogHelper.java

@@ -137,7 +137,7 @@ class FileLog {
137 137
 
138 138
     public FileLog() throws RuntimeException, IOException {
139 139
         File sdcard = new File(SD_CARD);
140
-        String fileName = "上传测试"+new SimpleDateFormat("MM-dd-HH-mm").format(new Date()) + ".log";
140
+        String fileName = "paiai-"+new SimpleDateFormat("MM-dd-HH-mm").format(new Date()) + ".log";
141 141
         File logFile = new File(LOG_PATH+fileName);
142 142
 
143 143
         if (!sdcard.exists()) {

+ 12 - 0
common/src/main/java/com/android/common/utils/TimeUtils.java

@@ -1,6 +1,7 @@
1 1
 package com.android.common.utils;
2 2
 
3 3
 import java.text.DateFormat;
4
+import java.text.ParseException;
4 5
 import java.text.SimpleDateFormat;
5 6
 import java.util.Date;
6 7
 import java.util.TimeZone;
@@ -53,6 +54,17 @@ public class TimeUtils {
53 54
         return utc2Local(utcTime, "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd HH:mm");
54 55
     }
55 56
 
57
+    public static long getStandardTimeInMiliSec(String utcTime){
58
+        long time = 0;
59
+        String standardTimeStr = getStandardTime(utcTime);
60
+        try {
61
+            Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(standardTimeStr);
62
+            time = date.getTime();
63
+        } catch (ParseException e) {
64
+            e.printStackTrace();
65
+        }
66
+        return time;
67
+    }
56 68
 
57 69
     public static String getFormattedTime(String utcTime) {
58 70
         String formattedTime = utc2Local(utcTime, "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd HH:mm");

Kodo/kodo - Gogs: Go Git Service

4 Commits (aa2fd2f1679fb451d94395618c834c2e0c4f8753)

Author SHA1 Message Date
  Brightcells 953ffaab3c Change to use django-uniapi 8 years ago
  Brightcells 51e42ffc44 Add mail conf to report error 8 years ago
  Brightcells fabef63211 set line_length=200 for isort 9 years ago
  Brightcells 4defb80fdc gogs first init 9 years ago