GoodsDetailSrcView.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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. self.soldLab.text = [NSString stringWithFormat:@"SOLD: %@",model.sold] ;
  133. NSMutableAttributedString *reviewsStr = [[NSMutableAttributedString alloc]
  134. initWithString:[NSString stringWithFormat:@"REVIEWS:%@",model.review_nums]];
  135. NSRange contentRange = {0,[reviewsStr length]};
  136. [reviewsStr addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:contentRange];
  137. self.reviewsLab.attributedText = reviewsStr;
  138. self.reviewsLab.textAlignment = NSTextAlignmentRight;
  139. NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.final_prices]];
  140. [priceAtr addAttribute: NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#0B0B0B"] range:NSMakeRange(0, priceAtr.length)];
  141. [priceAtr addAttribute:NSFontAttributeName value:[UIFont fontWithName:Rob_Bold size:20] range:NSMakeRange(0, priceAtr.length)];
  142. NSString *saveStr = @"";
  143. if(model.final_prices == model.price){
  144. self.saveLab.hidden = YES;
  145. }else{
  146. self.saveLab.hidden = NO;
  147. double savePrice = [model.price doubleValue]-[model.final_prices doubleValue];
  148. saveStr = [NSString stringWithFormat:@"Save %@%.2f",model.currency_symbol,savePrice];
  149. [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@" "]];
  150. NSMutableAttributedString *priceAtrSub1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",model.price]];
  151. [priceAtrSub1 addAttribute:NSForegroundColorAttributeName
  152. value:[UIColor colorWithHexString:@"#8c8c8c"]
  153. range:NSMakeRange(0, priceAtrSub1.length)];
  154. [priceAtrSub1 addAttribute:NSFontAttributeName
  155. value:[UIFont fontWithName:Rob_Regular size:14]
  156. range:NSMakeRange(0, priceAtrSub1.length)];
  157. [priceAtrSub1 addAttribute:NSStrikethroughStyleAttributeName
  158. value:[NSNumber numberWithInteger:NSUnderlineStyleSingle]
  159. range:NSMakeRange(0, priceAtrSub1.length)];
  160. [priceAtr appendAttributedString:priceAtrSub1];
  161. }
  162. self.priceLab.attributedText = priceAtr;
  163. self.infoModel.priceAtr = priceAtr;
  164. self.saveLab.text = saveStr;
  165. self.datails_payV.titleLab.text = [NSString stringWithFormat:@"Pay in 4 interest-free payments of %@%.2f with",model.currency_symbol,[model.final_prices floatValue]/4];
  166. NSString *product_details= @"";
  167. for (NSDictionary *dic in model.custom_attributes) {
  168. NSString *tmpStr= MM_str(dic[@"attribute_code"]);
  169. if ([tmpStr isEqualToString:@"feature"]) {
  170. product_details = MM_str(dic[@"value"]);
  171. }
  172. }
  173. NSString *htmlStr = [NSString stringWithFormat:@"<html> \n"
  174. "<head> \n"
  175. "<meta charset=\"utf-8\" /> \n"
  176. "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no\" /> \n"
  177. "<style> \n"
  178. "*{ \n"
  179. "padding: 5; \n"
  180. "margin: 0; \n"
  181. "} \n"
  182. "table{ \n"
  183. "width: 100%%; \n"
  184. "border: 1px solid #A8A8A8; \n"
  185. "border-collapse:collapse; \n"
  186. "} \n"
  187. "th{ \n"
  188. "width: 30.42%%; \n"
  189. "min-height: 36px; \n"
  190. "padding: 10px; \n"
  191. "border: 1px solid #A8A8A8; \n"
  192. "font-size: 12px; \n"
  193. "font-weight: bold; \n"
  194. "color: #000; \n"
  195. "} \n"
  196. "td{ \n"
  197. "width: 69.58%%; \n"
  198. "min-height: 36px; \n"
  199. "padding: 10px; \n"
  200. "border: 1px solid #A8A8A8; \n"
  201. "font-size: 12px; \n"
  202. "font-weight: 400; \n"
  203. "color: #000; \n"
  204. "line-height: 16px; \n"
  205. "word-break: break-word; \n"
  206. "} \n"
  207. "</style> \n"
  208. "</head> \n"
  209. "<body style=\"font-family: -apple-system,Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol',sans-serif;\">%@</body> \n"
  210. "</html>",product_details];
  211. [self.wkWebView loadHTMLString:htmlStr baseURL:nil];
  212. }
  213. #pragma mark WKNavigationDelegate 计算webView
  214. -(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
  215. @weakify(self)
  216. [webView evaluateJavaScript:@"document.body.offsetHeight" completionHandler:^(id _Nullable result, NSError * _Nullable error) {
  217. @strongify(self)
  218. CGFloat height = [result doubleValue]+40;
  219. [self tool_webChangeFrame:height];
  220. }];
  221. }
  222. -(void)tool_webChangeFrame:(CGFloat)height{
  223. [self.wkWebView mas_updateConstraints:^(MASConstraintMaker *make) {
  224. make.height.mas_equalTo(height);
  225. }];
  226. }
  227. #pragma mark - **************** handle ****************
  228. -(void)xxx_onRadioButtonValueChanged:(RadioButton *)btn{
  229. if (btn.selected) {
  230. btn.backgroundColor = [UIColor colorWithHexString:@"#113632"];
  231. }else{
  232. btn.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
  233. }
  234. }
  235. -(void)handle_couponEvent:(UIButton *)btn{
  236. //wm_todo 优惠券的展开和合并
  237. btn.selected = !btn.selected;
  238. }
  239. -(void)tap_reviewsClick{
  240. [self delegate_configClosetype:GoodsReviewsTag data:@""];
  241. }
  242. -(void)tap_sizeLab{ ///展开size 规格选择的页面
  243. }
  244. - (void)delegate_configClosetype:(NSInteger)type data:(id)data {
  245. if (self.TTscrolldelegate && [self.TTscrolldelegate respondsToSelector:@selector(tengteng_configtapchilds:data:)]) {
  246. [self.TTscrolldelegate tengteng_configtapchilds:type data:data];
  247. }
  248. }
  249. #pragma mark - **************** lazy ****************
  250. - (WKM_goodsBanner *)goodsBanner {
  251. if (!_goodsBanner) {
  252. _goodsBanner = [[WKM_goodsBanner alloc] init];
  253. }
  254. return _goodsBanner;
  255. }
  256. - (QMUILabel *)titleLab {
  257. if (!_titleLab) {
  258. _titleLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  259. _titleLab.textAlignment = NSTextAlignmentLeft;
  260. _titleLab.numberOfLines = 2;
  261. _titleLab.textColor = [UIColor colorWithHexString:@"#000000"];
  262. _titleLab.font = [UIFont fontWithName:Rob_Bold size:16];
  263. }
  264. return _titleLab;
  265. }
  266. - (QMUILabel *)soldLab {
  267. if (!_soldLab) {
  268. _soldLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  269. _soldLab.textAlignment = NSTextAlignmentLeft;
  270. _soldLab.textColor = [UIColor colorWithHexString:@"#666666"];
  271. _soldLab.font = [UIFont systemFontOfSize:12];
  272. }
  273. return _soldLab;
  274. }
  275. - (QMUILabel *)reviewsLab {
  276. if (!_reviewsLab) {
  277. _reviewsLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  278. _reviewsLab.textAlignment = NSTextAlignmentRight;
  279. _reviewsLab.textColor = [UIColor colorWithHexString:@"#666666"];
  280. _reviewsLab.font = [UIFont fontWithName:Rob_Regular size:12];
  281. _reviewsLab.userInteractionEnabled = YES;
  282. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap_reviewsClick)];
  283. [_reviewsLab addGestureRecognizer:tap];
  284. // reviewsStr.underlineStyle = NSUnderlineStyleSingle;
  285. }
  286. return _reviewsLab;
  287. }
  288. - (QMUILabel *)priceLab {
  289. if (!_priceLab) {
  290. _priceLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  291. _priceLab.textAlignment = NSTextAlignmentLeft;
  292. _priceLab.textColor = [UIColor blackColor];
  293. _priceLab.font = [UIFont systemFontOfSize:18];
  294. }
  295. return _priceLab;
  296. }
  297. - (QMUILabel *)saveLab {
  298. if (!_saveLab) {
  299. _saveLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  300. _saveLab.contentEdgeInsets= UIEdgeInsetsMake(10, 10, 10, 10);
  301. _saveLab.backgroundColor = [UIColor colorWithHexString:@"#E0FFF5"];
  302. _saveLab.textAlignment = NSTextAlignmentCenter;
  303. _saveLab.textColor = [UIColor colorWithHexString:@"#113632"];
  304. _saveLab.font = [UIFont fontWithName:Rob_Bold size:12];
  305. }
  306. return _saveLab;
  307. }
  308. - (QMUILabel *)couponLab {
  309. if (!_couponLab) {
  310. _couponLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  311. _couponLab.mj_size = CGSizeMake(KScreenWidth-20, 45);
  312. _couponLab.backgroundColor = [UIColor colorWithHexString:@"#113632"];
  313. _couponLab.textAlignment = NSTextAlignmentLeft;
  314. _couponLab.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
  315. _couponLab.font = [UIFont fontWithName:Rob_Bold size:14];
  316. _couponLab.text = @"COUPON";
  317. _couponLab.layer.cornerRadius = 4;
  318. _couponLab.clipsToBounds = YES;
  319. _couponLab.contentEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
  320. UIButton *btn = [[UIButton alloc]init];
  321. btn.selected = NO;
  322. [btn addTarget:self action:@selector(handle_couponEvent:) forControlEvents:UIControlEventTouchUpInside];
  323. btn.frame = CGRectMake(_couponLab.mj_w-45-10, 0, 45, 45);
  324. [btn setImage:[UIImage imageNamed:@"base_add_white"] forState:UIControlStateNormal];
  325. [btn setImage:[UIImage imageNamed:@"base_subtract_white"] forState:UIControlStateSelected];
  326. [_couponLab addSubview:btn];
  327. }
  328. return _couponLab;
  329. }
  330. - (QMUILabel *)sizeLab {
  331. if (!_sizeLab) {
  332. _sizeLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  333. _sizeLab.mj_size = CGSizeMake(KScreenWidth-20, 45);
  334. _sizeLab.backgroundColor = [UIColor colorWithHexString:@"#113632"];
  335. _sizeLab.textAlignment = NSTextAlignmentLeft;
  336. _sizeLab.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
  337. _sizeLab.font = [UIFont fontWithName:Rob_Bold size:14];
  338. _sizeLab.text = @"Size Selection";
  339. _sizeLab.layer.cornerRadius = 4;
  340. _sizeLab.clipsToBounds = YES;
  341. _sizeLab.contentEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
  342. _sizeLab.userInteractionEnabled = YES;
  343. UIImageView *imgV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"base_add_white"]];
  344. imgV.frame = CGRectMake(_sizeLab.mj_w-45-10, 0, 45, 45);
  345. imgV.userInteractionEnabled = YES;
  346. imgV.contentMode = UIViewContentModeCenter;
  347. [_sizeLab addSubview:imgV];
  348. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap_sizeLab)];
  349. [_sizeLab addGestureRecognizer:tap];
  350. }
  351. return _sizeLab;
  352. }
  353. -(GoodsDetailsPayV *)datails_payV{
  354. if (!_datails_payV) {
  355. _datails_payV = [[GoodsDetailsPayV alloc]initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 78)];
  356. _datails_payV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
  357. _datails_payV.layer.cornerRadius = 4;
  358. _datails_payV.clipsToBounds = YES;
  359. }
  360. return _datails_payV;
  361. }
  362. - (GoodsDetailsIntroduceV *)datails_IntroduceV {
  363. if (!_datails_IntroduceV) {
  364. _datails_IntroduceV = [[GoodsDetailsIntroduceV alloc] initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 120)];
  365. _datails_IntroduceV.backgroundColor = _F5F5F5;
  366. _datails_IntroduceV.clipsToBounds = YES;
  367. }
  368. return _datails_IntroduceV;
  369. }
  370. - (NSMutableArray *)radioBtnAry {
  371. if (!_radioBtnAry) {
  372. _radioBtnAry = [[NSMutableArray alloc] init];
  373. }
  374. return _radioBtnAry;
  375. }
  376. - (WKWebView *)wkWebView {
  377. if(!_wkWebView){
  378. NSString *injectionJSString = @"var script = document.createElement('meta');"
  379. "script.name = 'viewport';"
  380. "script.content=\"width=device-width, user-scalable=no\";"
  381. "document.getElementsByTagName('head')[0].appendChild(script);";
  382. // CSS选中样式取消 ---禁用web 长按菜单里的查询、学习、共享等按钮,
  383. NSString *css = @"body{-webkit-user-select:none;-webkit-user-drag:none;}";
  384. NSMutableString *javascript = [NSMutableString string];
  385. [javascript appendString:injectionJSString];
  386. [javascript appendString:@"var style = document.createElement('style');"];
  387. [javascript appendString:@"style.type = 'text/css';"];
  388. [javascript appendFormat:@"var cssContent = document.createTextNode('%@');", css];
  389. [javascript appendString:@"style.appendChild(cssContent);"];
  390. [javascript appendString:@"document.body.appendChild(style);"];
  391. WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:javascript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
  392. WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc]init];
  393. config.selectionGranularity = WKSelectionGranularityDynamic;
  394. WKUserContentController * wkUController = [[WKUserContentController alloc] init];
  395. [wkUController addUserScript:wkUScript];
  396. config.userContentController= wkUController;
  397. WKPreferences *wkp = [WKPreferences new];
  398. wkp.minimumFontSize = 12;
  399. config.preferences = wkp;
  400. _wkWebView = [[WKWebView alloc] initWithFrame: CGRectMake(0, 0, KScreenWidth, KScreenWidth) configuration:config];
  401. _wkWebView.navigationDelegate=self;
  402. _wkWebView.backgroundColor=[UIColor colorWithHexString:@"#FFFFFF"];
  403. _wkWebView.scrollView.scrollEnabled=NO;
  404. _wkWebView.allowsLinkPreview = NO;
  405. if(@available(iOS 16.4 , *)){
  406. _wkWebView.inspectable = YES;
  407. }
  408. }
  409. return _wkWebView;
  410. }
  411. @end