add v1.1.0(327)
This commit is contained in:
parent
6f4800c560
commit
c8ab88e0ac
@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
l
|
l
|
||||||
java:S1104"OMake msg a static final constant or non-public and provide accessors if needed.(ÝѺŒ8¹ä±¶ü/
|
java:S1104"PMake code a static final constant or non-public and provide accessors if needed.(€Î‡68«îûÒü/
|
||||||
|
l
|
||||||
|
java:S1104"OMake msg a static final constant or non-public and provide accessors if needed.(ÝѺŒ8¹ä±¶ü/
|
||||||
{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(Þ…‡Ýùÿÿÿÿ8ºä±¶ü/
|
{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(Þ…‡Ýùÿÿÿÿ8ºä±¶ü/
|
@ -5,43 +5,46 @@ n java:S116F"TRename this field "Longitude" to match the regular expression '^
|
|||||||
k
|
k
|
||||||
java:S1450W"VRemove the "context" field and declare it as a local variable in the relevant methods.(êÝç
|
java:S1450W"VRemove the "context" field and declare it as a local variable in the relevant methods.(êÝç
|
||||||
h
|
h
|
||||||
java:S3776\"RRefactor this method to reduce its Cognitive Complexity from 32 to the 15 allowed.(Öìâ±
|
java:S3776\"RRefactor this method to reduce its Cognitive Complexity from 52 to the 15 allowed.(Öìâ±
|
||||||
P
|
P
|
||||||
java:S1135¸"2Complete the task associated to this TODO comment.(¹‘ÆŽ8ãÀ©¶ü/
|
java:S1135¹"2Complete the task associated to this TODO comment.(¹‘ÆŽ8ãÀ©¶ü/
|
||||||
C
|
C
|
||||||
java:S1602À",Remove useless curly braces around statement(̇‘´
|
java:S1602Á",Remove useless curly braces around statement(̇‘´
|
||||||
H
|
H
|
||||||
java:S1602Ä",Remove useless curly braces around statement(ŽÕʾøÿÿÿÿ
|
java:S1602Å",Remove useless curly braces around statement(ŽÕʾøÿÿÿÿ
|
||||||
5
|
5
|
||||||
java:S2119ó"Save and re-use this "Random".(ÊŒ±Ð
|
java:S2119ô"Save and re-use this "Random".(ÊŒ±Ð
|
||||||
5
|
5
|
||||||
java:S2119ý"Save and re-use this "Random".(ÊŒ±Ð
|
java:S2119þ"Save and re-use this "Random".(ÊŒ±Ð
|
||||||
5
|
5
|
||||||
java:S2119ˆ"Save and re-use this "Random".(ÊŒ±Ð
|
java:S2119‰"Save and re-use this "Random".(ÊŒ±Ð
|
||||||
i java:S100Ï"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Úœï ûÿÿÿÿ
|
K java:S108¶")Either remove or fill this block of code.(½œÂôûÿÿÿÿ8›°ùÒü/
|
||||||
|
i java:S100ï"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Úœï ûÿÿÿÿ
|
||||||
C
|
C
|
||||||
java:S1602â",Remove useless curly braces around statement(̇‘´
|
java:S1602‚",Remove useless curly braces around statement(̇‘´
|
||||||
H
|
H
|
||||||
java:S1602æ",Remove useless curly braces around statement(ŽÕʾøÿÿÿÿ
|
java:S1602†",Remove useless curly braces around statement(ŽÕʾøÿÿÿÿ
|
||||||
@
|
@
|
||||||
java:S1068W"+Remove this unused "context" private field.(êÝç
|
java:S1068W"+Remove this unused "context" private field.(êÝç
|
||||||
u
|
u
|
||||||
java:S2293¶"YReplace the type specification in this constructor call with the diamond operator ("<>").(òÒëÆúÿÿÿÿ
|
java:S2293¶"YReplace the type specification in this constructor call with the diamond operator ("<>").(òÒëÆúÿÿÿÿ
|
||||||
u
|
u
|
||||||
java:S2293·"YReplace the type specification in this constructor call with the diamond operator ("<>").(ßî×ãûÿÿÿÿ
|
java:S2293·"YReplace the type specification in this constructor call with the diamond operator ("<>").(ßî×ãûÿÿÿÿ
|
||||||
|
|
|
||||||
|
java:S2293¸"YReplace the type specification in this constructor call with the diamond operator ("<>").(¦êˆßøÿÿÿÿ8„ö÷Òü/
|
||||||
>
|
>
|
||||||
java:S1604¦"(Make this anonymous inner class a lambda(÷õË
|
java:S1604¦"(Make this anonymous inner class a lambda(÷õË
|
||||||
D
|
D
|
||||||
java:S1604"(Make this anonymous inner class a lambda(Ÿ<> ¹ÿÿÿÿÿ
|
java:S1604"(Make this anonymous inner class a lambda(Ÿ<> ¹ÿÿÿÿÿ
|
||||||
?
|
?
|
||||||
java:S1604»"(Make this anonymous inner class a lambda(ñ<>¼É
|
java:S1604¼"(Make this anonymous inner class a lambda(ñ<>¼É
|
||||||
D
|
D
|
||||||
java:S1604å"(Make this anonymous inner class a lambda(Òñ<C392>±þÿÿÿÿ
|
java:S1604æ"(Make this anonymous inner class a lambda(Òñ<C392>±þÿÿÿÿ
|
||||||
?
|
?
|
||||||
java:S1604<EFBFBD>"(Make this anonymous inner class a lambda(Éæ²³
|
java:S1604‚"(Make this anonymous inner class a lambda(Éæ²³
|
||||||
D
|
D
|
||||||
java:S1604 "(Make this anonymous inner class a lambda(®¥Ïªÿÿÿÿÿ
|
java:S1604¡"(Make this anonymous inner class a lambda(®¥Ïªÿÿÿÿÿ
|
||||||
?
|
?
|
||||||
java:S1604°"(Make this anonymous inner class a lambda(ü‹¼Ô
|
java:S1604±"(Make this anonymous inner class a lambda(ü‹¼Ô
|
||||||
z
|
z
|
||||||
java:S1104&"_Make fusedLocationClient a static final constant or non-public and provide accessors if needed.(»»¾ªýÿÿÿÿ
|
java:S1104&"_Make fusedLocationClient a static final constant or non-public and provide accessors if needed.(»»¾ªýÿÿÿÿ
|
@ -11,8 +11,6 @@ g
|
|||||||
.entry/src/main/java/com/xcl/location/XLog.java,a\4\a49d04c34d269757f710cdd66ee499b30ca4d012
|
.entry/src/main/java/com/xcl/location/XLog.java,a\4\a49d04c34d269757f710cdd66ee499b30ca4d012
|
||||||
e
|
e
|
||||||
5entry/src/main/java/com/xcl/location/MainAbility.java,4\6\4658bbfeed30bc3c16d89bdde88d0ce1bb94d3a7
|
5entry/src/main/java/com/xcl/location/MainAbility.java,4\6\4658bbfeed30bc3c16d89bdde88d0ce1bb94d3a7
|
||||||
H
|
|
||||||
entry/proguard-rules.pro,1\a\1a0bfe7a027837ed647b6bd5b6e2500c8555362e
|
|
||||||
<
|
<
|
||||||
build.gradle,f\0\f07866736216be0ee2aba49e392191aeae700a35
|
build.gradle,f\0\f07866736216be0ee2aba49e392191aeae700a35
|
||||||
B
|
B
|
||||||
@ -21,17 +19,19 @@ l
|
|||||||
<entry/src/main/java/com/xcl/location/Util/MyToastDialog.java,b\2\b21eebb6b040e2b10cd428205c5acd1f68cc6d50
|
<entry/src/main/java/com/xcl/location/Util/MyToastDialog.java,b\2\b21eebb6b040e2b10cd428205c5acd1f68cc6d50
|
||||||
b
|
b
|
||||||
2entry/src/main/java/com/xcl/location/Net/DXJX.java,2\5\25dacbaab99cc1fe7e73d185785207a3337590fb
|
2entry/src/main/java/com/xcl/location/Net/DXJX.java,2\5\25dacbaab99cc1fe7e73d185785207a3337590fb
|
||||||
b
|
|
||||||
2entry/src/main/java/com/xcl/location/Net/TJXX.java,c\e\cea9463d59754ba3cdc565e6279149e7440edadf
|
|
||||||
a
|
|
||||||
1entry/src/main/java/com/xcl/location/Net/Wan.java,1\5\15d8bcbfc11a5f476138f9bcb53e2052e1a9dfbf
|
|
||||||
J
|
|
||||||
entry/src/main/config.json,1\0\10f965cf51fe14a5ef0ca2ebefb1bd7e4607eeb2
|
|
||||||
M
|
M
|
||||||
entry/agconnect-services.json,9\c\9c0629d9ee39e937c45ba4e3206cabded9f4c3be
|
entry/agconnect-services.json,9\c\9c0629d9ee39e937c45ba4e3206cabded9f4c3be
|
||||||
L
|
L
|
||||||
jianjia/src/main/config.json,0\f\0fc04922cd9a34622b859cd4d1a67a89f33da940
|
jianjia/src/main/config.json,0\f\0fc04922cd9a34622b859cd4d1a67a89f33da940
|
||||||
<
|
<
|
||||||
package.json,7\0\7030d0b2f71b999ff89a343de08c414af32fc93a
|
package.json,7\0\7030d0b2f71b999ff89a343de08c414af32fc93a
|
||||||
|
J
|
||||||
|
entry/src/main/config.json,1\0\10f965cf51fe14a5ef0ca2ebefb1bd7e4607eeb2
|
||||||
|
b
|
||||||
|
2entry/src/main/java/com/xcl/location/Net/TJXX.java,c\e\cea9463d59754ba3cdc565e6279149e7440edadf
|
||||||
|
a
|
||||||
|
1entry/src/main/java/com/xcl/location/Net/Wan.java,1\5\15d8bcbfc11a5f476138f9bcb53e2052e1a9dfbf
|
||||||
|
H
|
||||||
|
entry/proguard-rules.pro,1\a\1a0bfe7a027837ed647b6bd5b6e2500c8555362e
|
||||||
p
|
p
|
||||||
@entry/src/main/java/com/xcl/location/slice/MainAbilitySlice.java,e\0\e0da17fc7f5e236564b670ddce19a468201781e3
|
@entry/src/main/java/com/xcl/location/slice/MainAbilitySlice.java,e\0\e0da17fc7f5e236564b670ddce19a468201781e3
|
@ -3,8 +3,8 @@
|
|||||||
"bundleName": "com.xcl.location",
|
"bundleName": "com.xcl.location",
|
||||||
"vendor": "xcl",
|
"vendor": "xcl",
|
||||||
"version": {
|
"version": {
|
||||||
"code": 326,
|
"code": 327,
|
||||||
"name": "1.0.1.220326"
|
"name": "1.1.0.220327"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deviceConfig": {
|
"deviceConfig": {
|
||||||
|
@ -8,6 +8,10 @@ package com.xcl.location.Net;
|
|||||||
* @package com.xcl.location.Net
|
* @package com.xcl.location.Net
|
||||||
*/
|
*/
|
||||||
public class TJXX {
|
public class TJXX {
|
||||||
|
/**
|
||||||
|
* The Code.
|
||||||
|
*/
|
||||||
|
public String code;
|
||||||
/**
|
/**
|
||||||
* The Msg.
|
* The Msg.
|
||||||
*/
|
*/
|
||||||
|
@ -33,4 +33,15 @@ public interface Wan {
|
|||||||
@POST("/Home/Monitor/monitor_add")
|
@POST("/Home/Monitor/monitor_add")
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
Call<TJXX> postDKXX(@FieldMap Map<String, String> param);
|
Call<TJXX> postDKXX(@FieldMap Map<String, String> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post cxdkxx call.
|
||||||
|
*
|
||||||
|
* @param param the param
|
||||||
|
* @return the call
|
||||||
|
*/
|
||||||
|
@BaseUrl("https://yx.ty-ke.com/")
|
||||||
|
@POST("/Home/Monitor/monitor_cha")
|
||||||
|
@FormUrlEncoded
|
||||||
|
Call<TJXX> postCXDKXX(@FieldMap Map<String, String> param);
|
||||||
}
|
}
|
||||||
|
@ -181,6 +181,7 @@ public class MainAbilitySlice extends AbilitySlice {
|
|||||||
Button stopLocatingButton = (Button) findComponentById(ResourceTable.Id_stop_locating);
|
Button stopLocatingButton = (Button) findComponentById(ResourceTable.Id_stop_locating);
|
||||||
Map<String, String> url = new HashMap<String, String>();
|
Map<String, String> url = new HashMap<String, String>();
|
||||||
Map<String, String> url1 = new HashMap<String, String>();
|
Map<String, String> url1 = new HashMap<String, String>();
|
||||||
|
Map<String, String> url2 = new HashMap<String, String>();
|
||||||
url.put("ak", "此处填写你的百度地图ak");//TODO:百度地图ak
|
url.put("ak", "此处填写你的百度地图ak");//TODO:百度地图ak
|
||||||
url.put("output", "json");
|
url.put("output", "json");
|
||||||
url.put("coordtype", "wgs84ll");
|
url.put("coordtype", "wgs84ll");
|
||||||
@ -304,6 +305,9 @@ public class MainAbilitySlice extends AbilitySlice {
|
|||||||
daka.setClickedListener(new Component.ClickedListener() {
|
daka.setClickedListener(new Component.ClickedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(Component component) {
|
public void onClick(Component component) {
|
||||||
|
if(Preference_RW.ff1_r().equals("")||Preference_RW.ff1_r()==null||Preference_RW.ff1_r().equals("0")){
|
||||||
|
Preference_RW.ff1_w(input.getText());
|
||||||
|
}else{}
|
||||||
url1.put("mobile", Preference_RW.ff1_r());
|
url1.put("mobile", Preference_RW.ff1_r());
|
||||||
url1.put("city", city);
|
url1.put("city", city);
|
||||||
url1.put("jk_type", "健康");
|
url1.put("jk_type", "健康");
|
||||||
@ -314,12 +318,28 @@ public class MainAbilitySlice extends AbilitySlice {
|
|||||||
url1.put("wc_type", "否");
|
url1.put("wc_type", "否");
|
||||||
url1.put("is_verify", "0");
|
url1.put("is_verify", "0");
|
||||||
url1.put("province", province);
|
url1.put("province", province);
|
||||||
|
url2.put("mobile", Preference_RW.ff1_r());
|
||||||
|
url2.put("days", "null");
|
||||||
|
url2.put("daka_status", "null");
|
||||||
|
MyApplication.getInstance().getWan().postCXDKXX(url2).enqueue(new Callback<TJXX>(){
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<TJXX> call, Response<TJXX> response) {
|
||||||
|
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
if(response.body().code.equals("200")){
|
||||||
|
ShowDialog("当前时间段您已经打过卡了...");
|
||||||
|
result.setText("当前时间段您已经完成打卡!");
|
||||||
|
}else if(response.body().code.equals("404")){
|
||||||
MyApplication.getInstance().getWan().postDKXX(url1).enqueue(new Callback<TJXX>() {
|
MyApplication.getInstance().getWan().postDKXX(url1).enqueue(new Callback<TJXX>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<TJXX> call, Response<TJXX> response) {
|
public void onResponse(Call<TJXX> call, Response<TJXX> response) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
ShowDialog("打卡成功!");
|
ShowDialog("打卡成功!");
|
||||||
XLog.info(label, response.body().msg);
|
XLog.info(label, response.body().msg);
|
||||||
result.setText(response.body().msg);
|
result.setText(response.body().msg);
|
||||||
|
}else{
|
||||||
|
ShowDialog("打卡失败,请稍后重试...");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -329,6 +349,18 @@ public class MainAbilitySlice extends AbilitySlice {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
XLog.error(label, "访问失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<TJXX> call, Throwable t) {
|
||||||
|
XLog.error(label, t.getMessage());
|
||||||
|
ShowDialog("查询失败!错误原因:" + t.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
README.md
10
README.md
@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
**本项目仅用于个人知识积累供大家学习交流分享,请勿将成果用于非法用途,建议您设计测试完成后进行正规的打卡操作。因使用本技术研究带来的一切后果,由使用者自行负责。出现任何问题均与作者无关。**
|
**本项目仅用于个人知识积累供大家学习交流分享,请勿将成果用于非法用途,建议您设计测试完成后进行正规的打卡操作。因使用本技术研究带来的一切后果,由使用者自行负责。出现任何问题均与作者无关。**
|
||||||
|
|
||||||
|
**[版本更新地址](https://www.xuegao-xcl.tech/demo/38.html)**
|
||||||
|
|
||||||
实现原理:
|
### 实现原理:
|
||||||
|
|
||||||
1. 首先我们通过HMS服务调用系统定位模块来获取当前设备的详细经纬度
|
1. 首先我们通过HMS服务调用系统定位模块来获取当前设备的详细经纬度
|
||||||
2. 我们使用从[百度地图官网](https://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-geocoding-abroad)申请的AK密钥,来使用全球逆地理编码服务
|
2. 我们使用从[百度地图官网](https://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-geocoding-abroad)申请的AK密钥,来使用全球逆地理编码服务
|
||||||
@ -14,7 +15,7 @@
|
|||||||
5. 最后根据返回值即可得到打卡成功的返回值
|
5. 最后根据返回值即可得到打卡成功的返回值
|
||||||
|
|
||||||
|
|
||||||
使用方法:
|
### 使用方法:
|
||||||
|
|
||||||
1. 下载本项目到本地
|
1. 下载本项目到本地
|
||||||
2. 首先你要到华为开发者平台申请密钥,以便于真机调试,[参考官方方法](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404),并且在应用API处打开地理位置的开关,并且按照官网指引下载agconnect-services.json文件,并参考[这个](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/harmonyos-java-config-app-signing-0000001199536987),并在:
|
2. 首先你要到华为开发者平台申请密钥,以便于真机调试,[参考官方方法](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404),并且在应用API处打开地理位置的开关,并且按照官网指引下载agconnect-services.json文件,并参考[这个](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/harmonyos-java-config-app-signing-0000001199536987),并在:
|
||||||
@ -41,10 +42,11 @@
|
|||||||
"type": "data",
|
"type": "data",
|
||||||
"uri": "dataability://你的打包名.location.AGConnectInitializeAbility"
|
"uri": "dataability://你的打包名.location.AGConnectInitializeAbility"
|
||||||
}
|
}
|
||||||
`,还有记得在MainAbilitySlice.java中的第184行左右TODO左侧处填写你自己在百度地图控制台申请的AK
|
`,还有记得在MainAbilitySlice.java中的第185行左右TODO左侧处填写你自己在百度地图控制台申请的AK
|
||||||
4. 最后你就可以在自己的真机上运行了
|
4. 最后你就可以在自己的真机上运行了
|
||||||
|
|
||||||
|
|
||||||
免责声明
|
### 免责声明
|
||||||
|
|
||||||
**本项目所有信息都仅用于个人知识积累供大家学习交流分享,请勿将成果用于非法用途,建议您设计测试完成后进行正规的打卡操作。因使用本技术研究带来的一切后果,由使用者自行负责。出现任何问题均与作者无关。**
|
**本项目所有信息都仅用于个人知识积累供大家学习交流分享,请勿将成果用于非法用途,建议您设计测试完成后进行正规的打卡操作。因使用本技术研究带来的一切后果,由使用者自行负责。出现任何问题均与作者无关。**
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user