首次提交
This commit is contained in:
21
QXLive/Mine(音域)/View/钱包/QXCornRecordCell.h
Normal file
21
QXLive/Mine(音域)/View/钱包/QXCornRecordCell.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// QXCornRecordCell.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/27.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXCoinDetailModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXCornRecordCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
|
||||
@property (nonatomic,assign)BOOL isCoin;
|
||||
@property (nonatomic,strong) QXCoinDetailModel *model;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
50
QXLive/Mine(音域)/View/钱包/QXCornRecordCell.m
Normal file
50
QXLive/Mine(音域)/View/钱包/QXCornRecordCell.m
Normal file
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// QXCornRecordCell.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/27.
|
||||
//
|
||||
|
||||
#import "QXCornRecordCell.h"
|
||||
#import "NSDate+QX.h"
|
||||
|
||||
@implementation QXCornRecordCell
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
static NSString *cellId = @"QXCornRecordCell";
|
||||
QXCornRecordCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
-(void)setIsCoin:(BOOL)isCoin{
|
||||
_isCoin = isCoin;
|
||||
}
|
||||
-(void)setModel:(QXCoinDetailModel *)model{
|
||||
_model = model;
|
||||
self.reasonLabel.text = model.remarks;
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:model.createtime.longLongValue]; //此处根据项目需求,选择是否除以1000 , 如果时间戳精确到秒则去掉1000
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
|
||||
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
|
||||
NSString*time = [formatter stringFromDate:date];
|
||||
self.timeLabel.text = time;
|
||||
if (self.isCoin) {
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.change_value.doubleValue];
|
||||
}else{
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.4f",model.change_value.doubleValue];
|
||||
}
|
||||
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
77
QXLive/Mine(音域)/View/钱包/QXCornRecordCell.xib
Normal file
77
QXLive/Mine(音域)/View/钱包/QXCornRecordCell.xib
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="85" id="KGk-i7-Jjw" customClass="QXCornRecordCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="85"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="85"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="每日签到" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Ov-rS-XTy">
|
||||
<rect key="frame" x="16" y="12" width="242" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="M6b-EW-qW0"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2024.12.14 11:22:55" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fEd-EE-hdG">
|
||||
<rect key="frame" x="16" y="56" width="357" height="15"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_recharge_corn" translatesAutoresizingMaskIntoConstraints="NO" id="otM-9U-0Vb">
|
||||
<rect key="frame" x="361" y="14.666666666666664" width="16" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="16" id="TBo-Q1-4cA"/>
|
||||
<constraint firstAttribute="height" constant="16" id="XDZ-Mi-dJN"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+99999" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fxs-N2-aqw">
|
||||
<rect key="frame" x="278" y="12.666666666666664" width="80" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="80" id="wGg-jd-N7q"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="1" green="0.15294116735458374" blue="0.15294116735458374" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="otM-9U-0Vb" secondAttribute="trailing" constant="16" id="1Jo-bc-EXX"/>
|
||||
<constraint firstItem="9Ov-rS-XTy" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="12" id="4J4-MP-MMr"/>
|
||||
<constraint firstItem="9Ov-rS-XTy" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="7Wh-Dd-Lsz"/>
|
||||
<constraint firstItem="otM-9U-0Vb" firstAttribute="leading" secondItem="Fxs-N2-aqw" secondAttribute="trailing" constant="3" id="JOW-D1-VCO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fEd-EE-hdG" secondAttribute="bottom" constant="14" id="R8J-ww-6pD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fEd-EE-hdG" secondAttribute="trailing" constant="20" id="g4d-4v-ibb"/>
|
||||
<constraint firstItem="Fxs-N2-aqw" firstAttribute="leading" secondItem="9Ov-rS-XTy" secondAttribute="trailing" constant="20" id="kVM-pQ-Cml"/>
|
||||
<constraint firstItem="fEd-EE-hdG" firstAttribute="leading" secondItem="9Ov-rS-XTy" secondAttribute="leading" id="mlg-f5-ftM"/>
|
||||
<constraint firstItem="Fxs-N2-aqw" firstAttribute="centerY" secondItem="9Ov-rS-XTy" secondAttribute="centerY" id="ubr-E6-gOU"/>
|
||||
<constraint firstItem="otM-9U-0Vb" firstAttribute="centerY" secondItem="9Ov-rS-XTy" secondAttribute="centerY" id="wqd-tc-4FI"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="priceLabel" destination="Fxs-N2-aqw" id="rfF-fe-gWN"/>
|
||||
<outlet property="reasonLabel" destination="9Ov-rS-XTy" id="JXd-OS-yeh"/>
|
||||
<outlet property="timeLabel" destination="fEd-EE-hdG" id="4VS-rn-KzE"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="194.6564885496183" y="13.028169014084508"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="mine_recharge_corn" width="20" height="20"/>
|
||||
</resources>
|
||||
</document>
|
||||
16
QXLive/Mine(音域)/View/钱包/QXReVerificationPopView.h
Normal file
16
QXLive/Mine(音域)/View/钱包/QXReVerificationPopView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QXReVerificationPopView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/27.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXReVerificationPopView : UIView
|
||||
@property (nonatomic,copy)void(^commitBlock)(NSString*code);
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
113
QXLive/Mine(音域)/View/钱包/QXReVerificationPopView.m
Normal file
113
QXLive/Mine(音域)/View/钱包/QXReVerificationPopView.m
Normal file
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// QXReVerificationPopView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/27.
|
||||
//
|
||||
|
||||
#import "QXReVerificationPopView.h"
|
||||
#import "QXLoginTextField.h"
|
||||
#import "QXLoginNetwork.h"
|
||||
@interface QXReVerificationPopView()<QXLoginTextFieldDelegate>
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@property (nonatomic,strong)QXLoginTextField *codeTextField;
|
||||
@property (nonatomic,strong)UIButton *closeBtn;
|
||||
@property (nonatomic,strong)UIButton *commitBtn;
|
||||
@end
|
||||
@implementation QXReVerificationPopView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.backgroundColor = [UIColor whiteColor];
|
||||
[self addRoundedCornersWithRadius:16];
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
self.titleLabel.textColor = QXConfig.textColor;
|
||||
self.titleLabel.text = QXText(@"二次验证");
|
||||
[self addSubview:self.titleLabel];
|
||||
|
||||
self.codeTextField = [[QXLoginTextField alloc] init];
|
||||
self.codeTextField.delegate = self;
|
||||
self.codeTextField.type = LoginTextTypeCode;
|
||||
self.codeTextField.backgroundColor = RGB16(0xEFF2F8);
|
||||
[self.codeTextField addRoundedCornersWithRadius:10];
|
||||
[self addSubview:self.codeTextField];
|
||||
|
||||
self.closeBtn = [[UIButton alloc] init];
|
||||
[self.closeBtn addTarget:self action:@selector(closeAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.closeBtn setImage:[UIImage imageNamed:@"wallet_close"] forState:(UIControlStateNormal)];
|
||||
[self addSubview:self.closeBtn];
|
||||
|
||||
self.commitBtn = [[UIButton alloc] init];
|
||||
[self.commitBtn setTitle:QXText(@"确定") forState:(UIControlStateNormal)];
|
||||
self.commitBtn.titleLabel.font = [UIFont systemFontOfSize:14];;
|
||||
[self.commitBtn addRoundedCornersWithRadius:21];
|
||||
self.commitBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.commitBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
|
||||
[self.commitBtn addTarget:self action:@selector(commitAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.commitBtn];
|
||||
[self.commitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(38);
|
||||
make.right.mas_equalTo(-38);
|
||||
make.height.mas_equalTo(42);
|
||||
make.bottom.mas_equalTo(-16);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self);
|
||||
make.top.mas_equalTo(12);
|
||||
make.height.mas_equalTo(24);
|
||||
}];
|
||||
|
||||
[self.codeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(10);
|
||||
make.right.mas_equalTo(-10);
|
||||
make.bottom.equalTo(self.commitBtn.mas_top).offset(-30);
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.right.equalTo(self);
|
||||
make.size.mas_equalTo(CGSizeMake(45, 45));
|
||||
}];
|
||||
}
|
||||
-(void)closeAction{
|
||||
[[QXGlobal shareGlobal] hideViewBlock:^{
|
||||
|
||||
}];
|
||||
}
|
||||
-(void)commitAction{
|
||||
if (self.commitBlock) {
|
||||
self.commitBlock(self.codeTextField.textField.text);
|
||||
}
|
||||
}
|
||||
|
||||
-(void)didClickSendCode:(UIButton *)sender{
|
||||
NSString*mobile = [QXGlobal shareGlobal].loginModel.mobile;
|
||||
if (mobile.length == 0) {
|
||||
showToast(@"请先绑定手机号");
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
[QXLoginNetwork getSmscodeWithMobile:[QXGlobal shareGlobal].loginModel.mobile type:GetSmscodeTypeWithDraw successBlock:^(id _Nonnull responseObject) {
|
||||
[weakSelf.codeTextField startTimeDown];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
@end
|
||||
21
QXLive/Mine(音域)/View/钱包/QXWalletDateView.h
Normal file
21
QXLive/Mine(音域)/View/钱包/QXWalletDateView.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// QXWalletDateView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/27.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXWalletDateViewDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
-(void)didSelectedStartDate:(NSString*)startDateString startDate:(NSDate*)startDate endDateString:(NSString*)endDateString endDate:(NSDate*)endDate;
|
||||
|
||||
@end
|
||||
@interface QXWalletDateView : UIView
|
||||
@property (nonatomic,weak)id<QXWalletDateViewDelegate>delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
89
QXLive/Mine(音域)/View/钱包/QXWalletDateView.m
Normal file
89
QXLive/Mine(音域)/View/钱包/QXWalletDateView.m
Normal file
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// QXWalletDateView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/27.
|
||||
//
|
||||
|
||||
#import "QXWalletDateView.h"
|
||||
#import "QXRoomDetailHeaderView.h"
|
||||
@interface QXWalletDateView()
|
||||
@property (nonatomic,strong)UILabel *startLabel;
|
||||
@property (nonatomic,strong)UIImageView *leadToImageView;
|
||||
@property (nonatomic,strong)UILabel *endLabel;
|
||||
@property (nonatomic,strong)UIImageView *dateImageView;
|
||||
@property (nonatomic,strong)QXDatePickerView *pickerView;
|
||||
@end
|
||||
@implementation QXWalletDateView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.backgroundColor = RGB16(0xF8F8F8);
|
||||
[self addRoundedCornersWithRadius:5];
|
||||
self.leadToImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"corn_date_lead_to"]];
|
||||
[self addSubview:self.leadToImageView];
|
||||
[self.leadToImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self).offset(-14);
|
||||
make.size.mas_equalTo(CGSizeMake(14, 14));
|
||||
make.centerY.equalTo(self);
|
||||
}];
|
||||
|
||||
self.dateImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"corn_date"]];
|
||||
[self addSubview:self.dateImageView];
|
||||
[self.dateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(self);
|
||||
make.size.mas_equalTo(CGSizeMake(14, 14));
|
||||
make.right.mas_equalTo(-12);
|
||||
}];
|
||||
|
||||
self.startLabel = [[UILabel alloc] init];
|
||||
self.startLabel.text = QXText(@"开始时间");
|
||||
self.startLabel.font = [UIFont systemFontOfSize:13];
|
||||
self.startLabel.textColor = RGB16(0xa6a6a6);
|
||||
[self addSubview:self.startLabel];
|
||||
[self.startLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(12);
|
||||
make.centerY.equalTo(self);
|
||||
make.right.equalTo(self.leadToImageView.mas_left).offset(-5);
|
||||
}];
|
||||
|
||||
self.endLabel = [[UILabel alloc] init];
|
||||
self.endLabel.text = QXText(@"结束时间");
|
||||
self.endLabel.font = [UIFont systemFontOfSize:13];
|
||||
self.endLabel.textColor = RGB16(0xa6a6a6);
|
||||
[self addSubview:self.endLabel];
|
||||
[self.endLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.leadToImageView.mas_right).offset(12);
|
||||
make.centerY.equalTo(self);
|
||||
make.right.equalTo(self.dateImageView.mas_left).offset(-5);
|
||||
}];
|
||||
MJWeakSelf
|
||||
[self addTapBlock:^(id _Nonnull obj) {
|
||||
[weakSelf.pickerView show];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
-(QXDatePickerView *)pickerView{
|
||||
if (!_pickerView) {
|
||||
_pickerView = [[QXDatePickerView alloc] init];
|
||||
_pickerView.pickerMode = BRDatePickerModeYMDHMS;
|
||||
MJWeakSelf
|
||||
_pickerView.selectedDateBlock = ^(NSString * _Nonnull startTime, NSDate * _Nonnull startDate, NSString * _Nonnull endTime, NSDate * _Nonnull endDate) {
|
||||
weakSelf.startLabel.text = startTime;
|
||||
weakSelf.endLabel.text = endTime;
|
||||
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didSelectedStartDate:startDate:endDateString:endDate:)]) {
|
||||
[weakSelf.delegate didSelectedStartDate:startTime startDate:startDate endDateString:endTime endDate:endDate];
|
||||
}
|
||||
};
|
||||
}
|
||||
return _pickerView;
|
||||
}
|
||||
@end
|
||||
17
QXLive/Mine(音域)/View/钱包/QXWalletHomeCell.h
Normal file
17
QXLive/Mine(音域)/View/钱包/QXWalletHomeCell.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// QXWalletHomeCell.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXWalletHomeCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
31
QXLive/Mine(音域)/View/钱包/QXWalletHomeCell.m
Normal file
31
QXLive/Mine(音域)/View/钱包/QXWalletHomeCell.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// QXWalletHomeCell.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/16.
|
||||
//
|
||||
|
||||
#import "QXWalletHomeCell.h"
|
||||
|
||||
@implementation QXWalletHomeCell
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
static NSString *cellId = @"QXWalletHomeCell";
|
||||
QXWalletHomeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
75
QXLive/Mine(音域)/View/钱包/QXWalletHomeCell.xib
Normal file
75
QXLive/Mine(音域)/View/钱包/QXWalletHomeCell.xib
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="119" id="KGk-i7-Jjw" customClass="QXWalletHomeCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="119"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="119"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2Jr-Iv-ZVP">
|
||||
<rect key="frame" x="16" y="6" width="445" height="107"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GRE-zM-0ma">
|
||||
<rect key="frame" x="12" y="45" width="35.333333333333336" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrowRight" translatesAutoresizingMaskIntoConstraints="NO" id="c2a-Jb-s2X">
|
||||
<rect key="frame" x="405" y="41.666666666666664" width="24" height="23.999999999999993"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="Npj-rj-nqt"/>
|
||||
<constraint firstAttribute="height" constant="24" id="QVY-OL-9UH"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="GRE-zM-0ma" firstAttribute="leading" secondItem="2Jr-Iv-ZVP" secondAttribute="leading" constant="12" id="4IG-QW-dUi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="c2a-Jb-s2X" secondAttribute="trailing" constant="16" id="kro-Nn-63X"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="7"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="2Jr-Iv-ZVP" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="6" id="2v9-ZJ-EMj"/>
|
||||
<constraint firstItem="2Jr-Iv-ZVP" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="IiU-gz-TfH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2Jr-Iv-ZVP" secondAttribute="bottom" constant="6" id="MBW-fP-cW2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2Jr-Iv-ZVP" secondAttribute="trailing" constant="16" id="gCm-6H-6E9"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<constraints>
|
||||
<constraint firstItem="GRE-zM-0ma" firstAttribute="centerY" secondItem="aW0-zy-SZf" secondAttribute="centerY" id="gGc-sV-aWf"/>
|
||||
<constraint firstItem="c2a-Jb-s2X" firstAttribute="centerY" secondItem="aW0-zy-SZf" secondAttribute="centerY" id="v8x-7j-nsd"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="titleLabel" destination="GRE-zM-0ma" id="Jpd-7Z-kMy"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="258.77862595419845" y="46.126760563380287"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="arrowRight" width="16" height="16"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
32
QXLive/Mine(音域)/View/钱包/QXWalletHomeTopView.h
Normal file
32
QXLive/Mine(音域)/View/钱包/QXWalletHomeTopView.h
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// QXWalletHomeTopView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXWalletHomeTopViewDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
-(void)didClickButtonIsRecharge:(BOOL)isRecharge;
|
||||
|
||||
@end
|
||||
|
||||
@interface QXWalletHomeTopView : UIView
|
||||
@property (nonatomic,weak)id <QXWalletHomeTopViewDelegate> delegate;
|
||||
@property (nonatomic,strong)NSString*coin;
|
||||
@property (nonatomic,strong)NSString*earnings;
|
||||
@end
|
||||
|
||||
@interface QXWalletHomeTopSubview : UIView
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@property (nonatomic,strong)UILabel *priceLabel;
|
||||
@property (nonatomic,strong)UIButton *btn;
|
||||
@property (nonatomic,assign)BOOL isCorn;
|
||||
@property (nonatomic,weak)id <QXWalletHomeTopViewDelegate> delegate;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
124
QXLive/Mine(音域)/View/钱包/QXWalletHomeTopView.m
Normal file
124
QXLive/Mine(音域)/View/钱包/QXWalletHomeTopView.m
Normal file
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// QXWalletHomeTopView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/16.
|
||||
//
|
||||
|
||||
#import "QXWalletHomeTopView.h"
|
||||
@class QXWalletHomeTopSubview;
|
||||
@interface QXWalletHomeTopView()<QXWalletHomeTopViewDelegate>
|
||||
@property (nonatomic,strong)QXWalletHomeTopSubview *leftBgView;
|
||||
@property (nonatomic,strong)QXWalletHomeTopSubview *rightBgView;
|
||||
@end
|
||||
|
||||
@implementation QXWalletHomeTopView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.leftBgView = [[QXWalletHomeTopSubview alloc] init];
|
||||
self.leftBgView.isCorn = YES;
|
||||
self.leftBgView.delegate = self;
|
||||
self.leftBgView.btn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
|
||||
[self addSubview:self.leftBgView];
|
||||
[self.leftBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.width.mas_equalTo((SCREEN_WIDTH-16*2-11)/2);
|
||||
make.height.mas_equalTo(ScaleWidth(98));
|
||||
make.top.equalTo(self).offset(12);
|
||||
}];
|
||||
|
||||
self.rightBgView = [[QXWalletHomeTopSubview alloc] init];
|
||||
self.rightBgView.isCorn = NO;
|
||||
self.rightBgView.delegate = self;
|
||||
[self addSubview:self.rightBgView];
|
||||
[self.rightBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-16);
|
||||
make.width.mas_equalTo((SCREEN_WIDTH-16*2-11)/2);
|
||||
make.height.mas_equalTo(ScaleWidth(98));
|
||||
make.top.equalTo(self).offset(12);
|
||||
}];
|
||||
}
|
||||
-(void)setCoin:(NSString *)coin{
|
||||
self.leftBgView.priceLabel.text = coin;
|
||||
}
|
||||
- (void)setEarnings:(NSString *)earnings{
|
||||
_earnings = earnings;
|
||||
self.rightBgView.priceLabel.text = earnings;
|
||||
}
|
||||
-(void)didClickButtonIsRecharge:(BOOL)isRecharge{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickButtonIsRecharge:)]) {
|
||||
[self.delegate didClickButtonIsRecharge:isRecharge];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXWalletHomeTopSubview
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)setIsCorn:(BOOL)isCorn{
|
||||
_isCorn = isCorn;
|
||||
self.bgImageView.image = isCorn?[UIImage imageNamed:@"home_top_corn"]:[UIImage imageNamed:@"home_top_diamond"];
|
||||
self.titleLabel.text = isCorn?QXText(@"金币"):QXText(@"钻石");
|
||||
[self.btn setBackgroundImage:[UIImage imageNamed:isCorn?@"home_top_recharge":@"home_top_withdraw"] forState:(UIControlStateNormal)];
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"home_top_corn"]];
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.left.right.equalTo(self);
|
||||
}];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
self.titleLabel.textColor = RGB16(0x666666);
|
||||
[self addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(10);
|
||||
make.bottom.mas_equalTo(-11);
|
||||
make.size.mas_equalTo(CGSizeMake(50, 18));
|
||||
}];
|
||||
|
||||
self.priceLabel = [[UILabel alloc] init];
|
||||
self.priceLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
self.priceLabel.textColor = RGB16(0x333333);
|
||||
[self addSubview:self.priceLabel];
|
||||
[self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(10);
|
||||
make.bottom.equalTo(self.titleLabel.mas_top).offset(-4);
|
||||
make.height.mas_equalTo(24);
|
||||
make.right.mas_equalTo(-10);
|
||||
}];
|
||||
|
||||
self.btn = [[UIButton alloc] init];
|
||||
[self.btn addTarget:self action:@selector(btnClick:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.btn];
|
||||
[self.btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-10);
|
||||
make.centerY.equalTo(self.titleLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(74, 28));
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)btnClick:(UIButton*)button{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickButtonIsRecharge:)]) {
|
||||
[self.delegate didClickButtonIsRecharge:self.isCorn];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
25
QXLive/Mine(音域)/View/钱包/QXWalletTopView.h
Normal file
25
QXLive/Mine(音域)/View/钱包/QXWalletTopView.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// QXWalletTopView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
/// 充值
|
||||
QXWalletTopViewTypeRecharge = 0,
|
||||
/// 提现
|
||||
QXWalletTopViewTypeWithDraw,
|
||||
/// 钻石兑币
|
||||
QXWalletTopViewTypeDiamond
|
||||
}QXWalletTopViewType;
|
||||
@interface QXWalletTopView : UIView
|
||||
@property (nonatomic,assign)QXWalletTopViewType type;
|
||||
|
||||
@property (nonatomic,strong)NSString *coin;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
92
QXLive/Mine(音域)/View/钱包/QXWalletTopView.m
Normal file
92
QXLive/Mine(音域)/View/钱包/QXWalletTopView.m
Normal file
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// QXWalletTopView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/16.
|
||||
//
|
||||
|
||||
#import "QXWalletTopView.h"
|
||||
@interface QXWalletTopView()
|
||||
@property (nonatomic,strong)UIImageView *topBgImageView;
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@property (nonatomic,strong)UIImageView *cornImageView;
|
||||
@property (nonatomic,strong)UILabel *moneyLabel;
|
||||
@end
|
||||
@implementation QXWalletTopView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
self.topBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wallet_top_bg"]];
|
||||
[self addSubview:self.topBgImageView];
|
||||
[self.topBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.bottom.right.top.equalTo(self);
|
||||
}];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.text = QXText(@"金币余额");
|
||||
self.titleLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
self.titleLabel.textColor = RGB16(0xffffff);
|
||||
[self addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self).offset(16);
|
||||
make.top.equalTo(self).offset(22);
|
||||
make.height.mas_equalTo(24);
|
||||
}];
|
||||
|
||||
self.cornImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wallet_corn"]];
|
||||
[self addSubview:self.cornImageView];
|
||||
[self.cornImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.titleLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(28, 28));
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).offset(13);
|
||||
}];
|
||||
|
||||
self.moneyLabel = [[UILabel alloc] init];
|
||||
self.moneyLabel.font = [UIFont boldSystemFontOfSize:35];
|
||||
self.moneyLabel.textColor = QXConfig.textColor;
|
||||
[self addSubview:self.moneyLabel];
|
||||
[self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.cornImageView.mas_right).offset(4);
|
||||
make.centerY.equalTo(self.cornImageView);
|
||||
make.height.mas_equalTo(38);
|
||||
}];
|
||||
|
||||
}
|
||||
-(void)setType:(QXWalletTopViewType)type{
|
||||
_type = type ;
|
||||
switch (type) {
|
||||
case QXWalletTopViewTypeRecharge:{
|
||||
self.cornImageView.image = [UIImage imageNamed:@"wallet_corn"];
|
||||
self.topBgImageView.image = [UIImage imageNamed:@"wallet_top_bg"];
|
||||
self.titleLabel.text = QXText(@"金币余额");
|
||||
}
|
||||
break;
|
||||
case QXWalletTopViewTypeWithDraw:{
|
||||
self.topBgImageView.image = [UIImage imageNamed:@"wallet_top_bg1"];
|
||||
self.cornImageView.image = [UIImage imageNamed:@"wallet_diamond"];
|
||||
self.titleLabel.text = QXText(@"我的钻石");
|
||||
}
|
||||
break;
|
||||
case QXWalletTopViewTypeDiamond:{
|
||||
self.topBgImageView.image = [UIImage imageNamed:@"wallet_top_bg1"];
|
||||
self.cornImageView.image = [UIImage imageNamed:@"wallet_diamond"];
|
||||
self.titleLabel.text = QXText(@"钻石余额");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
-(void)setCoin:(NSString *)coin{
|
||||
_coin = coin;
|
||||
self.moneyLabel.text = coin;
|
||||
}
|
||||
@end
|
||||
33
QXLive/Mine(音域)/View/钱包/QXWithDrawInputView.h
Normal file
33
QXLive/Mine(音域)/View/钱包/QXWithDrawInputView.h
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// QXWithDrawInputView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/26.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
/// 提现
|
||||
QXWithDrawInputViewTypeWithDraw = 0,
|
||||
/// 钻石兑币
|
||||
QXWithDrawInputViewTypeExchangeCorn
|
||||
}QXWithDrawInputViewType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXWithDrawInputViewDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
-(void)didClickAll;
|
||||
|
||||
@end
|
||||
@interface QXWithDrawInputView : UIView
|
||||
@property (nonatomic,strong)UILabel *unitLabel;
|
||||
@property (nonatomic,strong)UIImageView *unitImageView;
|
||||
@property (nonatomic,strong)UITextField *textField;
|
||||
@property (nonatomic,strong)UIButton *allBtn;
|
||||
@property (nonatomic,strong)UIView *bottomLine;
|
||||
@property (nonatomic,assign)QXWithDrawInputViewType type;
|
||||
@property (nonatomic,weak)id<QXWithDrawInputViewDelegate>delegate;
|
||||
@property (nonatomic,strong)NSString *fee;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
166
QXLive/Mine(音域)/View/钱包/QXWithDrawInputView.m
Normal file
166
QXLive/Mine(音域)/View/钱包/QXWithDrawInputView.m
Normal file
@@ -0,0 +1,166 @@
|
||||
//
|
||||
// QXWithDrawInputView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/26.
|
||||
//
|
||||
|
||||
#import "QXWithDrawInputView.h"
|
||||
@interface QXWithDrawInputView()<UITextFieldDelegate>
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@property (nonatomic,strong)UILabel *feeLabel;
|
||||
@end
|
||||
@implementation QXWithDrawInputView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.text = QXText(@"提现金额");
|
||||
self.titleLabel.textColor = UIColor.blackColor;
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.top.mas_equalTo(12);
|
||||
make.height.mas_equalTo(18);
|
||||
}];
|
||||
|
||||
|
||||
self.unitLabel = [[UILabel alloc] init];
|
||||
self.unitLabel.text = @"¥";
|
||||
self.unitLabel.font = [UIFont boldSystemFontOfSize:18];
|
||||
self.unitLabel.textColor = RGB16(0x333333);
|
||||
[self addSubview:self.unitLabel];
|
||||
[self.unitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.titleLabel);
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).offset(12);
|
||||
make.height.mas_equalTo(27);
|
||||
make.width.mas_equalTo(25);
|
||||
}];
|
||||
|
||||
self.unitImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wallet_diamond"]];
|
||||
self.unitImageView.clipsToBounds = YES;
|
||||
[self addSubview:self.unitImageView];
|
||||
[self.unitImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.titleLabel);
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).offset(12);
|
||||
make.height.mas_equalTo(25);
|
||||
make.width.mas_equalTo(25);
|
||||
}];
|
||||
|
||||
|
||||
self.allBtn = [[UIButton alloc] init];
|
||||
self.allBtn.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[self.allBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
[self.allBtn setTitle:QXText(@"全部提现") forState:(UIControlStateNormal)];
|
||||
[self.allBtn addTarget:self action:@selector(allAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.allBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentTrailing;
|
||||
[self addSubview:self.allBtn];
|
||||
[self.allBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(self.unitLabel);
|
||||
make.right.mas_equalTo(-16);
|
||||
make.height.mas_equalTo(40);
|
||||
make.width.mas_equalTo(65);
|
||||
}];
|
||||
|
||||
|
||||
self.textField = [[UITextField alloc] init];
|
||||
self.textField.returnKeyType = UIReturnKeyDone;
|
||||
self.textField.delegate = self;
|
||||
self.textField.keyboardType = UIKeyboardTypeNumberPad;
|
||||
self.textField.font = [UIFont boldSystemFontOfSize:18];
|
||||
self.textField.textColor = RGB16(0x333333);
|
||||
self.textField.placeholder = QXText(@"请输入提现金额");
|
||||
[self addSubview:self.textField];
|
||||
[self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.unitLabel.mas_right).offset(3);
|
||||
make.centerY.equalTo(self.unitLabel);
|
||||
make.height.mas_equalTo(40);
|
||||
make.right.equalTo(self.allBtn.mas_left).offset(-5);
|
||||
}];
|
||||
|
||||
|
||||
self.bottomLine = [[UIView alloc] init];
|
||||
self.bottomLine.backgroundColor = RGB16(0x999999);
|
||||
[self addSubview:self.bottomLine];
|
||||
[self.bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.textField.mas_bottom);
|
||||
make.left.mas_offset(16);
|
||||
make.right.mas_offset(-16);
|
||||
make.height.mas_equalTo(0.5);
|
||||
}];
|
||||
|
||||
self.feeLabel = [[UILabel alloc] init];
|
||||
// self.feeLabel.text = [NSString stringWithFormat:@"%@:%@",QXText(@"提现手续服务费"),@"6%"];
|
||||
self.feeLabel.font = [UIFont systemFontOfSize:12];
|
||||
self.feeLabel.textColor = RGB16(0xff2727);
|
||||
[self addSubview:self.feeLabel];
|
||||
[self.feeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.top.equalTo(self.bottomLine.mas_bottom).offset(5);
|
||||
make.right.mas_equalTo(-16);
|
||||
make.height.mas_equalTo(18);
|
||||
}];
|
||||
}
|
||||
-(BOOL)textFieldShouldReturn:(UITextField *)textField{
|
||||
[textField resignFirstResponder];
|
||||
return YES;
|
||||
}
|
||||
-(void)setFee:(NSString *)fee{
|
||||
_fee = fee;
|
||||
switch (self.type) {
|
||||
case QXWithDrawInputViewTypeWithDraw:{
|
||||
self.feeLabel.text = [NSString stringWithFormat:@"%@:%@%%",QXText(@"提现手续服务费"),fee];
|
||||
}
|
||||
break;
|
||||
case QXWithDrawInputViewTypeExchangeCorn:{
|
||||
self.feeLabel.text = [NSString stringWithFormat:@"1钻石=%@个金币",fee];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
-(void)setType:(QXWithDrawInputViewType)type{
|
||||
_type = type;
|
||||
switch (type) {
|
||||
case QXWithDrawInputViewTypeWithDraw:{
|
||||
self.unitLabel.hidden = NO;
|
||||
self.unitImageView.hidden = YES;
|
||||
self.textField.placeholder = QXText(@"请输入提现金额");
|
||||
if (QXGlobal.shareGlobal.withdrawal_service_fee.length > 0 ) {
|
||||
self.feeLabel.text = [NSString stringWithFormat:@"%@:%@%%",QXText(@"提现手续服务费"),QXGlobal.shareGlobal.withdrawal_service_fee];
|
||||
}
|
||||
[self.allBtn setTitle:QXText(@"全部提现") forState:(UIControlStateNormal)];
|
||||
}
|
||||
break;
|
||||
case QXWithDrawInputViewTypeExchangeCorn:{
|
||||
self.unitLabel.hidden = YES;
|
||||
self.unitImageView.hidden = NO;
|
||||
self.titleLabel.text = QXText(@"兑换金额");
|
||||
self.textField.placeholder = QXText(@"请输入钻石数量");
|
||||
if (QXGlobal.shareGlobal.coin_exchange_rate.length > 0 ) {
|
||||
self.feeLabel.text = [NSString stringWithFormat:@"1钻石=%@个金币",QXGlobal.shareGlobal.coin_exchange_rate];
|
||||
}
|
||||
|
||||
[self.allBtn setTitle:QXText(@"全部兑换") forState:(UIControlStateNormal)];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
-(void)allAction{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickAll)]) {
|
||||
[self.delegate didClickAll];
|
||||
}
|
||||
}
|
||||
@end
|
||||
22
QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.h
Normal file
22
QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// QXWithDrawRecordCell.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/7/12.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXCoinDetailModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXWithDrawRecordCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
|
||||
|
||||
@property (nonatomic,strong)QXWithDrawRecordModel *model;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
39
QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.m
Normal file
39
QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.m
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// QXWithDrawRecordCell.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/7/12.
|
||||
//
|
||||
|
||||
#import "QXWithDrawRecordCell.h"
|
||||
|
||||
@implementation QXWithDrawRecordCell
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
static NSString *cellId = @"QXWithDrawRecordCell";
|
||||
QXWithDrawRecordCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
-(void)setModel:(QXWithDrawRecordModel *)model{
|
||||
_model = model;
|
||||
self.reasonLabel.text = model.name;
|
||||
self.timeLabel.text = model.createtime;
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.money.doubleValue];
|
||||
self.statusLabel.text = model.status_str;
|
||||
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
76
QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.xib
Normal file
76
QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.xib
Normal file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="85" id="kPI-qL-1ri" customClass="QXWithDrawRecordCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="85"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kPI-qL-1ri" id="s9T-6G-yHf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="85"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="每日签到" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qq3-Ya-VEA">
|
||||
<rect key="frame" x="16" y="12" width="261" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="d9x-Tj-Ikf"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2024.12.14 11:22:55" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FLY-c0-OJ2">
|
||||
<rect key="frame" x="16" y="56" width="121" height="15"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+99999" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sxs-13-Gyh">
|
||||
<rect key="frame" x="297" y="12.666666666666664" width="80" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="80" id="N1f-68-eYJ"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="1" green="0.15294116739999999" blue="0.15294116739999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已通过" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lsg-kQ-zEd">
|
||||
<rect key="frame" x="338" y="53" width="39" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="aMc-86-ajV"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Sxs-13-Gyh" firstAttribute="leading" secondItem="Qq3-Ya-VEA" secondAttribute="trailing" constant="20" id="2dI-1d-yuF"/>
|
||||
<constraint firstItem="Lsg-kQ-zEd" firstAttribute="centerY" secondItem="FLY-c0-OJ2" secondAttribute="centerY" id="McZ-JB-PsG"/>
|
||||
<constraint firstItem="Qq3-Ya-VEA" firstAttribute="leading" secondItem="s9T-6G-yHf" secondAttribute="leading" constant="16" id="ZFS-5U-e4a"/>
|
||||
<constraint firstItem="FLY-c0-OJ2" firstAttribute="leading" secondItem="Qq3-Ya-VEA" secondAttribute="leading" id="ZOu-oY-tHe"/>
|
||||
<constraint firstItem="Sxs-13-Gyh" firstAttribute="centerY" secondItem="Qq3-Ya-VEA" secondAttribute="centerY" id="caK-uz-2hM"/>
|
||||
<constraint firstItem="Qq3-Ya-VEA" firstAttribute="top" secondItem="s9T-6G-yHf" secondAttribute="top" constant="12" id="hqc-IX-QbO"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lsg-kQ-zEd" secondAttribute="trailing" constant="16" id="kIM-LF-NOI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Sxs-13-Gyh" secondAttribute="trailing" constant="16" id="oXX-2c-aJq"/>
|
||||
<constraint firstAttribute="bottom" secondItem="FLY-c0-OJ2" secondAttribute="bottom" constant="14" id="rDE-Cu-M0l"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="Izm-u8-2uc"/>
|
||||
<connections>
|
||||
<outlet property="priceLabel" destination="Sxs-13-Gyh" id="NdW-oN-sqm"/>
|
||||
<outlet property="reasonLabel" destination="Qq3-Ya-VEA" id="yaG-aO-KcX"/>
|
||||
<outlet property="statusLabel" destination="Lsg-kQ-zEd" id="buo-xV-o0N"/>
|
||||
<outlet property="timeLabel" destination="FLY-c0-OJ2" id="RFZ-hc-laN"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="194.6564885496183" y="13.028169014084508"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
17
QXLive/Mine(音域)/View/钱包/QXWithDrawTypeCell.h
Normal file
17
QXLive/Mine(音域)/View/钱包/QXWithDrawTypeCell.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// QXWithDrawTypeCell.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/26.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXPayTypeModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXWithDrawTypeCell : UITableViewCell
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@property (nonatomic,strong)QXPayTypeModel *model;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
68
QXLive/Mine(音域)/View/钱包/QXWithDrawTypeCell.m
Normal file
68
QXLive/Mine(音域)/View/钱包/QXWithDrawTypeCell.m
Normal file
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// QXWithDrawTypeCell.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/5/26.
|
||||
//
|
||||
|
||||
#import "QXWithDrawTypeCell.h"
|
||||
#import "QXRechargePayTypeView.h"
|
||||
|
||||
@interface QXWithDrawTypeCell()
|
||||
@property (nonatomic,strong)QXRechargePayTypeView *payTypeView;
|
||||
@end
|
||||
@implementation QXWithDrawTypeCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
static NSString *cellId = @"QXWithDrawTypeCell";
|
||||
QXWithDrawTypeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[QXWithDrawTypeCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:cellId];
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)setModel:(QXPayTypeModel *)model{
|
||||
_model = model;
|
||||
self.payTypeView.model = model;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.payTypeView = [[QXRechargePayTypeView alloc] init];
|
||||
[self.contentView addSubview:self.payTypeView];
|
||||
[self.payTypeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.right.mas_equalTo(-16);
|
||||
make.top.bottom.equalTo(self);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user