|
|
@ -40,10 +40,17 @@ namespace BBWY.Client.Views.Order |
|
|
|
private void GrabJDMibole_Loaded(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
var sp = (App.Current as App).ServiceProvider; |
|
|
|
|
|
|
|
using (var s = sp.CreateScope()) |
|
|
|
{ |
|
|
|
w2m = s.ServiceProvider.GetRequiredService<WebView2Manager>(); |
|
|
|
} |
|
|
|
GlobalContext globalContext = null; |
|
|
|
using (var s = sp.CreateScope()) |
|
|
|
{ |
|
|
|
globalContext = s.ServiceProvider.GetRequiredService<GlobalContext>(); |
|
|
|
} |
|
|
|
|
|
|
|
w2m.Init(shopId); |
|
|
|
grid.Children.Add(w2m.wb2); |
|
|
|
|
|
|
@ -53,6 +60,7 @@ namespace BBWY.Client.Views.Order |
|
|
|
w2m.CoreWebView2InitializationCompleted = (e) => |
|
|
|
{ |
|
|
|
isNavigated = true; |
|
|
|
w2m.wb2.CoreWebView2.AddHostObjectToScript("webContext", globalContext); |
|
|
|
w2m.wb2.CoreWebView2.Navigate($"https://neworder.shop.jd.com/order/orderDetail?orderId={orderId}"); |
|
|
|
}; |
|
|
|
w2m.OnNavigationCompleted = async (e) => |
|
|
|