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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
40 deletions
+94
-40
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
+35
-8
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+25
-11
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
...
@@ -74,14 +74,19 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
...
@@ -74,14 +74,19 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
completionHandler
(
Int
(
UNAuthorizationOptions
.
alert
.
rawValue
))
// 需要执行这个方法,选择是否提醒用户,有Badge、Sound、Alert三种类型可以选择设置
completionHandler
(
Int
(
UNAuthorizationOptions
.
alert
.
rawValue
))
// 需要执行这个方法,选择是否提醒用户,有Badge、Sound、Alert三种类型可以选择设置
}
}
//ios 10 以上接受数据
func
jpushNotificationCenter
(
_
center
:
UNUserNotificationCenter
!
,
didReceive
response
:
UNNotificationResponse
!
,
withCompletionHandler
completionHandler
:
(()
->
Void
)
!
)
{
func
jpushNotificationCenter
(
_
center
:
UNUserNotificationCenter
!
,
didReceive
response
:
UNNotificationResponse
!
,
withCompletionHandler
completionHandler
:
(()
->
Void
)
!
)
{
let
userInfo
=
response
.
notification
.
request
.
content
.
userInfo
let
userInfo
=
response
.
notification
.
request
.
content
.
userInfo
if
(
response
.
notification
.
request
.
trigger
?
.
isKind
(
of
:
UNPushNotificationTrigger
.
self
))
!
{
if
(
response
.
notification
.
request
.
trigger
?
.
isKind
(
of
:
UNPushNotificationTrigger
.
self
))
!
{
JPUSHService
.
handleRemoteNotification
(
userInfo
)
JPUSHService
.
handleRemoteNotification
(
userInfo
)
jpushLocationNotic
(
userInfo
:
userInfo
as
NSDictionary
)
}
}
completionHandler
()
completionHandler
()
}
}
func
jpushLocationNotic
(
userInfo
:
NSDictionary
)
{
}
//监测通知授权状态返回的结果
//监测通知授权状态返回的结果
func
jpushNotificationAuthorization
(
_
status
:
JPAuthorizationStatus
,
withInfo
info
:
[
AnyHashable
:
Any
]
!
)
{
func
jpushNotificationAuthorization
(
_
status
:
JPAuthorizationStatus
,
withInfo
info
:
[
AnyHashable
:
Any
]
!
)
{
}
}
...
@@ -110,6 +115,7 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
...
@@ -110,6 +115,7 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
JPUSHService
.
handleRemoteNotification
(
userInfo
)
JPUSHService
.
handleRemoteNotification
(
userInfo
)
}
}
// 进入前台的时候,清空角标
// 进入前台的时候,清空角标
func
applicationWillEnterForeground
(
_
application
:
UIApplication
)
{
func
applicationWillEnterForeground
(
_
application
:
UIApplication
)
{
UIApplication
.
shared
.
applicationIconBadgeNumber
=
0
UIApplication
.
shared
.
applicationIconBadgeNumber
=
0
...
@@ -134,7 +140,7 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
...
@@ -134,7 +140,7 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
// 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
(){
func
RCINMC
(){
// RCIM.shared()?.initWithAppKey(RY_App_Key)
// RCIM.shared()?.initWithAppKey(RY_App_Key)
...
...
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.swift
View file @
cce929f9
...
@@ -14,6 +14,7 @@ import UIKit
...
@@ -14,6 +14,7 @@ import UIKit
class
TitleAndSwitchCell
:
UITableViewCell
{
class
TitleAndSwitchCell
:
UITableViewCell
{
var
delegate
:
TitleAndSwitchCellDelegate
?
var
delegate
:
TitleAndSwitchCellDelegate
?
@IBOutlet
weak
var
namelbl
:
UILabel
!
@IBOutlet
weak
var
namelbl
:
UILabel
!
@IBOutlet
weak
var
contentLbl
:
UILabel
!
@IBOutlet
weak
var
infoSw
:
UISwitch
!
@IBOutlet
weak
var
infoSw
:
UISwitch
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
...
...
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.xib
View file @
cce929f9
<?xml version="1.0" encoding="UTF-8"?>
<?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"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<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=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<objects>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<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"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<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"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
...
@@ -35,6 +35,12 @@
...
@@ -35,6 +35,12 @@
<rect
key=
"frame"
x=
"256"
y=
"9.5"
width=
"51"
height=
"31"
/>
<rect
key=
"frame"
x=
"256"
y=
"9.5"
width=
"51"
height=
"31"
/>
<color
key=
"onTintColor"
name=
"蓝色字体颜色"
/>
<color
key=
"onTintColor"
name=
"蓝色字体颜色"
/>
</switch>
</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>
</subviews>
<constraints>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"Bds-Lh-7Ha"
secondAttribute=
"bottom"
id=
"0PF-oT-n5E"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Bds-Lh-7Ha"
secondAttribute=
"bottom"
id=
"0PF-oT-n5E"
/>
...
@@ -43,11 +49,14 @@
...
@@ -43,11 +49,14 @@
<constraint
firstItem=
"FvZ-bw-uC0"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"Lm1-iE-0pD"
/>
<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=
"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=
"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"
/>
<constraint
firstItem=
"fA1-yF-28i"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"xkg-cs-Jt4"
/>
</constraints>
</constraints>
</tableViewCellContentView>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<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=
"infoSw"
destination=
"FvZ-bw-uC0"
id=
"qJb-jc-KCl"
/>
<outlet
property=
"namelbl"
destination=
"fA1-yF-28i"
id=
"Jew-JX-3ML"
/>
<outlet
property=
"namelbl"
destination=
"fA1-yF-28i"
id=
"Jew-JX-3ML"
/>
</connections>
</connections>
...
@@ -62,7 +71,7 @@
...
@@ -62,7 +71,7 @@
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<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>
</namedColor>
</resources>
</resources>
</document>
</document>
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
cce929f9
...
@@ -332,10 +332,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -332,10 +332,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
return
return
}
}
}
}
if
keyWord
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入关键字"
),
delay
:
1.2
)
return
}
if
wuLiuPrice
.
count
==
0
{
if
wuLiuPrice
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入物流费用"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请输入物流费用"
),
delay
:
1.2
)
return
return
...
@@ -746,7 +743,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -746,7 +743,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
cell
.
tempLbl
.
text
=
"冷藏:-"
cell
.
tempLbl
.
text
=
"冷藏:-"
if
dict
.
wenDu
.
count
>
0
{
if
dict
.
wenDu
.
count
>
0
{
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
℃
"
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
"
}
}
cell
.
weightLbl
.
text
=
"重量(kg):- kg"
cell
.
weightLbl
.
text
=
"重量(kg):- kg"
if
dict
.
weight
.
count
>
0
{
if
dict
.
weight
.
count
>
0
{
...
@@ -1293,7 +1290,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1293,7 +1290,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
vc
.
isOpenYSSetting
=
dataDict
.
isOpenYSSetting
vc
.
isOpenYSSetting
=
dataDict
.
isOpenYSSetting
vc
.
selectIdx
=
selectIdx
vc
.
selectIdx
=
selectIdx
vc
.
itemDanWeiSelect
=
dataDict
.
itemDanWeiSelect
vc
.
itemDanWeiSelect
=
dataDict
.
itemDanWeiSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
!
vc
.
delegate
=
self
vc
.
delegate
=
self
vc
.
DJBiLi
=
dataDict
.
DJBiLi
vc
.
DJBiLi
=
dataDict
.
DJBiLi
vc
.
ysKuCun
=
dataDict
.
ysKuCun
vc
.
ysKuCun
=
dataDict
.
ysKuCun
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
cce929f9
...
@@ -22,12 +22,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -22,12 +22,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var
delegate
:
ProductDetailViewControllerDelegate
?
var
delegate
:
ProductDetailViewControllerDelegate
?
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
if
view
.
titleLbl
.
text
==
"请选择商品类型"
{
if
view
.
titleLbl
.
text
==
"请选择商品类型"
{
print
(
itemTypeArr
,
selectArr
)
itemTypeArr
=
selectArr
itemTypeArr
=
selectArr
}
}
if
selectnum
!=
10086
{
if
selectnum
!=
10086
{
if
view
.
titleLbl
.
text
==
"请选择国家"
{
if
view
.
titleLbl
.
text
==
"请选择国家"
{
print
(
itemTypeArr
,
selectArr
)
countrySelect
=
selectnum
countrySelect
=
selectnum
}
}
if
view
.
titleLbl
.
text
==
"请选择运输方式"
{
if
view
.
titleLbl
.
text
==
"请选择运输方式"
{
...
@@ -43,7 +41,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -43,7 +41,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
let
spxxArr
=
[
"商品名称"
,
"商品类型"
,
"商品分类"
,
"品牌"
,
"起卖数量"
,
"是否清真"
,
"是否询价"
]
let
spxxArr
=
[
"商品名称"
,
"商品类型"
,
"商品分类"
,
"品牌"
,
"起卖数量"
,
"是否清真"
,
"是否询价"
]
var
tishixxArr
=
[
"请输入商品名称"
,
"
请选择商品类型
"
,
"请选择商品分类"
,
"请选择品牌"
,
"请输入起卖数量"
]
var
tishixxArr
=
[
"请输入商品名称"
,
"
普通
"
,
"请选择商品分类"
,
"请选择品牌"
,
"请输入起卖数量"
]
var
tishixxArr1
=
[
"请输入关键字"
,
"请输入物流费用"
,
"中国"
,
"请选择商品状态"
,
"请选择运输方式"
]
//国家默认值
var
tishixxArr1
=
[
"请输入关键字"
,
"请输入物流费用"
,
"中国"
,
"请选择商品状态"
,
"请选择运输方式"
]
//国家默认值
let
sptpArr
=
[
"商品封面图(限一张)"
,
"商品主图(限五张)"
]
let
sptpArr
=
[
"商品封面图(限一张)"
,
"商品主图(限五张)"
]
let
qtxxArr
=
[
"关键字"
,
"物流费用"
,
"国家"
,
"商品状态"
,
"运输方式"
]
let
qtxxArr
=
[
"关键字"
,
"物流费用"
,
"国家"
,
"商品状态"
,
"运输方式"
]
...
@@ -66,7 +64,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -66,7 +64,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var
maxFiveImgsArr
:
Array
<
String
>
=
[]
//多图
var
maxFiveImgsArr
:
Array
<
String
>
=
[]
//多图
var
singleImgArr
:
Array
<
String
>
=
[]
//单张图
var
singleImgArr
:
Array
<
String
>
=
[]
//单张图
var
itemName
=
""
//商品名称
var
itemName
=
""
//商品名称
var
qiMaiShuLiang
=
""
//起卖数量
var
qiMaiShuLiang
=
"
1
"
//起卖数量
var
shiFouQZ
=
false
//是否清真
var
shiFouQZ
=
false
//是否清真
var
shiFouXJ
=
false
//是否询价
var
shiFouXJ
=
false
//是否询价
var
keyWord
=
""
//关键字
var
keyWord
=
""
//关键字
...
@@ -102,6 +100,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -102,6 +100,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
return
return
}
}
if
qiMaiShuLiang
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入起卖数量"
),
delay
:
1.2
)
return
}
if
singleImgArr
.
count
==
0
{
if
singleImgArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
...
@@ -334,12 +336,23 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -334,12 +336,23 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSwitch"
)
as!
TitleAndSwitchCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSwitch"
)
as!
TitleAndSwitchCell
cell
.
namelbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
namelbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
contentLbl
.
isHidden
=
false
switch
cell
.
namelbl
.
text
{
switch
cell
.
namelbl
.
text
{
case
"是否清真"
:
case
"是否清真"
:
cell
.
infoSw
.
isOn
=
shiFouQZ
cell
.
infoSw
.
isOn
=
shiFouQZ
if
cell
.
infoSw
.
isOn
{
cell
.
contentLbl
.
text
=
"是清真"
}
else
{
cell
.
contentLbl
.
text
=
"非清真"
}
break
break
case
"是否询价"
:
case
"是否询价"
:
cell
.
infoSw
.
isOn
=
shiFouXJ
cell
.
infoSw
.
isOn
=
shiFouXJ
if
cell
.
infoSw
.
isOn
{
cell
.
contentLbl
.
text
=
"是询价"
}
else
{
cell
.
contentLbl
.
text
=
"非询价"
}
break
break
default
:
default
:
break
break
...
@@ -391,7 +404,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -391,7 +404,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
cell
.
tempLbl
.
text
=
"冷藏:-"
cell
.
tempLbl
.
text
=
"冷藏:-"
if
dict
.
wenDu
.
count
>
0
{
if
dict
.
wenDu
.
count
>
0
{
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
℃
"
cell
.
tempLbl
.
text
=
"冷藏:
\(
dict
.
wenDu
)
"
}
}
cell
.
weightLbl
.
text
=
"重量(kg):- kg"
cell
.
weightLbl
.
text
=
"重量(kg):- kg"
if
dict
.
weight
.
count
>
0
{
if
dict
.
weight
.
count
>
0
{
...
@@ -537,10 +550,14 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -537,10 +550,14 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
view
.
delegate
=
self
view
.
delegate
=
self
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
if
itemTypeArr
?
.
count
==
0
{
if
itemTypeArr
?
.
count
==
0
{
for
_
in
view
.
dataArr
{
for
i
in
0
..<
view
.
dataArr
.
count
{
if
i
==
1
{
itemTypeArr
?
.
append
(
1
)
}
else
{
itemTypeArr
?
.
append
(
99
)
itemTypeArr
?
.
append
(
99
)
}
}
}
}
}
view
.
selectArray
=
itemTypeArr
view
.
selectArray
=
itemTypeArr
view
.
tempArr
=
itemTypeArr
view
.
tempArr
=
itemTypeArr
...
@@ -850,7 +867,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -850,7 +867,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
else
{
}
else
{
isYuShouShangPin
=
false
isYuShouShangPin
=
false
}
}
print
(
"isYuShouShangPin == "
,
isYuShouShangPin
)
tishixxArr
.
insert
(
titles
.
componentsJoined
(
by
:
","
),
at
:
view
.
tag
)
tishixxArr
.
insert
(
titles
.
componentsJoined
(
by
:
","
),
at
:
view
.
tag
)
tishixxArr
.
remove
(
at
:
view
.
tag
+
1
)
tishixxArr
.
remove
(
at
:
view
.
tag
+
1
)
if
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
if
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
...
@@ -909,7 +926,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -909,7 +926,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
vc
.
isOpenYSSetting
=
dataDict
.
isOpenYSSetting
vc
.
isOpenYSSetting
=
dataDict
.
isOpenYSSetting
vc
.
selectIdx
=
selectIdx
vc
.
selectIdx
=
selectIdx
vc
.
itemDanWeiSelect
=
dataDict
.
itemDanWeiSelect
vc
.
itemDanWeiSelect
=
dataDict
.
itemDanWeiSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
vc
.
tempSelect
=
dataDict
.
tempSelect
!
vc
.
delegate
=
self
vc
.
delegate
=
self
vc
.
DJBiLi
=
dataDict
.
DJBiLi
vc
.
DJBiLi
=
dataDict
.
DJBiLi
vc
.
ysKuCun
=
dataDict
.
ysKuCun
vc
.
ysKuCun
=
dataDict
.
ysKuCun
...
@@ -979,9 +996,19 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -979,9 +996,19 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
switch
cell
.
namelbl
.
text
{
switch
cell
.
namelbl
.
text
{
case
"是否清真"
:
case
"是否清真"
:
shiFouQZ
=
content
.
isOn
shiFouQZ
=
content
.
isOn
if
shiFouQZ
{
cell
.
contentLbl
.
text
=
"是清真"
}
else
{
cell
.
contentLbl
.
text
=
"非清真"
}
break
break
case
"是否询价"
:
case
"是否询价"
:
shiFouXJ
=
content
.
isOn
shiFouXJ
=
content
.
isOn
if
shiFouXJ
{
cell
.
contentLbl
.
text
=
"是询价"
}
else
{
cell
.
contentLbl
.
text
=
"非询价"
}
break
break
case
"用户付款是否需要审核"
:
case
"用户付款是否需要审核"
:
shiFouSH
=
content
.
isOn
shiFouSH
=
content
.
isOn
...
...
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
cce929f9
...
@@ -36,8 +36,8 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -36,8 +36,8 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var
datasArr
:
Array
<
GuiGeModel
>
=
[]
var
datasArr
:
Array
<
GuiGeModel
>
=
[]
var
dataModel
=
GuiGeModel
()
var
dataModel
=
GuiGeModel
()
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量:"
,
"温藏:"
,
"单位:"
]
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量
(kg)
:"
,
"温藏:"
,
"单位:"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"
请选择商品温藏
"
,
"请选择商品单位"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"
常温
"
,
"请选择商品单位"
]
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
bottomBtn
:
LGButton
!
@IBOutlet
weak
var
bottomBtn
:
LGButton
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
...
@@ -187,7 +187,6 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -187,7 +187,6 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
}
}
dataModel
.
price
=
price
dataModel
.
price
=
price
dataModel
.
guiGe
=
guiGe
dataModel
.
guiGe
=
guiGe
dataModel
.
weight
=
weight
dataModel
.
weight
=
weight
...
@@ -220,6 +219,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -220,6 +219,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
//MARK: - TEXTFIELD DELEGATE
//MARK: - TEXTFIELD DELEGATE
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
print
(
textField
.
tag
)
switch
textField
.
tag
{
switch
textField
.
tag
{
case
0
:
case
0
:
if
isPurnNumber
(
str
:
textField
.
text
!
)
{
if
isPurnNumber
(
str
:
textField
.
text
!
)
{
...
@@ -238,7 +238,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -238,7 +238,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
else
{
}
else
{
HUD
.
flash
(
.
label
(
"请输入正确的重量"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请输入正确的重量"
),
delay
:
1.2
)
textField
.
text
=
""
textField
.
text
=
""
price
=
textField
.
text
!
weight
=
textField
.
text
!
}
}
break
break
default
:
default
:
...
@@ -323,9 +323,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -323,9 +323,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
nameLbl
.
text
=
titleArray
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
titleArray
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
pliceHolderArr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
pliceHolderArr
[
indexPath
.
row
]
if
indexPath
.
row
==
3
{
if
indexPath
.
row
==
3
{
if
tempSelect
!=
nil
{
cell
.
contentLbl
.
text
=
selectListArr
[
tempSelect
!
]
cell
.
contentLbl
.
text
=
selectListArr
[
tempSelect
]
}
}
}
if
indexPath
.
row
==
4
{
if
indexPath
.
row
==
4
{
if
itemDanWeiSelect
!=
nil
{
if
itemDanWeiSelect
!=
nil
{
...
@@ -442,6 +442,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -442,6 +442,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
1
{
if
indexPath
.
section
==
1
{
if
isYuShouSetting
==
false
{
return
0.001
}
if
isOpenYSSetting
{
if
isOpenYSSetting
{
return
184.5
return
184.5
}
}
...
@@ -493,8 +496,14 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -493,8 +496,14 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
return
59
return
59
}
}
if
section
==
1
{
if
isYuShouSetting
==
false
{
return
0.001
}
}
return
10
return
10
}
}
return
0.01
return
0.01
}
}
//footer
//footer
...
@@ -517,6 +526,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -517,6 +526,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
return
view
return
view
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
||
section
==
1
{
if
isYuShouSetting
==
false
{
return
0.001
}
}
if
section
==
2
{
if
section
==
2
{
if
isJieTiOpen
&&
selectYuShou
==
false
{
if
isJieTiOpen
&&
selectYuShou
==
false
{
return
49
return
49
...
@@ -568,7 +582,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -568,7 +582,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var
tempSelect
:
Int
?
var
tempSelect
:
Int
=
2
var
itemDanWeiSelect
:
Int
?
var
itemDanWeiSelect
:
Int
?
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
...
@@ -584,10 +598,10 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -584,10 +598,10 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
tempSelect
=
i
tempSelect
=
i
}
}
}
}
if
tempSelect
!=
nil
{
view
.
selectNum
=
tempSelect
!
view
.
selectNum
=
tempSelect
view
.
tempNum
=
view
.
selectNum
view
.
tempNum
=
view
.
selectNum
}
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
selectView
=
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