Parcourir la source

代码提价;

Handy_Cao il y a 4 ans
Parent
commit
0433d8d9f9

+ 2 - 0
MTP_iOS/MTP2_iOS/Info.plist

@@ -16,6 +16,8 @@
 	<string>6.0</string>
 	<key>CFBundleName</key>
 	<string>$(PRODUCT_NAME)</string>
+	<key>UIUserInterfaceStyle</key>
+	<string>Light</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>

+ 4 - 4
MTP_iOS/MTP2_iOS/Resource/Storyboard/Home/Home.storyboard

@@ -13,7 +13,7 @@
         <!--Base Navigation Controller-->
         <scene sceneID="TgR-Fw-VwH">
             <objects>
-                <navigationController storyboardIdentifier="Home" navigationBarHidden="YES" id="WE7-qu-AR4" customClass="BaseNavigationController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
+                <navigationController storyboardIdentifier="Home" interfaceStyle="dark" navigationBarHidden="YES" id="WE7-qu-AR4" customClass="BaseNavigationController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <nil key="simulatedTopBarMetrics"/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="OYc-ho-eEG">
                         <autoresizingMask key="autoresizingMask"/>
@@ -33,7 +33,7 @@
         <!--首页-->
         <scene sceneID="unj-4I-ADf">
             <objects>
-                <viewController storyboardIdentifier="HomeID" title="首页" interfaceStyle="light" id="9T1-s3-NT8" customClass="HomeViewController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="HomeID" title="首页" interfaceStyle="dark" id="9T1-s3-NT8" customClass="HomeViewController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="Wqc-lq-i2v">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -103,7 +103,7 @@
                                                                 <subviews>
                                                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FIY-SG-GC1" customClass="SDCycleScrollView">
                                                                         <rect key="frame" x="0.0" y="0.0" width="394" height="220"/>
-                                                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                     </view>
                                                                 </subviews>
                                                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -288,7 +288,7 @@
                                                                         <nil key="highlightedColor"/>
                                                                     </label>
                                                                 </subviews>
-                                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                 <constraints>
                                                                     <constraint firstItem="qza-be-h4q" firstAttribute="leading" secondItem="wgU-vX-pvU" secondAttribute="leading" constant="12" id="48C-Lu-pl5"/>
                                                                     <constraint firstAttribute="height" constant="40" id="NEd-kx-KFN"/>

+ 4 - 18
MTP_iOS/MTP2_iOS/Resource/Storyboard/Main/Main.storyboard

@@ -12,7 +12,7 @@
         <!--登录-->
         <scene sceneID="GAk-AM-2ff">
             <objects>
-                <viewController storyboardIdentifier="Login" title="登录" id="ZMi-PD-FFG" customClass="LoginViewController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="Login" title="登录" interfaceStyle="dark" id="ZMi-PD-FFG" customClass="LoginViewController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="59b-pP-Edq">
                         <rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -160,7 +160,7 @@
                                                         </connections>
                                                     </switch>
                                                 </subviews>
-                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <constraints>
                                                     <constraint firstItem="7aR-Hs-a2O" firstAttribute="leading" secondItem="aeA-26-GGk" secondAttribute="leading" id="74O-2T-QIb"/>
                                                     <constraint firstItem="cgj-W5-7An" firstAttribute="centerY" secondItem="aeA-26-GGk" secondAttribute="centerY" constant="-5" id="AVJ-tK-xsw"/>
@@ -174,15 +174,8 @@
                                             <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kpw-6r-t75">
                                                 <rect key="frame" x="0.0" y="125" width="328" height="20"/>
                                                 <subviews>
-                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M08-Yy-Y6j">
-                                                        <rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
-                                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                                                        <constraints>
-                                                            <constraint firstAttribute="width" constant="20" id="q2Q-AQ-Fm6"/>
-                                                        </constraints>
-                                                    </view>
                                                     <button opaque="NO" tag="105" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RuS-no-Ddz">
-                                                        <rect key="frame" x="20" y="0.0" width="144" height="20"/>
+                                                        <rect key="frame" x="0.0" y="0.0" width="144" height="20"/>
                                                         <state key="normal" title="注册账号">
                                                             <color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                                                         </state>
@@ -191,7 +184,7 @@
                                                         </connections>
                                                     </button>
                                                     <button opaque="NO" tag="106" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2o8-U6-Ust">
-                                                        <rect key="frame" x="164" y="0.0" width="144" height="20"/>
+                                                        <rect key="frame" x="144" y="0.0" width="184" height="20"/>
                                                         <state key="normal" title="忘记密码?">
                                                             <color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                                                         </state>
@@ -199,13 +192,6 @@
                                                             <action selector="viewPassed:" destination="ZMi-PD-FFG" eventType="touchUpInside" id="oZr-Zv-xtG"/>
                                                         </connections>
                                                     </button>
-                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DRg-H4-zGr">
-                                                        <rect key="frame" x="308" y="0.0" width="20" height="20"/>
-                                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                                                        <constraints>
-                                                            <constraint firstAttribute="width" constant="20" id="okd-we-GJe"/>
-                                                        </constraints>
-                                                    </view>
                                                 </subviews>
                                                 <constraints>
                                                     <constraint firstItem="RuS-no-Ddz" firstAttribute="width" secondItem="kpw-6r-t75" secondAttribute="width" multiplier="0.5" constant="-20" id="S4P-Vg-P6F"/>

+ 3 - 3
MTP_iOS/MTP2_iOS/Resource/Storyboard/Message/Message.storyboard

@@ -12,7 +12,7 @@
         <!--消息-->
         <scene sceneID="zBv-4o-7kE">
             <objects>
-                <navigationController storyboardIdentifier="Message" title="消息" id="tMl-RU-w7z" customClass="BaseNavigationController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
+                <navigationController storyboardIdentifier="Message" title="消息" interfaceStyle="dark" id="tMl-RU-w7z" customClass="BaseNavigationController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Y9z-H7-adq">
                         <rect key="frame" x="0.0" y="44" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
@@ -105,7 +105,7 @@
                                         </userDefinedRuntimeAttributes>
                                     </label>
                                 </subviews>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                <color key="backgroundColor" red="0.96470588235294119" green="0.96470588235294119" blue="0.97254901960784312" alpha="1" colorSpace="calibratedRGB"/>
                                 <constraints>
                                     <constraint firstItem="WVD-eZ-FuR" firstAttribute="top" secondItem="NCy-9Z-Kim" secondAttribute="bottom" id="1Le-rF-MC2"/>
                                     <constraint firstAttribute="bottom" secondItem="WVD-eZ-FuR" secondAttribute="bottom" id="7pF-zT-gWu"/>
@@ -347,7 +347,7 @@
                             </stackView>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="kUG-eG-9jl"/>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
                             <constraint firstItem="djN-kw-0m8" firstAttribute="leading" secondItem="kUG-eG-9jl" secondAttribute="leading" constant="15" id="4qz-NH-TVm"/>
                             <constraint firstItem="djN-kw-0m8" firstAttribute="top" secondItem="kUG-eG-9jl" secondAttribute="top" constant="10" id="cQc-Gz-3Is"/>

+ 12 - 12
MTP_iOS/MTP2_iOS/Resource/Storyboard/Order/Order.storyboard

@@ -12,7 +12,7 @@
         <!--Base Navigation Controller-->
         <scene sceneID="dqw-PC-Muy">
             <objects>
-                <navigationController storyboardIdentifier="OrderNav" id="WGl-BJ-Qs3" customClass="BaseNavigationController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
+                <navigationController storyboardIdentifier="OrderNav" interfaceStyle="dark" id="WGl-BJ-Qs3" customClass="BaseNavigationController" customModule="LYB" customModuleProvider="target" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Ycf-xZ-5pn">
                         <rect key="frame" x="0.0" y="44" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
@@ -39,7 +39,7 @@
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TUp-9U-Hf6" customClass="JXSegmentedView" customModule="JXSegmentedView">
                                 <rect key="frame" x="0.0" y="88" width="414" height="44"/>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                <color key="backgroundColor" red="0.96470588235294119" green="0.96470588235294119" blue="0.97254901960784312" alpha="1" colorSpace="calibratedRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="44" id="AxJ-tO-O6C"/>
                                 </constraints>
@@ -167,7 +167,7 @@
                                                                     <subviews>
                                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QJO-o5-qA4">
                                                                             <rect key="frame" x="0.0" y="0.0" width="204" height="30"/>
-                                                                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                         </view>
                                                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VRE-m7-NNd" customClass="AnimatableButton" customModule="IBAnimatable">
                                                                             <rect key="frame" x="214" y="0.0" width="80" height="30"/>
@@ -223,7 +223,7 @@
                                                             </subviews>
                                                         </stackView>
                                                     </subviews>
-                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <constraints>
                                                         <constraint firstItem="BN7-Sz-mW2" firstAttribute="top" secondItem="RHl-Ey-reZ" secondAttribute="top" constant="10" id="Oxb-0W-wJ2"/>
                                                         <constraint firstAttribute="bottom" secondItem="BN7-Sz-mW2" secondAttribute="bottom" constant="10" id="fo5-GT-AMT"/>
@@ -289,7 +289,7 @@
                             </button>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="IVi-2F-Tzi"/>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
                             <constraint firstItem="4cd-gL-slQ" firstAttribute="leading" secondItem="IVi-2F-Tzi" secondAttribute="leading" id="88U-Ie-mdS"/>
                             <constraint firstItem="4cd-gL-slQ" firstAttribute="top" secondItem="TUp-9U-Hf6" secondAttribute="bottom" id="E8r-Jf-naV"/>
@@ -465,7 +465,7 @@
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hxP-JA-tA2" customClass="JXSegmentedView" customModule="JXSegmentedView">
                                 <rect key="frame" x="0.0" y="88" width="414" height="44"/>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                <color key="backgroundColor" red="0.96470588235294119" green="0.96470588235294119" blue="0.97254901960784312" alpha="1" colorSpace="calibratedRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="44" id="zZa-Rm-QW3"/>
                                 </constraints>
@@ -639,7 +639,7 @@
                                                             </constraints>
                                                         </stackView>
                                                     </subviews>
-                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <constraints>
                                                         <constraint firstAttribute="trailing" secondItem="uwH-WV-sGb" secondAttribute="trailing" constant="10" id="Ah0-VW-KH2"/>
                                                         <constraint firstItem="fpb-bX-k3q" firstAttribute="top" secondItem="uwH-WV-sGb" secondAttribute="bottom" constant="7.5" id="Fjz-84-PvL"/>
@@ -709,7 +709,7 @@
                             </button>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="oI3-Cu-0p4"/>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
                             <constraint firstItem="BsH-jA-14K" firstAttribute="top" secondItem="hxP-JA-tA2" secondAttribute="bottom" id="5yG-XT-ULo"/>
                             <constraint firstItem="hxP-JA-tA2" firstAttribute="top" secondItem="oI3-Cu-0p4" secondAttribute="top" id="6YR-k7-1n0"/>
@@ -856,7 +856,7 @@
                                                         </subviews>
                                                     </stackView>
                                                 </subviews>
-                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <constraints>
                                                     <constraint firstAttribute="bottom" secondItem="oDk-EE-NhA" secondAttribute="bottom" constant="20" id="lxG-LF-A4s"/>
                                                     <constraint firstAttribute="trailing" secondItem="oDk-EE-NhA" secondAttribute="trailing" constant="10" id="nBW-Mm-rlE"/>
@@ -938,7 +938,7 @@
                                                         </subviews>
                                                     </stackView>
                                                 </subviews>
-                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <constraints>
                                                     <constraint firstAttribute="trailing" secondItem="7VK-8d-Men" secondAttribute="trailing" constant="10" id="6yZ-9p-o06"/>
                                                     <constraint firstItem="7VK-8d-Men" firstAttribute="leading" secondItem="HSQ-0j-Tj0" secondAttribute="leading" constant="10" id="7ln-bH-WBm"/>
@@ -1017,7 +1017,7 @@
                                                         </subviews>
                                                     </stackView>
                                                 </subviews>
-                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <constraints>
                                                     <constraint firstAttribute="bottom" secondItem="q5h-nO-AYz" secondAttribute="bottom" constant="10" id="JXq-k4-6FN"/>
                                                     <constraint firstItem="q5h-nO-AYz" firstAttribute="leading" secondItem="AtL-oJ-W59" secondAttribute="leading" constant="10" id="JvY-Gd-iO6"/>
@@ -1072,7 +1072,7 @@
                             </button>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="Elz-mu-f05"/>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
                             <constraint firstItem="Wfk-mV-ctU" firstAttribute="top" secondItem="Elz-mu-f05" secondAttribute="top" id="4yq-bI-jhc"/>
                             <constraint firstItem="7gT-gw-Lfx" firstAttribute="bottom" secondItem="Elz-mu-f05" secondAttribute="bottom" id="DKc-g9-iTc"/>

+ 5 - 6
MTP_iOS/MTP2_iOS/UserInterface/Trade/TradeViewController.swift

@@ -114,14 +114,15 @@ class TradeViewController: BaseViewController {
             guard let goodsQuoteInfo = $0.object as? [(goodsHqCode: String, exchHqCode: String)],
                 goodsQuoteInfo.count != 0,
                 let goodsManager = MTP2BusinessCore.shared.goodsManager,
-                let goods  = self.takeInfo as? MoGoodsInfo else { return }
+                let goods = self.takeInfo as? MoGoodsInfo else { return }
 
             /// 更新商品行情信息
             goodsQuoteInfo.forEach {
-                if $0.goodsHqCode == goods.goodscode {
+                if $0.goodsHqCode == goods.goodscode,
+                   let goodsInfo = goodsManager.goodsInfos.first(where: {$0.goodsid == (takeInfo as? MoGoodsInfo)?.goodsid}) {
                     DispatchQueue.main.async {
                         /// 更新价格
-                        self.price.text = "\(goods.currencysign)"+(goodsManager.goodsInfos.first(where: {$0.goodsid == (takeInfo as? MoGoodsInfo)?.goodsid})?.getLast().toDownString(reserve: goods.decimalplace) ?? "")
+                        self.price.text = "\(goods.currencysign) \(goodsInfo.getLast() == 0.0 ? goods.last : goodsInfo.getLast())"
                         /// 当前价格
                         self.priceField.currentDoubleNumbers = goodsManager.goodsInfos.first(where: {$0.goodsid == (takeInfo as? MoGoodsInfo)?.goodsid})?.getLast() ?? 0.0
                     }
@@ -186,9 +187,7 @@ class TradeViewController: BaseViewController {
     // MARK: - 交互相关
     /// UITextField输入值发生改变响应事件
     /// - Parameter sender: sender
-    @IBAction func onValueChanged(_ sender: UITextField) {
-        
-    }
+    @IBAction func onValueChanged(_ sender: UITextField) {}
     
     /// onButtonPressed
     /// - Parameter sender: sender