Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mctower
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tangguangrui
mctower
Commits
99985848
Commit
99985848
authored
Dec 17, 2020
by
tangguangrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加月卡绑定功能
parent
ff75f907
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
12 deletions
+41
-12
HttpPostHelper.java
app/src/main/java/cn/dankal/base/http/HttpPostHelper.java
+3
-3
Constant.java
app/src/main/java/cn/mctower/visitor/Constant.java
+2
-2
MonthCardDetailActivity.java
...main/java/cn/mctower/visitor/MonthCardDetailActivity.java
+14
-7
MonthCardDetailBean.java
...in/java/cn/mctower/visitor/model/MonthCardDetailBean.java
+1
-0
activity_month_card_detail.xml
app/src/main/res/layout/activity_month_card_detail.xml
+21
-0
No files found.
app/src/main/java/cn/dankal/base/http/HttpPostHelper.java
View file @
99985848
...
...
@@ -77,7 +77,7 @@ public class HttpPostHelper {
@Override
public
void
onFailure
(
HttpException
error
,
String
msg
)
{
LogUtils
.
e
(
"请求失败:"
,
msg
);
callback
.
requestFailure
(
"-3"
,
"请求失败!"
);
callback
.
requestFailure
(
"-3"
,
msg
);
callback
.
requestFinish
();
}
});
...
...
@@ -116,7 +116,7 @@ public class HttpPostHelper {
@Override
public
void
onFailure
(
HttpException
error
,
String
msg
)
{
LogUtils
.
e
(
"请求失败:"
,
"error : "
+
msg
+
error
.
getLocalizedMessage
());
callback
.
requestFailure
(
"-3"
,
"请求失败!"
);
callback
.
requestFailure
(
"-3"
,
msg
);
callback
.
requestFinish
();
}
});
...
...
@@ -182,7 +182,7 @@ public class HttpPostHelper {
@Override
public
void
onFailure
(
HttpException
error
,
String
msg
)
{
KLog
.
e
(
"HttpPostRequest*** 请求失败["
+
System
.
currentTimeMillis
()+
"] url="
+
url
+
"--"
+
"错误信息:"
+
msg
);
callback
.
requestFailure
(
"-3"
,
"网络开小差啦,请重试呦。。。"
);
callback
.
requestFailure
(
"-3"
,
msg
);
callback
.
requestFinish
();
}
});
...
...
app/src/main/java/cn/mctower/visitor/Constant.java
View file @
99985848
...
...
@@ -14,8 +14,8 @@ public class Constant {
public
static
String
BaseImagesDir
=
Utils
.
getRootFilePath
()
+
"/image/"
;
public
static
String
Host
=
"https://api-mircrosoft-building.dankal.cn/v1/"
;
//测试
//
public static String Host = "https://api.mctower.dankal.cn/v1/"; //正式
//
public static String Host = "https://api-mircrosoft-building.dankal.cn/v1/"; //测试
public
static
String
Host
=
"https://api.mctower.dankal.cn/v1/"
;
//正式
public
static
final
String
API_VISIT_RECORD_LIST
=
Host
+
"mini/visit/users"
;
public
static
final
String
API_VISIT_DETAIL
=
Host
+
"mini/visit/user/detail/"
;
public
static
final
String
API_GET_QINIU_TOKEN
=
Host
+
"cms/property/common/ignore/qiniu"
;
...
...
app/src/main/java/cn/mctower/visitor/MonthCardDetailActivity.java
View file @
99985848
...
...
@@ -18,6 +18,7 @@ import cn.dankal.base.http.HttpPostHelper;
import
cn.dankal.base.http.NOToastHttpCallBack
;
import
cn.dankal.base.utils.LogUtils
;
import
cn.dankal.base.utils.NetPicUtil
;
import
cn.dankal.base.utils.ToastUtils
;
import
cn.mctower.visitor.model.MonthCardDetailBean
;
import
cn.mctower.visitor.model.MonthCardRqCodeBean
;
import
cn.mctower.visitor.model.QiNiuTokenBean
;
...
...
@@ -36,6 +37,8 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
TextView
openTime
;
@ViewInject
(
R
.
id
.
availableTime
)
TextView
availableTime
;
@ViewInject
(
R
.
id
.
bindTimes
)
TextView
bindTimes
;
@ViewInject
(
R
.
id
.
carCardNum
)
TextView
carCardNum
;
@ViewInject
(
R
.
id
.
carNum
)
...
...
@@ -142,6 +145,7 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
carNum
.
setText
(
bean
.
cardNo
);
applyReason
.
setText
(
bean
.
description
);
}
bindTimes
.
setText
(
bean
.
replaceCount
+
"次"
);
initQiNiuToken
();
}
}
...
...
@@ -186,22 +190,25 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
private
void
showBigPic
(
int
id
){
if
(
bean
.
vehicleImgArray
!=
null
&&
bean
.
vehicleImgArray
.
size
()
>
0
)
{
if
(
qiNiuTokenBean
!=
null
&&
!
TextUtils
.
isEmpty
(
qiNiuTokenBean
.
url
))
{
if
(
bean
.
vehicleImgArray
!=
null
&&
bean
.
vehicleImgArray
.
size
()
>
0
)
{
switch
(
id
)
{
case
R
.
id
.
pic1
:
if
(
bean
.
vehicleImgArray
.
size
()
>
0
)
netPicUtil
.
display
(
bigPic
,
bean
.
vehicleImgArray
.
get
(
0
));
if
(
bean
.
vehicleImgArray
.
size
()
>
0
)
netPicUtil
.
display
(
bigPic
,
qiNiuTokenBean
.
url
+
bean
.
vehicleImgArray
.
get
(
0
));
break
;
case
R
.
id
.
pic2
:
if
(
bean
.
vehicleImgArray
.
size
()
>
1
)
netPicUtil
.
display
(
bigPic
,
bean
.
vehicleImgArray
.
get
(
1
));
if
(
bean
.
vehicleImgArray
.
size
()
>
1
)
netPicUtil
.
display
(
bigPic
,
qiNiuTokenBean
.
url
+
bean
.
vehicleImgArray
.
get
(
1
));
break
;
case
R
.
id
.
pic3
:
if
(
bean
.
vehicleImgArray
.
size
()
>
2
)
netPicUtil
.
display
(
bigPic
,
bean
.
vehicleImgArray
.
get
(
2
));
if
(
bean
.
vehicleImgArray
.
size
()
>
2
)
netPicUtil
.
display
(
bigPic
,
qiNiuTokenBean
.
url
+
bean
.
vehicleImgArray
.
get
(
2
));
break
;
}
bigPicFrame
.
setVisibility
(
View
.
VISIBLE
);
}
}
else
ToastUtils
.
show
(
"图片路劲信息获取失败"
);
}
}
app/src/main/java/cn/mctower/visitor/model/MonthCardDetailBean.java
View file @
99985848
...
...
@@ -17,6 +17,7 @@ public class MonthCardDetailBean {
public
String
userUuid
;
public
String
uuid
;
public
String
description
;
public
String
replaceCount
;
public
List
<
String
>
vehicleImgArray
;
public
static
class
MonthCardBean
{
...
...
app/src/main/res/layout/activity_month_card_detail.xml
View file @
99985848
...
...
@@ -101,6 +101,27 @@
android:layout_below=
"@id/availableTime"
android:layout_marginTop=
"12dp"
/>
<TextView
android:id=
"@+id/bindTimesTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"本月已绑定次数"
android:textColor=
"#ABB2B7"
android:textSize=
"14sp"
android:layout_below=
"@id/carCardTitle"
android:layout_marginTop=
"12dp"
/>
<TextView
android:id=
"@+id/bindTimes"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"xxxxxx"
android:textColor=
"#2D506B"
android:textSize=
"14sp"
android:layout_alignParentRight=
"true"
android:layout_below=
"@id/carCardTitle"
android:layout_marginTop=
"12dp"
/>
</cn.mctower.visitor.RoundLayout>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment