123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610 |
- //
- // shareRecordViewController.m
- // Private-X
- //
- // Created by xd h on 2024/5/14.
- //
- #import "shareRecordViewController.h"
- #import "shareRecordTableViewCell.h"
- #import "shareRecordDetailsHWViewController.h"
- #import "ShareRecordModel.h"
- #import "CustomerWebViewController.h"
- @interface shareRecordViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
- {
- BOOL isEditType;
- }
- @property (nonatomic, strong) UITableView *tableView;
- @property (nonatomic, strong) UIButton *ruleBottomButton;
- @property (nonatomic, strong) UIButton *delRuleButton;
- @property (nonatomic, strong) UIButton *cancelShareButton;
- @property (nonatomic, strong) UIButton *rightEditButton;
- @property (nonatomic, strong) UIButton *leftCancleButton;
- @property (nonatomic, strong) UIButton *rightSelectAllButton;
- @property (nonatomic, strong) ShareRecordModel * ShareRecordMod;
- @property (nonatomic, strong) NSMutableArray *didSelectArr;
- @end
- @implementation shareRecordViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
-
- [self.toolBar setHidden:YES];
- [self.navigationBar setHidden:YES];
- [self.navBarBGView setHidden:NO];
- self.navBarBGView.backgroundColor = [UIColor whiteColor];
- //[self.view setBackgroundColor:[UIColor hwColor:@"#F5F7FA"]];
- [self.view setBackgroundColor:[UIColor whiteColor]];
- self.titleLabel.text = NSLocalizedString(@"my_set_no_share",nil);
-
- _didSelectArr = [NSMutableArray new];
- [self drawAnyView];
- [self getShareFileListFun];
-
- //数据埋点
- [[netWorkManager shareInstance] DataEmbeddingPointBy:2 withEventValue:@"Share_record"];
- }
- - (void)drawAnyView{
-
- [self initNavHeadUIFun];
-
- [self.view addSubview:self.tableView];
- [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.bottom.mas_equalTo(-(60 + safeArea));
- make.top.equalTo(self.navBarBGView.mas_bottom).offset(10.f);
- }];
-
- _ruleBottomButton = [[UIButton alloc] init];
- [_ruleBottomButton setTitle:NSLocalizedString(@"share_rule_but_title",nil) forState:UIControlStateNormal];
- [_ruleBottomButton setTitleColor:[UIColor hwColor:@"#01B7EA"] forState:UIControlStateNormal];
- _ruleBottomButton.titleLabel.font = [UIFont boldSystemFontOfSize:14.0];
- [_ruleBottomButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
- _ruleBottomButton.tag = 1;
- [self.view addSubview:_ruleBottomButton];
- _ruleBottomButton.layer.cornerRadius = 8;
- _ruleBottomButton.layer.masksToBounds = YES;
- _ruleBottomButton.backgroundColor = [UIColor whiteColor];
- _ruleBottomButton.layer.borderWidth = 1;
- _ruleBottomButton.layer.borderColor = [UIColor hwColor:@"#01B7EA"].CGColor;
-
- [_ruleBottomButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(15);
- make.right.mas_equalTo(-15);
- make.bottom.mas_equalTo(-(safeArea));
- make.height.mas_equalTo(48);
- }];
-
-
- _delRuleButton = [[UIButton alloc] init];
- [_delRuleButton setTitle:NSLocalizedString(@"share_del_record",nil) forState:UIControlStateNormal];
- [_delRuleButton setTitleColor:HW0A132BColor forState:UIControlStateNormal];
- _delRuleButton.titleLabel.font = [UIFont boldSystemFontOfSize:14.0];
- [_delRuleButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
- _delRuleButton.tag = 10;
- [self.view addSubview:_delRuleButton];
- _delRuleButton.layer.cornerRadius = 8;
- _delRuleButton.layer.masksToBounds = YES;
- _delRuleButton.backgroundColor = [UIColor hwColor:@"#E3E8F1"];
- _delRuleButton.hidden = YES;
-
- [_delRuleButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(15);
- make.right.equalTo(self.view.mas_centerX).offset(-10);
- make.bottom.mas_equalTo(-(safeArea));
- make.height.mas_equalTo(48);
- }];
-
-
- _cancelShareButton = [[UIButton alloc] init];
- CGFloat w_btn = SCREEN_W/2.0 -15 -10;
-
- // gradient
- CAGradientLayer *gl = [CAGradientLayer layer];
- gl.frame = CGRectMake(0,0,w_btn,48.f);
- gl.startPoint = CGPointMake(0, 0.5);
- gl.endPoint = CGPointMake(1, 0.5);
- gl.colors = @[(__bridge id)HW0CDEFDColor.CGColor, (__bridge id)HW058DFBColor.CGColor];
- gl.locations = @[@(0), @(1.0f)];
-
- [_cancelShareButton.layer addSublayer:gl];
- [_cancelShareButton setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
- [_cancelShareButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:(UIControlEventTouchUpInside)];
- [_cancelShareButton setTitle:NSLocalizedString(@"cancel_share_title",nil) forState:(UIControlStateNormal)];
- [_cancelShareButton.titleLabel setFont:[UIFont systemFontOfSize:14.f]];
- [_cancelShareButton.layer setCornerRadius:8.f];
- _cancelShareButton.clipsToBounds = YES;
- _cancelShareButton.tag = 11;
-
- [self.view addSubview:_cancelShareButton];
- _cancelShareButton.hidden = YES;
- [_cancelShareButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.mas_equalTo(-15);
- make.left.equalTo(self.view.mas_centerX).offset(10);
- make.bottom.mas_equalTo(-(safeArea));
- make.height.mas_equalTo(48);
- }];
-
-
-
- }
- - (void)initNavHeadUIFun
- {
- _rightEditButton = [[UIButton alloc] init];
- [_rightEditButton setTitle:NSLocalizedString(@"edit_common",nil) forState:UIControlStateNormal];
- _rightEditButton.tag = 2;
- [_rightEditButton setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal];
- _rightEditButton.titleLabel.font = [UIFont systemFontOfSize:16.0];
- _rightEditButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
- [_rightEditButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
- [self.navBarBGView addSubview:_rightEditButton];
-
- [_rightEditButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.width.mas_equalTo(80);
- make.height.mas_equalTo(40);
- make.right.mas_equalTo(-15);
- make.centerY.mas_equalTo(self.titleLabel.mas_centerY);
- }];
-
-
- _leftCancleButton = [[UIButton alloc] init];
- [_leftCancleButton setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal];
- _leftCancleButton.titleLabel.font = [UIFont systemFontOfSize:18.0];
- _leftCancleButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
- [_leftCancleButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
- _leftCancleButton.tag = 3;
- [_leftCancleButton setTitle:NSLocalizedString(@"other_cancel",nil) forState:UIControlStateNormal];
- [self.navBarBGView addSubview:_leftCancleButton];
- _leftCancleButton.hidden = YES;
-
- [_leftCancleButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.width.mas_equalTo(80);
- make.left.mas_equalTo(15);
- make.height.mas_equalTo(30);
- make.centerY.mas_equalTo(self.titleLabel.mas_centerY);
- }];
-
- _rightSelectAllButton = [[UIButton alloc] init];
- [_rightSelectAllButton setImage:[UIImage imageNamed:@"edit_select_all_h"] forState:UIControlStateSelected];
- [_rightSelectAllButton setImage:[UIImage imageNamed:@"edit_select_all_n"] forState:UIControlStateNormal];
- [_rightSelectAllButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
- _rightSelectAllButton.tag = 4;
- [self.navBarBGView addSubview:_rightSelectAllButton];
- _rightSelectAllButton.hidden = YES;
-
- [_rightSelectAllButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.width.mas_equalTo(80);
- make.right.mas_equalTo(0);
- make.height.mas_equalTo(30);
- make.centerY.mas_equalTo(self.titleLabel.mas_centerY);
- }];
- }
- #pragma mark - 懒加载
- - (UITableView *)tableView{
- if (!_tableView) {
- _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H - TABBARHEIGHT) style:UITableViewStylePlain];
- _tableView.delegate = self;
- _tableView.dataSource = self;
- _tableView.showsVerticalScrollIndicator = NO;
- _tableView.showsHorizontalScrollIndicator = NO;
- // _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 0, 0, 0);
- [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
- [_tableView setSeparatorColor:[UIColor clearColor]];
- [_tableView setBackgroundColor:[UIColor clearColor]];
- [_tableView setTableFooterView:[UIView new]];
- [_tableView setBounces:YES];
-
- if (@available(iOS 15.0, *)) {
- _tableView.sectionHeaderTopPadding = 0;
- }
-
- //空数据引入第三方开源处理
- _tableView.emptyDataSetSource = self;
- _tableView.emptyDataSetDelegate = self;
- }
-
- return _tableView;
- }
- #pragma mark - 列表委托
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
- return 1;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- if (_ShareRecordMod && _ShareRecordMod.data.count>0) {
- return _ShareRecordMod.data.count;
- }
- return 0;
- }
- - (shareRecordTableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
-
- __block NSInteger row = indexPath.row;
- static NSString *identifier = @"shareRecordTableViewCell";
-
- shareRecordTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- if (!cell){
- cell = [[shareRecordTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
- [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
- [cell setBackgroundColor:[UIColor clearColor]];
- [cell setAccessoryType:(UITableViewCellAccessoryNone)];
- }
-
- cell.isEditType = isEditType;
-
- if(row < _ShareRecordMod.data.count){
- ShareRecordListModel* model = _ShareRecordMod.data[row];
- cell.dataModel = model;
-
- KWeakSelf
- cell.didClickSwitch = ^(BOOL SwitchOn) {
- [weakSelf handleSelectOrNotDataBy:row withSelect:SwitchOn];
- };
- }
- return cell;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 70;
- }
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
- NSInteger row = indexPath.row;
- if(isEditType){
- return;
- }
-
- shareRecordDetailsHWViewController *vc = [shareRecordDetailsHWViewController new];
- [self.navigationController pushViewController:vc animated:YES];
-
- if(row < _ShareRecordMod.data.count){
- ShareRecordListModel* model = _ShareRecordMod.data[row];
- vc.dataModel = model;
- }
-
- KWeakSelf
- vc.didCancelShareLinkFun = ^{
- [weakSelf getShareFileListFun];
- };
- }
- #pragma mark 空数据
- - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
-
- NSString *imageName = @"common_no_data_pic";
-
- return [UIImage imageNamed:imageName];
- }
- - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
- NSString *text = NSLocalizedString(@"common_no_data_tip",nil);
-
- NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
- NSForegroundColorAttributeName: HW999999Color};
-
- return [[NSAttributedString alloc] initWithString:text attributes:attributes];
- }
- //调整图片位置
- - (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
- return -150;
- }
- - (void)didClickButtonFun:(UIButton*)but
- {
- NSInteger tag = but.tag;
-
- if(tag == 1){
- [self ruleBtnClick];
- }
- else if(tag == 2){
- [self setEditTypeFun];
- }
- else if(tag == 3){
- [self cancelEditTypeFun];
- }
- else if(tag == 4){
- but.selected = !but.selected;
- [self selectAllOrNotBy:but.selected];
- }
- else if(tag == 10){//删除分享
- [self showDeleteAlearViewFun];
- }
- else if(tag == 11){//取消分享
- [self showCancelAlearViewFun];
- }
- }
- #pragma mark 进入编辑
- - (void)setEditTypeFun
- {
- isEditType = YES;
- _rightEditButton.hidden = YES;
- _ruleBottomButton.hidden = YES;
- self.backBtn.hidden = YES;
-
- _leftCancleButton.hidden = NO;
- _rightSelectAllButton.hidden = NO;
-
- _delRuleButton.hidden = NO;
- _delRuleButton.userInteractionEnabled = NO;
- _delRuleButton.alpha = 0.5;
-
- _cancelShareButton.hidden = NO;
- _cancelShareButton.userInteractionEnabled = NO;
- _cancelShareButton.alpha = 0.5;
-
- [self.tableView reloadData];
- }
- #pragma mark 取消编辑
- - (void)cancelEditTypeFun
- {
- //数据还原
- [_didSelectArr removeAllObjects];
- for (ShareRecordListModel* model in _ShareRecordMod.data) {
- model.isSelectType = NO;
- }
-
- isEditType = NO;
- _rightEditButton.hidden = NO;
- _ruleBottomButton.hidden = NO;
- self.backBtn.hidden = NO;
-
- _leftCancleButton.hidden = YES;
- _rightSelectAllButton.hidden = YES;
- _delRuleButton.hidden = YES;
- _cancelShareButton.hidden = YES;
- [self.tableView reloadData];
- }
- #pragma mark 设置按钮状态
- - (void)setBottomStateFun
- {
- CGFloat alpha = 0.5;
- BOOL canClickBut = NO;
- if(_didSelectArr.count >0){
- alpha =1.0;
- canClickBut = YES;
- }
-
- _delRuleButton.userInteractionEnabled = canClickBut;
- _delRuleButton.alpha = alpha;
-
- _cancelShareButton.userInteractionEnabled = canClickBut;
- _cancelShareButton.alpha = alpha;
- }
- #pragma mark 单个选中或者取消
- - (void)handleSelectOrNotDataBy:(NSInteger)row withSelect:(BOOL)select
- {
- if(row < _ShareRecordMod.data.count){
- ShareRecordListModel* model = _ShareRecordMod.data[row];
- model.isSelectType = !model.isSelectType;
- if(select){
- [_didSelectArr addObject:model];
- }
- else{
- [_didSelectArr removeObject:model];
- }
-
- [self setBottomStateFun];
- }
- }
- #pragma mark 全部选中或者取消全选
- - (void)selectAllOrNotBy:(BOOL)isSelectAll
- {
- [_didSelectArr removeAllObjects];
-
- for (ShareRecordListModel* model in _ShareRecordMod.data) {
- if(isSelectAll){
- model.isSelectType = YES;
- [_didSelectArr addObject:model];
- }
- else{
- model.isSelectType = NO;
- }
- }
-
- [self setBottomStateFun];
- [self.tableView reloadData];
- }
- #pragma mark 分享记录列表
- - (void)getShareFileListFun
- {
- NSMutableDictionary*paraDict = [NSMutableDictionary new];
-
- NSString *SNStr = ksharedAppDelegate.DeviceThirdIdMod.data.changeSn;
- if(SNStr){
- [paraDict setValue:SNStr forKey:@"sn"];
- }
- else{
- return;;
- }
-
- [self showNewIndicatorWithCanBack:YES canTouch:NO];
-
- KWeakSelf
- [[netWorkManager shareInstance] CommonPostCallBackCode:queryShareRecordFun Parameters:paraDict success:^(id _Nonnull responseObject) {
- [weakSelf removeNewIndicator];
- weakSelf.ShareRecordMod = [[ShareRecordModel alloc] initWithDictionary:responseObject error:nil];
- if(weakSelf.ShareRecordMod && weakSelf.ShareRecordMod.status == 0){
- [weakSelf.tableView reloadData];
- }
- else{
-
- }
- } failure:^(NSError * _Nonnull error) {
- [weakSelf removeNewIndicator];
- }];
- }
- #pragma mark 取消分享
- - (void)showCancelAlearViewFun
- {
- NSString *tipStr = NSLocalizedString(@"cancel_share_Tip_msg",nil);
- KWeakSelf
- ComontAlretViewController *curAlretVC= [[ComontAlretViewController alloc] initWithTiTle:nil
- msg:tipStr
- imageStr:nil
- cancelTitle:NSLocalizedString(@"other_cancel",nil)
- okTitle:NSLocalizedString(@"other_confirm",nil) isOkBtnHighlight:YES
- didClickOk:^{
-
- [weakSelf cancelShareLinkFun];
- } didClickCancel:^{
-
- }];
-
- curAlretVC.modalPresentationStyle = UIModalPresentationCustom;
-
- [self presentViewController:curAlretVC animated:YES completion:^{
- curAlretVC.view.superview.backgroundColor = [UIColor clearColor];
- }];
- }
- #pragma mark 取消分享
- - (void)cancelShareLinkFun
- {
- NSMutableDictionary *paraDict = [NSMutableDictionary new];
- if(_didSelectArr){
- NSMutableArray *LinkIdArr = [NSMutableArray new];
- for (ShareRecordListModel* model in _didSelectArr) {
- if(!model.expirationStatus){
- [LinkIdArr addObject:model.addShareId];
- }
- }
-
- if(LinkIdArr.count == 0){
- [[iToast makeText:NSLocalizedString(@"cancel_share_suc_msg",nil)] show];
- return;
- }
-
- [paraDict setValue:LinkIdArr forKey:@"idList"];
- }
- [paraDict setValue:@1 forKey:@"expirationStatus"];
-
- KWeakSelf
- [self showNewIndicatorWithCanBack:NO canTouch:NO];
- [[netWorkManager shareInstance] CommonPostCallBackCode:updateShareInfoFun Parameters:paraDict success:^(id _Nonnull responseObject) {
- [weakSelf removeNewIndicator];
- SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
- if(model && model.code == 0){
- [[iToast makeText:NSLocalizedString(@"cancel_share_suc_msg",nil)] show];
- [weakSelf.didSelectArr removeAllObjects];
- [weakSelf setBottomStateFun];
- [weakSelf getShareFileListFun];
- }
- else{
- [[iToast makeText:NSLocalizedString(@"cancel_share_fail_msg",nil)] show];
- }
-
- } failure:^(NSError * _Nonnull error) {
- [weakSelf removeNewIndicator];
- [[iToast makeText:NSLocalizedString(@"cancel_share_fail_msg",nil)] show];
- }];
- }
- #pragma mark 删除分享
- - (void)showDeleteAlearViewFun
- {
- NSString *titleStr = NSLocalizedString(@"delete_share_title_msg",nil);
- NSString *tipStr = NSLocalizedString(@"delete_share_Tip_msg",nil);
- KWeakSelf
- ComontAlretViewController *curAlretVC= [[ComontAlretViewController alloc] initWithTiTle:titleStr
- msg:tipStr
- imageStr:nil
- cancelTitle:NSLocalizedString(@"other_cancel",nil)
- okTitle:NSLocalizedString(@"other_confirm",nil) isOkBtnHighlight:YES
- didClickOk:^{
-
- [weakSelf deleteShareLinkArrFun];
- } didClickCancel:^{
-
- }];
-
- curAlretVC.modalPresentationStyle = UIModalPresentationCustom;
-
- [self presentViewController:curAlretVC animated:YES completion:^{
- curAlretVC.view.superview.backgroundColor = [UIColor clearColor];
- }];
- }
- #pragma mark 删除分享
- - (void)deleteShareLinkArrFun
- {
- NSMutableDictionary *paraDict = [NSMutableDictionary new];
- if(_didSelectArr){
- NSMutableArray *LinkIdArr = [NSMutableArray new];
- for (ShareRecordListModel* model in _didSelectArr) {
- [LinkIdArr addObject:model.addShareId];
- }
-
- if(LinkIdArr.count == 0){
- [[iToast makeText:NSLocalizedString(@"delete_share_fail_msg",nil)] show];
- return;
- }
-
- [paraDict setValue:LinkIdArr forKey:@"idList"];
- }
-
-
- KWeakSelf
- [self showNewIndicatorWithCanBack:NO canTouch:NO];
- [[netWorkManager shareInstance] CommonPostCallBackCode:deleteShareListFun Parameters:paraDict success:^(id _Nonnull responseObject) {
- [weakSelf removeNewIndicator];
- SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
- if(model && model.code == 0){
- [[iToast makeText:NSLocalizedString(@"delete_share_suc_msg",nil)] show];
- [weakSelf.didSelectArr removeAllObjects];
- [weakSelf setBottomStateFun];
- [weakSelf getShareFileListFun];
- }
- else{
- [[iToast makeText:NSLocalizedString(@"delete_share_fail_msg",nil)] show];
- }
-
- } failure:^(NSError * _Nonnull error) {
- [weakSelf removeNewIndicator];
- [[iToast makeText:NSLocalizedString(@"delete_share_fail_msg",nil)] show];
- }];
- }
- #pragma mark 分享规则
- - (void)ruleBtnClick {
- //https://cliys.armclouding.com/h5/protocol/protocol.html?agreementCoding=YSZYHXY2002&type=1
- // [self gotoProtocolWKWebVCByPush:YES];
- CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
- vc.titleStr = NSLocalizedString(@"share_rule_title",nil);
- // NSString *url = @"http://testprivacy.phone.armclouding.com:1801/h5/rule.html";
- // if([CloudService rangeOfString:@"hiboxde.armclouding.com"].location != NSNotFound){
- // url = @"http://hiboxde.armclouding.com:7780/h5/rule.html";;
- // }
- NSString *url = [[NSString alloc] initWithFormat:@"%@/h5/rule.html",CloudService];
- vc.webUrl = url;
- [self.navigationController pushViewController:vc animated:YES];
- }
- @end
|