Commit 1f16cd61 authored by jz's avatar jz

GMLiveWelfareView

parents 2427676f bd4cf773
......@@ -18,7 +18,7 @@ target 'GMAILab_Example' do
pod 'GMBaseSwift', '3.4.2'
pod 'GMAlbum', '4.1.6'
pod 'Qiniu', '7.2.6'
# pod 'GMBaseWeb', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git', :commit => 'c3ca876'
pod 'GMBaseWeb', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git', :commit => 'c3ca876'
# s.dependency 'GMBaseSwift','3.4.0'
......
......@@ -29,7 +29,7 @@ PODS:
- EVReflection (= 5.10.0)
- GMBase
- GMBaseSwift
- GMBaseWeb (= 0.0.2)
- GMBaseWeb
- GMFoundation
- GMKit
- GMNetService
......@@ -68,10 +68,9 @@ PODS:
- GMPhobos
- GMRefresh
- SnapKit (= 4.0.0)
- GMBaseWeb (0.0.2):
- GMBaseWeb (0.1.0):
- GMAlbum
- GMBase
- GMBaseSwift
- GMCache
- GMFoundation
- GMHud
......@@ -192,6 +191,7 @@ DEPENDENCIES:
- GMAlbum (= 4.1.6)
- GMBase (= 1.1.7)
- GMBaseSwift (= 3.4.2)
- "GMBaseWeb (from `git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git`, commit `c3ca876`)"
- GMPhobos (= 2.0.7)
- Qiniu (= 7.2.6)
......@@ -201,7 +201,6 @@ SPEC REPOS:
- GMAlbum
- GMBase
- GMBaseSwift
- GMBaseWeb
- GMCache
- GMFoundation
- GMHud
......@@ -243,6 +242,14 @@ SPEC REPOS:
EXTERNAL SOURCES:
GMAILab:
:path: "../"
GMBaseWeb:
:commit: c3ca876
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git"
CHECKOUT OPTIONS:
GMBaseWeb:
:commit: c3ca876
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git"
SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
......@@ -252,11 +259,11 @@ SPEC CHECKSUMS:
DouyinOpenSDK: 5ba83de22963ba7a3ba70c8ff11dfcb2885ecc2b
EVReflection: 1abc1a81927ab0d30170238cf9b79bff489e9728
GM-Swift-Observable: 756d8fc13638b9faa68cb10266b2ffb47a911595
GMAILab: 4463b0965e77c547ecd4c998efd2478e0b51dd88
GMAILab: c900b10ce5ceba6b5d24b2787b6661bbd766fa0e
GMAlbum: f1073eaa4ec518316d7da2098806df473942ebe0
GMBase: 2b21497f52e691e0a2ba47fc883f1334fa7f2cbf
GMBaseSwift: 82915eb16c9505ff19f66c85a2bbf5f7f50756f2
GMBaseWeb: d3c49a18ac9a51d424814d22152df52a62073b42
GMBaseWeb: 4b374ec5a7afc59368eea5dc480f0e98129a9c69
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMFoundation: e9f7fd9c6e5f133e09009b0ee5de4fce60ac5682
GMHud: feca48b3eda4f3a6f617f4bbaa3657316a245c1f
......@@ -288,6 +295,6 @@ SPEC CHECKSUMS:
Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
PODFILE CHECKSUM: c85b45131163a07565d21eb2daf37ca0f951d9c6
PODFILE CHECKSUM: 1046380b9bddf0bea14e4262b5a1c38da592c3b1
COCOAPODS: 1.9.3
......@@ -79,8 +79,7 @@ TODO: Add long description of the pod here.
s.dependency 'YYText'
s.dependency 'GMShareSDK'
s.dependency 'DouyinOpenSDK', '1.4.1'
s.dependency 'GMBaseWeb', '0.0.2'
s.dependency 'GMBaseWeb'
# 信令
s.dependency 'NIMSDK', '7.5.0'
s.dependency 'AlipaySDK-iOS', '15.6.8'
......@@ -88,19 +87,14 @@ TODO: Add long description of the pod here.
s.dependency 'PLPlayerKit'
s.dependency 'Qiniu'
s.libraries = "z", "c++", "xml2", "sqlite3"
s.frameworks = 'ReplayKit', 'CoreTelephony', 'SystemConfiguration'
s.pod_target_xcconfig = { 'VALID_ARCHS' => 'arm64 armv7 x86_64' }
# s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => '' }
# s.dependency 'TTTRtcEngineKit_iOS'
# s.dependency 'TTTPlayerKit_iOS'
s.static_framework = true
# s.pod_target_xcconfig = { 'VALID_ARCHS' => 'armv7' }
end
//
// GMLiveWelfareView.h
// Gengmei
//
// Created by 汪俊 on 2017/3/30.
// Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//
#import "GMImageView.h"
#import "GMInstallmentView.h"
#import "GMInsuranceView.h"
//#import "Gengmei-Swift.h"
@class AllLayoutButton;
@class GMLiveWelfareView;
@class GMAdLabel;
@protocol GMLiveWelfareViewDelegate <NSObject>
- (void)didSelectedWelfareView:(GMLiveWelfareView *)welFareView;
- (void)didClickedHospitalDetailButton:(AllLayoutButton *)button;
@end
/**
直播和回放页面的美购
*/
@interface GMLiveWelfareView : GMView
@property (nonatomic , strong) GMView *welfareContainer;
/** @brief 美购大图片 */
@property (nonatomic , strong) GMImageView *bigIconImage;
/** @brief 预付价 */
@property (nonatomic , strong) GMImageView *yufuImage;
/** @brief 已售完 */
@property (nonatomic , strong) GMImageView *sallOutImage;
/** @brief 美购标题 */
@property (nonatomic , strong) GMLabel *welfareTitle;
/** @brief 美购简介 */
@property (nonatomic , strong) GMAdLabel *welfareContent;
/** @brief 更美价 */
@property (nonatomic , strong) GMLabel *gengmeiPrice;
/** @brief 市场价 */
@property (nonatomic , strong) GMLabel *marketPrice;
/** @brief 删除线 */
@property (nonatomic , strong) GMLabel *deleteLabel;
/** @brief 人民币(元/元起) */
@property (nonatomic , strong) GMLabel *yuanLabel;
/** @brief 预付款标签 */
@property (nonatomic , strong) GMLabel *yufuLabel;
/** @brief 申请数 */
@property (nonatomic , strong) GMLabel *applyNumber;
/** @brief 剩余多少个*/
@property (nonatomic , strong) GMLabel *surplusLabel;
/** @brief 城市 */
@property (nonatomic , strong) GMLabel *cityLabel;
/** @brief 医生 */
@property (nonatomic , strong) GMLabel *doctorLabel;
/** @brief 机构 */
@property (nonatomic , strong) GMLabel *hospitalLabel;
/**状态栏背景*/
@property (nonatomic, strong) GMView *statusBG;
/** @brief */
@property (nonatomic , strong) UIView *surplusBG;
/** @brief 秒杀价图片*/
@property (nonatomic , strong) GMImageView *seckillIcon;
/** seckill是否隐藏*/
@property (nonatomic, assign) BOOL isSeckillHidden;
/**
展示推广label
@author wangjun 16-08-01 in 6.3.0
*/
@property (nonatomic, assign) BOOL showPromotion;
/**
分期提示
*/
//@property (nonatomic, strong) GMInstallmentView *installmentView;
/**
保险提示
*/
//@property (nonatomic, strong) GMInsuranceView *insuranceView;
/**
是否展示推分期
*/
//@property (nonatomic, assign) BOOL showInstallment;
/**
是否展示保险
*/
//@property (nonatomic, assign) BOOL showInsurance;
@property (nonatomic , strong) UIImageView *hospitalBg;
@property (nonatomic, weak) id<GMLiveWelfareViewDelegate> delegate;
- (void)show;
- (void)hide;
@end
//
// GMLiveWelfareView.m
// Gengmei
//
// Created by 汪俊 on 2017/3/30.
// Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//
#import "GMLiveWelfareView.h"
#import "UIView+Layout.h"
#import <GMBase/GMBase-Swift.h>
//#import "GMAdLabel.h"
#import <GMKit/GMKit-umbrella.h>
//#import "AllLayoutButton.swift"
@import GMBaseSwift;
@interface GMLiveWelfareView ()
@property (nonatomic , strong) AllLayoutButton *rightButton;
@property (nonatomic , strong) GMLabel *leftLabel;
@end
@implementation GMLiveWelfareView
- (void)setup {
[super setup];
__weak typeof(self)weakSelf = self;
[self setTapActionWithBlock:^{
[weakSelf welfareItemDidClicked];
}];
self.backgroundColor = UIColor.whiteColor;
_leftLabel = [GMLabel labelWithTextColor:UIColor.headlineText fontSize:16];
_leftLabel.text = @"相关美购";
[self addSubview:_leftLabel];
[_leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(15);
make.top.mas_equalTo(14);
}];
_hospitalBg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"live_hospital_bg"]];
_hospitalBg.userInteractionEnabled = YES;
[self addSubview:_hospitalBg];
[_hospitalBg mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(0);
make.top.mas_equalTo(4.5);
make.size.mas_equalTo(CGSizeMake(102, 33));
}];
_rightButton = [[AllLayoutButton alloc] initWithImage:[UIImage imageNamed:@"live_hospital_arrow"] title:@"医生主页" titleColor:UIColor.whiteColor font:[UIFont gmFont:15]];
_rightButton.space = 6;
_rightButton.type = ImageTitleTypeImageRightTitleLeft;
_rightButton.enableAdaptive = YES;
_rightButton.margin = UIEdgeInsetsMake(0, 18, 0, 0);
[_rightButton addTarget:self action:@selector(hospitalDetailAction:) forControlEvents:UIControlEventTouchUpInside];
[_hospitalBg addSubview:_rightButton];
[_rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.centerY.mas_equalTo(_hospitalBg);
}];
[self addHorizontalLineWithTop:42 left:0 right:0];
_welfareContainer = [[GMView alloc] init];
// _welfareContainer.backgroundColor = [UIColor redColor];
[self addSubview:_welfareContainer];
[_welfareContainer mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(42);
make.left.right.mas_equalTo(0);
if (UIDevice.aspectRatioType == GMDeviceAspectRatioTypeWide){
make.bottom.mas_equalTo(-18);
} else{
make.bottom.mas_equalTo(0);
}
}];
_bigIconImage = [[GMImageView alloc] init];
_bigIconImage.layer.cornerRadius = 2.5;
_bigIconImage.layer.masksToBounds = YES;
_bigIconImage.backgroundColor = UIColor.background;
[_welfareContainer addSubview:_bigIconImage];
_surplusBG = [[UIView alloc] init];
_surplusBG.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.7];
[_bigIconImage addSubview:_surplusBG];
_statusBG = [[GMView alloc] init];
[_bigIconImage addSubview:_statusBG];
_surplusLabel = [GMLabel labelWithTextColor:UIColor.whiteColor fontSize:10];
_surplusLabel.textColor = [UIColor whiteColor];
_surplusLabel.font = [UIFont gmFont:10];
[_statusBG addSubview:_surplusLabel];
_welfareContent = [[GMAdLabel alloc] init];//[GMAdLabel labelWithTextColor:UIColor.headlineText fontSize:14];
_welfareContent.textColor = UIColor.headlineText;
_welfareContent.font = [UIFont gmFont:14];
_welfareContent.numberOfLines = 2;
_welfareContent.adLabelTop = 4;
[_welfareContainer addSubview:_welfareContent];
_doctorLabel =[[GMLabel alloc] init];
_doctorLabel.textAlignment = NSTextAlignmentLeft;
_doctorLabel.verticalAlignment = GMLabelVerticalAlignmentMiddle;
_doctorLabel.font = [UIFont gmFont:12];
_doctorLabel.textColor = UIColor.auxiliaryTextLight;
[_welfareContainer addSubview:_doctorLabel];
_hospitalLabel =[[GMLabel alloc] init];
_hospitalLabel.textAlignment = NSTextAlignmentLeft;
_hospitalLabel.verticalAlignment = GMLabelVerticalAlignmentMiddle;
_hospitalLabel.font = [UIFont gmFont:12];
_hospitalLabel.textColor = UIColor.auxiliaryTextLight;
[_welfareContainer addSubview:_hospitalLabel];
[_doctorLabel setContentHuggingPriority:252 forAxis:UILayoutConstraintAxisHorizontal];
[_doctorLabel setContentCompressionResistancePriority:751 forAxis:UILayoutConstraintAxisHorizontal];
[_hospitalLabel setContentHuggingPriority:251 forAxis:UILayoutConstraintAxisHorizontal];
[_hospitalLabel setContentCompressionResistancePriority:750 forAxis:UILayoutConstraintAxisHorizontal];
_seckillIcon = [[GMImageView alloc]initWithImage:[UIImage imageNamed:@"seckill_shop"]];
[_welfareContainer addSubview:_seckillIcon];
_gengmeiPrice = [GMLabel labelWithTextColor:UIColor.secondaryVisual fontSize:15];
[_welfareContainer addSubview:_gengmeiPrice];
_gengmeiPrice.font = [UIFont gmFont:15];
_yuanLabel = [GMLabel labelWithTextColor:UIColor.secondaryVisual fontSize:11];
[_welfareContainer addSubview:_yuanLabel];
_marketPrice = [GMLabel labelWithTextColor:UIColor.auxiliaryTextLight fontSize:9];
[_welfareContainer addSubview:_marketPrice];
_deleteLabel = [GMLabel new];
_deleteLabel.backgroundColor = UIColor.auxiliaryTextLight;
[_marketPrice addSubview:_deleteLabel];
_applyNumber = [GMLabel labelWithTextColor:UIColor.auxiliaryTextLight fontSize:11];
[_welfareContainer addSubview:_applyNumber];
//
// _installmentView = [[GMInstallmentView alloc] init];
// _installmentView.layer.masksToBounds = YES;
// [_welfareContainer addSubview:_installmentView];
//
// _insuranceView = [[GMInsuranceView alloc] init];
// _insuranceView.layer.masksToBounds = YES;
// [_welfareContainer addSubview:_insuranceView];
}
- (void)updateConstraints {
[_bigIconImage mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(15);
make.top.mas_equalTo(15);
make.size.mas_equalTo(CGSizeMake(100, 100));
}];
[_statusBG mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.bottom.equalTo(_bigIconImage.mas_bottom).offset(-8);
}];
[_surplusLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(5);
make.right.mas_equalTo(-5);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
[_doctorLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(_bigIconImage.mas_right).offset(15);
make.top.equalTo(_welfareContent.mas_bottom).offset(5);
}];
[_hospitalLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(_doctorLabel.mas_right).offset(10);
make.right.mas_equalTo(-10);
make.top.equalTo(_doctorLabel.mas_top);
}];
[_seckillIcon mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(_bigIconImage.mas_right).offset(15);
make.centerY.equalTo(_gengmeiPrice.mas_centerY);
make.size.sizeOffset(CGSizeMake(25, 13));
}];
[_deleteLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.height.mas_equalTo(0.5);
make.centerY.equalTo(_marketPrice.mas_centerY).offset(0);
make.width.mas_equalTo(_marketPrice.mas_width);
}];
[_applyNumber mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-10);
make.centerY.equalTo(_gengmeiPrice.mas_centerY);
}];
[_yuanLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(_gengmeiPrice.mas_right).offset(2);
make.bottom.equalTo(_bigIconImage.mas_bottom).offset(0);
}];
// [_installmentView mas_remakeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(_bigIconImage.mas_bottom).offset(15);
// make.left.right.mas_equalTo(0);
// make.height.mas_equalTo(35);
// }];
// [_insuranceView mas_remakeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(_installmentView.mas_bottom).offset(0);
// make.left.right.mas_equalTo(0);
// make.height.mas_equalTo(35);
// }];
[_marketPrice mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(_yuanLabel.hidden?_gengmeiPrice.mas_right:_yuanLabel.mas_right).offset(5);
make.bottom.equalTo(_bigIconImage.mas_bottom).offset(0);
}];
[_gengmeiPrice mas_remakeConstraints:^(MASConstraintMaker *make) {
if (_isSeckillHidden) {
make.left.equalTo(_bigIconImage.mas_right).offset(15);
}else{
make.left.equalTo(_seckillIcon.mas_right).offset(5);
}
make.bottom.mas_equalTo(_bigIconImage.mas_bottom).offset(2);
}];
[_welfareContent mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(10);
if (_showPromotion) {
make.left.equalTo(_bigIconImage.mas_right).offset(20);
} else {
make.left.equalTo(_bigIconImage.mas_right).offset(15);
}
make.right.mas_equalTo(-15);
}];
// [_installmentView mas_remakeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(_bigIconImage.mas_bottom).offset(15);
// make.left.right.mas_equalTo(0);
// if (_showInstallment) {
// make.height.mas_equalTo(35);
// } else {
// make.height.mas_equalTo(0);
// }
// }];
//
// [_insuranceView mas_remakeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(_installmentView.mas_bottom).offset(0);
// make.left.right.mas_equalTo(0);
// if (_showInsurance) {
// make.height.mas_equalTo(35);
// } else {
// make.height.mas_equalTo(0);
// }
// }];
[super updateConstraints];
}
- (void)show {
self.hidden = NO;
[self mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo( MAINSCREEN_HEIGHT - self.height);
}];
[UIView animateWithDuration:0.25 animations:^{
[self.superview layoutIfNeeded];
}];
}
- (void)hide {
[self mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(MAINSCREEN_HEIGHT);
}];
[UIView animateWithDuration:0.25 animations:^{
[self.superview layoutIfNeeded];
} completion:^(BOOL finished) {
self.hidden = YES;
}];
}
- (void)welfareItemDidClicked {
if ([self.delegate respondsToSelector:@selector(didSelectedWelfareView:)]) {
[self.delegate didSelectedWelfareView:self];
}
}
- (void)hospitalDetailAction:(AllLayoutButton *)button {
if ([self.delegate respondsToSelector:@selector(didClickedHospitalDetailButton:)]) {
[self.delegate didClickedHospitalDetailButton:button];
}
}
@end
......@@ -21,9 +21,8 @@
#import "GMToFacePayPopView.h"
#import "RequestHeader.h"
#import <GMBase/GMBaseTool.h>
#import <GMBaseWeb/GMBaseWeb-Swift.h>
#import <GMBaseWeb/GMWebutil.h>
@import GMBaseWeb;
#define counsellorAllHeight (573 + UIView.safeAreaInsetsBottom)
#define counsellorHalfHeight (366 + UIView.safeAreaInsetsBottom)
#define doctorAllHeight (573 + UIView.safeAreaInsetsBottom)
......@@ -32,7 +31,7 @@
#define dispatchAllHeight (522 + UIView.safeAreaInsetsBottom)
#define dispatchHalfHeight (286 + UIView.safeAreaInsetsBottom)
@interface GMBasicInfoCardView ()<WKBaseWebViewDelegate>
@interface GMBasicInfoCardView ()<GMJSBridgeProtocol>
@property (nonatomic, strong) GMBaseWebViewComponent *webCompent;
@property (nonatomic, strong) GMVideoWaitingView *waitingView;
@property (nonatomic, assign) int currentTime;
......@@ -130,7 +129,9 @@
}
}
- (void)getVideoPermission:(NSDictionary *)data {
- (void)getVideoPermission:(NSString *)jsonString; {
NSDictionary *data = [NSDictionary dictionaryWithJsonString:jsonString];
//先请求订单接口,付款完成后再进行面诊
self.dict = [NSMutableDictionary dictionaryWithDictionary:data];
self.traceId = [GMVideoPhobos getTraceId];
......@@ -166,7 +167,12 @@
[self layoutIfNeeded];
}
-(void)globalDataLoaded:(NSDictionary *)data {
- (void)globalDataLoaded:(NSString *)jsonString {
if (![jsonString isNonEmpty]) {
return;
}
NSDictionary *data = [NSDictionary dictionaryWithJsonString:jsonString];
int consultation_type = [data[@"consultation_type"] intValue];
int counsellor_type = [data[@"counsellor_type"] intValue];
NSDictionary *dict = @{@"page_name":[GMBaseTool getCurrentViewController].pageName,
......
......@@ -13,10 +13,9 @@
#import "GMEndConsultView.h"
#import "RequestHeader.h"
#import "GMToFaceNetworking.h"
#import <GMBaseWeb/GMBaseWeb-Swift.h>
#import <WebKit/WebKit.h>
@import GMBaseWeb;
@import GMHud;
@interface GMTofaceOrderDetailViewController () <WKBaseWebViewDelegate>
@interface GMTofaceOrderDetailViewController () <GMJSBridgeProtocol>
@property (nonatomic, strong) GMComplaintObject *complaintObject;
@end
......@@ -72,7 +71,7 @@
view.complaintType = GMComplaintTypeDoctor;
view.complaintFinish = ^(NSInteger complaintStatus) {
NSString *jsStr = [NSString stringWithFormat:@"window.gm&&window.gm.pack&&window.gm.pack.run('notificReportState')"];
[self.webCompent.webView evaluateJavaScript:jsStr completionHandler:nil];
[self.webCompent.webView _safeAsyncEvaluateJavaScript:jsStr completionHandler:nil];
};
[[GMBaseTool getCurrentViewController].view addSubview:view];
}
......
......@@ -12,7 +12,7 @@
#import "NSString+CalculateSize.h"
#import "WMTagObject.h"
#import <GMBase/GMBaseTool.h>
#import <GMBaseWeb/GMWebutil.h>
@import GMBaseWeb;
@import GMHud;
@import GMRouter;
......
......@@ -11,7 +11,6 @@
#import "GMGMDiagnosisWorkingTableScrollView.h"
#import "RequestHeader.h"
#import "GMLibraryHeader.h"
//#import "WMBrowserViewController.h"
@import GMRouter;
@interface GMServiceDataItemView()
@property (nonatomic, strong) UILabel *line;
......
......@@ -12,11 +12,10 @@
#import "GMComplaintResultView.h"
#import "GMComplaintObject.h"
#import "RequestHeader.h"
#import <GMBaseWeb/GMBaseWeb-Swift.h>
#import <GMFoundation/GMFoundation-umbrella.h>
@import GMBaseWeb;
@import GMNetworking;
@import WebKit.WKWebView;
@interface GMBusinessReportListController () <WKBaseWebViewDelegate>
@interface GMBusinessReportListController () <GMJSBridgeProtocol>
@end
......@@ -42,14 +41,15 @@
@"state" : @(1)
};
NSString *jsStr = [NSString stringWithFormat:@"window.gm&&window.gm.pack&&window.gm.pack.run('notificReportState','%@')", [NSString convertToBriefJsonString:params]];
[self.webCompent.webView evaluateJavaScript:jsStr completionHandler:nil];
[self.webCompent.webView _safeAsyncEvaluateJavaScript:jsStr completionHandler:nil];
}
- (NSString *)moreQueryParameters {
return [NSString stringWithFormat:@"&doctor_id=%@&counsellor_id=%@",SafeString(self.doctorId),SafeString(self.counsellorId)];
}
- (void)videoDiagnoseComplaint:(NSDictionary *)complaint {
- (void)videoDiagnoseComplaint:(NSString *)jsonString {
NSDictionary *complaint = [NSDictionary dictionaryWithJsonString:jsonString];
GMComplaintResultViewType complaintStatus = [complaint[@"status"] integerValue];
if (complaintStatus == GMComplaintResultViewTypeNone) {
GMEndConsultView *view = [[GMEndConsultView alloc] initWithType:GMEndConsultViewTypeDoctorComplaint starNum:0];
......@@ -60,7 +60,7 @@
@"state" : @(complaintStatus)
};
NSString *jsStr = [NSString stringWithFormat:@"window.gm&&window.gm.pack&&window.gm.pack.run('notificReportState','%@')", [NSString convertToBriefJsonString:params]];
[self.webCompent.webView evaluateJavaScript:jsStr completionHandler:nil];
[self.webCompent.webView _safeAsyncEvaluateJavaScript:jsStr completionHandler:nil];
};
[[GMBaseTool getCurrentViewController].view addSubview:view];
} else {
......
......@@ -11,14 +11,14 @@
#import "RequestHeader.h"
#import "GMAIUploadImagesManager.h"
//#import "GMUploadImagesManager.h"
#import <GMBaseWeb/GMBaseWeb-Swift.h>
#import <GMbase/GMBaseTool.h>
@import GMBaseWeb;
@import GMHud;
@import GMNetworking;
@import GMFoundation;
@import GMAlbum;
@interface GMBusinessReportResultController () <WKBaseWebViewDelegate>
@interface GMBusinessReportResultController () <GMJSBridgeProtocol>
@property (nonatomic, strong) UIImage *shareImage;
@property (nonatomic, copy) NSString *shareUserId;
......
......@@ -9,7 +9,6 @@
#import "GMEditQuesPartViewModel.h"
#import "GMBusinessReportListController.h"
#import <GMBase/GMBaseTool.h>
//#import "WMBrowserViewController.h"
#import "RequestHeader.h"
@import GMHud;
@import GMRouter;
......
......@@ -15,12 +15,12 @@
#import "GMToFaceOrderInfoModel.h"
#import "GMToFaceNetworking.h"
#import "NSString+AIJsonData.h"
#import <GMBase/GMBase-Swift.h>
//#import <GMBase/GMBase-Swift.h>
#import "RequestHeader.h"
#import <GMBaseWeb/GMBaseWeb-Swift.h>
@import GMBase;
@import WebKit.WKWebView;
@import GMBaseWeb;
@interface GMViewEvaluateModel: GMObject
//面诊id
@property (nonatomic, copy) NSString *consultationId;
......@@ -31,9 +31,10 @@
//页面名称
@property (nonatomic, copy) NSString *tabName;
@end
@implementation GMViewEvaluateModel @end
@interface GMDiagnoseRecordWebViewController () <WKBaseWebViewDelegate>
@interface GMDiagnoseRecordWebViewController () <GMJSBridgeProtocol>
@property (nonatomic, strong) GMComplaintObject *complaintObject;
@property (nonatomic, assign) BOOL isSureOrder;
......@@ -103,7 +104,7 @@
}
NSString *str = [NSDictionary dictionaryToJson:dict];
NSString *jsStr = [NSString stringWithFormat:@"window.gm&&window.gm.pack&&window.gm.pack.run('evaluateCallback',%@)", str];
[weakSelf.webCompent.webView evaluateJavaScript:jsStr completionHandler:nil];
[weakSelf.webCompent.webView _safeAsyncEvaluateJavaScript:jsStr completionHandler:nil];
};
view.showComplaint = model.showComplaint;
view.recordId = model.consultationId;
......@@ -160,7 +161,7 @@
NSDictionary *dict = @{@"type":@(type),@"star":@(star),@"desc":desc};
NSString *str = [NSDictionary dictionaryToJson:dict];
NSString *jsStr = [NSString stringWithFormat:@"window.gm&&window.gm.pack&&window.gm.pack.run('confirmCallback',%@)", str];
[weakSelf.webCompent.webView evaluateJavaScript:jsStr completionHandler:nil];
[weakSelf.webCompent.webView _safeAsyncEvaluateJavaScript:jsStr completionHandler:nil];
};
popView.infoModel = infoModel;
[[GMBaseTool mainWindow] addSubview:popView];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment