Merge branch 'master' of https://gitee.com/starlock-cn/app-starlock
# Conflicts: # star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart # star_lock/lib/network/api.dart
This commit is contained in:
commit
8e57e6e459
49
star_lock/android/app/aliyun-emas-services.json
Normal file
49
star_lock/android/app/aliyun-emas-services.json
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"emas.appKey":"333904040",
|
||||||
|
"emas.appSecret":"c316965fe0a74fc9a481a5c44a535dc2",
|
||||||
|
"emas.packageName":"com.example.star_lock",
|
||||||
|
"hotfix.idSecret":"333904040-1",
|
||||||
|
"hotfix.rsaSecret":"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCTjeqT4cX/VTcInnWLLxo2f+0W1vKfPLwpHr9rYeW1pELlySFFeDusdaV8vBBYRE2A4Mti6wuVRCw67YIif7gK+ZLipALWob/cPxC4pcbqJ0S5QznM8qPW2nheWhvuZA9SenO5OyNnQvhBeSMK0VaGBnCBrznm52Mq7yb1cQDlosGtTwDgezt5073xDJFhefYg7BzurAlCgmS4BRX0l1i5GWsv+R5hWLWyhO+dI2deArgbYiW0575f5L1zywJ4BJ/3qOgsJoSflLgtTVLlmbAXI1Xo023UWtfnnowH71avDn+SQ5agqZepp6pkoXiFhC7DN9gLTknHTb03mDHODOW1AgMBAAECggEADrs5c0A0M1S/pNWlKJswQ8ar1f7pxCodIwHV3JOuil726tgUwUnKs2Iffn+MJjPThQ1sYNjUlDd1LwDtYCJeLoJSPtxfCCyn6gZF1hl+7Xu0Kcbja2nCH746DDl01m0Y9oQRL6oO081k2ayNahQSTlkwPFJRNpNdXDj6K8D3dPWPCBw7ECFKYpoDmPt+lNwqPPIWlVwYFRwhhCRuSPZsejO+a65gWZhm6uWDkh/EtPzdCIkrpfxbfqSnM6t+WHKmA3Gmm6AiwNLrzUGJ5lIsLXNuvaXFpsjBpVq7x9Ff86Cj0vJ7wdIRn7sP1Wlw6SosKZZwn9+zDLQU0Prge0Mn9QKBgQDKFXnzWqdmG6PxykyHJrXeLvQyMBdy6x91lmNSYGxYYEG2Tr1LR+P5r1oL/VRmuT43qWxubL7gEMqMGOVEMwKN6cEBTFDIOyqpNgR5Nnt0DrYMDhca3Wxc1/SkzuaVsRPHAKn8bChWGtq58/VuuZIY8SRVTWLgRWrnXFWCbKq0QwKBgQC67AVJwymxxIYt7UVRxtihd84SIGhRluEXG3O8PzK7Je5qDgBkLc+khnTvnGQyG7AJwtMpIbzmzJyu76pjiga1XJnYCO1QXhayMRlieSkrk2C4u9hnmeni24iGDUkV7yCnwsTjFaQ3lq1XtrJJKB9rUeBndXwuN06lTIqokSuapwKBgQCYCEpEHCqediMEMDcc4rGmo1qSO34Yte1oEKlOez5nypsFZf2hmkdYPGUZahBKbAjz5WGvPd7oQZmwhrZNdbbxPzA2Is0Ppvu0a/A3pRaBvOOW9C7LxlPVEZ97MjFl4t/HMqewQUqjZPazOWenUrMoUpsMFflSUsdXoi6uvcQ7cwKBgGNS1tyDH7yeOM5erd7uUl46Uv2+yq/QBHtK0wzMaCCZ3z3rgrm4vgUmjSxlZbhajgghxiKtErtxLjCmmVubFEV6lyT8WV3DITw+asawqvfEsDh5WFx0pJsvHDRfCt7k2e1KyWQBM+l131Ykdkf5Ufis4RkYjIviR5/+NA+uVAUxAoGAEIrRsaTDij9AX3/wD0XpDavFJdHzkvX259b6v0aASVoYlzAfj5bh1fZI90ex+MDibx3UyhHOVS2kk6q/TPAoevVlfS6IDfV0VJJZvie52qumfhttBpvH302rzrdEiZEhRd2UuKkBw7hsW+NlJEmoV0tj3xiP2vLLPnsaua9F3/g=",
|
||||||
|
"httpdns.accountId":"125761",
|
||||||
|
"httpdns.secretKey":"f77f39c6f0e66d7c169aa7e8d87dfe13",
|
||||||
|
"appmonitor.tlog.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCEYcyLDY/8H6714r5FuRuv94oWLod90sa5dwcJ5l8GmRMscFPxMXt9cNiKwL7zqPCWws+ApSfHczFnRgvZQX/p/t0U1nPNdotLqkLuzXNBim+TpfNnCvIoiVujAGXwdIGo7oaxci9+VV/1TFs5lm9M1wsreT2u+62cCqi/h16ZkQIDAQAB",
|
||||||
|
"appmonitor.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCEYcyLDY/8H6714r5FuRuv94oWLod90sa5dwcJ5l8GmRMscFPxMXt9cNiKwL7zqPCWws+ApSfHczFnRgvZQX/p/t0U1nPNdotLqkLuzXNBim+TpfNnCvIoiVujAGXwdIGo7oaxci9+VV/1TFs5lm9M1wsreT2u+62cCqi/h16ZkQIDAQAB"
|
||||||
|
},
|
||||||
|
"services": {
|
||||||
|
"hotfix_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"3.3.9"
|
||||||
|
},
|
||||||
|
"ha-adapter_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"1.2.3.0-open"
|
||||||
|
},
|
||||||
|
"feedback_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"3.4.2"
|
||||||
|
},
|
||||||
|
"tlog_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"1.1.7.0-open"
|
||||||
|
},
|
||||||
|
"httpdns_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"2.3.3"
|
||||||
|
},
|
||||||
|
"apm_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"1.1.3.0-open"
|
||||||
|
},
|
||||||
|
"man_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"1.2.7"
|
||||||
|
},
|
||||||
|
"cps_service":{
|
||||||
|
"status":1,
|
||||||
|
"version":"3.8.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"use_maven":true,
|
||||||
|
"proguard_keeplist":"\n#httpdns\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#cps\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n-keepclasseswithmembernames class ** {\nnative <methods>;\n}\n-keepattributes Signature\n-keep class sun.misc.Unsafe { *; }\n-keep class com.alipay.** {*;}\n-dontwarn com.alipay.**\n-keep class anet.**{*;}\n-keep class org.android.spdy.**{*;}\n-keep class org.android.agoo.**{*;}\n-dontwarn anet.**\n-dontwarn org.android.spdy.**\n-dontwarn org.android.agoo.**\n\n#hotfix\n#基线包使用,生成mapping.txt\n-printmapping mapping.txt\n#生成的mapping.txt在app/buidl/outputs/mapping/release路径下,移动到/app路径下\n#修复后的项目使用,保证混淆结果一致\n#-applymapping mapping.txt\n#hotfix\n-keep class com.taobao.sophix.**{*;}\n-keep class com.ta.utdid2.device.**{*;}\n#防止inline\n-dontoptimize\n\n#man\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#feedback\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n"
|
||||||
|
}
|
||||||
@ -52,7 +52,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "cn.starlock.lock"
|
applicationId "com.example.star_lock"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
||||||
// minSdkVersion flutter.minSdkVersion
|
// minSdkVersion flutter.minSdkVersion
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
<!--允许获取设备和运营商信息,用于问题排查和网络定位(无gps情况下的定位),若需网络定位功能则必选-->
|
<!--允许获取设备和运营商信息,用于问题排查和网络定位(无gps情况下的定位),若需网络定位功能则必选-->
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
|
||||||
|
|
||||||
<!--允许获取网络状态,用于网络定位(无gps情况下的定位),若需网络定位功能则必选-->
|
<!--允许获取网络状态,用于网络定位(无gps情况下的定位),若需网络定位功能则必选-->
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
@ -78,5 +79,23 @@
|
|||||||
android:name="flutterEmbedding"
|
android:name="flutterEmbedding"
|
||||||
android:value="2" />
|
android:value="2" />
|
||||||
<meta-data android:name="com.amap.api.v2.apikey" android:value="11d49b3f4fc09c04a02bbb7500925ba2"> </meta-data>
|
<meta-data android:name="com.amap.api.v2.apikey" android:value="11d49b3f4fc09c04a02bbb7500925ba2"> </meta-data>
|
||||||
|
<!-- 请填写你自己的- appKey -->
|
||||||
|
<meta-data android:name="com.alibaba.app.appkey" android:value="333904040"/>
|
||||||
|
<!-- 请填写你自己的appSecret -->
|
||||||
|
<meta-data android:name="com.alibaba.app.appsecret" android:value="c316965fe0a74fc9a481a5c44a535dc2"/>
|
||||||
</application>
|
</application>
|
||||||
|
<!-- 消息接收监听器 (用户可自主扩展) -->
|
||||||
|
<receiver
|
||||||
|
android:name="com.example.star_lock.MyMessageReceiver"
|
||||||
|
android:exported="false" > <!-- 为保证receiver安全,建议设置不可导出,如需对其他应用开放可通过android:permission进行限制 -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.sdk.android.push.RECEIVE" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@ -0,0 +1,72 @@
|
|||||||
|
package com.example.star_lock
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.Log
|
||||||
|
import com.alibaba.sdk.android.push.MessageReceiver
|
||||||
|
import com.alibaba.sdk.android.push.notification.CPushMessage
|
||||||
|
|
||||||
|
|
||||||
|
class MyMessageReceiver : MessageReceiver() {
|
||||||
|
override fun onNotification(
|
||||||
|
context: Context?,
|
||||||
|
title: String,
|
||||||
|
summary: String,
|
||||||
|
extraMap: Map<String?, String?>
|
||||||
|
) {
|
||||||
|
// TODO处理推送通知
|
||||||
|
Log.e(
|
||||||
|
"MyMessageReceiver",
|
||||||
|
"Receive notification, title: $title, summary: $summary, extraMap: $extraMap"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onMessage(context: Context?, cPushMessage: CPushMessage) {
|
||||||
|
Log.e(
|
||||||
|
"MyMessageReceiver",
|
||||||
|
"onMessage, messageId: " + cPushMessage.getMessageId() + ", title: " + cPushMessage.getTitle() + ", content:" + cPushMessage.getContent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNotificationOpened(context: Context?, title: String, summary: String, extraMap: String) {
|
||||||
|
Log.e(
|
||||||
|
"MyMessageReceiver",
|
||||||
|
"onNotificationOpened, title: $title, summary: $summary, extraMap:$extraMap"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override fun onNotificationClickedWithNoAction(
|
||||||
|
context: Context?,
|
||||||
|
title: String,
|
||||||
|
summary: String,
|
||||||
|
extraMap: String
|
||||||
|
) {
|
||||||
|
Log.e(
|
||||||
|
"MyMessageReceiver",
|
||||||
|
"onNotificationClickedWithNoAction, title: $title, summary: $summary, extraMap:$extraMap"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override fun onNotificationReceivedInApp(
|
||||||
|
context: Context?,
|
||||||
|
title: String,
|
||||||
|
summary: String,
|
||||||
|
extraMap: Map<String?, String?>,
|
||||||
|
openType: Int,
|
||||||
|
openActivity: String,
|
||||||
|
openUrl: String
|
||||||
|
) {
|
||||||
|
Log.e(
|
||||||
|
"MyMessageReceiver",
|
||||||
|
"onNotificationReceivedInApp, title: $title, summary: $summary, extraMap:$extraMap, openType:$openType, openActivity:$openActivity, openUrl:$openUrl"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override fun onNotificationRemoved(context: Context?, messageId: String?) {
|
||||||
|
Log.e("MyMessageReceiver", "onNotificationRemoved")
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
// 消息接收部分的LOG_TAG
|
||||||
|
const val REC_TAG = "receiver"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,32 +9,14 @@
|
|||||||
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
|
||||||
<application android:name="*****">
|
<application android:name="*****">
|
||||||
<!-- 请填写你自己的- appKey -->
|
<!-- 请填写你自己的- appKey -->
|
||||||
<meta-data android:name="com.alibaba.app.appkey" android:value="333895262"/>
|
<meta-data android:name="com.alibaba.app.appkey" android:value="333904040"/>
|
||||||
<!-- 请填写你自己的appSecret -->
|
<!-- 请填写你自己的appSecret -->
|
||||||
<meta-data android:name="com.alibaba.app.appsecret" android:value="a82105a258e54aa1a129238164e23a51"/>
|
<meta-data android:name="com.alibaba.app.appsecret" android:value="c316965fe0a74fc9a481a5c44a535dc2"/>
|
||||||
</application>
|
|
||||||
|
|
||||||
|
<!-- 华为通道的参数appid -->
|
||||||
<!-- 消息接收监听器 (用户可自主扩展) -->
|
|
||||||
<receiver
|
|
||||||
android:name=".MyMessageReceiver"
|
|
||||||
android:exported="false"> <!-- 为保证receiver安全,建议设置不可导出,如需对其他应用开放可通过android:permission进行限制 -->
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="com.alibaba.sdk.android.push.RECEIVE" />
|
|
||||||
</intent-filter>
|
|
||||||
</receiver>
|
|
||||||
|
|
||||||
|
|
||||||
<application android:name="*****">
|
|
||||||
<!-- 华为通道的参数appid -->
|
|
||||||
<meta-data android:name="com.huawei.hms.client.appid" android:value="appid=xxxxx" />
|
<meta-data android:name="com.huawei.hms.client.appid" android:value="appid=xxxxx" />
|
||||||
|
|
||||||
<!-- vivo通道的参数api_key为appkey -->
|
<!-- vivo通道的参数api_key为appkey -->
|
||||||
@ -60,6 +42,21 @@
|
|||||||
<meta-data android:name="com.gcm.push.applicationid" android:value="" />
|
<meta-data android:name="com.gcm.push.applicationid" android:value="" />
|
||||||
<meta-data android:name="com.gcm.push.projectid" android:value="" />
|
<meta-data android:name="com.gcm.push.projectid" android:value="" />
|
||||||
<meta-data android:name="com.gcm.push.api.key" android:value="" />
|
<meta-data android:name="com.gcm.push.api.key" android:value="" />
|
||||||
|
|
||||||
|
<!-- 消息接收监听器 (用户可自主扩展) -->
|
||||||
|
<receiver
|
||||||
|
android:name="com.example.star_lock.MyMessageReceiver"
|
||||||
|
android:exported="false" > <!-- 为保证receiver安全,建议设置不可导出,如需对其他应用开放可通过android:permission进行限制 -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.sdk.android.push.RECEIVE" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@ -202,6 +202,7 @@
|
|||||||
"videoIntercomDoorLock":"Video intercom door lock",
|
"videoIntercomDoorLock":"Video intercom door lock",
|
||||||
"NFCPassiveLock":"NFC Passive Lock",
|
"NFCPassiveLock":"NFC Passive Lock",
|
||||||
"addDevice":"Add device",
|
"addDevice":"Add device",
|
||||||
|
"shoppingCart":"Lock Mall",
|
||||||
"gateway":"Gateway",
|
"gateway":"Gateway",
|
||||||
"message":"Message",
|
"message":"Message",
|
||||||
"supportStaff":"Support Staff",
|
"supportStaff":"Support Staff",
|
||||||
@ -473,7 +474,7 @@
|
|||||||
"openRight": "Open Right",
|
"openRight": "Open Right",
|
||||||
"judgmentMethod": "Judgment Method:\n",
|
"judgmentMethod": "Judgment Method:\n",
|
||||||
"judgmentMethodContent": "The man stood outside the house, facing the entrance door. \nIf the hinge or shaft of the door is on the left, the door is left open; \nA door is right-open if its hinge or shaft is on the right. \nIf the setting is wrong, it will not open and close the door properly. \nRecommended to be operated by installation or maintenance personnel.",
|
"judgmentMethodContent": "The man stood outside the house, facing the entrance door. \nIf the hinge or shaft of the door is on the left, the door is left open; \nA door is right-open if its hinge or shaft is on the right. \nIf the setting is wrong, it will not open and close the door properly. \nRecommended to be operated by installation or maintenance personnel.",
|
||||||
|
|
||||||
"customMode": "Custom mode",
|
"customMode": "Custom mode",
|
||||||
"videoSlot": "Video slot"
|
"videoSlot": "Video slot"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -202,6 +202,7 @@
|
|||||||
"videoIntercomDoorLock":"videoIntercomDoorLock",
|
"videoIntercomDoorLock":"videoIntercomDoorLock",
|
||||||
"NFCPassiveLock":"NFCPassiveLock",
|
"NFCPassiveLock":"NFCPassiveLock",
|
||||||
"addDevice":"addDevice",
|
"addDevice":"addDevice",
|
||||||
|
"shoppingCart":"shoppingCart",
|
||||||
"gateway":"gateway",
|
"gateway":"gateway",
|
||||||
"message":"message",
|
"message":"message",
|
||||||
"supportStaff":"supportStaff",
|
"supportStaff":"supportStaff",
|
||||||
@ -476,4 +477,4 @@
|
|||||||
|
|
||||||
"customMode": "customMode",
|
"customMode": "customMode",
|
||||||
"videoSlot": "videoSlot"
|
"videoSlot": "videoSlot"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -202,6 +202,7 @@
|
|||||||
"videoIntercomDoorLock":"可视对讲门锁",
|
"videoIntercomDoorLock":"可视对讲门锁",
|
||||||
"NFCPassiveLock":"NFC无源锁",
|
"NFCPassiveLock":"NFC无源锁",
|
||||||
"addDevice":"添加设备",
|
"addDevice":"添加设备",
|
||||||
|
"shoppingCart":"配件商城",
|
||||||
"gateway":"网关",
|
"gateway":"网关",
|
||||||
"message":"消息",
|
"message":"消息",
|
||||||
"supportStaff":"客服",
|
"supportStaff":"客服",
|
||||||
@ -479,4 +480,4 @@
|
|||||||
|
|
||||||
"customMode": "自定义模式",
|
"customMode": "自定义模式",
|
||||||
"videoSlot": "录像时段"
|
"videoSlot": "录像时段"
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
star_lock/images/lockSet_liveVideo.png
Normal file
BIN
star_lock/images/lockSet_liveVideo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
BIN
star_lock/images/mine/icon_mine_main_shoppingcart.png
Normal file
BIN
star_lock/images/mine/icon_mine_main_shoppingcart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@ -12,6 +12,7 @@ import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_
|
|||||||
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_page.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/familyDetails/familyDetails_page.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/familyDetails/familyDetails_page.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/lcokSet/liveVideo/liveVideo_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/lockUser/lockUser_page.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/lockUser/lockUser_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/motorPower/motorPower_page.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/motorPower/motorPower_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_page.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_page.dart';
|
||||||
@ -143,6 +144,7 @@ import 'mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_
|
|||||||
import 'mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart';
|
import 'mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart';
|
||||||
import 'mine/gateway/gatewayDetail/gatewayDetail_page.dart';
|
import 'mine/gateway/gatewayDetail/gatewayDetail_page.dart';
|
||||||
import 'mine/gateway/gatewayList/gatewayList_page.dart';
|
import 'mine/gateway/gatewayList/gatewayList_page.dart';
|
||||||
|
import 'mine/mall/mall_page.dart';
|
||||||
import 'mine/message/messageList_page.dart';
|
import 'mine/message/messageList_page.dart';
|
||||||
import 'mine/mine/starLockMine_page.dart';
|
import 'mine/mine/starLockMine_page.dart';
|
||||||
import 'mine/mineMultiLanguage/mineMultiLanguage_page.dart';
|
import 'mine/mineMultiLanguage/mineMultiLanguage_page.dart';
|
||||||
@ -182,6 +184,7 @@ abstract class Routers {
|
|||||||
static const starLockMain = '/StarLockMain'; // 首页
|
static const starLockMain = '/StarLockMain'; // 首页
|
||||||
static const starLockMinePage = '/StarLockMinePage'; // 我的
|
static const starLockMinePage = '/StarLockMinePage'; // 我的
|
||||||
static const seletLockTypePage = '/SeletLockTypePage'; // 选择锁类型
|
static const seletLockTypePage = '/SeletLockTypePage'; // 选择锁类型
|
||||||
|
static const LockMallPage = '/LockMallPage'; // 商城页面
|
||||||
static const addLockPage = '/AddLockPage'; // 选择锁类型
|
static const addLockPage = '/AddLockPage'; // 选择锁类型
|
||||||
static const nearbyLockPage = '/NearbyLockPage'; // 附近的锁
|
static const nearbyLockPage = '/NearbyLockPage'; // 附近的锁
|
||||||
static const lockAddressPage = '/LockAddressPage'; // 锁地址
|
static const lockAddressPage = '/LockAddressPage'; // 锁地址
|
||||||
@ -414,6 +417,7 @@ abstract class Routers {
|
|||||||
static const doorLockLogPage = '/doorLockLogPage'; //门锁日志
|
static const doorLockLogPage = '/doorLockLogPage'; //门锁日志
|
||||||
static const catEyeCustomModePage = '/catEyeCustomModePage'; //猫眼自定义模式
|
static const catEyeCustomModePage = '/catEyeCustomModePage'; //猫眼自定义模式
|
||||||
static const videoSlotPage = '/videoSlotPage'; //录像时段
|
static const videoSlotPage = '/videoSlotPage'; //录像时段
|
||||||
|
static const liveVideoPage = '/liveVideoPage'; //实时画面
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppRouters {
|
abstract class AppRouters {
|
||||||
@ -434,6 +438,10 @@ abstract class AppRouters {
|
|||||||
name: Routers.seletLockTypePage,
|
name: Routers.seletLockTypePage,
|
||||||
page: () => const SeletLockTypePage(),
|
page: () => const SeletLockTypePage(),
|
||||||
),
|
),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.LockMallPage,
|
||||||
|
page: () => const LockMallPage(),
|
||||||
|
),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.addLockPage,
|
name: Routers.addLockPage,
|
||||||
page: () => const AddLockPage(),
|
page: () => const AddLockPage(),
|
||||||
@ -1005,5 +1013,6 @@ abstract class AppRouters {
|
|||||||
name: Routers.catEyeCustomModePage,
|
name: Routers.catEyeCustomModePage,
|
||||||
page: () => const CatEyeCustomModePage()),
|
page: () => const CatEyeCustomModePage()),
|
||||||
GetPage(name: Routers.videoSlotPage, page: (() => const VideoSlotPage())),
|
GetPage(name: Routers.videoSlotPage, page: (() => const VideoSlotPage())),
|
||||||
|
GetPage(name: Routers.liveVideoPage, page: (() => const LiveVideoPage()))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,22 +1,16 @@
|
|||||||
import 'package:aliyun_push/aliyun_push.dart';
|
import 'package:aliyun_push/aliyun_push.dart';
|
||||||
import 'package:audioplayers/audioplayers.dart';
|
|
||||||
// import 'package:audioplayers/audioplayers.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:flutter_pcm_sound/flutter_pcm_sound.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_sound/flutter_sound.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:star_lock/talk/udp/udp_talkClass.dart';
|
|
||||||
import 'package:star_lock/tools/app_manager.dart';
|
import 'package:star_lock/tools/app_manager.dart';
|
||||||
import 'package:star_lock/tools/bindings/app_binding.dart';
|
import 'package:star_lock/tools/bindings/app_binding.dart';
|
||||||
import 'package:star_lock/tools/device_info_service.dart';
|
import 'package:star_lock/tools/device_info_service.dart';
|
||||||
import 'package:star_lock/tools/platform_info_services.dart';
|
import 'package:star_lock/tools/platform_info_services.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
import 'package:star_lock/tools/xs_aliyunPush.dart';
|
import 'package:star_lock/tools/xs_aliyunPush.dart';
|
||||||
// import 'package:star_lock/tools/store_service.dart';
|
|
||||||
import 'package:star_lock/translations/app_dept.dart';
|
import 'package:star_lock/translations/app_dept.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -54,12 +48,6 @@ class MyApp extends StatefulWidget {
|
|||||||
// final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
|
// final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
||||||
final _aliyunPush = AliyunPush();
|
|
||||||
var _deviceId = "";
|
|
||||||
// final audioPlayer = AudioPlayer();
|
|
||||||
final FlutterSoundPlayer _audioPlayer = FlutterSoundPlayer();
|
|
||||||
late List<int> allDataBytes;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ScreenUtilInit(
|
return ScreenUtilInit(
|
||||||
@ -130,7 +118,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
WidgetsBinding.instance?.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
|
||||||
openBlueScan();
|
openBlueScan();
|
||||||
|
|
||||||
@ -139,46 +127,30 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
|||||||
|
|
||||||
//初始化阿里云推送
|
//初始化阿里云推送
|
||||||
void initAliyunPush() {
|
void initAliyunPush() {
|
||||||
XSAliyunPushProvider().init(_aliyunPush);
|
final aliyunPush = AliyunPush();
|
||||||
|
XSAliyunPushProvider().init(aliyunPush);
|
||||||
XSAliyunPushProvider().initAliyunPush();
|
XSAliyunPushProvider().initAliyunPush();
|
||||||
|
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
XSAliyunPushProvider().initAliyunThirdPush();
|
XSAliyunPushProvider().initAliyunThirdPush();
|
||||||
}
|
}
|
||||||
|
|
||||||
//暂不使用DeviceID推送
|
//暂使用DeviceID推送
|
||||||
_aliyunPush.getDeviceId().then((deviceId) async {
|
aliyunPush.getDeviceId().then((deviceId) async {
|
||||||
|
// print('得到的DeviceId$deviceId');
|
||||||
final data = await Storage.getString(saveUserLoginData);
|
final data = await Storage.getString(saveUserLoginData);
|
||||||
if (data!.isNotEmpty) {
|
if (data!.isNotEmpty && deviceId.isNotEmpty) {
|
||||||
XSAliyunPushProvider()
|
XSAliyunPushProvider()
|
||||||
.pushBindDeviceID(deviceId, Platform.isAndroid ? 10 : 20);
|
.pushBindDeviceID(deviceId, Platform.isAndroid ? 10 : 20);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// //使用userid根据账号推送
|
|
||||||
// _aliyunPush.bindAccount(Storage.getUid().toString()).then((value) {
|
|
||||||
// print("得到了value$value");
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
WidgetsBinding.instance?.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
|
||||||
if (state == AppLifecycleState.resumed) {
|
|
||||||
// 应用进入前台
|
|
||||||
print("应用进入前台");
|
|
||||||
} else if (state == AppLifecycleState.paused) {
|
|
||||||
// 应用进入后台
|
|
||||||
print("应用进入后台");
|
|
||||||
if (UDPTalkClass().isBeCall == true) {
|
|
||||||
UDPTalkClass().playLocalAudio();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置国际化信息
|
// 设置国际化信息
|
||||||
|
|||||||
@ -244,9 +244,9 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
// 获取是否是演示模式 演示模式不获取接口
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
_initReplySubscription();
|
// _initReplySubscription();
|
||||||
|
|
||||||
mockNetworkDataRequest();
|
// mockNetworkDataRequest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
// 获取是否是演示模式 演示模式不获取接口
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
getLockRecordLastUploadDataTime();
|
// getLockRecordLastUploadDataTime();
|
||||||
// senderReferEventRecordTime();
|
// senderReferEventRecordTime();
|
||||||
// senderReferEventRecordNumber();
|
// senderReferEventRecordNumber();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
import 'package:cupertino_stepper/cupertino_stepper.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_advanced_calendar/flutter_advanced_calendar.dart';
|
import 'package:flutter_advanced_calendar/flutter_advanced_calendar.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:gzx_dropdown_menu/gzx_dropdown_menu.dart';
|
|
||||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_logic.dart';
|
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_logic.dart';
|
||||||
|
import 'package:timelines/timelines.dart';
|
||||||
|
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../tools/storage.dart';
|
import '../../../tools/storage.dart';
|
||||||
@ -56,270 +54,143 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: Column(
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisSize: MainAxisSize.max,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Theme(
|
||||||
Theme(
|
data: theme.copyWith(
|
||||||
data: theme.copyWith(
|
textTheme: theme.textTheme.copyWith(
|
||||||
textTheme: theme.textTheme.copyWith(
|
titleMedium: theme.textTheme.titleMedium!.copyWith(
|
||||||
titleMedium: theme.textTheme.titleMedium!.copyWith(
|
fontSize: 16,
|
||||||
fontSize: 16,
|
color: theme.colorScheme.secondary,
|
||||||
color: theme.colorScheme.secondary,
|
|
||||||
),
|
|
||||||
bodyLarge: theme.textTheme.bodyLarge!.copyWith(
|
|
||||||
fontSize: 14,
|
|
||||||
color: Colors.black54,
|
|
||||||
),
|
|
||||||
bodyMedium: theme.textTheme.bodyMedium!.copyWith(
|
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.black87,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
primaryColor: AppColors.mainColor,
|
bodyLarge: theme.textTheme.bodyLarge!.copyWith(
|
||||||
highlightColor: Colors.yellow,
|
fontSize: 14,
|
||||||
disabledColor: Colors.green,
|
color: Colors.black54,
|
||||||
),
|
),
|
||||||
child: AdvancedCalendar(
|
bodyMedium: theme.textTheme.bodyMedium!.copyWith(
|
||||||
controller: state.calendarControllerCustom,
|
fontSize: 12,
|
||||||
events: state.events,
|
color: Colors.black87,
|
||||||
weekLineHeight: 48.0,
|
|
||||||
startWeekDay: 1,
|
|
||||||
innerDot: true,
|
|
||||||
keepLineSize: true,
|
|
||||||
calendarTextStyle: const TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
height: 1.3125,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
primaryColor: AppColors.mainColor,
|
||||||
|
highlightColor: Colors.yellow,
|
||||||
|
disabledColor: Colors.green,
|
||||||
),
|
),
|
||||||
Stack(
|
child: AdvancedCalendar(
|
||||||
key: state.stackKey,
|
controller: state.calendarControllerCustom,
|
||||||
children: <Widget>[
|
events: state.events,
|
||||||
Column(
|
weekLineHeight: 48.0,
|
||||||
children: <Widget>[
|
startWeekDay: 1,
|
||||||
_buildHeaderView(),
|
innerDot: true,
|
||||||
],
|
keepLineSize: true,
|
||||||
),
|
calendarTextStyle: const TextStyle(
|
||||||
// 下拉菜单,注意GZXDropDownMenu目前只能在Stack内,后续有时间会改进,以及支持CustomScrollView和NestedScrollView
|
fontSize: 18,
|
||||||
_buildDropDownMenu()
|
fontWeight: FontWeight.w400,
|
||||||
],
|
height: 1.3125,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
OrientationBuilder(
|
),
|
||||||
builder: (BuildContext context, Orientation orientation) {
|
Row(children: [
|
||||||
switch (orientation) {
|
SizedBox(
|
||||||
case Orientation.portrait:
|
width: 30.w,
|
||||||
return _buildStepper(StepperType.vertical);
|
|
||||||
case Orientation.landscape:
|
|
||||||
return _buildStepper(StepperType.horizontal);
|
|
||||||
default:
|
|
||||||
throw UnimplementedError(orientation.toString());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
Obx(() => DropdownButton<String>(
|
||||||
),
|
value: state.dropdownValue.value,
|
||||||
),
|
icon: const Icon(Icons.arrow_drop_down),
|
||||||
);
|
iconSize: 40,
|
||||||
}
|
elevation: 12,
|
||||||
|
style: TextStyle(fontSize: 26.sp, color: Colors.black),
|
||||||
//下拉头部控件GZXDropDownHeader
|
iconEnabledColor: Colors.grey,
|
||||||
Widget _buildHeaderView() {
|
onChanged: (newValue) {
|
||||||
return GZXDropDownHeader(
|
state.dropdownValue.value = newValue!;
|
||||||
// 下拉的头部项,目前每一项,只能自定义显示的文字、图标、图标大小修改
|
},
|
||||||
items: [
|
items: state.dropDownItemList.obs
|
||||||
GZXDropDownHeaderItem(state.dropDownDoorLockItem[0], iconSize: 36),
|
.map<DropdownMenuItem<String>>((item) {
|
||||||
],
|
return DropdownMenuItem<String>(
|
||||||
// GZXDropDownHeader对应第一父级Stack的key
|
value: item,
|
||||||
stackKey: state.stackKey,
|
child: Text(item),
|
||||||
// controller用于控制menu的显示或隐藏
|
);
|
||||||
controller: state.dropdownMenuController,
|
}).toList(),
|
||||||
// 当点击头部项的事件,在这里可以进行页面跳转或openEndDrawer
|
))
|
||||||
onItemTap: (index) {},
|
]),
|
||||||
// 头部的高度
|
SizedBox(
|
||||||
height: 46,
|
height: 20.h,
|
||||||
// 头部背景颜色
|
),
|
||||||
color: Colors.white,
|
Expanded(
|
||||||
// 文字样式
|
child: Container(
|
||||||
style: TextStyle(
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
color: AppColors.darkGrayTextColor, fontSize: ScreenUtil().setSp(24)),
|
//给contain设置一个10像素的圆角
|
||||||
// 下拉时文字样式
|
decoration: BoxDecoration(
|
||||||
dropDownStyle: TextStyle(
|
color: Colors.white, borderRadius: BorderRadius.circular(16.w)),
|
||||||
fontSize: ScreenUtil().setSp(24),
|
child: Timeline.tileBuilder(
|
||||||
color: AppColors.darkGrayTextColor,
|
builder: TimelineTileBuilder.fromStyle(
|
||||||
),
|
contentsAlign: ContentsAlign.basic,
|
||||||
// 图标大小
|
contentsBuilder: (context, index) => Padding(
|
||||||
iconSize: 20,
|
padding: EdgeInsets.all(24.0.w),
|
||||||
// 图标颜色
|
child: Column(
|
||||||
iconColor: AppColors.greyBackgroundColor,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
// 下拉时图标颜色
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
iconDropDownColor: AppColors.mainColor,
|
children: [
|
||||||
);
|
Text('09:30 有人出现在门口',
|
||||||
}
|
textAlign: TextAlign.left,
|
||||||
|
style: TextStyle(
|
||||||
//下拉菜单
|
color: AppColors.darkGrayTextColor,
|
||||||
Widget _buildDropDownMenu() {
|
fontSize: 24.sp,
|
||||||
return Obx(() => GZXDropDownMenu(
|
)),
|
||||||
// controller用于控制menu的显示或隐藏
|
SizedBox(
|
||||||
controller: state.dropdownMenuController,
|
height: 10.h,
|
||||||
// 下拉菜单显示或隐藏动画时长
|
),
|
||||||
animationMilliseconds: 300,
|
const Image(
|
||||||
// 下拉后遮罩颜色
|
image: AssetImage(
|
||||||
// maskColor: Theme.of(context).primaryColor.withOpacity(0.5),
|
'images/main/icon_lockDetail_monitoringvoiceFrist.png')),
|
||||||
// maskColor: Colors.red.withOpacity(0.5),
|
],
|
||||||
dropdownMenuChanging: (isShow, index) {},
|
|
||||||
dropdownMenuChanged: (isShow, index) {},
|
|
||||||
// 下拉菜单,高度自定义,你想显示什么就显示什么,完全由你决定,你只需要在选择后调用_dropdownMenuController.hide();即可
|
|
||||||
menus: [
|
|
||||||
GZXDropdownMenuBuilder(
|
|
||||||
dropDownHeight: 44.0.h * state.eventSortConditions.value.length,
|
|
||||||
dropDownWidget: _buildConditionListWidget(
|
|
||||||
state.eventSortConditions.value, (value) {
|
|
||||||
state.selectGroupSortCondition = value;
|
|
||||||
state.dropDownDoorLockItem[0] =
|
|
||||||
state.selectGroupSortCondition.name;
|
|
||||||
})),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
_buildConditionListWidget(
|
|
||||||
items, void Function(SortCondition sortCondition) itemOnTap) {
|
|
||||||
return Container(
|
|
||||||
color: Colors.white,
|
|
||||||
child: ListView.separated(
|
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
shrinkWrap: true,
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
itemCount: items.length,
|
|
||||||
// item 的个数
|
|
||||||
separatorBuilder: (BuildContext context, int index) =>
|
|
||||||
const Divider(height: 1.0),
|
|
||||||
// 添加分割线
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
return gestureDetector(items, index, itemOnTap, context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
GestureDetector gestureDetector(
|
|
||||||
items,
|
|
||||||
int index,
|
|
||||||
void Function(SortCondition sortCondition) itemOnTap,
|
|
||||||
BuildContext context) {
|
|
||||||
SortCondition goodsSortCondition = items[index];
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
for (var value in items) {
|
|
||||||
value.isSelected = false;
|
|
||||||
}
|
|
||||||
goodsSortCondition.isSelected = true;
|
|
||||||
|
|
||||||
itemOnTap(goodsSortCondition);
|
|
||||||
},
|
|
||||||
child: SizedBox(
|
|
||||||
height: 44.h,
|
|
||||||
child: Center(
|
|
||||||
child: Obx(() => Text(
|
|
||||||
goodsSortCondition.name,
|
|
||||||
style: TextStyle(
|
|
||||||
color: goodsSortCondition.isSelected
|
|
||||||
? AppColors.mainColor
|
|
||||||
: Colors.black,
|
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
),
|
itemCount: 10,
|
||||||
));
|
),
|
||||||
}
|
theme: TimelineThemeData(
|
||||||
|
nodePosition: 0.04, //居左侧距离
|
||||||
CupertinoStepper _buildStepper(StepperType type) {
|
connectorTheme: const ConnectorThemeData(
|
||||||
final canCancel = state.currentStep.value > 0;
|
thickness: 2.0,
|
||||||
final canContinue = state.currentStep.value < 3;
|
color: AppColors.greyBackgroundColor,
|
||||||
return CupertinoStepper(
|
indent: 0.5),
|
||||||
type: type,
|
indicatorTheme: const IndicatorThemeData(
|
||||||
currentStep: state.currentStep.value,
|
size: 16.0,
|
||||||
onStepTapped: (step) => setState(() => state.currentStep.value = step),
|
color: AppColors.greyBackgroundColor,
|
||||||
onStepCancel:
|
position: 0.07),
|
||||||
canCancel ? () => setState(() => --state.currentStep.value) : null,
|
),
|
||||||
onStepContinue:
|
),
|
||||||
canContinue ? () => setState(() => ++state.currentStep.value) : null,
|
)),
|
||||||
steps: [
|
],
|
||||||
for (var i = 0; i < 3; ++i)
|
|
||||||
_buildStep(
|
|
||||||
title: const Text(''),
|
|
||||||
isActive: i == state.currentStep.value,
|
|
||||||
state: i == state.currentStep.value
|
|
||||||
? StepState.editing
|
|
||||||
: i < state.currentStep.value
|
|
||||||
? StepState.complete
|
|
||||||
: StepState.indexed,
|
|
||||||
),
|
|
||||||
// _buildStep(
|
|
||||||
// title: Text('Error'),
|
|
||||||
// state: StepState.error,
|
|
||||||
// ),
|
|
||||||
// _buildStep(
|
|
||||||
// title: Text('Disabled'),
|
|
||||||
// state: StepState.disabled,
|
|
||||||
// )
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Step _buildStep({
|
|
||||||
required Widget title,
|
|
||||||
StepState state = StepState.indexed,
|
|
||||||
bool isActive = false,
|
|
||||||
}) {
|
|
||||||
return Step(
|
|
||||||
title: title,
|
|
||||||
subtitle: const Text('10:45 有人出现在门口'),
|
|
||||||
state: state,
|
|
||||||
isActive: isActive,
|
|
||||||
content: LimitedBox(
|
|
||||||
maxWidth: 300,
|
|
||||||
maxHeight: 300,
|
|
||||||
child: Container(color: CupertinoColors.systemGrey),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String getTypeIcon(int type) {
|
String getTypeIcon(int type) {
|
||||||
String title = 'images/controls_user.png';
|
String title = 'images/controls_user.png';
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
// 蓝牙开锁
|
// 蓝牙开锁
|
||||||
title = 'images/controls_user.png';
|
title = 'images/controls_user.png';
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// 密码开锁
|
// 密码开锁
|
||||||
title = 'images/icon_password.png';
|
title = 'images/icon_password.png';
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
// ic卡
|
// ic卡
|
||||||
title = 'images/icon_card.png';
|
title = 'images/icon_card.png';
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
// 指纹开锁
|
// 指纹开锁
|
||||||
title = 'images/icon_fingerprint.png';
|
title = 'images/icon_fingerprint.png';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
return title;
|
||||||
}
|
}
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
class SortCondition {
|
|
||||||
String name;
|
|
||||||
bool isSelected;
|
|
||||||
|
|
||||||
SortCondition({
|
|
||||||
required this.name,
|
|
||||||
required this.isSelected,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_advanced_calendar/flutter_advanced_calendar.dart';
|
import 'package:flutter_advanced_calendar/flutter_advanced_calendar.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:gzx_dropdown_menu/gzx_dropdown_menu.dart';
|
|
||||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_page.dart';
|
|
||||||
|
|
||||||
import '../../lockMian/entity/lockListInfo_entity.dart';
|
import '../../lockMian/entity/lockListInfo_entity.dart';
|
||||||
import '../electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
import '../electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
||||||
@ -11,25 +8,14 @@ class DoorLockLogState {
|
|||||||
final keyInfos = LockListInfoItemEntity().obs;
|
final keyInfos = LockListInfoItemEntity().obs;
|
||||||
final lockOperatingRecordListData = <KeyRecordDataItem>[].obs;
|
final lockOperatingRecordListData = <KeyRecordDataItem>[].obs;
|
||||||
final calendarControllerToday = AdvancedCalendarController.today();
|
final calendarControllerToday = AdvancedCalendarController.today();
|
||||||
final calendarControllerCustom =
|
final calendarControllerCustom = AdvancedCalendarController.today();
|
||||||
AdvancedCalendarController(DateTime(2024, 01, 10));
|
|
||||||
final events = <DateTime>[
|
final events = <DateTime>[
|
||||||
DateTime.now(),
|
DateTime.now(),
|
||||||
DateTime(2024, 10, 10),
|
DateTime(2024, 10, 10),
|
||||||
];
|
];
|
||||||
final eventSortConditions = [
|
var dropdownValue = '全部事件'.obs;
|
||||||
SortCondition(name: '全部事件', isSelected: true),
|
final List dropDownItemList =
|
||||||
SortCondition(name: '门锁异常', isSelected: false),
|
['全部事件', '门锁异常', '有人出现', '有人按门铃', '一次性密码开门'].obs;
|
||||||
SortCondition(name: '有人出现', isSelected: false),
|
|
||||||
SortCondition(name: '有人按门铃', isSelected: false),
|
|
||||||
SortCondition(name: '一次性密码开门', isSelected: false)
|
|
||||||
].obs;
|
|
||||||
final List dropDownDoorLockItem = ['全部事件'];
|
|
||||||
final GZXDropdownMenuController dropdownMenuController =
|
|
||||||
GZXDropdownMenuController();
|
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
|
||||||
final GlobalKey stackKey = GlobalKey();
|
|
||||||
late SortCondition selectGroupSortCondition = eventSortConditions.value[0];
|
|
||||||
var currentStep = 0.obs;
|
var currentStep = 0.obs;
|
||||||
|
|
||||||
DoorLockLogState() {
|
DoorLockLogState() {
|
||||||
|
|||||||
@ -43,14 +43,14 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
body: ListView(
|
body: ListView(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel: TranslationLoader.lanKeys!.lockNumber!.tr,
|
||||||
TranslationLoader.lanKeys!.lockNumber!.tr,
|
|
||||||
rightTitle: state.lockBasicInfo.value.lockName,
|
rightTitle: state.lockBasicInfo.value.lockName,
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
isHaveLine: true),
|
isHaveLine: true),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: "MAC/ID",
|
leftTitel: "MAC/ID",
|
||||||
rightTitle: "${state.lockBasicInfo.value.mac}/${state.lockBasicInfo.value.lockId}",
|
rightTitle:
|
||||||
|
"${state.lockBasicInfo.value.mac}/${state.lockBasicInfo.value.lockId}",
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
isHaveLine: false),
|
isHaveLine: false),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -62,23 +62,30 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.uploadElectricQuantityPage, arguments: {'lockSetInfoData': state.lockSetInfoData.value});
|
Get.toNamed(Routers.uploadElectricQuantityPage, arguments: {
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
})),
|
})),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||||
rightTitle: logic.getUseKeyTypeStr(state.lockBasicInfo.value.startDate, state.lockBasicInfo.value.startDate, state.lockBasicInfo.value.keyType),
|
rightTitle: logic.getUseKeyTypeStr(
|
||||||
|
state.lockBasicInfo.value.startDate,
|
||||||
|
state.lockBasicInfo.value.startDate,
|
||||||
|
state.lockBasicInfo.value.keyType),
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
isHaveLine: false),
|
isHaveLine: false),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel: TranslationLoader.lanKeys!.lockName!.tr,
|
||||||
TranslationLoader.lanKeys!.lockName!.tr,
|
|
||||||
rightTitle: state.lockBasicInfo.value.lockAlias,
|
rightTitle: state.lockBasicInfo.value.lockAlias,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var data = await Get.toNamed(Routers.editLockNamePage, arguments: {'lockSetInfoData': state.lockSetInfoData.value});
|
var data = await Get.toNamed(Routers.editLockNamePage,
|
||||||
if(data != null) {
|
arguments: {
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
|
if (data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.lockBasicInfo.value = data["lockBasicInfo"];
|
state.lockBasicInfo.value = data["lockBasicInfo"];
|
||||||
});
|
});
|
||||||
@ -90,10 +97,10 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
Get.toNamed(Routers.lockSeletGroupingPage,
|
Get.toNamed(Routers.lockSeletGroupingPage, arguments: {
|
||||||
arguments: {
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
})!
|
||||||
})!.then((val) {
|
.then((val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
// mockNetworkDataRequest();
|
// mockNetworkDataRequest();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
@ -101,10 +108,15 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: (state.lockBasicInfo.value.isLockOwner == 1 || state.lockBasicInfo.value.keyRight == 1) ? true : false,
|
visible: (state.lockBasicInfo.value.isLockOwner == 1 ||
|
||||||
|
state.lockBasicInfo.value.keyRight == 1)
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr,
|
leftTitel:
|
||||||
rightTitle: state.lockSetInfoData.value!.lockBasicInfo!.adminPwd,
|
TranslationLoader.lanKeys!.adminOpenLockPassword!.tr,
|
||||||
|
rightTitle:
|
||||||
|
state.lockSetInfoData.value!.lockBasicInfo!.adminPwd,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
@ -113,6 +125,7 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
/* 2024-01-12 会议确定去掉“微信二维码” by DaisyWu
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.unlockQRCode!.tr,
|
TranslationLoader.lanKeys!.unlockQRCode!.tr,
|
||||||
@ -122,9 +135,9 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.unlockQRCodePage);
|
Get.toNamed(Routers.unlockQRCodePage);
|
||||||
}),
|
}),
|
||||||
|
*/
|
||||||
],
|
],
|
||||||
)
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//1:限期 2:永久 3:单次 4:循环
|
//1:限期 2:永久 3:单次 4:循环
|
||||||
|
|||||||
@ -63,6 +63,9 @@ class _CatEyeCustomModePageState extends State<CatEyeCustomModePage> {
|
|||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveRightWidget: false,
|
isHaveRightWidget: false,
|
||||||
|
action: () {
|
||||||
|
Get.toNamed(Routers.liveVideoPage);
|
||||||
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
|
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
@ -114,10 +115,12 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
//自定义模式跳转
|
||||||
if (clickIndex == 3) {
|
if (clickIndex == 3) {
|
||||||
Get.toNamed(Routers.catEyeCustomModePage);
|
Get.toNamed(Routers.catEyeCustomModePage);
|
||||||
} else {
|
} else {
|
||||||
// Get.toNamed(Routes.catEyeWorkModeDetailPage);
|
//其他模式弹框
|
||||||
|
showBottomSheet(context, clickIndex);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -159,34 +162,119 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//显示底部弹框的功能
|
//显示底部弹框的功能
|
||||||
void showBottomSheet(BuildContext context) {
|
void showBottomSheet(BuildContext context, int clickIndex) {
|
||||||
//用于在底部打开弹框的效果
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
//构建弹框中的内容
|
//构建弹框中的内容
|
||||||
return _buildBottomSheetWidget(context);
|
if (clickIndex == 0) {
|
||||||
|
return _buildBottomSheetWidget(context, '省电模式', '有人按门铃或发生\n异常事件时',
|
||||||
|
'不录像', '/', '有人按门铃或发生\n异常事件时');
|
||||||
|
} else if (clickIndex == 1) {
|
||||||
|
return _buildBottomSheetWidget(context, '逗留抓拍模式',
|
||||||
|
'有人出现、按门铃\n或发生异常事件时', '逗留达到10秒', '约1.5米', '随时');
|
||||||
|
} else if (clickIndex == 2) {
|
||||||
|
return _buildBottomSheetWidget(
|
||||||
|
context, '实时监控模式', '有人出现、按门铃\n或发生异常事件时', '立即录像', '约1.5米', '随时');
|
||||||
|
} else {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
context: context);
|
context: context);
|
||||||
}
|
}
|
||||||
|
|
||||||
_buildBottomSheetWidget(BuildContext context) {
|
_buildBottomSheetWidget(BuildContext context, String modeTitle, String tips1,
|
||||||
|
String tips2, String tips3, String tips4) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
//居中显示
|
||||||
'省电模式',
|
Expanded(
|
||||||
style: TextStyle(
|
child: Center(
|
||||||
fontSize: 24.sp,
|
child: Text(
|
||||||
color: Colors.black,
|
modeTitle,
|
||||||
fontWeight: FontWeight.w500),
|
style: TextStyle(
|
||||||
)
|
fontSize: 26.sp,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 40.h,
|
||||||
|
),
|
||||||
|
_buildRowWidget('录像时机', tips1),
|
||||||
|
_buildRowWidget('有人出现时录像', tips2),
|
||||||
|
_buildRowWidget('人体侦测距离', tips3),
|
||||||
|
_buildRowWidget('查看实时画面', tips4),
|
||||||
|
_buildIKnowBtn(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_buildRowWidget(String titleStr, String subTitleStr) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(top: 26.h, bottom: 26.h),
|
||||||
|
child: Row(
|
||||||
|
//Row两端对齐的方法
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
titleStr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 20.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
subTitleStr,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp,
|
||||||
|
color: AppColors.placeholderTextColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20.sp,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_buildIKnowBtn() {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
|
height: 80.h,
|
||||||
|
margin: EdgeInsets.only(top: 40.h, bottom: 40.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.btnDisableColor,
|
||||||
|
borderRadius: BorderRadius.circular(80.h / 2),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'我知道了',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.darkGrayTextColor,
|
||||||
|
fontSize: 24.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
import 'package:star_lock/main/lockDetail/lcokSet/liveVideo/liveVideo_state.dart';
|
||||||
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
|
class LiveVideoLogic extends BaseGetXController {
|
||||||
|
final LiveVideoState state = LiveVideoState();
|
||||||
|
}
|
||||||
@ -0,0 +1,144 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/lcokSet/liveVideo/liveVideo_logic.dart';
|
||||||
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class LiveVideoPage extends StatefulWidget {
|
||||||
|
const LiveVideoPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LiveVideoPage> createState() => _LiveVideoPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LiveVideoPageState extends State<LiveVideoPage> {
|
||||||
|
final logic = Get.put(LiveVideoLogic());
|
||||||
|
final state = Get.find<LiveVideoLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '实时画面',
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
|
TextButton(
|
||||||
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.save!.tr,
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 80.h,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/lockSet_liveVideo.png',
|
||||||
|
height: 541.h,
|
||||||
|
width: 255.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 86.h,
|
||||||
|
),
|
||||||
|
_buildTipsView('发生事件时查看\n', '仅当门锁发生事件或有人按门铃时,才能在门锁首页查看实时画面。', 0),
|
||||||
|
SizedBox(
|
||||||
|
height: 16.h,
|
||||||
|
),
|
||||||
|
_buildTipsView('实时查看\n',
|
||||||
|
'指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。', 1),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTipsView(String titleStr, String subTitle, int clickIndex) {
|
||||||
|
return Obx(() => GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 10.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: clickIndex == 0
|
||||||
|
? (state.isLiveView.value == false
|
||||||
|
? AppColors.blueViewBgColor
|
||||||
|
: AppColors.greyBackgroundColor)
|
||||||
|
: (state.isLiveView.value == true
|
||||||
|
? AppColors.blueViewBgColor
|
||||||
|
: AppColors.greyBackgroundColor),
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 20.w, top: 30.h, bottom: 30.h, right: 20.w),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
clickIndex == 0
|
||||||
|
? (state.isLiveView.value == false
|
||||||
|
? Image.asset(
|
||||||
|
'images/mine/icon_mine_blueSelect.png',
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
)
|
||||||
|
: SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
))
|
||||||
|
: (state.isLiveView.value == true
|
||||||
|
? Image.asset(
|
||||||
|
'images/mine/icon_mine_blueSelect.png',
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
)
|
||||||
|
: SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
)),
|
||||||
|
SizedBox(width: 10.w),
|
||||||
|
Expanded(
|
||||||
|
child: _buildRichText(
|
||||||
|
titleStr,
|
||||||
|
subTitle,
|
||||||
|
clickIndex == 0
|
||||||
|
? (state.isLiveView.value == false ? true : false)
|
||||||
|
: (state.isLiveView.value == true
|
||||||
|
? true
|
||||||
|
: false)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
state.isLiveView.value = !state.isLiveView.value;
|
||||||
|
},
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildRichText(String titleStr, String subTitle, bool isClick) {
|
||||||
|
//高亮样式
|
||||||
|
final TextStyle titleStyle = TextStyle(
|
||||||
|
color: isClick ? AppColors.blueTextTipsColor : Colors.black,
|
||||||
|
fontSize: 24.sp,
|
||||||
|
fontWeight: FontWeight.w500);
|
||||||
|
//默认样式
|
||||||
|
final TextStyle subTipsStyle = TextStyle(
|
||||||
|
color: isClick
|
||||||
|
? AppColors.blueTextTipsColor
|
||||||
|
: AppColors.placeholderTextColor,
|
||||||
|
fontSize: 20.sp);
|
||||||
|
|
||||||
|
late InlineSpan tipsPreviewSpan = TextSpan(children: [
|
||||||
|
TextSpan(text: titleStr, style: titleStyle),
|
||||||
|
TextSpan(text: subTitle, style: subTipsStyle),
|
||||||
|
]);
|
||||||
|
return RichText(text: tipsPreviewSpan);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class LiveVideoState {
|
||||||
|
var isLiveView = false.obs; //是否实时查看
|
||||||
|
}
|
||||||
@ -60,7 +60,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
List<Widget> getListWidget() {
|
List<Widget> getListWidget() {
|
||||||
print(
|
print(
|
||||||
"state.lockBasicInfo.value.isLockOwner:${state.lockBasicInfo.value.isLockOwner} state.lockBasicInfo.value.keyRight:${state.lockBasicInfo.value.keyRight}");
|
"state.lockBasicInfo.value.isLockOwner:${state.lockBasicInfo.value.isLockOwner} state.lockBasicInfo.value.keyRight:${state.lockBasicInfo.value.keyRight}");
|
||||||
if (state.lockBasicInfo.value.isLockOwner == 1 || state.lockBasicInfo.value.keyRight == 1) {
|
if (state.lockBasicInfo.value.isLockOwner == 1 ||
|
||||||
|
state.lockBasicInfo.value.keyRight == 1) {
|
||||||
// 超级管理员、授权管理员
|
// 超级管理员、授权管理员
|
||||||
return getAllWidget();
|
return getAllWidget();
|
||||||
} else {
|
} else {
|
||||||
@ -105,7 +106,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// 常开模式
|
// 常开模式
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
// visible: state.lockFeature.value.passageMode == 1 ? true : false,
|
// visible: state.lockFeature.value.passageMode == 1 ? true : false,
|
||||||
visible:true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
|
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
|
||||||
@ -418,8 +419,9 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
Get.toNamed(Routers.motorPowerPage);
|
Get.toNamed(Routers.motorPowerPage);
|
||||||
})),
|
})),
|
||||||
// 蓝牙广播(关闭则不能使用蓝牙主动开锁)
|
// 蓝牙广播(关闭则不能使用蓝牙主动开锁)
|
||||||
|
/* 2024-01-12 会议确定去掉“蓝牙广播” by DaisyWu
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.bluetoothBroadcast!.tr,
|
leftTitel: TranslationLoader.lanKeys!.bluetoothBroadcast!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
@ -427,6 +429,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: _lockBlueBroadcastSwitch()))),
|
rightWidget: _lockBlueBroadcastSwitch()))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
|
*/
|
||||||
//-----新增至此
|
//-----新增至此
|
||||||
// 标记房态
|
// 标记房态
|
||||||
Obx(() {
|
Obx(() {
|
||||||
@ -450,7 +453,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
}));
|
}));
|
||||||
}),
|
}),
|
||||||
// 考勤
|
// 考勤
|
||||||
Obx(() => Visibility(
|
Obx(
|
||||||
|
() => Visibility(
|
||||||
visible: state.lockFeature.value.attendance == 1 ? true : false,
|
visible: state.lockFeature.value.attendance == 1 ? true : false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
||||||
@ -596,7 +600,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
|
|
||||||
// 开启考勤
|
// 开启考勤
|
||||||
CupertinoSwitch _openCheckInSwitch() {
|
CupertinoSwitch _openCheckInSwitch() {
|
||||||
print("111111state.lockSettingInfo.value.attendance:${state.lockSettingInfo.value.attendance}");
|
print(
|
||||||
|
"111111state.lockSettingInfo.value.attendance:${state.lockSettingInfo.value.attendance}");
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
@ -814,10 +819,11 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
print("lockSet===didPop");
|
print("lockSet===didPop");
|
||||||
logic.cancelBlueConnetctToastTimer();
|
logic.cancelBlueConnetctToastTimer();
|
||||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||||
if(state.deletWaitScanTimer != null){
|
if (state.deletWaitScanTimer != null) {
|
||||||
state.deletWaitScanTimer!.cancel();
|
state.deletWaitScanTimer!.cancel();
|
||||||
}
|
}
|
||||||
if(state.deletWaitScanCompleter != null && !state.deletWaitScanCompleter!.isCompleted){
|
if (state.deletWaitScanCompleter != null &&
|
||||||
|
!state.deletWaitScanCompleter!.isCompleted) {
|
||||||
state.deletWaitScanCompleter!.complete();
|
state.deletWaitScanCompleter!.complete();
|
||||||
}
|
}
|
||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
@ -840,10 +846,11 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
logic.cancelBlueConnetctToastTimer();
|
logic.cancelBlueConnetctToastTimer();
|
||||||
|
|
||||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||||
if(state.deletWaitScanTimer != null){
|
if (state.deletWaitScanTimer != null) {
|
||||||
state.deletWaitScanTimer!.cancel();
|
state.deletWaitScanTimer!.cancel();
|
||||||
}
|
}
|
||||||
if(state.deletWaitScanCompleter != null && !state.deletWaitScanCompleter!.isCompleted){
|
if (state.deletWaitScanCompleter != null &&
|
||||||
|
!state.deletWaitScanCompleter!.isCompleted) {
|
||||||
state.deletWaitScanCompleter!.complete();
|
state.deletWaitScanCompleter!.complete();
|
||||||
}
|
}
|
||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||||
import 'package:star_lock/network/api.dart';
|
|
||||||
|
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
import '../../tools/commonItem.dart';
|
import '../../tools/commonItem.dart';
|
||||||
@ -68,6 +67,7 @@ class _AbountPageState extends State<AbountPage> {
|
|||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
|
print("用户协议${XSConstantMacro.userAgreementURL}");
|
||||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||||
arguments: {
|
arguments: {
|
||||||
"url": XSConstantMacro.userAgreementURL,
|
"url": XSConstantMacro.userAgreementURL,
|
||||||
|
|||||||
50
star_lock/lib/mine/mall/mall_page.dart
Normal file
50
star_lock/lib/mine/mall/mall_page.dart
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
import 'package:star_lock/tools/titleAppBar.dart';
|
||||||
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
|
import '../../translations/trans_lib.dart';
|
||||||
|
|
||||||
|
class LockMallPage extends StatefulWidget {
|
||||||
|
const LockMallPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LockMallPage> createState() => _LockMallPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LockMallPageState extends State<LockMallPage> {
|
||||||
|
late WebViewController _webViewController;
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
_webViewController = WebViewController()
|
||||||
|
..setJavaScriptMode(JavaScriptMode.unrestricted);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// FIXME 如果未登录状态,应先跳转登录页
|
||||||
|
// FIXME url应该使用接口获取,接口名称 “获取商城跳转地址:/mall/getUrl“ POST请求,无参数,需要登录
|
||||||
|
String url = 'https://ge.mall.star-lock.cn/quick_login?id=4&key=1ffb9d37109b8351ebb04ccfcca02c8e';
|
||||||
|
_webViewController.loadRequest(Uri.parse(url));
|
||||||
|
return Scaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
|
backgroundColor: const Color(0xFFFFFFFF),
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: getWebTitle(),
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
body: WebViewWidget(controller: _webViewController));
|
||||||
|
}
|
||||||
|
|
||||||
|
String getWebTitle() {
|
||||||
|
String webTitleStr = TranslationLoader.lanKeys!.shoppingCart!.tr;
|
||||||
|
_webViewController.getTitle().then((result) {
|
||||||
|
webTitleStr = result!;
|
||||||
|
});
|
||||||
|
return webTitleStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -147,6 +147,11 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|||||||
Get.back();
|
Get.back();
|
||||||
Get.toNamed(Routers.valueAddedServicesPage);
|
Get.toNamed(Routers.valueAddedServicesPage);
|
||||||
}),
|
}),
|
||||||
|
mineItem('images/mine/icon_mine_main_shoppingcart.png',
|
||||||
|
TranslationLoader.lanKeys!.shoppingCart!.tr, () {
|
||||||
|
Get.back();
|
||||||
|
Get.toNamed(Routers.LockMallPage);
|
||||||
|
}),
|
||||||
mineItem('images/mine/icon_mine_main_about.png',
|
mineItem('images/mine/icon_mine_main_about.png',
|
||||||
TranslationLoader.lanKeys!.about!.tr, () {
|
TranslationLoader.lanKeys!.about!.tr, () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@ -45,6 +45,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
Widget getListDataView() {
|
Widget getListDataView() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
/* 2024-01-12 会议确定去掉“提示音、触摸开锁” by DaisyWu
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.prompTone!.tr,
|
leftTitel: TranslationLoader.lanKeys!.prompTone!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
@ -63,6 +64,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
width: 60.w,
|
width: 60.w,
|
||||||
height: 50.h,
|
height: 50.h,
|
||||||
child: Obx(() => _isTouchUnlockSwitch()))),
|
child: Obx(() => _isTouchUnlockSwitch()))),
|
||||||
|
*/
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.pushNotification!.tr,
|
leftTitel: TranslationLoader.lanKeys!.pushNotification!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
@ -137,6 +139,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
state.currentLanguage.value = result['currentLanguage'];
|
state.currentLanguage.value = result['currentLanguage'];
|
||||||
}
|
}
|
||||||
})),
|
})),
|
||||||
|
/* 2024-01-12 会议确定去掉“锁屏” by DaisyWu
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockScreen!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lockScreen!.tr,
|
||||||
rightTitle: (state.lockScreen.value == 1
|
rightTitle: (state.lockScreen.value == 1
|
||||||
@ -150,6 +153,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
logic.userSettingsInfoRequest();
|
logic.userSettingsInfoRequest();
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
|
*/
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.hideInvalidUnlockPermissions!.tr,
|
TranslationLoader.lanKeys!.hideInvalidUnlockPermissions!.tr,
|
||||||
@ -197,8 +201,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
logic.showToast("功能暂未开放");
|
logic.showToast("功能暂未开放");
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader
|
leftTitel: TranslationLoader.lanKeys!.xiaomiIOTPlatform!.tr,
|
||||||
.lanKeys!.xiaomiIOTPlatform!.tr,
|
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
|
|||||||
@ -2,15 +2,10 @@ abstract class Api {
|
|||||||
// static String baseAddress = "https://pre.lock.star-lock.cn:8093"; //预发布环境
|
// static String baseAddress = "https://pre.lock.star-lock.cn:8093"; //预发布环境
|
||||||
static String baseAddress = "https://dev.lock.star-lock.cn"; //联调环境
|
static String baseAddress = "https://dev.lock.star-lock.cn"; //联调环境
|
||||||
// static String baseAddress = "http://192.168.1.15:8022"; //谢总本地
|
// static String baseAddress = "http://192.168.1.15:8022"; //谢总本地
|
||||||
|
// static String baseAddress = "https://ge.lock.star-lock.cn:8100"; //葛工开发环境地址
|
||||||
|
|
||||||
final String baseUrl = "$baseAddress/api";
|
final String baseUrl = "$baseAddress/api";
|
||||||
|
|
||||||
// final String baseUrl = "http://test.lock.star-lock.cn/api"; // 葛工
|
|
||||||
// final String baseUrl = "https://lock.star-lock.cn/api"; // 测试环境
|
|
||||||
// final String baseUrl = "http://wenlin.lock.star-lock.cn/api"; //曾工
|
|
||||||
// final String baseUrl = "http://192.168.56.101:8099/api"; //曾工本地
|
|
||||||
// final String baseUrl = "http://192.168.1.14:8099/api"; //葛工开发环境地址
|
|
||||||
|
|
||||||
// 登录注册
|
// 登录注册
|
||||||
final String getVerificationCodeUrl = '/user/sendValidationCode';
|
final String getVerificationCodeUrl = '/user/sendValidationCode';
|
||||||
final String registerUrl = '/user/register';
|
final String registerUrl = '/user/register';
|
||||||
@ -105,15 +100,19 @@ abstract class Api {
|
|||||||
final String addFingerprintURL = '/fingerprint/add'; // 添加指纹
|
final String addFingerprintURL = '/fingerprint/add'; // 添加指纹
|
||||||
final String editFingerprintURL = '/fingerprint/changePeriod'; // 编辑指纹
|
final String editFingerprintURL = '/fingerprint/changePeriod'; // 编辑指纹
|
||||||
final String deleteFingerprintURL = '/fingerprint/delete'; // 删除指纹
|
final String deleteFingerprintURL = '/fingerprint/delete'; // 删除指纹
|
||||||
final String updateFingerprintUserNoURL = '/fingerprint/updateFingerprintUserNo'; // 更新指纹用户序号
|
final String updateFingerprintUserNoURL =
|
||||||
final String checkFingerprintNameURL = '/fingerprint/checkFingerprintName'; // 校验指纹名字是否存在
|
'/fingerprint/updateFingerprintUserNo'; // 更新指纹用户序号
|
||||||
|
final String checkFingerprintNameURL =
|
||||||
|
'/fingerprint/checkFingerprintName'; // 校验指纹名字是否存在
|
||||||
|
|
||||||
final String getICCardListURL = '/identityCard/list'; // IC卡列表
|
final String getICCardListURL = '/identityCard/list'; // IC卡列表
|
||||||
final String addICCardURL = '/identityCard/add'; // 添加IC卡
|
final String addICCardURL = '/identityCard/add'; // 添加IC卡
|
||||||
final String editICCardURL = '/identityCard/update'; // 编辑IC卡
|
final String editICCardURL = '/identityCard/update'; // 编辑IC卡
|
||||||
final String deleteICCardURL = '/identityCard/delete'; // 删除IC卡
|
final String deleteICCardURL = '/identityCard/delete'; // 删除IC卡
|
||||||
final String updateICCardUserNoURL = '/identityCard/updateCardUserNo'; // 更新ic卡用户序号
|
final String updateICCardUserNoURL =
|
||||||
final String checkCardNameURL = '/identityCard/checkIdentityCardName'; // 校验卡名字是否存在
|
'/identityCard/updateCardUserNo'; // 更新ic卡用户序号
|
||||||
|
final String checkCardNameURL =
|
||||||
|
'/identityCard/checkIdentityCardName'; // 校验卡名字是否存在
|
||||||
|
|
||||||
final String transferLockListURL = '/room/listForTransfer'; // 转移锁锁列表
|
final String transferLockListURL = '/room/listForTransfer'; // 转移锁锁列表
|
||||||
final String transferLockConfirmURL = '/room/transferLockConfirm'; // 转移智能锁确认
|
final String transferLockConfirmURL = '/room/transferLockConfirm'; // 转移智能锁确认
|
||||||
|
|||||||
@ -16,29 +16,29 @@ class XSAliyunPushProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onNotification(Map<dynamic, dynamic> message) async {
|
Future<void> _onNotification(Map<dynamic, dynamic> message) async {
|
||||||
// Toast.show(msg: 'onNotification: $message');
|
print('onNotification: $message');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onAndroidNotificationReceivedInApp(
|
Future<void> _onAndroidNotificationReceivedInApp(
|
||||||
Map<dynamic, dynamic> message) async {
|
Map<dynamic, dynamic> message) async {
|
||||||
// Toast.show(msg: 'onAndroidNotificationReceivedInApp: $message');
|
print('onAndroidNotificationReceivedInApp: $message');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onMessage(Map<dynamic, dynamic> message) async {
|
Future<void> _onMessage(Map<dynamic, dynamic> message) async {
|
||||||
// Toast.show(msg: 'onMessage: $message');
|
print('onMessage: $message');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onNotificationOpened(Map<dynamic, dynamic> message) async {
|
Future<void> _onNotificationOpened(Map<dynamic, dynamic> message) async {
|
||||||
// Toast.show(msg: 'onNotificationOpened: $message');
|
print('onNotificationOpened: $message');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onNotificationRemoved(Map<dynamic, dynamic> message) async {
|
Future<void> _onNotificationRemoved(Map<dynamic, dynamic> message) async {
|
||||||
// Toast.show(msg: 'onNotificationRemoved: $message');
|
print('onNotificationRemoved: $message');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onAndroidNotificationClickedWithNoAction(
|
Future<void> _onAndroidNotificationClickedWithNoAction(
|
||||||
Map<dynamic, dynamic> message) async {
|
Map<dynamic, dynamic> message) async {
|
||||||
// Toast.show(msg: 'onAndroidNotificationClickedWithNoAction: $message');
|
print('onAndroidNotificationClickedWithNoAction: $message');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onIOSChannelOpened(Map<dynamic, dynamic> message) async {}
|
Future<void> _onIOSChannelOpened(Map<dynamic, dynamic> message) async {}
|
||||||
|
|||||||
@ -198,6 +198,7 @@ class LanKeyEntity {
|
|||||||
this.videoIntercomDoorLock,
|
this.videoIntercomDoorLock,
|
||||||
this.NFCPassiveLock,
|
this.NFCPassiveLock,
|
||||||
this.addDevice,
|
this.addDevice,
|
||||||
|
this.shoppingCart,
|
||||||
this.gateway,
|
this.gateway,
|
||||||
this.message,
|
this.message,
|
||||||
this.supportStaff,
|
this.supportStaff,
|
||||||
@ -661,6 +662,7 @@ class LanKeyEntity {
|
|||||||
videoIntercomDoorLock = json['videoIntercomDoorLock'];
|
videoIntercomDoorLock = json['videoIntercomDoorLock'];
|
||||||
NFCPassiveLock = json['NFCPassiveLock'];
|
NFCPassiveLock = json['NFCPassiveLock'];
|
||||||
addDevice = json['addDevice'];
|
addDevice = json['addDevice'];
|
||||||
|
shoppingCart = json['shoppingCart'];
|
||||||
gateway = json['gateway'];
|
gateway = json['gateway'];
|
||||||
message = json['message'];
|
message = json['message'];
|
||||||
supportStaff = json['supportStaff'];
|
supportStaff = json['supportStaff'];
|
||||||
@ -1147,6 +1149,7 @@ class LanKeyEntity {
|
|||||||
String? videoIntercomDoorLock;
|
String? videoIntercomDoorLock;
|
||||||
String? NFCPassiveLock;
|
String? NFCPassiveLock;
|
||||||
String? addDevice;
|
String? addDevice;
|
||||||
|
String? shoppingCart;
|
||||||
String? gateway;
|
String? gateway;
|
||||||
String? message;
|
String? message;
|
||||||
String? supportStaff;
|
String? supportStaff;
|
||||||
@ -1629,6 +1632,7 @@ class LanKeyEntity {
|
|||||||
map['videoIntercomDoorLock'] = videoIntercomDoorLock;
|
map['videoIntercomDoorLock'] = videoIntercomDoorLock;
|
||||||
map['NFCPassiveLock'] = NFCPassiveLock;
|
map['NFCPassiveLock'] = NFCPassiveLock;
|
||||||
map['addDevice'] = addDevice;
|
map['addDevice'] = addDevice;
|
||||||
|
map['shoppingCart'] = shoppingCart;
|
||||||
map['gateway'] = gateway;
|
map['gateway'] = gateway;
|
||||||
map['message'] = message;
|
map['message'] = message;
|
||||||
map['supportStaff'] = supportStaff;
|
map['supportStaff'] = supportStaff;
|
||||||
|
|||||||
@ -135,9 +135,7 @@ dependencies:
|
|||||||
#监听网络连接状态
|
#监听网络连接状态
|
||||||
connectivity_plus: ^5.0.2
|
connectivity_plus: ^5.0.2
|
||||||
flutter_advanced_calendar: ^1.4.1
|
flutter_advanced_calendar: ^1.4.1
|
||||||
#下拉选择菜单框
|
timelines: ^0.1.0
|
||||||
gzx_dropdown_menu: ^3.1.0
|
|
||||||
cupertino_stepper: ^0.2.1
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user