GoodsDetailSrcView.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. //
  2. // GoodsDetailSrcView.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2023/5/8.
  6. //
  7. #import "GoodsDetailSrcView.h"
  8. #import "WKM_goodsBanner.h"
  9. #import "GoodsDetailsPayV.h"
  10. #import "GoodsDetailsIntroduceV.h"
  11. #import "RadioButton.h"
  12. @interface GoodsDetailSrcView ()<WKNavigationDelegate,TT_BaseTableVDelegate>
  13. @property (nonatomic, strong) GoodsInformationM *infoModel;
  14. @property (nonatomic, strong) WKM_goodsBanner *goodsBanner;
  15. @property (nonatomic, strong) QMUILabel *titleLab;
  16. @property (nonatomic, strong) QMUILabel *soldLab;
  17. @property (nonatomic, strong) QMUILabel *reviewsLab;
  18. @property (nonatomic, strong) QMUILabel *priceLab;
  19. @property (nonatomic, strong) QMUILabel *saveLab;
  20. @property (nonatomic, strong) QMUILabel *couponLab;
  21. @property (nonatomic, strong) QMUILabel *sizeLab;
  22. @property (nonatomic, strong) GoodsDetailsPayV *datails_payV;
  23. @property (nonatomic, strong) GoodsDetailsIntroduceV *datails_IntroduceV;
  24. @property (nonatomic, strong) NSMutableArray *radioBtnAry;
  25. @property (nonatomic, strong)WKWebView *wkWebView;
  26. @end
  27. @implementation GoodsDetailSrcView
  28. - (void)tt_addsubviewS{
  29. [self addSubview:self.goodsBanner];
  30. [self addSubview:self.titleLab];
  31. [self addSubview:self.soldLab];
  32. [self addSubview:self.reviewsLab];
  33. [self addSubview:self.priceLab];
  34. [self addSubview:self.saveLab];
  35. [self addSubview:self.couponLab];
  36. [self addSubview:self.sizeLab];
  37. [self addSubview:self.datails_payV];
  38. [self addSubview:self.datails_IntroduceV];
  39. [self.goodsBanner mas_makeConstraints:^(MASConstraintMaker *make) {
  40. make.left.top.mas_equalTo(0);
  41. make.width.mas_equalTo(KScreenWidth);
  42. make.height.mas_equalTo(KScreenWidth+112+10);
  43. }];
  44. [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
  45. make.left.mas_equalTo(10);
  46. make.width.mas_equalTo(KScreenWidth-20);
  47. make.top.equalTo(self.goodsBanner.mas_bottom).offset(20);
  48. make.height.mas_equalTo(45);
  49. }];
  50. [self.soldLab mas_makeConstraints:^(MASConstraintMaker *make) {
  51. make.left.mas_equalTo(10);
  52. make.height.mas_equalTo(16);
  53. make.top.equalTo(self.titleLab.mas_bottom).offset(10);
  54. }];
  55. [self.reviewsLab mas_makeConstraints:^(MASConstraintMaker *make) {
  56. make.right.equalTo(self.titleLab.mas_right);
  57. make.height.mas_equalTo(16);
  58. make.top.equalTo(self.titleLab.mas_bottom).offset(10);
  59. }];
  60. [self.priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
  61. make.left.mas_equalTo(10);
  62. make.top.equalTo(self.reviewsLab.mas_bottom).offset(20);
  63. make.height.mas_equalTo(24);
  64. }];
  65. [self.saveLab mas_makeConstraints:^(MASConstraintMaker *make) {
  66. make.left.equalTo(self.priceLab.mas_right).offset(10);
  67. make.height.mas_equalTo(20);
  68. make.centerY.equalTo(self.priceLab);
  69. }];
  70. [self.couponLab mas_makeConstraints:^(MASConstraintMaker *make) {
  71. make.left.mas_equalTo(10);
  72. make.top.equalTo(self.priceLab.mas_bottom).offset(20);
  73. make.width.mas_equalTo(KScreenWidth-20);
  74. make.height.mas_equalTo(45);
  75. }];
  76. [self.sizeLab mas_makeConstraints:^(MASConstraintMaker *make) {
  77. make.left.mas_equalTo(10);
  78. make.top.equalTo(self.couponLab.mas_bottom).offset(10);
  79. make.width.mas_equalTo(KScreenWidth-20);
  80. make.height.mas_equalTo(45);
  81. }];
  82. [self.datails_payV mas_makeConstraints:^(MASConstraintMaker *make) {
  83. make.left.mas_equalTo(10);
  84. make.top.equalTo(self.sizeLab.mas_bottom).offset(10);
  85. make.width.mas_equalTo(KScreenWidth-20);
  86. make.height.mas_equalTo(78);
  87. }];
  88. [self.datails_IntroduceV mas_makeConstraints:^(MASConstraintMaker *make) {
  89. make.left.mas_equalTo(10);
  90. make.top.equalTo(self.datails_payV.mas_bottom).offset(10);
  91. make.width.mas_equalTo(KScreenWidth-20);
  92. make.height.mas_equalTo(120);
  93. }];
  94. NSArray *titleAry = @[@"PRODUCT DETAILS",@"REVIEWS"];
  95. for (int i= 0; i<titleAry.count; i++) {
  96. RadioButton *radBtn= [[RadioButton alloc]init];
  97. radBtn.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
  98. radBtn.titleLabel.font = [UIFont fontWithName:Rob_Bold size:14];
  99. radBtn.layer.cornerRadius = 4;
  100. radBtn.clipsToBounds = YES;
  101. radBtn.tag = i;
  102. [radBtn setTitle:titleAry[i] forState:UIControlStateNormal];
  103. [radBtn setTitleColor:[UIColor colorWithHexString:@"#000000"] forState:UIControlStateNormal];
  104. [radBtn setTitleColor:[UIColor colorWithHexString:@"#FFFFFF"] forState:UIControlStateSelected];
  105. [radBtn addTarget:self action:@selector(xxx_onRadioButtonValueChanged:) forControlEvents:UIControlEventValueChanged];
  106. [self addSubview:radBtn];
  107. [self.radioBtnAry addObject:radBtn];
  108. CGFloat btnWidth = (KScreenWidth -30)/2;
  109. [radBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  110. make.left.mas_equalTo(10+(10+btnWidth)*i);
  111. make.height.mas_equalTo(40);
  112. make.top.equalTo(self.datails_IntroduceV.mas_bottom).offset(20);
  113. make.width.mas_equalTo(btnWidth);
  114. }];
  115. }
  116. RadioButton *firstBtn = self.radioBtnAry[0];
  117. [firstBtn setGroupButtons:self.radioBtnAry];
  118. [self.radioBtnAry[0] setSelected:YES];
  119. [self xxx_onRadioButtonValueChanged:self.radioBtnAry[0]];
  120. [self addSubview:self.wkWebView];
  121. [self.wkWebView mas_makeConstraints:^(MASConstraintMaker *make) {
  122. make.left.mas_equalTo(0);
  123. make.top.equalTo(self.datails_IntroduceV.mas_bottom).offset(80);
  124. make.width.mas_equalTo(KScreenWidth);
  125. }];
  126. }
  127. - (void)tt_configData:(id)data{
  128. GoodsInformationM *model = (GoodsInformationM *)data;
  129. self.infoModel = model;
  130. [self.goodsBanner tt_confignewdata:self.infoModel];
  131. self.titleLab.text =MM_str(model.name);
  132. //wm_todo soldLab\ reviewsLab\ coupon 和 size
  133. self.soldLab.text = [NSString stringWithFormat:@"SOLD: %@",model.sold] ;
  134. NSMutableAttributedString *reviewsStr = [[NSMutableAttributedString alloc]
  135. initWithString:[NSString stringWithFormat:@"REVIEWS:%@",model.review_nums]];
  136. NSRange contentRange = {0,[reviewsStr length]};
  137. [reviewsStr addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:contentRange];
  138. self.reviewsLab.attributedText = reviewsStr;
  139. self.reviewsLab.textAlignment = NSTextAlignmentRight;
  140. NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.final_prices]];
  141. [priceAtr addAttribute: NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#0B0B0B"] range:NSMakeRange(0, priceAtr.length)];
  142. [priceAtr addAttribute:NSFontAttributeName value:[UIFont fontWithName:Rob_Bold size:20] range:NSMakeRange(0, priceAtr.length)];
  143. NSString *saveStr = @"";
  144. if(model.final_prices == model.price){
  145. self.saveLab.hidden = YES;
  146. }else{
  147. self.saveLab.hidden = NO;
  148. double savePrice = [model.price doubleValue]-[model.final_prices doubleValue];
  149. saveStr = [NSString stringWithFormat:@"Save %@%.2f",model.currency_symbol,savePrice];
  150. [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@" "]];
  151. NSMutableAttributedString *priceAtrSub1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",model.price]];
  152. [priceAtrSub1 addAttribute:NSForegroundColorAttributeName
  153. value:[UIColor colorWithHexString:@"#8c8c8c"]
  154. range:NSMakeRange(0, priceAtrSub1.length)];
  155. [priceAtrSub1 addAttribute:NSFontAttributeName
  156. value:[UIFont fontWithName:Rob_Regular size:14]
  157. range:NSMakeRange(0, priceAtrSub1.length)];
  158. [priceAtrSub1 addAttribute:NSStrikethroughStyleAttributeName
  159. value:[NSNumber numberWithInteger:NSUnderlineStyleSingle]
  160. range:NSMakeRange(0, priceAtrSub1.length)];
  161. [priceAtr appendAttributedString:priceAtrSub1];
  162. }
  163. self.priceLab.attributedText = priceAtr;
  164. self.infoModel.priceAtr = priceAtr;
  165. self.saveLab.text = saveStr;
  166. self.datails_payV.titleLab.text = [NSString stringWithFormat:@"Pay in 4 interest-free payments of %@%.2f with",model.currency_symbol,[model.final_prices floatValue]/4];
  167. NSString *product_details= @"";
  168. for (NSDictionary *dic in model.custom_attributes) {
  169. NSString *tmpStr= MM_str(dic[@"attribute_code"]);
  170. if ([tmpStr isEqualToString:@"feature"]) {
  171. product_details = MM_str(dic[@"value"]);
  172. }
  173. }
  174. NSString *htmlStr = [NSString stringWithFormat:@"<html> \n"
  175. "<head> \n"
  176. "<meta charset=\"utf-8\" /> \n"
  177. "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no\" /> \n"
  178. "<style> \n"
  179. "*{ \n"
  180. "padding: 5; \n"
  181. "margin: 0; \n"
  182. "} \n"
  183. "table{ \n"
  184. "width: 100%%; \n"
  185. "border: 1px solid #A8A8A8; \n"
  186. "border-collapse:collapse; \n"
  187. "} \n"
  188. "th{ \n"
  189. "width: 30.42%%; \n"
  190. "min-height: 36px; \n"
  191. "padding: 10px; \n"
  192. "border: 1px solid #A8A8A8; \n"
  193. "font-size: 12px; \n"
  194. "font-weight: bold; \n"
  195. "color: #000; \n"
  196. "} \n"
  197. "td{ \n"
  198. "width: 69.58%%; \n"
  199. "min-height: 36px; \n"
  200. "padding: 10px; \n"
  201. "border: 1px solid #A8A8A8; \n"
  202. "font-size: 12px; \n"
  203. "font-weight: 400; \n"
  204. "color: #000; \n"
  205. "line-height: 16px; \n"
  206. "word-break: break-word; \n"
  207. "} \n"
  208. "</style> \n"
  209. "</head> \n"
  210. "<body style=\"font-family: -apple-system,Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol',sans-serif;\">%@</body> \n"
  211. "</html>",product_details];
  212. [self.wkWebView loadHTMLString:htmlStr baseURL:nil];
  213. }
  214. #pragma mark WKNavigationDelegate 计算webView
  215. -(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
  216. @weakify(self)
  217. [webView evaluateJavaScript:@"document.body.offsetHeight" completionHandler:^(id _Nullable result, NSError * _Nullable error) {
  218. @strongify(self)
  219. CGFloat height = [result doubleValue]+40;
  220. [self tool_webChangeFrame:height];
  221. }];
  222. }
  223. -(void)tool_webChangeFrame:(CGFloat)height{
  224. [self.wkWebView mas_updateConstraints:^(MASConstraintMaker *make) {
  225. make.height.mas_equalTo(height);
  226. }];
  227. }
  228. #pragma mark - **************** handle ****************
  229. -(void)xxx_onRadioButtonValueChanged:(RadioButton *)btn{
  230. if (btn.selected) {
  231. btn.backgroundColor = [UIColor colorWithHexString:@"#113632"];
  232. }else{
  233. btn.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
  234. }
  235. }
  236. -(void)handle_couponEvent:(UIButton *)btn{
  237. //wm_todo
  238. btn.selected = !btn.selected;
  239. }
  240. -(void)tap_reviewsClick{
  241. [self delegate_configClosetype:GoodsReviewsTag data:@""];
  242. }
  243. -(void)tap_sizeLab{ ///展开size 规格选择的页面
  244. }
  245. - (void)delegate_configClosetype:(NSInteger)type data:(id)data {
  246. if (self.TTscrolldelegate && [self.TTscrolldelegate respondsToSelector:@selector(tengteng_configtapchilds:data:)]) {
  247. [self.TTscrolldelegate tengteng_configtapchilds:type data:data];
  248. }
  249. }
  250. #pragma mark - **************** lazy ****************
  251. - (WKM_goodsBanner *)goodsBanner {
  252. if (!_goodsBanner) {
  253. _goodsBanner = [[WKM_goodsBanner alloc] init];
  254. }
  255. return _goodsBanner;
  256. }
  257. - (QMUILabel *)titleLab {
  258. if (!_titleLab) {
  259. _titleLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  260. _titleLab.textAlignment = NSTextAlignmentLeft;
  261. _titleLab.numberOfLines = 2;
  262. _titleLab.textColor = [UIColor colorWithHexString:@"#000000"];
  263. _titleLab.font = [UIFont fontWithName:Rob_Bold size:16];
  264. }
  265. return _titleLab;
  266. }
  267. - (QMUILabel *)soldLab {
  268. if (!_soldLab) {
  269. _soldLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  270. _soldLab.textAlignment = NSTextAlignmentLeft;
  271. _soldLab.textColor = [UIColor colorWithHexString:@"#666666"];
  272. _soldLab.font = [UIFont systemFontOfSize:12];
  273. }
  274. return _soldLab;
  275. }
  276. - (QMUILabel *)reviewsLab {
  277. if (!_reviewsLab) {
  278. _reviewsLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  279. _reviewsLab.textAlignment = NSTextAlignmentRight;
  280. _reviewsLab.textColor = [UIColor colorWithHexString:@"#666666"];
  281. _reviewsLab.font = [UIFont fontWithName:Rob_Regular size:12];
  282. _reviewsLab.userInteractionEnabled = YES;
  283. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap_reviewsClick)];
  284. [_reviewsLab addGestureRecognizer:tap];
  285. // reviewsStr.underlineStyle = NSUnderlineStyleSingle;
  286. }
  287. return _reviewsLab;
  288. }
  289. - (QMUILabel *)priceLab {
  290. if (!_priceLab) {
  291. _priceLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  292. _priceLab.textAlignment = NSTextAlignmentLeft;
  293. _priceLab.textColor = [UIColor blackColor];
  294. _priceLab.font = [UIFont systemFontOfSize:18];
  295. }
  296. return _priceLab;
  297. }
  298. - (QMUILabel *)saveLab {
  299. if (!_saveLab) {
  300. _saveLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  301. _saveLab.contentEdgeInsets= UIEdgeInsetsMake(10, 10, 10, 10);
  302. _saveLab.backgroundColor = [UIColor colorWithHexString:@"#E0FFF5"];
  303. _saveLab.textAlignment = NSTextAlignmentCenter;
  304. _saveLab.textColor = [UIColor colorWithHexString:@"#113632"];
  305. _saveLab.font = [UIFont fontWithName:Rob_Bold size:12];
  306. }
  307. return _saveLab;
  308. }
  309. - (QMUILabel *)couponLab {
  310. if (!_couponLab) {
  311. _couponLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  312. _couponLab.mj_size = CGSizeMake(KScreenWidth-20, 45);
  313. _couponLab.backgroundColor = [UIColor colorWithHexString:@"#113632"];
  314. _couponLab.textAlignment = NSTextAlignmentLeft;
  315. _couponLab.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
  316. _couponLab.font = [UIFont fontWithName:Rob_Bold size:14];
  317. _couponLab.text = @"COUPON";
  318. _couponLab.layer.cornerRadius = 4;
  319. _couponLab.clipsToBounds = YES;
  320. _couponLab.contentEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
  321. UIButton *btn = [[UIButton alloc]init];
  322. btn.selected = NO;
  323. [btn addTarget:self action:@selector(handle_couponEvent:) forControlEvents:UIControlEventTouchUpInside];
  324. btn.frame = CGRectMake(_couponLab.mj_w-45-10, 0, 45, 45);
  325. [btn setImage:[UIImage imageNamed:@"base_add_white"] forState:UIControlStateNormal];
  326. [btn setImage:[UIImage imageNamed:@"base_subtract_white"] forState:UIControlStateSelected];
  327. [_couponLab addSubview:btn];
  328. }
  329. return _couponLab;
  330. }
  331. - (QMUILabel *)sizeLab {
  332. if (!_sizeLab) {
  333. _sizeLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  334. _sizeLab.mj_size = CGSizeMake(KScreenWidth-20, 45);
  335. _sizeLab.backgroundColor = [UIColor colorWithHexString:@"#113632"];
  336. _sizeLab.textAlignment = NSTextAlignmentLeft;
  337. _sizeLab.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
  338. _sizeLab.font = [UIFont fontWithName:Rob_Bold size:14];
  339. _sizeLab.text = @"Size Selection";
  340. _sizeLab.layer.cornerRadius = 4;
  341. _sizeLab.clipsToBounds = YES;
  342. _sizeLab.contentEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
  343. _sizeLab.userInteractionEnabled = YES;
  344. UIImageView *imgV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"base_add_white"]];
  345. imgV.frame = CGRectMake(_sizeLab.mj_w-45-10, 0, 45, 45);
  346. imgV.userInteractionEnabled = YES;
  347. imgV.contentMode = UIViewContentModeCenter;
  348. [_sizeLab addSubview:imgV];
  349. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap_sizeLab)];
  350. [_sizeLab addGestureRecognizer:tap];
  351. }
  352. return _sizeLab;
  353. }
  354. -(GoodsDetailsPayV *)datails_payV{
  355. if (!_datails_payV) {
  356. _datails_payV = [[GoodsDetailsPayV alloc]initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 78)];
  357. _datails_payV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
  358. _datails_payV.layer.cornerRadius = 4;
  359. _datails_payV.clipsToBounds = YES;
  360. }
  361. return _datails_payV;
  362. }
  363. - (GoodsDetailsIntroduceV *)datails_IntroduceV {
  364. if (!_datails_IntroduceV) {
  365. _datails_IntroduceV = [[GoodsDetailsIntroduceV alloc] initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 120)];
  366. _datails_IntroduceV.backgroundColor = _F5F5F5;
  367. _datails_IntroduceV.clipsToBounds = YES;
  368. }
  369. return _datails_IntroduceV;
  370. }
  371. - (NSMutableArray *)radioBtnAry {
  372. if (!_radioBtnAry) {
  373. _radioBtnAry = [[NSMutableArray alloc] init];
  374. }
  375. return _radioBtnAry;
  376. }
  377. - (WKWebView *)wkWebView {
  378. if(!_wkWebView){
  379. NSString *injectionJSString = @"var script = document.createElement('meta');"
  380. "script.name = 'viewport';"
  381. "script.content=\"width=device-width, user-scalable=no\";"
  382. "document.getElementsByTagName('head')[0].appendChild(script);";
  383. // CSS选中样式取消 ---禁用web 长按菜单里的查询、学习、共享等按钮,
  384. NSString *css = @"body{-webkit-user-select:none;-webkit-user-drag:none;}";
  385. NSMutableString *javascript = [NSMutableString string];
  386. [javascript appendString:injectionJSString];
  387. [javascript appendString:@"var style = document.createElement('style');"];
  388. [javascript appendString:@"style.type = 'text/css';"];
  389. [javascript appendFormat:@"var cssContent = document.createTextNode('%@');", css];
  390. [javascript appendString:@"style.appendChild(cssContent);"];
  391. [javascript appendString:@"document.body.appendChild(style);"];
  392. WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:javascript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
  393. WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc]init];
  394. config.selectionGranularity = WKSelectionGranularityDynamic;
  395. WKUserContentController * wkUController = [[WKUserContentController alloc] init];
  396. [wkUController addUserScript:wkUScript];
  397. config.userContentController= wkUController;
  398. WKPreferences *wkp = [WKPreferences new];
  399. wkp.minimumFontSize = 12;
  400. config.preferences = wkp;
  401. _wkWebView = [[WKWebView alloc] initWithFrame: CGRectMake(0, 0, KScreenWidth, KScreenWidth) configuration:config];
  402. _wkWebView.navigationDelegate=self;
  403. _wkWebView.backgroundColor=[UIColor colorWithHexString:@"#FFFFFF"];
  404. _wkWebView.scrollView.scrollEnabled=NO;
  405. _wkWebView.allowsLinkPreview = NO;
  406. if(@available(iOS 16.4 , *)){
  407. _wkWebView.inspectable = YES;
  408. }
  409. }
  410. return _wkWebView;
  411. }
  412. @end