Commit f8abf555 authored by 刘俊宏's avatar 刘俊宏

完成个人中心 下午好

parent 0e992714
......@@ -9,7 +9,7 @@
import UIKit
import Photos
import Alamofire
import SwiftDate
class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource {
@IBOutlet weak var shopNameLbl: UILabel!
......@@ -26,18 +26,33 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
adminInfo(["user_token":UserToken as Any], success: { (data) in
self.dataModel = (data as! AdminInfoModel)
self.iconImg.sd_setImage(with: URL(string: SERVERCE_ImageHost + (self.dataModel?.data?.shop_img)!), placeholderImage: UIImage.init(named: "个人设置头像"))
//
self.shopNameLbl.text = self.dataModel?.data?.stall_name
self.nameLbl.text = self.dataModel?.data?.admin_name
}) { (error) in
}
self.nameLbl.text = self.nowDateStr()
}
func nowDateStr() -> String {
let date = Date() + 8.hours
if date.compare(.isMorning) {
return "Hi~早上好!"
}else if date.compare(.isAfternoon) {
return "Hi~下午好!"
}else if date.compare(.isEvening) {
return "Hi~傍晚好!"
}else if date.compare(.isNight) {
return "Hi~深夜了!"
}
return ""
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if dataModel == nil {
loadData()
}
}
override func viewDidLoad() {
super.viewDidLoad()
topImgBg.snp.makeConstraints { (make) in
......
......@@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" 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="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
......@@ -69,7 +70,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="后台管_理app" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fgk-Rc-0oD">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fgk-Rc-0oD">
<rect key="frame" x="100" y="80" width="175" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="V7v-hK-fZO"/>
......@@ -79,7 +80,7 @@
<nil key="highlightedColor"/>
</label>
<view alpha="0.75" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L5q-yc-640">
<rect key="frame" x="95" y="105" width="80.5" height="17.5"/>
<rect key="frame" x="95" y="105" width="10" height="4"/>
<color key="backgroundColor" name="白色背景色"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
......@@ -87,8 +88,8 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="省冷一区49档" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1dW-Zl-K3m">
<rect key="frame" x="100" y="107" width="70.5" height="13.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1dW-Zl-K3m">
<rect key="frame" x="100" y="107" width="0.0" height="0.0"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="个人中心灰色字体"/>
......
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