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

理-个人中心+仓库管理

parent ee6201d5
......@@ -54,14 +54,31 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
//MARK: -方法
@IBAction func editAction(_ sender: Any) {
print("编辑资料")
let vc = AccountViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
//MARK:--跳转消息中心
@IBAction func toMsgCenterAction(_ sender: Any) {
print("跳转消息中心")
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
//MARK: -Cell delegate方法
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath.row)
if indexPath.row == 0 {
//格利支付
let vc = PayViewController()
self.navigationController?.pushViewController(vc, animated: true)
}else if indexPath.row == 1 {
//蓝牙设置
let vc = BluetoothConnectViewController()
self.navigationController?.pushViewController(vc, animated: true)
}else if indexPath.row == 2{
//权限设置-弹窗
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 50*glscale
......
......@@ -123,7 +123,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath)
let vc = CheckWareHourseViewController()
self.navigationController?.pushViewController(vc, animated: false)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
......
......@@ -20,7 +20,7 @@ class ChangePassViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "账号信息"
navbar.title = "修改密码"
self.view.addSubview(navbar)
newPassTF.isSecureTextEntry = true
......
......@@ -90,13 +90,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
//MARK:--新增触发
@IBAction func addNewGoodsAction(_ sender: UIButton) {
print("新增触发-")
// let vc = DemoViewController()
// self.navigationController?.pushViewController(vc, animated: true)
//模拟退出登录
NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil)
// UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token")
UserDefaults.standard.removeObject(forKey: "user_token")
UserDefaults.standard.synchronize()
let vc = ProductDetailViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
//MARK:--下拉视图各种代理
func showAction(sender: Int) {
......
......@@ -100,6 +100,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
return cell
}
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
switch indexPath.section {
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -94,7 +94,7 @@
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="按钮渐变色下,字体颜色">
<color red="0.27450980392156865" green="0.5607843137254902" blue="0.88627450980392153" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -27,7 +27,6 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
make.bottom.equalTo(bottomView.snp_top)
}
tableView?.register(UINib(nibName: "BlueToothCell", bundle: nil), forCellReuseIdentifier: "BlueTooth")
tableView?.register(UINib(nibName: "TitleAndSwitchCell", bundle: nil), forCellReuseIdentifier: "TitleAndSwitchCell")
}
......@@ -41,6 +40,9 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0{
return 1
}
return 10
}
//header
......@@ -48,7 +50,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
switch section {
case 0:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear
view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "已连接设备"
lbl.font = UIFont.boldSystemFont(ofSize: 15)
......@@ -57,7 +59,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return view
default:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear
view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "未连接设备"
lbl.font = UIFont.boldSystemFont(ofSize: 15)
......@@ -74,7 +76,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
switch section {
case 0:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear
view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "选择已经连接的设备作为默认打印设备"
lbl.font = UIFont.boldSystemFont(ofSize: 11)
......@@ -83,7 +85,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return view
default:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear
view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "选择设备进行连接"
lbl.font = UIFont.boldSystemFont(ofSize: 11)
......@@ -97,12 +99,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
}
//cell
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndSwitchCell") as! TitleAndSwitchCell
cell.infoSw.transform = CGAffineTransform(scaleX: 0.8, y: 0.8)
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "BlueTooth") as! BlueToothCell
if indexPath.section != 0 {
cell.statusIcon.isHidden = true
......@@ -110,9 +107,6 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
return 94
}
return 49
}
......
......@@ -34,14 +34,23 @@ class AccountViewController: BaseViewController{
@IBAction func gotoDetailAction(_ sender: Any) {
print("进入商家详情")
let vc = ShopInfoViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
@IBAction func changPassAction(_ sender: Any) {
print("修改密码")
let vc = ChangePassViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
@IBAction func logOutAction(_ sender: Any) {
print("退出登录")
}
//模拟退出登录
UserDefaults.standard.removeObject(forKey: "user_token")
UserDefaults.standard.synchronize()
NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil)
}
}
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