根据用户权限以及是否拥有锁来显示高级功能相关页面

This commit is contained in:
Daisy 2024-05-18 14:54:44 +08:00
parent 17908feb36
commit a35e184b60
2 changed files with 10 additions and 5 deletions

View File

@ -91,9 +91,10 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
),
Obx(() => GestureDetector(
onTap: () {
if (state.isVip.value == null || !state.isVip.value) {
if (CommonDataManage().currentKeyInfo == null) {
logic.showToast('请先添加设备');
if (!state.isVip.value) {
if (CommonDataManage().currentKeyInfo.isLockOwner !=
1) {
logic.showToast('请先添加锁');
} else {
Get.toNamed(Routers.advancedFeaturesWebPage,
arguments: {'isShop': true});

View File

@ -66,8 +66,12 @@ class _ValueAddedServicesPageListState
TranslationLoader.lanKeys!.advancedFunction!.tr, () async {
var isVip = await Storage.getBool(saveIsVip);
if (isVip == null || !isVip) {
Get.toNamed(Routers.advancedFeaturesWebPage,
arguments: {'isShop': true});
if (CommonDataManage().currentKeyInfo.isLockOwner != 1) {
logic.showToast('请先添加锁');
} else {
Get.toNamed(Routers.advancedFeaturesWebPage,
arguments: {'isShop': true});
}
} else {
Get.toNamed(Routers.valueAddedServicesHighFunctionPage);
}