From 05a844da2faf250b1125ce63d1e6c58078b6884c Mon Sep 17 00:00:00 2001 From: itgaojian Date: Thu, 22 Feb 2024 10:37:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/compiler.xml | 2 +- .idea/deploymentTargetDropDown.xml | 17 ------- .idea/misc.xml | 3 +- app/build.gradle | 2 +- app/release/output-metadata.json | 6 +-- app/src/main/AndroidManifest.xml | 1 + .../main/assets/html/xz_screen/contact.html | 2 +- .../main/assets/html/xz_screen/detail.html | 2 +- .../main/assets/html/xz_screen/img-list.html | 2 +- app/src/main/assets/html/xz_screen/list.html | 2 +- .../assets/html/xz_screen/venue-guide.html | 4 +- .../assets/html/xz_screen/venue-intro.html | 2 +- .../main/assets/html/xz_screen49/img-mid.html | 2 +- .../main/assets/html/xz_screen49/index.html | 6 +-- .../tenlionsoft/xzdisplay/MainActivity.java | 46 +++++++++++++++++-- .../tenlionsoft/xzdisplay/net/ApiDisplay.java | 5 ++ app/src/main/res/values/strings.xml | 2 +- app/src/main/res/xml/network_config.xml | 10 ++++ baselib/build.gradle | 2 +- .../baselib/core/retrofit_net/BaseUrlApi.java | 4 +- .../core/retrofit_net/RetrofitManager.java | 2 +- common.gradle | 4 +- 22 files changed, 83 insertions(+), 45 deletions(-) delete mode 100644 .idea/deploymentTargetDropDown.xml create mode 100755 app/src/main/res/xml/network_config.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml deleted file mode 100644 index 63a2f6c..0000000 --- a/.idea/deploymentTargetDropDown.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index bdd9278..773fe0f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,6 @@ - - + diff --git a/app/build.gradle b/app/build.gradle index 6ae8c8c..0dd4dc8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ android { compileSdk gCompileSdkVersion defaultConfig { - applicationId "com.tenlionsoft.xzdisplay" + applicationId "com.tengshisoft.displaysystem" minSdk gMinSdkVersion targetSdk gTargetSdkVersion versionCode gVersionCode diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 59e1e1c..da18ba1 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -4,15 +4,15 @@ "type": "APK", "kind": "Directory" }, - "applicationId": "com.tenlionsoft.xzdisplay", + "applicationId": "com.tengshisoft.displaysystem", "variantName": "release", "elements": [ { "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 27, - "versionName": "1.2.7", + "versionCode": 28, + "versionName": "1.2.8", "outputFile": "app-release.apk" } ], diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b9780c2..2c95ad2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -19,6 +19,7 @@ android:fullBackupContent="@xml/backup_rules" android:icon="@drawable/app_logo" android:label="@string/app_name" + android:networkSecurityConfig="@xml/network_config" android:roundIcon="@drawable/app_logo" android:supportsRtl="true" android:theme="@style/Theme.Xzdisplay" diff --git a/app/src/main/assets/html/xz_screen/contact.html b/app/src/main/assets/html/xz_screen/contact.html index 928b172..0214a4c 100755 --- a/app/src/main/assets/html/xz_screen/contact.html +++ b/app/src/main/assets/html/xz_screen/contact.html @@ -102,7 +102,7 @@ date: '', time: '', url: '', - sourcePath: '/route/file/downloadfile/false/', + sourcePath: '/route/file/download/false/', menuList: [], floorList: [], temperature: '', diff --git a/app/src/main/assets/html/xz_screen/detail.html b/app/src/main/assets/html/xz_screen/detail.html index bd3d6c6..9cf4019 100755 --- a/app/src/main/assets/html/xz_screen/detail.html +++ b/app/src/main/assets/html/xz_screen/detail.html @@ -84,7 +84,7 @@ date: '', time: '', url: '', - sourcePath: '/route/file/downloadfile/false/', + sourcePath: '/route/file/download/false/', menuList: [], floorList: [], temperature: '', diff --git a/app/src/main/assets/html/xz_screen/img-list.html b/app/src/main/assets/html/xz_screen/img-list.html index 9745566..0026be7 100755 --- a/app/src/main/assets/html/xz_screen/img-list.html +++ b/app/src/main/assets/html/xz_screen/img-list.html @@ -86,7 +86,7 @@ date: '', time: '', url: '', - sourcePath: '/route/file/downloadfile/false/', + sourcePath: '/route/file/download/false/', menuList: [], floorList: [], temperature: '', diff --git a/app/src/main/assets/html/xz_screen/list.html b/app/src/main/assets/html/xz_screen/list.html index 171466e..8c0f0a7 100755 --- a/app/src/main/assets/html/xz_screen/list.html +++ b/app/src/main/assets/html/xz_screen/list.html @@ -87,7 +87,7 @@ date: '', time: '', url: '', - sourcePath: '/route/file/downloadfile/false/', + sourcePath: '/route/file/download/false/', menuList: [], floorList: [], temperature: '', diff --git a/app/src/main/assets/html/xz_screen/venue-guide.html b/app/src/main/assets/html/xz_screen/venue-guide.html index 651dac7..4b84ad7 100755 --- a/app/src/main/assets/html/xz_screen/venue-guide.html +++ b/app/src/main/assets/html/xz_screen/venue-guide.html @@ -93,7 +93,7 @@ date: '2020-01-01', time: '00:00:00', url: '', - sourcePath: '/route/file/downloadfile/false/', + sourcePath: '/route/file/download/false/', menuList: [], floorList: [], temperature: '', @@ -210,6 +210,8 @@ }, mounted: function () { var self = this + + self.url = localStorage.getItem('url') self.deviceCode = localStorage.getItem('deviceCode') setInterval(function () { diff --git a/app/src/main/assets/html/xz_screen/venue-intro.html b/app/src/main/assets/html/xz_screen/venue-intro.html index f96c010..1034874 100755 --- a/app/src/main/assets/html/xz_screen/venue-intro.html +++ b/app/src/main/assets/html/xz_screen/venue-intro.html @@ -77,7 +77,7 @@ date: '', time: '', url: '', - sourcePath: '/route/file/downloadfile/false/', + sourcePath: '/route/file/download/true/', menuList: [], venueIntro: {}, tab: '*', diff --git a/app/src/main/assets/html/xz_screen49/img-mid.html b/app/src/main/assets/html/xz_screen49/img-mid.html index ba7c254..44013a6 100755 --- a/app/src/main/assets/html/xz_screen49/img-mid.html +++ b/app/src/main/assets/html/xz_screen49/img-mid.html @@ -15,7 +15,7 @@
  • - +
diff --git a/app/src/main/assets/html/xz_screen49/index.html b/app/src/main/assets/html/xz_screen49/index.html index 4fcf555..de16788 100755 --- a/app/src/main/assets/html/xz_screen49/index.html +++ b/app/src/main/assets/html/xz_screen49/index.html @@ -39,7 +39,7 @@ playing: {}, toTop: 0, sideList: [], - sourcePath: '/route/file/downloadfile/true/' + sourcePath: '/route/file/download/true/' }, methods: { changeVideo: function (idx) { @@ -93,8 +93,8 @@ var self = this self.url = window.AppInterface.getBaseUrl() self.deviceCode = window.AppInterface.getDeviceCode() - // self.url = 'https://www.wgink.ink/show' - // self.deviceCode = 'RKZ01H13' + // self.url = 'https://www.xzszwhy.cn/show' + // self.deviceCode = 'RKZ01H11' localStorage.setItem('url', self.url) localStorage.setItem('deviceCode', self.deviceCode) self.getList() diff --git a/app/src/main/java/com/tenlionsoft/xzdisplay/MainActivity.java b/app/src/main/java/com/tenlionsoft/xzdisplay/MainActivity.java index 54aa052..9a38f1a 100644 --- a/app/src/main/java/com/tenlionsoft/xzdisplay/MainActivity.java +++ b/app/src/main/java/com/tenlionsoft/xzdisplay/MainActivity.java @@ -113,13 +113,13 @@ public class MainActivity extends Activity { intentFilter.addAction(PathConfig.ACTION_APP_INSTALL); registerReceiver(this.mBoradCast, intentFilter); checkAppVersion(); +// getWeather(); } private void checkAppVersion() { RetrofitManager.getInstance() .create(BaseApiService.class) - .doCheckAppVersion("http://www.xzszwhy.cn/usercenter/app/appversion/getappversionnumber/e2f64ae0" + - "-69a5-454c-8471-483291a7bfb1") + .doCheckAppVersion(this.mBaseUrl + BaseUrlApi.APP_VERSION_URL) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer() { @@ -149,6 +149,7 @@ public class MainActivity extends Activity { @Override public void onError(@NonNull Throwable e) { + LogUtils.e("错误"); e.printStackTrace(); ExceptionHandler.handleException(e); } @@ -308,6 +309,7 @@ public class MainActivity extends Activity { public void onPageFinished(WebView webView, String str) { super.onPageFinished(webView, str); + LogUtils.e(webView.getUrl() + "===" + str); } public boolean shouldOverrideUrlLoading(WebView webView, String str) { @@ -350,9 +352,7 @@ public class MainActivity extends Activity { private void startDownloadApk() { ToastUtils.show("开始下载"); Intent intent = new Intent((Context) this, DownloadService.class); - intent.putExtra("downloadUrl", "http://192.168.1.100:7001/usercenter/app/appversion/downloadapp/e2f64ae0-69a5" + - "-454c-8471" + - "-483291a7bfb1"); + intent.putExtra("downloadUrl", this.mBaseUrl + "/app/appversion/download/e2f64ae0-69a5-454c-8471-483291a7bfb1"); startService(intent); } @@ -742,4 +742,40 @@ public class MainActivity extends Activity { }); } + public void getWeather(){ + RetrofitManager.getInstance() + .create(ApiDisplay.class) + .getWeather("日喀则","") + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(@NonNull Disposable d) { + + } + + @Override + public void onNext(@NonNull Object o) { + + } + + @Override + public void onError(@NonNull Throwable e) { + + } + + @Override + public void onComplete() { + + } + }); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (mBoradCast != null) { + unregisterReceiver(mBoradCast); + } + } } \ No newline at end of file diff --git a/app/src/main/java/com/tenlionsoft/xzdisplay/net/ApiDisplay.java b/app/src/main/java/com/tenlionsoft/xzdisplay/net/ApiDisplay.java index 67d3b37..a3e1862 100644 --- a/app/src/main/java/com/tenlionsoft/xzdisplay/net/ApiDisplay.java +++ b/app/src/main/java/com/tenlionsoft/xzdisplay/net/ApiDisplay.java @@ -12,6 +12,7 @@ import io.reactivex.rxjava3.core.Observable; import retrofit2.http.GET; import retrofit2.http.Headers; import retrofit2.http.Path; +import retrofit2.http.Query; import retrofit2.http.Url; public interface ApiDisplay { @@ -38,4 +39,8 @@ public interface ApiDisplay { @GET @Headers({"base_url_name:displaysystem", "Content-Type:application/json", "Accept:application/json"}) Observable getShowDataList(@Url String str); + + @GET("http://apis.juhe.cn/simpleWeather/query") + @Headers({"Content-Type:application/x-www-form-urlencoded", "Accept:application/json"}) + Observable getWeather(@Query("city") String city, @Query("key") String key); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8bcdbdc..ce1c7c4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - 公共文化展览系统 + 公共文化展览系统(触摸机) \ No newline at end of file diff --git a/app/src/main/res/xml/network_config.xml b/app/src/main/res/xml/network_config.xml new file mode 100755 index 0000000..223d267 --- /dev/null +++ b/app/src/main/res/xml/network_config.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/baselib/build.gradle b/baselib/build.gradle index fa44116..c400e86 100755 --- a/baselib/build.gradle +++ b/baselib/build.gradle @@ -89,7 +89,7 @@ dependencies { api "io.github.razerdp:BasePopup:$rootProject.popup_version" //选择器 api 'io.github.lucksiege:pictureselector:v2.7.3-rc08' - api 'me.rosuh:AndroidFilePicker:0.7.0-x' + api 'me.rosuh:AndroidFilePicker:0.8.3' //toast api 'com.github.getActivity:ToastUtils:9.5' diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java index ec2d507..6dd2e68 100755 --- a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java @@ -10,7 +10,8 @@ public class BaseUrlApi { // public static final String IP = "http://192.168.0.155:7011/";/* 测试IP */ // public static final String IP = "http://10.25.242.183:80/";/* 测试IP */ public static final String IP = "http://www.wlcbsyzl.cn/";/* 正式IP */ - public static final String BASE_DISPLAY_SYSTEM = "http://192.168.0.104:8086/show/"; + // public static final String BASE_DISPLAY_SYSTEM = "http://192.168.0.104:8086/show/"; + public static final String BASE_DISPLAY_SYSTEM = "https://www.xzszwhy.cn/xzszwhy"; public static final String SYS_USERCENTER = "usercenter/"; public static final String SYS_POPULATION = "population/";/*人口系统*/ public static final String SYS_CASE = "case/";/*事件部件*/ @@ -56,6 +57,7 @@ public class BaseUrlApi { public static final String SMART_CONSULT_URL = "https://www.cispirit.com/IntelligentConsulting"; + public static final String APP_VERSION_URL = "/app/appversion/get-number/e2f64ae0-69a5-454c-8471-483291a7bfb1"; // public static final String APP_VERSION_ID = "2f384d5c-419d-47a2-94cb-4a05b6f00936";/*测试App下载码*/ // public static final String APP_VERSION_ID = "c16826e7-8cfb-4db1-8844-09d2be697bc7";/* 155 测试App下载码*/ diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/RetrofitManager.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/RetrofitManager.java index 731a7b0..e7d633b 100755 --- a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/RetrofitManager.java +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/RetrofitManager.java @@ -68,7 +68,7 @@ public class RetrofitManager { builder.addInterceptor(new AreaInterceptor()); //builder.addInterceptor(new CommInterceptor()); //多BaseUrl连接器 - builder.addInterceptor(new BaseUrlInterceptor()); +// builder.addInterceptor(new BaseUrlInterceptor()); return builder; } diff --git a/common.gradle b/common.gradle index c7f188f..57ce8a5 100644 --- a/common.gradle +++ b/common.gradle @@ -2,8 +2,8 @@ ext{ gCompileSdkVersion = 32 gMinSdkVersion = 21 gTargetSdkVersion = 30 - gVersionCode = 27 - gVersionName = '1.2.7' + gVersionCode = 28 + gVersionName = '1.2.8' gBuildToolsVersion = "29.0.2" // gVersionCode=26 // gVersionName='1.3.0'