Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
SnailLoveSmile committed Nov 23, 2017
1 parent 0613b7d commit bf1c80f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extension RecommendViewController: UITableViewDataSource {
if array.count > 0 {
cell.model = array[indexPath.row]
}
//在这里校验 是否还能再继续加载避免再次发起请求
//在这里校验 是否还能再继续加载避免再次发起请求
if indexPath.row == category.users.count - 1 && category.canLoadMore{
recommendVM.getUserData(catagroy: recommendVM.categoryArray[row!], jsonDataBlock: {
self.userTableView.reloadData()
Expand Down
2 changes: 1 addition & 1 deletion BSBDJ/BSBDJ/我/View/VeticalSqureBtn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class VeticalSqureBtn: UIButton {
guard let name = content?.name, let icon = content?.icon, let url = URL(string: icon) else {
return
}
setTitleColor(UIColor.darkGray, for: .normal)
setTitleColor(UIColor.darkGray, for: .normal)
setBackgroundImage(UIImage.init(named: "mainCellBackground"), for: .normal)
addTarget(self, action: #selector(click(_:)), for: .touchUpInside)
setTitle(name, for: .normal)
Expand Down
4 changes: 2 additions & 2 deletions BSBDJ/BSBDJ/新帖/Model/ContentModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class ContentModel: NSObject {
name = dict["name"] as? String ?? ""
profile_image = dict["profile_image"] as? String ?? ""
create_time = dict["create_time"] as? String ?? ""
ding = Int((dict["ding"] as? NSString ?? "0").intValue)
cai = Int((dict["cai"] as? NSString ?? "0").intValue)
ding = Int((dict["ding"] as? NSString ?? "0").intValue)
cai = Int((dict["cai"] as? NSString ?? "0").intValue)
repost = dict["repost"] as? Int ?? 0
comment = Int((dict["comment"] as? NSString ?? "0").intValue)
width = CGFloat((dict["width"] as? NSString ?? "0").floatValue)
Expand Down
1 change: 0 additions & 1 deletion BSBDJ/BSBDJ/新帖/Model/UserModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class UserModel: NSObject {
var sex: String = ""
var profile_image: String = ""


init(dict: [String: Any]) {
username = dict["username"] as? String ?? ""
sex = dict["sex"] as? String ?? ""
Expand Down
6 changes: 3 additions & 3 deletions BSBDJ/BSBDJ/新帖/View/CommentCell.xib
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -88,7 +88,7 @@
<outlet property="sexView" destination="Qnt-RM-Sv3" id="aUw-se-GjM"/>
<outlet property="zaiCountLabel" destination="hQf-oq-5GU" id="XIL-8g-Ufu"/>
</connections>
<point key="canvasLocation" x="-420" y="-40"/>
<point key="canvasLocation" x="-223" y="-32"/>
</tableViewCell>
</objects>
<resources>
Expand Down
3 changes: 2 additions & 1 deletion BSBDJ/BSBDJ/精华/ViewModel/CommentViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class CommentViewModel: NSObject {
func loadData(contentID: String, boolFirstLoad: Bool, finishedBlock:@escaping ()->()){

if !canLoadMore {
finishedBlock()
return
}

Expand All @@ -32,7 +33,7 @@ class CommentViewModel: NSObject {
if boolFirstLoad {
parameter["hot"] = "1"
}else{
page += 1
page += 1
parameter["page"] = "\(page)"
parameter["lastcid"] = newComments.last?.ID ?? ""
}
Expand Down
2 changes: 1 addition & 1 deletion BSBDJ/BSBDJ/精华/ViewModel/EssenceNewViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class EssenceNewViewModel: NSObject {
}
var mmTime = ""
if let lastTime = dict["info"] as? [String: Any] {
mmTime = (lastTime["maxtime"] as? String) ?? ""
mmTime = (lastTime["maxtime"] as? String) ?? ""
}
var data = [ContentModel]()
for dic in datas {
Expand Down

0 comments on commit bf1c80f

Please sign in to comment.