更新眠花糖web升级提示
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[
|
||||
"assets/miniapp/mhtControl_1.0.90.zip",
|
||||
"assets/miniapp/mhtControl_1.0.94.zip",
|
||||
"assets/xiaoe/xiaoe_1.0.0.zip"
|
||||
]
|
||||
Binary file not shown.
@@ -537,7 +537,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.user_setting;
|
||||
String type = "control_${tmp}";
|
||||
if(tmp['type'] != null){
|
||||
if (tmp['type'] != null) {
|
||||
type = "control_${tmp['mac']}_${tmp['type']}";
|
||||
}
|
||||
String queryUrl =
|
||||
@@ -561,4 +561,30 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//查询是否需要更新提示
|
||||
selectUpdateTips() async {
|
||||
bool tips = false;
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.user_setting;
|
||||
String type = "web_control_tip";
|
||||
String queryUrl =
|
||||
"${serviceAddress}${serviceName}${serviceApi}?type=$type&code=mht";
|
||||
await requestWithLog(
|
||||
logTitle: "查询更新提示",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
if (res.data != null) {
|
||||
tips = res.data["tip"];
|
||||
}
|
||||
updateAll();
|
||||
},
|
||||
onFailure: (res) {
|
||||
print(res);
|
||||
},
|
||||
);
|
||||
return tips;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +94,9 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
//未登录
|
||||
return;
|
||||
}
|
||||
homeController.selectUpdateTips().then((bool tips) {
|
||||
//眠花糖更新提示
|
||||
if (tips) {
|
||||
showTipUpgradeDialog(
|
||||
context,
|
||||
Column(
|
||||
@@ -123,6 +126,8 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
height: 37.rpx,
|
||||
)),
|
||||
));
|
||||
}
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
||||
Reference in New Issue
Block a user