# Conflicts: # lib/community/headlines/headlines_collection.dart # lib/store/store_view/product_sku.dart # lib/view_widget/new_people_reward.dartzyh
@ -0,0 +1,7 @@
|
||||
<hbuilder version="1.9.9.80110" debug="false" syncDebug="false"> |
||||
<apps> |
||||
<app appid="__UNI__ACD00DA" appver="1.0"/> |
||||
<app appid="__UNI__E60E056" appver="1.0"/> |
||||
</apps> |
||||
</hbuilder> |
||||
|
@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"/> |
||||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> |
||||
<meta name="HandheldFriendly" content="true"/> |
||||
<meta name="MobileOptimized" content="320"/> |
||||
<title>Error</title> |
||||
<script type="text/javascript"> |
||||
// H5 plus事件处理 |
||||
var ws=null; |
||||
function plusReady(){ |
||||
// Android处理返回键 |
||||
plus.key.addEventListener('backbutton',function(){ |
||||
(history.length==1)&&ws.close(); |
||||
var c=setTimeout(function(){ |
||||
ws.close(); |
||||
},1000); |
||||
window.onbeforeunload=function(){ |
||||
clearTimeout(c); |
||||
} |
||||
history.go(-2); |
||||
},false); |
||||
ws=plus.webview.currentWebview(); |
||||
} |
||||
if(window.plus){ |
||||
plusReady(); |
||||
}else{ |
||||
document.addEventListener('plusready',plusReady,false); |
||||
} |
||||
document.addEventListener('touchstart',function(){ |
||||
return false; |
||||
},true); |
||||
// 禁止选择 |
||||
document.oncontextmenu=function(){ |
||||
return false; |
||||
}; |
||||
// 获取错误信息 |
||||
document.addEventListener("error",function(e){ |
||||
info.innerText="请求的页面("+e.url+")无法打开"; |
||||
console.log("请求的页面无法打开:"+e.href); |
||||
},false); |
||||
</script> |
||||
<style> |
||||
*{ |
||||
-webkit-user-select: none; |
||||
} |
||||
html,body{ |
||||
margin: 0px; |
||||
padding: 0px; |
||||
width: 100%; |
||||
height: 100%; |
||||
text-align: center; |
||||
word-break: break-all; |
||||
-webkit-touch-callout:none; |
||||
-webkit-tap-highlight-color:rgba(0,0,0,0); |
||||
} |
||||
.button{ |
||||
width: 50%; |
||||
font-size: 18px; |
||||
font-weight: normal; |
||||
text-decoration: none; |
||||
text-align: center; |
||||
padding: .5em 0em; |
||||
margin: .5em auto; |
||||
color: #333333; |
||||
background-color: #EEEEEE; |
||||
border: 1px solid #CCCCCC; |
||||
-webkit-border-radius: 5px; |
||||
border-radius: 5px; |
||||
} |
||||
.button:active{ |
||||
background-color: #CCCCCC; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div style="width:100%;height:20%;"></div> |
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 512 512" style="height:20%;width:30%"> |
||||
<g id="icomoon-ignore"> |
||||
<line stroke-width="1" x1="" y1="" x2="" y2="" stroke="#449FDB" opacity=""></line> |
||||
</g> |
||||
<path d="M256 0c-141.385 0-256 114.615-256 256s114.615 256 256 256 256-114.615 256-256-114.615-256-256-256zM352 128c17.673 0 32 14.327 32 32s-14.327 32-32 32-32-14.327-32-32 14.327-32 32-32zM160 128c17.673 0 32 14.327 32 32s-14.327 32-32 32-32-14.327-32-32 14.327-32 32-32zM352.049 390.37c-19.587-32.574-55.272-54.37-96.049-54.37s-76.462 21.796-96.049 54.37l-41.164-24.698c27.98-46.535 78.958-77.672 137.213-77.672s109.232 31.137 137.213 77.672l-41.164 24.698z" fill="#666666"></path> |
||||
</svg> |
||||
<p style="font-size:18px;font-weight:bolder;">We're sorry ...</p> |
||||
<p id="info" style="font-size:12px;"></p> |
||||
<!--<div class="button" onclick="history.back()">Retry</div>--> |
||||
<div class="button" onclick="if(history.length == 1){ws.close();}else{ws.back();ws.back();}">Back</div> |
||||
<div class="button" onclick="ws.close()">Close</div> |
||||
<div class="button" onclick="plus.runtime.restart()">Restart</div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@
|
||||
<properties> |
||||
<features> |
||||
<feature name="Barcode" value="io.dcloud.feature.barcode2.BarcodeFeatureImpl"/> |
||||
<feature name="Speech" value="io.dcloud.feature.speech.SpeechFeatureImpl"> |
||||
<module name="iFly" value="io.dcloud.feature.speech.IflySpeechEngine"/> |
||||
<module name="baidu" value="io.dcloud.feature.speech.BaiduSpeechEngine"/> |
||||
</feature> |
||||
<feature name="Maps" value="io.dcloud.js.map.amap.JsMapPluginImpl"/> |
||||
<!--<feature name="Maps" value="io.dcloud.js.map.JsMapPluginImpl"/>--> |
||||
<feature name="Contacts" value="io.dcloud.feature.contacts.ContactsFeatureImpl"/> |
||||
<feature name="Messaging" value="io.dcloud.adapter.messaging.MessagingPluginImpl"/> |
||||
<feature name="Camera" value="io.dcloud.js.camera.CameraFeatureImpl"/> |
||||
<feature name="Console" value="io.dcloud.feature.pdr.LoggerFeatureImpl"/> |
||||
<feature name="Device" value="io.dcloud.feature.device.DeviceFeatureImpl"/> |
||||
<feature name="File" value="io.dcloud.js.file.FileFeatureImpl"/> |
||||
<feature name="Proximity" value="io.dcloud.feature.sensor.ProximityFeatureImpl"/> |
||||
<feature name="Storage" value="io.dcloud.feature.pdr.NStorageFeatureImpl"/> |
||||
<feature name="Cache" value="io.dcloud.feature.pdr.CoreCacheFeatureImpl"/> |
||||
<feature name="Invocation" value="io.dcloud.invocation.Invocation"/> |
||||
<feature name="Navigator" value="io.dcloud.feature.ui.navigator.NavigatorUIFeatureImpl"/> |
||||
<feature name="NativeUI" value="io.dcloud.feature.ui.nativeui.NativeUIFeatureImpl"/> |
||||
<feature name="UI" value="io.dcloud.feature.ui.UIFeatureImpl"> |
||||
<module name="Navigator" value="io.dcloud.feature.ui.NavView"/> |
||||
</feature> |
||||
<feature name="Gallery" value="io.dcloud.js.gallery.GalleryFeatureImpl"/> |
||||
<feature name="Downloader" value="io.dcloud.net.DownloaderFeatureImpl"/> |
||||
<feature name="Uploader" value="io.dcloud.net.UploadFeature"/> |
||||
<feature name="Push" value="io.dcloud.feature.aps.APSFeatureImpl"> |
||||
<module name="igexin" value="io.dcloud.feature.apsGt.GTPushService"/> |
||||
<!-- mkeypush --> |
||||
</feature> |
||||
<feature name="Zip" value="io.dcloud.feature.pdr.ZipFeature"/> |
||||
<feature name="Audio" value="io.dcloud.feature.audio.AudioFeatureImpl"/> |
||||
<feature name="Runtime" value="io.dcloud.feature.pdr.RuntimeFeatureImpl"/> |
||||
<feature name="VideoPlayer" value="io.dcloud.media.MediaFeatureImpl"/> |
||||
<feature name="LivePusher" value="io.dcloud.media.live.LiveMediaFeatureImpl"/> |
||||
<feature name="XMLHttpRequest" value="io.dcloud.net.XMLHttpRequestFeature"/> |
||||
<feature name="Statistic" value="io.dcloud.feature.statistics.StatisticsFeatureImpl"/> |
||||
<feature name="Accelerometer" value="io.dcloud.feature.sensor.AccelerometerFeatureImpl"/> |
||||
<feature name="Orientation" value="io.dcloud.feature.sensor.OrientationFeatureImpl"/> |
||||
<feature name="NativeObj" value="io.dcloud.feature.nativeObj.FeatureImpl"/> |
||||
<feature name="Geolocation" value="io.dcloud.js.geolocation.GeolocationFeatureImpl"/> |
||||
<feature name="Payment" value="io.dcloud.feature.payment.PaymentFeatureImpl"> |
||||
<module name="AliPay" value="io.dcloud.feature.payment.alipay.AliPay"/> |
||||
<module name="Payment-Weixin" value="io.dcloud.feature.payment.weixin.WeiXinPay"/> |
||||
<module name="Payment-Qihoo" value="io.dcloud.feature.payment.qihoopay.QihooPay"/> |
||||
</feature> |
||||
<feature name="Share" value="io.dcloud.share.ShareFeatureImpl"> |
||||
<module name="Sina" value="io.dcloud.share.sina.SinaWeiboApiManager"/> |
||||
<module name="Tencent" value="io.dcloud.share.tencent.TencentWeiboApiManager"/> |
||||
<module name="Weixin" value="io.dcloud.share.mm.WeiXinApiManager"/> |
||||
<module name="QQ" value="io.dcloud.share.qq.QQApiManager"/> |
||||
</feature> |
||||
<feature name="OAuth" value="io.dcloud.feature.oauth.OAuthFeatureImpl"> |
||||
<module name="OAuth-Weixin" value="io.dcloud.feature.oauth.weixin.WeiXinOAuthService"/> |
||||
<module name="OAuth-QQ" value="io.dcloud.feature.oauth.qq.QQOAuthService"/> |
||||
<module name="OAuth-Sina" value="io.dcloud.feature.oauth.sina.SinaOAuthService"/> |
||||
<module name="OAuth-Qihoo" value="io.dcloud.oauth.qihoo.QihooOAuthService"/> |
||||
<module name="OAuth-MiUi" value="io.dcloud.feature.oauth.miui.MiUiOAuthService"/> |
||||
</feature> |
||||
<feature name="Stream" value="io.dcloud.appstream.js.StreamAppFeatureImpl"/> |
||||
<feature name="Fingerprint" value="io.dcloud.feature.fingerprint.FingerPrintsImpl"/> |
||||
<feature name="iBeacon" value="io.dcloud.feature.iBeacon.WxBluetoothFeatureImpl"/> |
||||
<feature name="Bluetooth" value="io.dcloud.feature.bluetooth.BluetoothFeature"/> |
||||
</features> |
||||
|
||||
<services> |
||||
<service name="push" value="io.dcloud.feature.aps.APSFeatureImpl"/> |
||||
<service name="Statistic" value="io.dcloud.feature.statistics.StatisticsBootImpl"/> |
||||
<service name="Downloader" value="io.dcloud.net.DownloaderBootImpl"/> |
||||
<service name="Maps" value="io.dcloud.js.map.MapInitImpl"/> |
||||
</services> |
||||
</properties> |
@ -1,127 +1,129 @@
|
||||
// |
||||
//package com.zsw.huixiang |
||||
// |
||||
//import android.content.Context |
||||
//import androidx.annotation.NonNull |
||||
//import io.dcloud.common.adapter.util.Logger |
||||
//import io.dcloud.feature.sdk.DCSDKInitConfig |
||||
//import io.dcloud.feature.sdk.DCUniMPSDK |
||||
//import io.dcloud.feature.sdk.MenuActionSheetItem |
||||
//import io.flutter.embedding.engine.plugins.FlutterPlugin |
||||
//import io.flutter.plugin.common.MethodCall |
||||
//import io.flutter.plugin.common.MethodChannel |
||||
//import io.flutter.plugin.common.MethodChannel.MethodCallHandler |
||||
//import io.flutter.plugin.common.MethodChannel.Result |
||||
//import org.json.JSONObject |
||||
// |
||||
// |
||||
///** MinPlugin */ |
||||
//class MinPlugin: FlutterPlugin, MethodCallHandler { |
||||
// /// The MethodChannel that will the communication between Flutter and native Android |
||||
// /// |
||||
// /// This local reference serves to register the plugin with the Flutter Engine and unregister it |
||||
// /// when the Flutter Engine is detached from the Activity |
||||
// private lateinit var channel : MethodChannel |
||||
// private lateinit var context : Context |
||||
// |
||||
// override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { |
||||
// context = flutterPluginBinding.applicationContext; |
||||
// channel = MethodChannel(flutterPluginBinding.binaryMessenger, "min") |
||||
// channel.setMethodCallHandler(this) |
||||
// } |
||||
// |
||||
// override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { |
||||
// if (call.method == "initialize") { |
||||
// if (!DCUniMPSDK.getInstance().isInitialize) { |
||||
// val item = MenuActionSheetItem("退出", "tc"); |
||||
// val sheetItems: MutableList<MenuActionSheetItem> = ArrayList() |
||||
// sheetItems.add(item) |
||||
// val config = DCSDKInitConfig.Builder() |
||||
// .setCapsule(true) |
||||
// .setMenuDefFontSize("16px") |
||||
// .setMenuDefFontColor("#000000") |
||||
// .setMenuDefFontWeight("normal") |
||||
// .setMenuActionSheetItems(sheetItems) |
||||
// .setEnableBackground(false) //后台运行 |
||||
// .build() |
||||
// DCUniMPSDK.getInstance().initialize(context, config) { |
||||
// result.success(it) |
||||
// } |
||||
// DCUniMPSDK.getInstance().setDefMenuButtonClickCallBack { p0, p1 -> |
||||
// Logger.e("p0: $p0 p1:$p1"); |
||||
// when (p1) { |
||||
// "tc" -> { |
||||
// Logger.e("用户点击了退出"); |
||||
// DCUniMPSDK.getInstance().closeCurrentApp() |
||||
// } |
||||
// } |
||||
// } |
||||
// DCUniMPSDK.getInstance().setUniMPOnCloseCallBack { |
||||
// Logger.e("用户点击了退出 it: $it") |
||||
// DCUniMPSDK.getInstance().closeCurrentApp() |
||||
// } |
||||
// } |
||||
// } else if (call.method == "isInitialize") { |
||||
// result.success(DCUniMPSDK.getInstance().isInitialize) |
||||
// } else if (call.method == "isExistsApp") { |
||||
// var appid = call.argument<String>("appid"); |
||||
// result.success(DCUniMPSDK.getInstance().isExistsApp(appid)) |
||||
// } else if (call.method == "getAppVersionInfo") { |
||||
// var appid = call.argument<String>("appid"); |
||||
// result.success(DCUniMPSDK.getInstance().getAppVersionInfo(appid)["name"]) |
||||
// } else if (call.method == "closeCurrentApp") { |
||||
// result.success(DCUniMPSDK.getInstance().closeCurrentApp()) |
||||
// } else if (call.method == "getAppBasePath") { |
||||
// result.success(DCUniMPSDK.getInstance().getAppBasePath(context)) |
||||
// } else if (call.method == "runingAppid") { |
||||
// result.success(DCUniMPSDK.getInstance().runingAppid) |
||||
// } else if (call.method == "currentPageUrl") { |
||||
// result.success(DCUniMPSDK.getInstance().currentPageUrl) |
||||
// } else if (call.method == "startMin") { |
||||
// try { |
||||
// var appid = call.argument<String>("appid") |
||||
// var hashMap = call.argument<HashMap<String, Object>>("json") |
||||
// Logger.e("startMin_json: ${JSONObject(hashMap as Map<*, *>)}") |
||||
// DCUniMPSDK.getInstance().startApp(context, appid, JSONObject(hashMap as Map<*, *>)) |
||||
// } catch (e: Exception) { |
||||
// e.printStackTrace() |
||||
// } |
||||
// result.success("") |
||||
// } else if (call.method == "clickListener") { |
||||
// DCUniMPSDK.getInstance().setDefMenuButtonClickCallBack { p0, p1 -> |
||||
// Logger.e("p0: $p0 p1:$p1"); |
||||
// when (p1) { |
||||
// "tc" -> { |
||||
// Logger.e("用户点击了退出"); |
||||
// DCUniMPSDK.getInstance().closeCurrentApp() |
||||
// } |
||||
// } |
||||
// } |
||||
// DCUniMPSDK.getInstance().setUniMPOnCloseCallBack { |
||||
// Logger.e("用户点击了退出 it: $it") |
||||
// } |
||||
// } else if (call.method == "reloadWgt") { |
||||
// try { |
||||
// var appid = call.argument<String>("appid"); |
||||
// var wgtPath = call.argument<String>("wgtPath"); |
||||
// DCUniMPSDK.getInstance().releaseWgtToRunPathFromePath(appid, wgtPath) { code, pArgs -> |
||||
// if (code == 1) { //释放wgt完成 |
||||
// result.success(true) |
||||
// } else { |
||||
// result.success(false) |
||||
// } |
||||
// null |
||||
// } |
||||
// } catch (e: Exception) { |
||||
// e.printStackTrace() |
||||
// } |
||||
// } else { |
||||
// result.notImplemented() |
||||
// } |
||||
// } |
||||
// |
||||
// override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { |
||||
// channel.setMethodCallHandler(null) |
||||
// } |
||||
//} |
||||
// |
||||
|
||||
|
||||
|
||||
package com.zsw.huixiang |
||||
|
||||
import android.content.Context |
||||
import androidx.annotation.NonNull |
||||
import io.dcloud.common.adapter.util.Logger |
||||
import io.dcloud.feature.sdk.DCSDKInitConfig |
||||
import io.dcloud.feature.sdk.DCUniMPSDK |
||||
import io.dcloud.feature.sdk.MenuActionSheetItem |
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin |
||||
import io.flutter.plugin.common.MethodCall |
||||
import io.flutter.plugin.common.MethodChannel |
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler |
||||
import io.flutter.plugin.common.MethodChannel.Result |
||||
import org.json.JSONObject |
||||
|
||||
|
||||
/** MinPlugin */ |
||||
class MinPlugin: FlutterPlugin, MethodCallHandler { |
||||
/// The MethodChannel that will the communication between Flutter and native Android |
||||
/// |
||||
/// This local reference serves to register the plugin with the Flutter Engine and unregister it |
||||
/// when the Flutter Engine is detached from the Activity |
||||
private lateinit var channel : MethodChannel |
||||
private lateinit var context : Context |
||||
|
||||
override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { |
||||
context = flutterPluginBinding.applicationContext; |
||||
channel = MethodChannel(flutterPluginBinding.binaryMessenger, "min") |
||||
channel.setMethodCallHandler(this) |
||||
} |
||||
|
||||
override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { |
||||
if (call.method == "initialize") { |
||||
if (!DCUniMPSDK.getInstance().isInitialize) { |
||||
val item = MenuActionSheetItem("退出", "tc"); |
||||
val sheetItems: MutableList<MenuActionSheetItem> = ArrayList() |
||||
sheetItems.add(item) |
||||
val config = DCSDKInitConfig.Builder() |
||||
.setCapsule(true) |
||||
.setMenuDefFontSize("16px") |
||||
.setMenuDefFontColor("#000000") |
||||
.setMenuDefFontWeight("normal") |
||||
.setMenuActionSheetItems(sheetItems) |
||||
.setEnableBackground(false) //后台运行 |
||||
.build() |
||||
DCUniMPSDK.getInstance().initialize(context, config) { |
||||
result.success(it) |
||||
} |
||||
DCUniMPSDK.getInstance().setDefMenuButtonClickCallBack { p0, p1 -> |
||||
Logger.e("p0: $p0 p1:$p1"); |
||||
when (p1) { |
||||
"tc" -> { |
||||
Logger.e("用户点击了退出"); |
||||
DCUniMPSDK.getInstance().closeCurrentApp() |
||||
} |
||||
} |
||||
} |
||||
DCUniMPSDK.getInstance().setUniMPOnCloseCallBack { |
||||
Logger.e("用户点击了退出 it: $it") |
||||
DCUniMPSDK.getInstance().closeCurrentApp() |
||||
} |
||||
} |
||||
} else if (call.method == "isInitialize") { |
||||
result.success(DCUniMPSDK.getInstance().isInitialize) |
||||
} else if (call.method == "isExistsApp") { |
||||
var appid = call.argument<String>("appid"); |
||||
result.success(DCUniMPSDK.getInstance().isExistsApp(appid)) |
||||
} else if (call.method == "getAppVersionInfo") { |
||||
var appid = call.argument<String>("appid"); |
||||
result.success(DCUniMPSDK.getInstance().getAppVersionInfo(appid)["name"]) |
||||
} else if (call.method == "closeCurrentApp") { |
||||
result.success(DCUniMPSDK.getInstance().closeCurrentApp()) |
||||
} else if (call.method == "getAppBasePath") { |
||||
result.success(DCUniMPSDK.getInstance().getAppBasePath(context)) |
||||
} else if (call.method == "runingAppid") { |
||||
result.success(DCUniMPSDK.getInstance().runingAppid) |
||||
} else if (call.method == "currentPageUrl") { |
||||
result.success(DCUniMPSDK.getInstance().currentPageUrl) |
||||
} else if (call.method == "startMin") { |
||||
try { |
||||
var appid = call.argument<String>("appid") |
||||
var hashMap = call.argument<HashMap<String, Object>>("json") |
||||
Logger.e("startMin_json: ${JSONObject(hashMap as Map<*, *>)}") |
||||
DCUniMPSDK.getInstance().startApp(context, appid, JSONObject(hashMap as Map<*, *>)) |
||||
} catch (e: Exception) { |
||||
e.printStackTrace() |
||||
} |
||||
result.success("") |
||||
} else if (call.method == "clickListener") { |
||||
DCUniMPSDK.getInstance().setDefMenuButtonClickCallBack { p0, p1 -> |
||||
Logger.e("p0: $p0 p1:$p1"); |
||||
when (p1) { |
||||
"tc" -> { |
||||
Logger.e("用户点击了退出"); |
||||
DCUniMPSDK.getInstance().closeCurrentApp() |
||||
} |
||||
} |
||||
} |
||||
DCUniMPSDK.getInstance().setUniMPOnCloseCallBack { |
||||
Logger.e("用户点击了退出 it: $it") |
||||
} |
||||
} else if (call.method == "reloadWgt") { |
||||
try { |
||||
var appid = call.argument<String>("appid"); |
||||
var wgtPath = call.argument<String>("wgtPath"); |
||||
DCUniMPSDK.getInstance().releaseWgtToRunPathFromePath(appid, wgtPath) { code, pArgs -> |
||||
if (code == 1) { //释放wgt完成 |
||||
result.success(true) |
||||
} else { |
||||
result.success(false) |
||||
} |
||||
null |
||||
} |
||||
} catch (e: Exception) { |
||||
e.printStackTrace() |
||||
} |
||||
} else { |
||||
result.notImplemented() |
||||
} |
||||
} |
||||
|
||||
override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { |
||||
channel.setMethodCallHandler(null) |
||||
} |
||||
} |
||||
|
||||
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 78 KiB |
@ -1,76 +1,76 @@
|
||||
import 'dart:async'; |
||||
import 'dart:io'; |
||||
|
||||
// import 'package:flutter/services.dart'; |
||||
import 'package:flutter/services.dart'; |
||||
|
||||
class Min { |
||||
// static const MethodChannel _channel = const MethodChannel('min'); |
||||
// |
||||
// static Future<bool> isInitialize() async { |
||||
// return await _channel.invokeMethod('isInitialize'); |
||||
// } |
||||
// |
||||
// static Future<bool> isExistsApp(appid) async { |
||||
// return await _channel |
||||
// .invokeMethod('isExistsApp', <String, dynamic>{"appid": appid}); |
||||
// } |
||||
// |
||||
// static Future<String> getAppVersionInfo(appid) async { |
||||
// final String version = await _channel.invokeMethod('getAppVersionInfo', <String, dynamic>{"appid": appid}); |
||||
// return version; |
||||
// } |
||||
// |
||||
// static Future<String> getAppBasePath(appid) async { |
||||
// if(Platform.isIOS) { |
||||
// final String getAppBasePath = await _channel.invokeMethod( |
||||
// 'getAppBasePath', <String, dynamic>{"appid": appid} |
||||
// ); |
||||
// return getAppBasePath; |
||||
// } else { |
||||
// final String getAppBasePath = await _channel.invokeMethod( |
||||
// 'getAppBasePath', |
||||
// ); |
||||
// return getAppBasePath; |
||||
// } |
||||
// } |
||||
// |
||||
// static Future<String> runingAppid() async { |
||||
// final String runingAppid = await _channel.invokeMethod( |
||||
// 'runingAppid', |
||||
// ); |
||||
// return runingAppid; |
||||
// } |
||||
// |
||||
// static Future<String> currentPageUrl() async { |
||||
// final String currentPageUrl = await _channel.invokeMethod( |
||||
// 'currentPageUrl', |
||||
// ); |
||||
// return currentPageUrl; |
||||
// } |
||||
// |
||||
// static Future<bool> closeCurrentApp() async { |
||||
// final bool isExists = await _channel.invokeMethod('closeCurrentApp'); |
||||
// return isExists; |
||||
// } |
||||
// |
||||
// static Future<bool> initialize() async { |
||||
// final bool isInit = await _channel.invokeMethod('initialize'); |
||||
// return isInit; |
||||
// } |
||||
// |
||||
// static startMin(appid, json) async { |
||||
// print("startMin: $json"); |
||||
// _channel.invokeMethod( |
||||
// 'startMin', <String, dynamic>{"appid": appid, "json": json}); |
||||
// } |
||||
// |
||||
// static Future<bool> reloadWgt(appid, wgtPath) async { |
||||
// final bool isReload = await _channel.invokeMethod( |
||||
// 'reloadWgt', <String, dynamic>{"appid": appid, "wgtPath": wgtPath}); |
||||
// return isReload; |
||||
// } |
||||
// |
||||
// static clickListener() { |
||||
// _channel.invokeMethod('clickListener'); |
||||
// } |
||||
static const MethodChannel _channel = const MethodChannel('min'); |
||||
|
||||
static Future<bool> isInitialize() async { |
||||
return await _channel.invokeMethod('isInitialize'); |
||||
} |
||||
|
||||
static Future<bool> isExistsApp(appid) async { |
||||
return await _channel |
||||
.invokeMethod('isExistsApp', <String, dynamic>{"appid": appid}); |
||||
} |
||||
|
||||
static Future<String> getAppVersionInfo(appid) async { |
||||
final String version = await _channel.invokeMethod('getAppVersionInfo', <String, dynamic>{"appid": appid}); |
||||
return version; |
||||
} |
||||
|
||||
static Future<String> getAppBasePath(appid) async { |
||||
if(Platform.isIOS) { |
||||
final String getAppBasePath = await _channel.invokeMethod( |
||||
'getAppBasePath', <String, dynamic>{"appid": appid} |
||||
); |
||||
return getAppBasePath; |
||||
} else { |
||||
final String getAppBasePath = await _channel.invokeMethod( |
||||
'getAppBasePath', |
||||
); |
||||
return getAppBasePath; |
||||
} |
||||
} |
||||
|
||||
static Future<String> runingAppid() async { |
||||
final String runingAppid = await _channel.invokeMethod( |
||||
'runingAppid', |
||||
); |
||||
return runingAppid; |
||||
} |
||||
|
||||
static Future<String> currentPageUrl() async { |
||||
final String currentPageUrl = await _channel.invokeMethod( |
||||
'currentPageUrl', |
||||
); |
||||
return currentPageUrl; |
||||
} |
||||
|
||||
static Future<bool> closeCurrentApp() async { |
||||
final bool isExists = await _channel.invokeMethod('closeCurrentApp'); |
||||
return isExists; |
||||
} |
||||
|
||||
static Future<bool> initialize() async { |
||||
final bool isInit = await _channel.invokeMethod('initialize'); |
||||
return isInit; |
||||
} |
||||
|
||||
static startMin(appid, json) async { |
||||
print("startMin: $json"); |
||||
_channel.invokeMethod( |
||||
'startMin', <String, dynamic>{"appid": appid, "json": json}); |
||||
} |
||||
|
||||
static Future<bool> reloadWgt(appid, wgtPath) async { |
||||
final bool isReload = await _channel.invokeMethod( |
||||
'reloadWgt', <String, dynamic>{"appid": appid, "wgtPath": wgtPath}); |
||||
return isReload; |
||||
} |
||||
|
||||
static clickListener() { |
||||
_channel.invokeMethod('clickListener'); |
||||
} |
||||
} |
||||
|