Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
a641d996
Commit
a641d996
authored
Apr 28, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成修改密码接口对接并完善功能
parent
bd5c0063
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
21 deletions
+51
-21
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+4
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Other/HUD/PKHUD/HUDEXT.swift
GeliBusinessPlatform/Other/HUD/PKHUD/HUDEXT.swift
+13
-0
GeliBusinessPlatform/ViewController/修改密码/ChangePassViewController.swift
...atform/ViewController/修改密码/ChangePassViewController.swift
+32
-19
GeliBusinessPlatform/ViewController/登录/LoginViewController.swift
...inessPlatform/ViewController/登录/LoginViewController.swift
+1
-1
GeliBusinessPlatform/ViewController/账号信息/AccountViewController.swift
...sPlatform/ViewController/账号信息/AccountViewController.swift
+1
-1
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
a641d996
...
@@ -242,6 +242,7 @@
...
@@ -242,6 +242,7 @@
F969BF08244EC38000C79953
/* GoodsCollectionViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F969BF06244EC38000C79953
/* GoodsCollectionViewCell.xib */
;
};
F969BF08244EC38000C79953
/* GoodsCollectionViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F969BF06244EC38000C79953
/* GoodsCollectionViewCell.xib */
;
};
F969BF1E244EE67900C79953
/* GoodsManageListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F969BF1C244EE67900C79953
/* GoodsManageListVC.swift */
;
};
F969BF1E244EE67900C79953
/* GoodsManageListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F969BF1C244EE67900C79953
/* GoodsManageListVC.swift */
;
};
F969BF1F244EE67900C79953
/* GoodsManageListVC.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F969BF1D244EE67900C79953
/* GoodsManageListVC.xib */
;
};
F969BF1F244EE67900C79953
/* GoodsManageListVC.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F969BF1D244EE67900C79953
/* GoodsManageListVC.xib */
;
};
F9DDBE922457BFEC00A32CB2
/* HUDEXT.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
/* Begin PBXContainerItemProxy section */
...
@@ -531,6 +532,7 @@
...
@@ -531,6 +532,7 @@
F969BF06244EC38000C79953
/* GoodsCollectionViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GoodsCollectionViewCell.xib
;
sourceTree
=
"<group>"
;
};
F969BF06244EC38000C79953
/* GoodsCollectionViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GoodsCollectionViewCell.xib
;
sourceTree
=
"<group>"
;
};
F969BF1C244EE67900C79953
/* GoodsManageListVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GoodsManageListVC.swift
;
sourceTree
=
"<group>"
;
};
F969BF1C244EE67900C79953
/* GoodsManageListVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GoodsManageListVC.swift
;
sourceTree
=
"<group>"
;
};
F969BF1D244EE67900C79953
/* GoodsManageListVC.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GoodsManageListVC.xib
;
sourceTree
=
"<group>"
;
};
F969BF1D244EE67900C79953
/* GoodsManageListVC.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GoodsManageListVC.xib
;
sourceTree
=
"<group>"
;
};
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HUDEXT.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -1181,6 +1183,7 @@
...
@@ -1181,6 +1183,7 @@
F933F6AE2452C68B00189561
/* PKHUD */
=
{
F933F6AE2452C68B00189561
/* PKHUD */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
,
F933F6AF2452C68B00189561
/* PKHUDSystemActivityIndicatorView.swift */
,
F933F6AF2452C68B00189561
/* PKHUDSystemActivityIndicatorView.swift */
,
F933F6B02452C68B00189561
/* PKHUDAnimation.swift */
,
F933F6B02452C68B00189561
/* PKHUDAnimation.swift */
,
F933F6B12452C68B00189561
/* PKHUDAnimating.swift */
,
F933F6B12452C68B00189561
/* PKHUDAnimating.swift */
,
...
@@ -1768,6 +1771,7 @@
...
@@ -1768,6 +1771,7 @@
E042F734245274F200CDFA12
/* YunDanLieBiaoCell.swift in Sources */
,
E042F734245274F200CDFA12
/* YunDanLieBiaoCell.swift in Sources */
,
E01C26B62446AF3100ADCC70
/* DemoViewController.swift in Sources */
,
E01C26B62446AF3100ADCC70
/* DemoViewController.swift in Sources */
,
F933F6C32452C68B00189561
/* FrameView.swift in Sources */
,
F933F6C32452C68B00189561
/* FrameView.swift in Sources */
,
F9DDBE922457BFEC00A32CB2
/* HUDEXT.swift in Sources */
,
E0A7548A244A8F0F00A84B67
/* CheckWareHourseViewController.swift in Sources */
,
E0A7548A244A8F0F00A84B67
/* CheckWareHourseViewController.swift in Sources */
,
F9023F62244999F500DD5A63
/* WarehoseMangementCell.swift in Sources */
,
F9023F62244999F500DD5A63
/* WarehoseMangementCell.swift in Sources */
,
E0516F772448003D00E373CE
/* PayViewController.swift in Sources */
,
E0516F772448003D00E373CE
/* PayViewController.swift in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
a641d996
No preview for this file type
GeliBusinessPlatform/Other/HUD/PKHUD/HUDEXT.swift
0 → 100644
View file @
a641d996
//
// HUDEXT.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/4/28.
// Copyright © 2020 junye lu. All rights reserved.
//
import
Foundation
func
delay
(
_
delay
:
Double
,
closure
:
@escaping
()
->
Void
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
DispatchTime
.
now
()
+
Double
(
Int64
(
delay
*
Double
(
NSEC_PER_SEC
)))
/
Double
(
NSEC_PER_SEC
),
execute
:
closure
)
}
GeliBusinessPlatform/ViewController/修改密码/ChangePassViewController.swift
View file @
a641d996
...
@@ -10,14 +10,14 @@ import UIKit
...
@@ -10,14 +10,14 @@ import UIKit
import
LGButton
import
LGButton
class
ChangePassViewController
:
BaseViewController
{
class
ChangePassViewController
:
BaseViewController
{
@IBOutlet
weak
var
newPBtn
:
UIButton
!
@IBOutlet
weak
var
newPBtn
:
UIButton
!
@IBOutlet
weak
var
oldPBtn
:
UIButton
!
@IBOutlet
weak
var
oldPBtn
:
UIButton
!
@IBOutlet
weak
var
newPassTF
:
UITextField
!
@IBOutlet
weak
var
newPassTF
:
UITextField
!
@IBOutlet
weak
var
oldPassTF
:
UITextField
!
@IBOutlet
weak
var
oldPassTF
:
UITextField
!
@IBOutlet
weak
var
fisrtView
:
UIView
!
@IBOutlet
weak
var
fisrtView
:
UIView
!
@IBOutlet
weak
var
submitBtn
:
LGButton
!
@IBOutlet
weak
var
submitBtn
:
LGButton
!
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
navbar
.
title
=
"修改密码"
navbar
.
title
=
"修改密码"
...
@@ -25,7 +25,7 @@ class ChangePassViewController: BaseViewController {
...
@@ -25,7 +25,7 @@ class ChangePassViewController: BaseViewController {
newPassTF
.
isSecureTextEntry
=
true
newPassTF
.
isSecureTextEntry
=
true
oldPassTF
.
isSecureTextEntry
=
true
oldPassTF
.
isSecureTextEntry
=
true
newPassTF
.
addTarget
(
self
,
action
:
#selector(
tfChange(sender:)
)
,
for
:
.
editingChanged
)
newPassTF
.
addTarget
(
self
,
action
:
#selector(
tfChange(sender:)
)
,
for
:
.
editingChanged
)
oldPassTF
.
addTarget
(
self
,
action
:
#selector(
tfChange(sender:)
)
,
for
:
.
editingChanged
)
oldPassTF
.
addTarget
(
self
,
action
:
#selector(
tfChange(sender:)
)
,
for
:
.
editingChanged
)
...
@@ -37,7 +37,7 @@ class ChangePassViewController: BaseViewController {
...
@@ -37,7 +37,7 @@ class ChangePassViewController: BaseViewController {
})
})
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
}
}
//MARK: -方法
//MARK: -方法
@objc
func
tfChange
(
sender
:
UITextField
){
@objc
func
tfChange
(
sender
:
UITextField
){
if
oldPassTF
.
textColor
==
UIColor
(
named
:
"密码错误字体颜色"
)
{
if
oldPassTF
.
textColor
==
UIColor
(
named
:
"密码错误字体颜色"
)
{
oldPassTF
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
oldPassTF
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
...
@@ -48,19 +48,32 @@ class ChangePassViewController: BaseViewController {
...
@@ -48,19 +48,32 @@ class ChangePassViewController: BaseViewController {
submitBtn
.
alpha
=
0.45
submitBtn
.
alpha
=
0.45
}
}
}
}
@IBAction
func
newPassAction
(
_
sender
:
UIButton
)
{
@IBAction
func
newPassAction
(
_
sender
:
UIButton
)
{
newPBtn
.
isSelected
=
!
newPBtn
.
isSelected
newPBtn
.
isSelected
=
!
newPBtn
.
isSelected
newPassTF
.
isSecureTextEntry
=
!
newPBtn
.
isSelected
newPassTF
.
isSecureTextEntry
=
!
newPBtn
.
isSelected
}
}
@IBAction
func
oldPassAction
(
_
sender
:
UIButton
)
{
@IBAction
func
oldPassAction
(
_
sender
:
UIButton
)
{
oldPBtn
.
isSelected
=
!
oldPBtn
.
isSelected
oldPBtn
.
isSelected
=
!
oldPBtn
.
isSelected
oldPassTF
.
isSecureTextEntry
=
!
oldPBtn
.
isSelected
oldPassTF
.
isSecureTextEntry
=
!
oldPBtn
.
isSelected
}
}
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
changePwd
([
"user_token"
:
UserToken
as
Any
,
"pwd"
:
oldPassTF
.
text
as
Any
,
"new_pwd"
:
newPassTF
.
text
as
Any
],
success
:
{
(
data
)
in
}
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"修改成功"
),
delay
:
1.5
)
delay
(
1.5
)
{
HUD
.
flash
(
.
label
(
"请重新登录"
),
delay
:
1.5
)
delay
(
1.5
){
UserDefaults
.
standard
.
removeObject
(
forKey
:
"user_token"
)
NotificationCenter
.
default
.
post
(
name
:
Notification
.
Name
(
rawValue
:
"logout"
),
object
:
nil
)
}
}
})
{
(
error
)
in
}
}
}
}
GeliBusinessPlatform/ViewController/登录/LoginViewController.swift
View file @
a641d996
...
@@ -96,7 +96,7 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
...
@@ -96,7 +96,7 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
login
([
"user_name"
:
phoneTF
.
text
as
Any
,
"pwd"
:
passTF
.
text
as
Any
],
success
:
{
(
data
)
in
login
([
"user_name"
:
phoneTF
.
text
as
Any
,
"pwd"
:
passTF
.
text
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
LoginModel
let
dataM
=
data
as!
LoginModel
UserDefaults
.
standard
.
set
(
dataM
.
data
?
.
user_token
,
forKey
:
"user_token"
)
UserDefaults
.
standard
.
set
(
dataM
.
data
?
.
user_token
,
forKey
:
"user_token"
)
UserDefaults
.
standard
.
synchronize
()
//
UserDefaults.standard.synchronize()
self
.
loginBtn
.
isLoading
=
false
self
.
loginBtn
.
isLoading
=
false
self
.
delegate
?
.
successLogin
()
self
.
delegate
?
.
successLogin
()
})
{
(
error
)
in
})
{
(
error
)
in
...
...
GeliBusinessPlatform/ViewController/账号信息/AccountViewController.swift
View file @
a641d996
...
@@ -50,7 +50,7 @@ class AccountViewController: BaseViewController{
...
@@ -50,7 +50,7 @@ class AccountViewController: BaseViewController{
print
(
"退出登录"
)
print
(
"退出登录"
)
//模拟退出登录
//模拟退出登录
UserDefaults
.
standard
.
removeObject
(
forKey
:
"user_token"
)
UserDefaults
.
standard
.
removeObject
(
forKey
:
"user_token"
)
UserDefaults
.
standard
.
synchronize
()
//
UserDefaults.standard.synchronize()
NotificationCenter
.
default
.
post
(
name
:
Notification
.
Name
(
rawValue
:
"logout"
),
object
:
nil
)
NotificationCenter
.
default
.
post
(
name
:
Notification
.
Name
(
rawValue
:
"logout"
),
object
:
nil
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment