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
cce929f9
Commit
cce929f9
authored
May 27, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改590,581,579,578,574,573,572,571
parent
6cd32a28
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
42 deletions
+96
-42
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/AppDelegate.swift
GeliBusinessPlatform/AppDelegate.swift
+17
-11
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.swift
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.swift
+1
-0
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.xib
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.xib
+13
-4
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+3
-6
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+36
-9
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+26
-12
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
cce929f9
No preview for this file type
GeliBusinessPlatform/AppDelegate.swift
View file @
cce929f9
...
...
@@ -18,17 +18,17 @@
//
import
UIKit
//import RongIMKit
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
UNUserNotificationCenterDelegate
,
JPUSHRegisterDelegate
{
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
// Override point for customization after application launch.
setting_Jpush
(
application
:
application
,
launchOptions
:
launchOptions
)
return
true
}
...
...
@@ -74,27 +74,32 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
completionHandler
(
Int
(
UNAuthorizationOptions
.
alert
.
rawValue
))
// 需要执行这个方法,选择是否提醒用户,有Badge、Sound、Alert三种类型可以选择设置
}
//ios 10 以上接受数据
func
jpushNotificationCenter
(
_
center
:
UNUserNotificationCenter
!
,
didReceive
response
:
UNNotificationResponse
!
,
withCompletionHandler
completionHandler
:
(()
->
Void
)
!
)
{
let
userInfo
=
response
.
notification
.
request
.
content
.
userInfo
if
(
response
.
notification
.
request
.
trigger
?
.
isKind
(
of
:
UNPushNotificationTrigger
.
self
))
!
{
JPUSHService
.
handleRemoteNotification
(
userInfo
)
jpushLocationNotic
(
userInfo
:
userInfo
as
NSDictionary
)
}
completionHandler
()
}
func
jpushLocationNotic
(
userInfo
:
NSDictionary
)
{
}
//监测通知授权状态返回的结果
func
jpushNotificationAuthorization
(
_
status
:
JPAuthorizationStatus
,
withInfo
info
:
[
AnyHashable
:
Any
]
!
)
{
}
}
func
application
(
_
application
:
UIApplication
,
didFailToRegisterForRemoteNotificationsWithError
error
:
Error
)
{
//TODO: 注册失败后的结果, 可以在这里记录失败结果, 以后再伺机弹框给用户打开通知
}
}
// 注册deviceToken
func
application
(
_
application
:
UIApplication
,
didRegisterForRemoteNotificationsWithDeviceToken
deviceToken
:
Data
)
{
JPUSHService
.
registerDeviceToken
(
deviceToken
)
}
// 接受数据
func
application
(
_
application
:
UIApplication
,
didReceiveRemoteNotification
userInfo
:
[
AnyHashable
:
Any
],
fetchCompletionHandler
completionHandler
:
@escaping
(
UIBackgroundFetchResult
)
->
Void
)
{
...
...
@@ -110,6 +115,7 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
JPUSHService
.
handleRemoteNotification
(
userInfo
)
}
// 进入前台的时候,清空角标
func
applicationWillEnterForeground
(
_
application
:
UIApplication
)
{
UIApplication
.
shared
.
applicationIconBadgeNumber
=
0
...
...
@@ -134,8 +140,8 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
// var RY_App_Key = "3argexb63sxae"
// var RY_App_Key = "3argexb63sxae"
func
RCINMC
(){
// RCIM.shared()?.initWithAppKey(RY_App_Key)
//
...
...
@@ -150,7 +156,7 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
//didRegisterForRemoteNotificationsWithDeviceToken
//// RCIMClient.shared()?.setDeviceTokenData(deviceToken)
}
}
...
...
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.swift
View file @
cce929f9
...
...
@@ -14,6 +14,7 @@ import UIKit
class
TitleAndSwitchCell
:
UITableViewCell
{
var
delegate
:
TitleAndSwitchCellDelegate
?
@IBOutlet
weak
var
namelbl
:
UILabel
!
@IBOutlet
weak
var
contentLbl
:
UILabel
!
@IBOutlet
weak
var
infoSw
:
UISwitch
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
...
...
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.xib
View file @
cce929f9
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
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=
"1
5704
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<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"
/>
...
...
@@ -10,7 +10,7 @@
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"TitleAndSwitchCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"TitleAndSwitchCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"50"
/>
<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"
>
...
...
@@ -35,6 +35,12 @@
<rect
key=
"frame"
x=
"256"
y=
"9.5"
width=
"51"
height=
"31"
/>
<color
key=
"onTintColor"
name=
"蓝色字体颜色"
/>
</switch>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AM9-cN-zfh"
>
<rect
key=
"frame"
x=
"218"
y=
"17"
width=
"33"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"Bds-Lh-7Ha"
secondAttribute=
"bottom"
id=
"0PF-oT-n5E"
/>
...
...
@@ -43,11 +49,14 @@
<constraint
firstItem=
"FvZ-bw-uC0"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"Lm1-iE-0pD"
/>
<constraint
firstItem=
"fA1-yF-28i"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"Sbu-8k-mlN"
/>
<constraint
firstItem=
"Bds-Lh-7Ha"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"Ub8-Dc-vqs"
/>
<constraint
firstItem=
"AM9-cN-zfh"
firstAttribute=
"centerY"
secondItem=
"FvZ-bw-uC0"
secondAttribute=
"centerY"
id=
"d6a-oc-odY"
/>
<constraint
firstItem=
"FvZ-bw-uC0"
firstAttribute=
"leading"
secondItem=
"AM9-cN-zfh"
secondAttribute=
"trailing"
constant=
"5"
id=
"tuM-Mz-KDO"
/>
<constraint
firstItem=
"fA1-yF-28i"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"xkg-cs-Jt4"
/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"contentLbl"
destination=
"AM9-cN-zfh"
id=
"ulu-a7-AL9"
/>
<outlet
property=
"infoSw"
destination=
"FvZ-bw-uC0"
id=
"qJb-jc-KCl"
/>
<outlet
property=
"namelbl"
destination=
"fA1-yF-28i"
id=
"Jew-JX-3ML"
/>
</connections>
...
...
@@ -62,7 +71,7 @@
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27
799999713897705"
green=
"0.56099998950958252"
blue=
"0.889999985694885
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.89019607843137
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
cce929f9
...
...
@@ -332,10 +332,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
return
}
}
if
keyWord
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入关键字"
),
delay
:
1.2
)
return
}
if
wuLiuPrice
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入物流费用"
),
delay
:
1.2
)
return
...
...
@@ -746,7 +743,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
cell
.
tempLbl
.
text
=
"冷藏:-"
if
dict
.
wenDu
.
count
>
0
{
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
℃
"
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
"
}
cell
.
weightLbl
.
text
=
"重量(kg):- kg"
if
dict
.
weight
.
count
>
0
{
...
...
@@ -1293,7 +1290,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
vc
.
isOpenYSSetting
=
dataDict
.
isOpenYSSetting
vc
.
selectIdx
=
selectIdx
vc
.
itemDanWeiSelect
=
dataDict
.
itemDanWeiSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
!
vc
.
delegate
=
self
vc
.
DJBiLi
=
dataDict
.
DJBiLi
vc
.
ysKuCun
=
dataDict
.
ysKuCun
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
cce929f9
...
...
@@ -22,12 +22,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var
delegate
:
ProductDetailViewControllerDelegate
?
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
if
view
.
titleLbl
.
text
==
"请选择商品类型"
{
print
(
itemTypeArr
,
selectArr
)
itemTypeArr
=
selectArr
}
if
selectnum
!=
10086
{
if
view
.
titleLbl
.
text
==
"请选择国家"
{
print
(
itemTypeArr
,
selectArr
)
countrySelect
=
selectnum
}
if
view
.
titleLbl
.
text
==
"请选择运输方式"
{
...
...
@@ -43,7 +41,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
let
spxxArr
=
[
"商品名称"
,
"商品类型"
,
"商品分类"
,
"品牌"
,
"起卖数量"
,
"是否清真"
,
"是否询价"
]
var
tishixxArr
=
[
"请输入商品名称"
,
"
请选择商品类型
"
,
"请选择商品分类"
,
"请选择品牌"
,
"请输入起卖数量"
]
var
tishixxArr
=
[
"请输入商品名称"
,
"
普通
"
,
"请选择商品分类"
,
"请选择品牌"
,
"请输入起卖数量"
]
var
tishixxArr1
=
[
"请输入关键字"
,
"请输入物流费用"
,
"中国"
,
"请选择商品状态"
,
"请选择运输方式"
]
//国家默认值
let
sptpArr
=
[
"商品封面图(限一张)"
,
"商品主图(限五张)"
]
let
qtxxArr
=
[
"关键字"
,
"物流费用"
,
"国家"
,
"商品状态"
,
"运输方式"
]
...
...
@@ -66,7 +64,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var
maxFiveImgsArr
:
Array
<
String
>
=
[]
//多图
var
singleImgArr
:
Array
<
String
>
=
[]
//单张图
var
itemName
=
""
//商品名称
var
qiMaiShuLiang
=
""
//起卖数量
var
qiMaiShuLiang
=
"
1
"
//起卖数量
var
shiFouQZ
=
false
//是否清真
var
shiFouXJ
=
false
//是否询价
var
keyWord
=
""
//关键字
...
...
@@ -102,6 +100,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
return
}
if
qiMaiShuLiang
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入起卖数量"
),
delay
:
1.2
)
return
}
if
singleImgArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
...
...
@@ -334,12 +336,23 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSwitch"
)
as!
TitleAndSwitchCell
cell
.
namelbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
delegate
=
self
cell
.
contentLbl
.
isHidden
=
false
switch
cell
.
namelbl
.
text
{
case
"是否清真"
:
cell
.
infoSw
.
isOn
=
shiFouQZ
if
cell
.
infoSw
.
isOn
{
cell
.
contentLbl
.
text
=
"是清真"
}
else
{
cell
.
contentLbl
.
text
=
"非清真"
}
break
case
"是否询价"
:
cell
.
infoSw
.
isOn
=
shiFouXJ
if
cell
.
infoSw
.
isOn
{
cell
.
contentLbl
.
text
=
"是询价"
}
else
{
cell
.
contentLbl
.
text
=
"非询价"
}
break
default
:
break
...
...
@@ -391,7 +404,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
cell
.
tempLbl
.
text
=
"冷藏:-"
if
dict
.
wenDu
.
count
>
0
{
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
℃
"
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
"
}
cell
.
weightLbl
.
text
=
"重量(kg):- kg"
if
dict
.
weight
.
count
>
0
{
...
...
@@ -537,8 +550,12 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
view
.
delegate
=
self
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
if
itemTypeArr
?
.
count
==
0
{
for
_
in
view
.
dataArr
{
itemTypeArr
?
.
append
(
99
)
for
i
in
0
..<
view
.
dataArr
.
count
{
if
i
==
1
{
itemTypeArr
?
.
append
(
1
)
}
else
{
itemTypeArr
?
.
append
(
99
)
}
}
}
...
...
@@ -850,7 +867,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
else
{
isYuShouShangPin
=
false
}
print
(
"isYuShouShangPin == "
,
isYuShouShangPin
)
tishixxArr
.
insert
(
titles
.
componentsJoined
(
by
:
","
),
at
:
view
.
tag
)
tishixxArr
.
remove
(
at
:
view
.
tag
+
1
)
if
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
...
...
@@ -909,7 +926,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
vc
.
isOpenYSSetting
=
dataDict
.
isOpenYSSetting
vc
.
selectIdx
=
selectIdx
vc
.
itemDanWeiSelect
=
dataDict
.
itemDanWeiSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
!
vc
.
delegate
=
self
vc
.
DJBiLi
=
dataDict
.
DJBiLi
vc
.
ysKuCun
=
dataDict
.
ysKuCun
...
...
@@ -979,9 +996,19 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
switch
cell
.
namelbl
.
text
{
case
"是否清真"
:
shiFouQZ
=
content
.
isOn
if
shiFouQZ
{
cell
.
contentLbl
.
text
=
"是清真"
}
else
{
cell
.
contentLbl
.
text
=
"非清真"
}
break
case
"是否询价"
:
shiFouXJ
=
content
.
isOn
if
shiFouXJ
{
cell
.
contentLbl
.
text
=
"是询价"
}
else
{
cell
.
contentLbl
.
text
=
"非询价"
}
break
case
"用户付款是否需要审核"
:
shiFouSH
=
content
.
isOn
...
...
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
cce929f9
...
...
@@ -36,8 +36,8 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var
datasArr
:
Array
<
GuiGeModel
>
=
[]
var
dataModel
=
GuiGeModel
()
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量:"
,
"温藏:"
,
"单位:"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"
请选择商品温藏
"
,
"请选择商品单位"
]
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量
(kg)
:"
,
"温藏:"
,
"单位:"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"
常温
"
,
"请选择商品单位"
]
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
bottomBtn
:
LGButton
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
...
...
@@ -187,7 +187,6 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
dataModel
.
price
=
price
dataModel
.
guiGe
=
guiGe
dataModel
.
weight
=
weight
...
...
@@ -220,6 +219,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
//MARK: - TEXTFIELD DELEGATE
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
print
(
textField
.
tag
)
switch
textField
.
tag
{
case
0
:
if
isPurnNumber
(
str
:
textField
.
text
!
)
{
...
...
@@ -238,7 +238,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
else
{
HUD
.
flash
(
.
label
(
"请输入正确的重量"
),
delay
:
1.2
)
textField
.
text
=
""
price
=
textField
.
text
!
weight
=
textField
.
text
!
}
break
default
:
...
...
@@ -323,9 +323,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
nameLbl
.
text
=
titleArray
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
pliceHolderArr
[
indexPath
.
row
]
if
indexPath
.
row
==
3
{
if
tempSelect
!=
nil
{
cell
.
contentLbl
.
text
=
selectListArr
[
tempSelect
!
]
}
cell
.
contentLbl
.
text
=
selectListArr
[
tempSelect
]
}
if
indexPath
.
row
==
4
{
if
itemDanWeiSelect
!=
nil
{
...
...
@@ -442,6 +442,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
1
{
if
isYuShouSetting
==
false
{
return
0.001
}
if
isOpenYSSetting
{
return
184.5
}
...
...
@@ -493,8 +496,14 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
return
59
}
if
section
==
1
{
if
isYuShouSetting
==
false
{
return
0.001
}
}
return
10
}
return
0.01
}
//footer
...
...
@@ -517,6 +526,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
||
section
==
1
{
if
isYuShouSetting
==
false
{
return
0.001
}
}
if
section
==
2
{
if
isJieTiOpen
&&
selectYuShou
==
false
{
return
49
...
...
@@ -568,7 +582,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var
tempSelect
:
Int
?
var
tempSelect
:
Int
=
2
var
itemDanWeiSelect
:
Int
?
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
...
...
@@ -584,10 +598,10 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
tempSelect
=
i
}
}
if
tempSelect
!=
nil
{
view
.
selectNum
=
tempSelect
!
view
.
tempNum
=
view
.
selectNum
}
view
.
selectNum
=
tempSelect
view
.
tempNum
=
view
.
selectNum
self
.
view
.
addSubview
(
view
)
selectView
=
view
}
...
...
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