// // LMGonghuiButieViewController.m // SweetParty // // Created by Xmac on 2024/8/9. // #import "LMGonghuiButieViewController.h" #import @interface LMGonghuiButieViewController () @property (weak, nonatomic) IBOutlet UIView *webCover; @property (strong, nonatomic) WKWebView *webView; @property (weak, nonatomic) IBOutlet UILabel *lastWeekLabel; @property (weak, nonatomic) IBOutlet UILabel *currentWeekLabel; @property (weak, nonatomic) IBOutlet UILabel *butieLabel; @end @implementation LMGonghuiButieViewController - (void)viewDidLoad { [super viewDidLoad]; self.navTitle = @"公会流水"; [self.customNavBar styleClear]; //狸猫新增 [self setupWebview]; self.lastWeekLabel.text = [NSString stringWithFormat:@"上周流水:%@",self.last_week_income]; self.currentWeekLabel.text = [NSString stringWithFormat:@"本周流水:%@",self.this_week_income]; self.butieLabel.text = [NSString stringWithFormat:@"获得补贴:%@",self.last_week_income_money]; } - (void)setupWebview { WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init]; configuration.userContentController = [[WKUserContentController alloc] init]; configuration.preferences = [[WKPreferences alloc] init]; configuration.preferences.minimumFontSize = 10; configuration.preferences.javaScriptEnabled = YES; configuration.preferences.javaScriptCanOpenWindowsAutomatically = YES; _webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, APPW, APPH) configuration:configuration]; _webView.navigationDelegate = self; _webView.UIDelegate = self; _webView.backgroundColor = kClearColor; _webView.scrollView.backgroundColor = kClearColor; [self.webCover addSubview:_webView]; NSURL *url = [NSURL URLWithString:[VERSION_HTTPS_SERVER stringByAppendingString:@"index.php/index/index/page_show?id=19"]]; [_webView loadRequest:[NSURLRequest requestWithURL:url]]; [_webView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(_webCover); }]; } @end