Commit bd403b89 authored by zhangshuai's avatar zhangshuai

修改冲突

parent 8b05af81
This diff is collapsed.
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
#define GYPrefixHeader_pch #define GYPrefixHeader_pch
//测试 //测试
//#define ServerReport @"http://reporttest.zhangxinhulian.com" #define ServerReport @"http://reporttest.zhangxinhulian.com"
//#define ServerHost @"http://feedapitest2.zhangxinhulian.com" // 服务端接口地址 #define ServerHost @"http://feedapitest2.zhangxinhulian.com" // 服务端接口地址
//#define ServerAds @"http://bstest.zhangxinhulian.com/v4/ads" #define ServerAds @"http://bstest.zhangxinhulian.com/v4/ads"
////正式 ////正式
#define ServerReport @"http://report.clouddistribute.net" //#define ServerReport @"http://report.clouddistribute.net"
#define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址 //#define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址
#define ServerAds @"http://bs.clouddistribute.net/v4/ads" //#define ServerAds @"http://bs.clouddistribute.net/v4/ads"
#define WXAppId @"wxe7a03eb52cce1b51" #define WXAppId @"wxe7a03eb52cce1b51"
......
//
// WelfareCenterCell.h
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WelfareCenterCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END
//
// WelfareCenterCell.m
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import "WelfareCenterCell.h"
@implementation WelfareCenterCell
- (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
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<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="default" indentationWidth="10" rowHeight="126" id="KGk-i7-Jjw" customClass="WelfareCenterCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="126"/>
<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="320" height="126"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pr8-hQ-LpE">
<rect key="frame" x="0.0" y="0.0" width="320" height="126"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nDA-SS-B2Z">
<rect key="frame" x="10" y="0.0" width="300" height="114"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="红包赢不停" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Hi-6u-Z8f">
<rect key="frame" x="14" y="14" width="91" height="26"/>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
<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="浏览60秒领取奖励" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Go5-7x-zg8">
<rect key="frame" x="14" y="46" width="118" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59215686274509804" green="0.32941176470588235" blue="0.13725490196078433" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dyx-aR-S4p">
<rect key="frame" x="200" y="73" width="86" height="34"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="16"/>
<state key="normal" title="立即领取" backgroundImage="GetItNow">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hkj-qT-nh4">
<rect key="frame" x="223.5" y="53" width="39" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title=" +1" image="MissionDiamond">
<color key="titleColor" red="1" green="0.3529411764705882" blue="0.26666666666666666" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
</subviews>
<color key="backgroundColor" red="0.99607843137254903" green="0.9882352941176471" blue="0.88627450980392153" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="hkj-qT-nh4" firstAttribute="centerX" secondItem="dyx-aR-S4p" secondAttribute="centerX" id="8HW-1s-Wwg"/>
<constraint firstItem="Go5-7x-zg8" firstAttribute="leading" secondItem="1Hi-6u-Z8f" secondAttribute="leading" id="BQB-Lx-flj"/>
<constraint firstAttribute="bottom" secondItem="dyx-aR-S4p" secondAttribute="bottom" constant="7" id="Ghm-cq-BfQ"/>
<constraint firstItem="Go5-7x-zg8" firstAttribute="top" secondItem="1Hi-6u-Z8f" secondAttribute="bottom" constant="6" id="Nph-zt-FH0"/>
<constraint firstAttribute="trailing" secondItem="dyx-aR-S4p" secondAttribute="trailing" constant="14" id="RAT-h5-XPA"/>
<constraint firstItem="1Hi-6u-Z8f" firstAttribute="top" secondItem="nDA-SS-B2Z" secondAttribute="top" constant="14" id="ffd-c9-ZHj"/>
<constraint firstItem="dyx-aR-S4p" firstAttribute="top" secondItem="hkj-qT-nh4" secondAttribute="bottom" id="mf8-KH-zK4"/>
<constraint firstItem="1Hi-6u-Z8f" firstAttribute="leading" secondItem="nDA-SS-B2Z" secondAttribute="leading" constant="14" id="qLo-LC-ZZ0"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" red="0.96862745098039216" green="0.74117647058823533" blue="0.48627450980392156" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="nDA-SS-B2Z" firstAttribute="top" secondItem="pr8-hQ-LpE" secondAttribute="top" id="8fC-07-6l8"/>
<constraint firstAttribute="trailing" secondItem="nDA-SS-B2Z" secondAttribute="trailing" constant="10" id="HBU-ub-jyU"/>
<constraint firstItem="nDA-SS-B2Z" firstAttribute="leading" secondItem="pr8-hQ-LpE" secondAttribute="leading" constant="10" id="bZF-4f-w2W"/>
<constraint firstAttribute="bottom" secondItem="nDA-SS-B2Z" secondAttribute="bottom" constant="12" id="zmj-Lz-4EQ"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="pr8-hQ-LpE" secondAttribute="trailing" id="IfP-kb-S0R"/>
<constraint firstItem="pr8-hQ-LpE" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Ih7-S3-ByO"/>
<constraint firstAttribute="bottom" secondItem="pr8-hQ-LpE" secondAttribute="bottom" id="T5W-Hc-m07"/>
<constraint firstItem="pr8-hQ-LpE" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="tc0-qz-yHg"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<point key="canvasLocation" x="-343" y="69"/>
</tableViewCell>
</objects>
<resources>
<image name="GetItNow" width="86" height="34"/>
<image name="MissionDiamond" width="17" height="15"/>
</resources>
</document>
//
// WelfareCenterVC.h
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WelfareCenterVC : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// WelfareCenterVC.m
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import "WelfareCenterVC.h"
#import "WelfareCenterCell.h"
#define Identifier @"WelfareCenterCell"
@interface WelfareCenterVC ()
@property (nonatomic, strong) NSMutableArray * dataArray;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@end
@implementation WelfareCenterVC
- (void)dealloc{
[[NSNotificationCenter defaultCenter]removeObserver:self.tableView];
}
- (NSMutableArray * )dataArray{
if (_dataArray == nil) {
_dataArray = [[NSMutableArray alloc]init];
}
return _dataArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self loadData];
[self initTableView];
// Do any additional setup after loading the view from its nib.
}
- (void)initTableView{
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = UITableViewAutomaticDimension;
self.tableView.backgroundColor = UIColor.clearColor;//kColorFromHex(0xFAFAFA);
UINib * nib = [UINib nibWithNibName:Identifier bundle:nil];
[self.tableView registerNib:nib forCellReuseIdentifier:Identifier];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 1;
}
- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArray.count;
}
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
// ESMusicListData * data = [self.dataArray objectAtIndex:indexPath.row];
WelfareCenterCell * cell = [tableView dequeueReusableCellWithIdentifier:Identifier forIndexPath:indexPath];
// cell.cellType = self.cellType;
// cell.title.text = data.songName;
// cell.content.text = data.musicCategory;
//// [cell.musicImage setImageWithURL:[NSURL URLWithString:data.musicCover] placeholderImage:[UIImage imageNamed:@"home_top_bg"]];
// [cell.musicImage sd_setImageWithURL:[NSURL URLWithString:data.musicCover] placeholderImage:[UIImage imageNamed:@"home_top_bg"]];
//
// cell.isPlaying = [[MMusicManager shareManager]isPlayingWithModel:data listName:self.albumCategory];
// if (cell.isPlaying) {
// self.indexPath = indexPath;
// }
return cell;
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableView *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 0;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView*header = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 40)];
UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(20, 12, KScreenWidth, 20)];
label.text = @"Explore Meditation";
label.textColor = UIColor.whiteColor;
label.font = [UIFont fontWithName:PF_SC_M size:20];
[header addSubview:label];
return header;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView * sectionView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth,4 )];
return sectionView;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:NO];
[tableView reloadData];
}
- (void)loadData{
WEAKSELF;
[MBProgressHUD showLoading:@"loading"];
//请求进度
[[CGNetworkTools shared] getWithAction:task_process parameters:@{} success:^(id _Nonnull response) {
} failure:^(NSError * _Nonnull error) {
}];
// 请求列表
[[CGNetworkTools shared] getWithAction:taskListWithStat parameters:@{} success:^(id _Nonnull response) {
} failure:^(NSError * _Nonnull error) {
}];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<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" customClass="WelfareCenterVC">
<connections>
<outlet property="tableView" destination="cLQ-3z-U9W" id="lrz-YI-VgV"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cLQ-3z-U9W">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="-1" id="YN3-rf-K4G"/>
<outlet property="delegate" destination="-1" id="ifg-sF-Ftu"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="cLQ-3z-U9W" secondAttribute="trailing" id="028-KM-XZz"/>
<constraint firstItem="cLQ-3z-U9W" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="7pf-5Q-Gok"/>
<constraint firstAttribute="bottom" secondItem="cLQ-3z-U9W" secondAttribute="bottom" id="8VV-5W-bB8"/>
<constraint firstItem="cLQ-3z-U9W" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="kEn-qd-C6h"/>
</constraints>
<point key="canvasLocation" x="-146" y="69"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
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