62 lines
2.1 KiB
Objective-C
62 lines
2.1 KiB
Objective-C
//
|
|
// LMWechatKefuViewController.m
|
|
// SweetParty
|
|
//
|
|
// Created by Xmac on 2024/9/11.
|
|
//
|
|
|
|
#import "LMWechatKefuViewController.h"
|
|
|
|
@interface LMWechatKefuViewController ()
|
|
@property (weak, nonatomic) IBOutlet UIImageView *zaoCodeIMG;
|
|
@property (weak, nonatomic) IBOutlet UIImageView *wanCodeIMG;
|
|
@property (weak, nonatomic) IBOutlet UILabel *wanTimeLabel;
|
|
@property (weak, nonatomic) IBOutlet UILabel *zaoTimeLabel;
|
|
@property (weak, nonatomic) IBOutlet UILabel *zaoTitleLabel;
|
|
@property (weak, nonatomic) IBOutlet UILabel *wanTitleLabel;
|
|
|
|
@property (weak, nonatomic) IBOutlet UIImageView *bottomIMG;
|
|
@property (weak, nonatomic) IBOutlet UILabel *bottomTitleLabel;
|
|
@property (weak, nonatomic) IBOutlet UILabel *bottomTimeLabel;
|
|
|
|
|
|
@end
|
|
|
|
@implementation LMWechatKefuViewController
|
|
|
|
- (void)viewDidLoad {
|
|
[super viewDidLoad];
|
|
self.navTitle = @"运营";
|
|
[self.customNavBar styleClear];
|
|
|
|
[self requestWechatKefuInfo];
|
|
}
|
|
|
|
- (void)requestWechatKefuInfo
|
|
{
|
|
[BJHttpTool BJ_User_get_kf_messageParameters:@{} success:^(id response) {
|
|
NSArray *data = [response safeArrayForKey:@"data"];
|
|
if (data.count>1){
|
|
NSDictionary *zao = [data objectAtIndex:0];
|
|
[self.zaoCodeIMG sd_setImageWithURL:[NSURL URLWithString:[zao safeStringForKey:@"image"]]];
|
|
self.zaoTimeLabel.text = [zao safeStringForKey:@"content"];
|
|
self.zaoTitleLabel.text = [zao safeStringForKey:@"contents"];
|
|
|
|
NSDictionary *wan = [data objectAtIndex:1];
|
|
[self.wanCodeIMG sd_setImageWithURL:[NSURL URLWithString:[wan safeStringForKey:@"image"]]];
|
|
self.wanTimeLabel.text = [wan safeStringForKey:@"content"];
|
|
self.wanTitleLabel.text = [wan safeStringForKey:@"contents"];
|
|
|
|
NSDictionary *bottom = [data objectAtIndex:2];
|
|
[self.bottomIMG sd_setImageWithURL:[NSURL URLWithString:[bottom safeStringForKey:@"image"]]];
|
|
self.bottomTimeLabel.text = [bottom safeStringForKey:@"content"];
|
|
self.bottomTitleLabel.text = [bottom safeStringForKey:@"contents"];
|
|
}
|
|
} failure:^(NSError *error) {
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
@end
|