xiongzhu 7 rokov pred
rodič
commit
e7fdd2bbad

+ 3 - 3
千模/Assets.xcassets/启动页/img_qidong.imageset/Contents.json

@@ -2,17 +2,17 @@
   "images" : [
     {
       "idiom" : "universal",
-      "filename" : "img_qidong.png",
+      "filename" : "img_wuwangwuwang.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "img_qidong@2x.png",
+      "filename" : "img_wuwangwuwang@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "filename" : "img_qidong@3x.png",
+      "filename" : "img_wuwangwuwang@3x.png",
       "scale" : "3x"
     }
   ],

BIN
千模/Assets.xcassets/启动页/img_qidong.imageset/img_qidong.png


BIN
千模/Assets.xcassets/启动页/img_qidong.imageset/img_qidong@2x.png


BIN
千模/Assets.xcassets/启动页/img_qidong.imageset/img_qidong@3x.png


BIN
千模/Assets.xcassets/启动页/img_qidong.imageset/img_wuwangwuwang.png


BIN
千模/Assets.xcassets/启动页/img_qidong.imageset/img_wuwangwuwang@2x.png


BIN
千模/Assets.xcassets/启动页/img_qidong.imageset/img_wuwangwuwang@3x.png


+ 1 - 1
千模/Info.plist

@@ -52,7 +52,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>2</string>
+	<string>4</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<false/>
 	<key>LSApplicationCategoryType</key>

+ 2 - 1
千模/Main/AdViewController.m

@@ -129,6 +129,7 @@
     }];
 
     self.label = [[UILabel alloc] init];
+    self.label.textAlignment = NSTextAlignmentCenter;
     [self.view addSubview:self.label];
     [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.view).offset(25);
@@ -169,7 +170,7 @@
     [cancelBtn setTitleColor:[UIColor colorWithHexString:@"#8F9294"] forState:UIControlStateNormal];
     [cancelBtn addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
 
-    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@", imageURl, self.model[@"Pic"]]];
+    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@", imageURl, self.model[@"banner"]]];
     [self.img sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"jiazai"]];
     self.label.text = self.model[@"Caption"];
 }

+ 73 - 37
千模/Main/ModelDetail/SendGiftViewController.xib

@@ -25,31 +25,63 @@
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
-            <rect key="frame" x="0.0" y="0.0" width="411" height="295"/>
+            <rect key="frame" x="0.0" y="0.0" width="375" height="333"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
+                <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qt5-6b-u1c" userLabel="Top">
+                    <rect key="frame" x="0.0" y="0.0" width="375" height="0.0"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您为选手送&quot;礼&quot;助威,我为您送&quot;茶&quot;还礼!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UBh-63-BgV">
+                            <rect key="frame" x="15" y="-7.5" width="229.5" height="15"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <color key="textColor" red="1" green="0.58431372549019611" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_inter" translatesAutoresizingMaskIntoConstraints="NO" id="NdB-pg-N6V">
+                            <rect key="frame" x="340" y="-10" width="20" height="20"/>
+                        </imageView>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b5G-Q7-gqE">
+                            <rect key="frame" x="0.0" y="-1" width="375" height="1"/>
+                            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.20000000000000001" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="UYW-c8-C4I"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="trailing" secondItem="NdB-pg-N6V" secondAttribute="trailing" constant="15" id="3lp-aR-fle"/>
+                        <constraint firstAttribute="height" id="5yU-Jg-Omy"/>
+                        <constraint firstItem="b5G-Q7-gqE" firstAttribute="leading" secondItem="qt5-6b-u1c" secondAttribute="leading" id="CXT-Hh-w0V"/>
+                        <constraint firstItem="UBh-63-BgV" firstAttribute="centerY" secondItem="qt5-6b-u1c" secondAttribute="centerY" id="DG9-bV-bPg"/>
+                        <constraint firstAttribute="trailing" secondItem="b5G-Q7-gqE" secondAttribute="trailing" id="JoF-i6-wu4"/>
+                        <constraint firstAttribute="bottom" secondItem="b5G-Q7-gqE" secondAttribute="bottom" id="KYQ-yq-u9l"/>
+                        <constraint firstItem="NdB-pg-N6V" firstAttribute="centerY" secondItem="qt5-6b-u1c" secondAttribute="centerY" id="Sbx-CS-jgN"/>
+                        <constraint firstItem="UBh-63-BgV" firstAttribute="leading" secondItem="qt5-6b-u1c" secondAttribute="leading" constant="15" id="XaP-JX-RkQ"/>
+                    </constraints>
+                </view>
                 <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="uU3-B9-lqy">
-                    <rect key="frame" x="0.0" y="13" width="411" height="116"/>
+                    <rect key="frame" x="0.0" y="0.0" width="375" height="116"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sgr-nx-orl">
-                            <rect key="frame" x="0.0" y="0.0" width="137" height="116"/>
+                            <rect key="frame" x="0.0" y="0.0" width="125" height="116"/>
                             <subviews>
                                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vIf-30-Kvd">
-                                    <rect key="frame" x="28.5" y="0.0" width="80" height="116"/>
+                                    <rect key="frame" x="22.5" y="0.0" width="80" height="116"/>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="80" id="j3x-pS-4Sf"/>
                                     </constraints>
                                 </view>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liwu_icon_meigui" translatesAutoresizingMaskIntoConstraints="NO" id="lP2-zH-LwM">
-                                    <rect key="frame" x="33.5" y="5" width="70" height="70"/>
+                                    <rect key="frame" x="27.5" y="5" width="70" height="70"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="70" id="FGV-MC-E9K"/>
                                         <constraint firstAttribute="height" constant="70" id="Tco-f3-4eq"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="玫瑰" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yjg-aK-7bB">
-                                    <rect key="frame" x="55" y="75" width="27" height="18"/>
+                                    <rect key="frame" x="49" y="75" width="27" height="18"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="18" id="me5-Ha-bkf"/>
                                     </constraints>
@@ -58,7 +90,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="8M币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2oS-Op-Fni">
-                                    <rect key="frame" x="53.5" y="94" width="30.5" height="17"/>
+                                    <rect key="frame" x="47.5" y="94" width="30.5" height="17"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="17" id="Lav-5U-ur7"/>
                                     </constraints>
@@ -86,24 +118,24 @@
                             </connections>
                         </view>
                         <view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j05-Hy-VUY">
-                            <rect key="frame" x="137" y="0.0" width="137" height="116"/>
+                            <rect key="frame" x="125" y="0.0" width="125" height="116"/>
                             <subviews>
                                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SaL-rY-dWe">
-                                    <rect key="frame" x="28.5" y="0.0" width="80" height="116"/>
+                                    <rect key="frame" x="22.5" y="0.0" width="80" height="116"/>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="80" id="DkA-hP-d5K"/>
                                     </constraints>
                                 </view>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liwu_icon_lanseyaoji" translatesAutoresizingMaskIntoConstraints="NO" id="eXh-cC-E6s">
-                                    <rect key="frame" x="33.5" y="5" width="70" height="70"/>
+                                    <rect key="frame" x="27.5" y="5" width="70" height="70"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="70" id="VuI-OK-G9u"/>
                                         <constraint firstAttribute="width" constant="70" id="ofZ-oX-okc"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="蓝色妖姬" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CWD-HF-MxN">
-                                    <rect key="frame" x="42" y="75" width="53.5" height="18"/>
+                                    <rect key="frame" x="36" y="75" width="53.5" height="18"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="18" id="SAb-Fb-r2s"/>
                                     </constraints>
@@ -112,7 +144,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="48M币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gYg-Z0-h2g">
-                                    <rect key="frame" x="49.5" y="94" width="38.5" height="17"/>
+                                    <rect key="frame" x="43.5" y="94" width="38.5" height="17"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="17" id="WxR-pQ-pJb"/>
                                     </constraints>
@@ -140,24 +172,24 @@
                             </connections>
                         </view>
                         <view tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g93-Mi-91X">
-                            <rect key="frame" x="274" y="0.0" width="137" height="116"/>
+                            <rect key="frame" x="250" y="0.0" width="125" height="116"/>
                             <subviews>
                                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F8H-0G-qQn">
-                                    <rect key="frame" x="28.5" y="0.0" width="80" height="116"/>
+                                    <rect key="frame" x="22.5" y="0.0" width="80" height="116"/>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="80" id="ZQv-qh-TY8"/>
                                     </constraints>
                                 </view>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liwu_icon_bijini" translatesAutoresizingMaskIntoConstraints="NO" id="8HA-Up-Zep">
-                                    <rect key="frame" x="33.5" y="5" width="70" height="70"/>
+                                    <rect key="frame" x="27.5" y="5" width="70" height="70"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="70" id="TkE-6q-dIu"/>
                                         <constraint firstAttribute="width" constant="70" id="gaX-9V-ZZ6"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="比基尼" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JKt-Vc-nsH">
-                                    <rect key="frame" x="48.5" y="75" width="40" height="18"/>
+                                    <rect key="frame" x="42.5" y="75" width="40" height="18"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="18" id="hrr-3j-wmy"/>
                                     </constraints>
@@ -166,7 +198,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="98M币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yzW-aT-Syc">
-                                    <rect key="frame" x="49.5" y="94" width="38.5" height="17"/>
+                                    <rect key="frame" x="43.5" y="94" width="38.5" height="17"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="17" id="XIQ-rz-z7a"/>
                                     </constraints>
@@ -199,27 +231,27 @@
                     </constraints>
                 </stackView>
                 <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="UlE-Vs-9eX">
-                    <rect key="frame" x="0.0" y="129" width="411" height="116"/>
+                    <rect key="frame" x="0.0" y="116" width="375" height="116"/>
                     <subviews>
                         <view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rgn-d2-X0U">
-                            <rect key="frame" x="0.0" y="0.0" width="137" height="116"/>
+                            <rect key="frame" x="0.0" y="0.0" width="125" height="116"/>
                             <subviews>
                                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Jo-fA-be5">
-                                    <rect key="frame" x="28.5" y="0.0" width="80" height="116"/>
+                                    <rect key="frame" x="22.5" y="0.0" width="80" height="116"/>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="80" id="QfQ-cf-z31"/>
                                     </constraints>
                                 </view>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liwu_icon_hunsha" translatesAutoresizingMaskIntoConstraints="NO" id="fwF-Cu-dDK">
-                                    <rect key="frame" x="33.5" y="5" width="70" height="70"/>
+                                    <rect key="frame" x="27.5" y="5" width="70" height="70"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="70" id="R7X-UZ-xZ5"/>
                                         <constraint firstAttribute="width" constant="70" id="Yr0-Ax-ioO"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="婚纱" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eR4-B8-Rme">
-                                    <rect key="frame" x="55" y="75" width="27" height="18"/>
+                                    <rect key="frame" x="49" y="75" width="27" height="18"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="18" id="8ju-QK-nXB"/>
                                     </constraints>
@@ -228,7 +260,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="298M币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yh4-1c-Agt">
-                                    <rect key="frame" x="46" y="94" width="45.5" height="17"/>
+                                    <rect key="frame" x="40" y="94" width="45.5" height="17"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="17" id="2Tv-ah-fa1"/>
                                     </constraints>
@@ -256,24 +288,24 @@
                             </connections>
                         </view>
                         <view tag="4" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9ep-sy-8gZ">
-                            <rect key="frame" x="137" y="0.0" width="137" height="116"/>
+                            <rect key="frame" x="125" y="0.0" width="125" height="116"/>
                             <subviews>
                                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PZi-6L-8Aa">
-                                    <rect key="frame" x="28.5" y="0.0" width="80" height="116"/>
+                                    <rect key="frame" x="22.5" y="0.0" width="80" height="116"/>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="80" id="gOs-6y-Rcc"/>
                                     </constraints>
                                 </view>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liwu_icon_zuanjie" translatesAutoresizingMaskIntoConstraints="NO" id="BUB-AA-dfm">
-                                    <rect key="frame" x="33.5" y="5" width="70" height="70"/>
+                                    <rect key="frame" x="27.5" y="5" width="70" height="70"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="70" id="Rca-Jj-3Pn"/>
                                         <constraint firstAttribute="width" constant="70" id="n48-kp-y3X"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="钻戒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="klb-XP-OSl">
-                                    <rect key="frame" x="55" y="75" width="27" height="18"/>
+                                    <rect key="frame" x="49" y="75" width="27" height="18"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="18" id="iS0-pl-mOz"/>
                                     </constraints>
@@ -282,7 +314,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="698M币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XOh-dk-KSG">
-                                    <rect key="frame" x="45.5" y="94" width="46" height="17"/>
+                                    <rect key="frame" x="39.5" y="94" width="46" height="17"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="17" id="bHU-I6-Ppx"/>
                                     </constraints>
@@ -310,24 +342,24 @@
                             </connections>
                         </view>
                         <view tag="5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uIy-hp-veE">
-                            <rect key="frame" x="274" y="0.0" width="137" height="116"/>
+                            <rect key="frame" x="250" y="0.0" width="125" height="116"/>
                             <subviews>
                                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="14f-tS-kkU">
-                                    <rect key="frame" x="28.5" y="0.0" width="80" height="116"/>
+                                    <rect key="frame" x="22.5" y="0.0" width="80" height="116"/>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="80" id="OOE-5v-2yt"/>
                                     </constraints>
                                 </view>
                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liwu_icon_youting" translatesAutoresizingMaskIntoConstraints="NO" id="pW9-dA-8Su">
-                                    <rect key="frame" x="33.5" y="5" width="70" height="70"/>
+                                    <rect key="frame" x="27.5" y="5" width="70" height="70"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="70" id="F5W-9E-fPZ"/>
                                         <constraint firstAttribute="height" constant="70" id="oF5-Ov-t3a"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="豪华游艇" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6F4-Oh-Zdf">
-                                    <rect key="frame" x="42" y="75" width="53.5" height="18"/>
+                                    <rect key="frame" x="36" y="75" width="53.5" height="18"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="18" id="S7e-IX-re4"/>
                                     </constraints>
@@ -336,7 +368,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1598M币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IRC-Kg-qcp">
-                                    <rect key="frame" x="43" y="94" width="51.5" height="17"/>
+                                    <rect key="frame" x="37" y="94" width="51.5" height="17"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="17" id="NAf-Df-gxB"/>
                                     </constraints>
@@ -369,7 +401,7 @@
                     </constraints>
                 </stackView>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nPQ-GW-Qsi">
-                    <rect key="frame" x="0.0" y="251" width="411" height="44"/>
+                    <rect key="frame" x="0.0" y="289" width="375" height="44"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="余额: 0M币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sRR-f6-Ayk">
                             <rect key="frame" x="30" y="14" width="67" height="16"/>
@@ -388,7 +420,7 @@
                             </connections>
                         </button>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pb1-E3-4gF">
-                            <rect key="frame" x="315" y="7" width="76" height="30"/>
+                            <rect key="frame" x="279" y="7" width="76" height="30"/>
                             <color key="backgroundColor" red="1" green="0.25098039220000001" blue="0.58431372550000005" alpha="1" colorSpace="calibratedRGB"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="30" id="dGJ-Cg-6QY"/>
@@ -415,7 +447,7 @@
                     </constraints>
                 </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lX4-Su-7SG">
-                    <rect key="frame" x="20" y="250" width="371" height="1"/>
+                    <rect key="frame" x="20" y="288" width="335" height="1"/>
                     <color key="backgroundColor" white="1" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="1" id="Toa-Yz-rlp"/>
@@ -425,12 +457,15 @@
             <color key="backgroundColor" red="0.15686274509803921" green="0.15294117647058825" blue="0.15294117647058825" alpha="1" colorSpace="calibratedRGB"/>
             <constraints>
                 <constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="lX4-Su-7SG" secondAttribute="bottom" constant="44" id="2un-NE-R24"/>
+                <constraint firstItem="qt5-6b-u1c" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="54I-mK-0gC"/>
                 <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="lX4-Su-7SG" secondAttribute="trailing" constant="20" id="9ng-e4-Yeg"/>
                 <constraint firstItem="nPQ-GW-Qsi" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="E5g-k1-VSD"/>
                 <constraint firstItem="lX4-Su-7SG" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="20" id="Mpw-8u-Cw6"/>
                 <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="uU3-B9-lqy" secondAttribute="trailing" id="Ovf-Ob-dU8"/>
+                <constraint firstItem="qt5-6b-u1c" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="PbB-Xe-m7x"/>
                 <constraint firstItem="UlE-Vs-9eX" firstAttribute="trailing" secondItem="Q5M-cg-NOt" secondAttribute="trailing" id="Rbl-A5-ZDz"/>
-                <constraint firstItem="uU3-B9-lqy" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="13" id="afY-p8-da2"/>
+                <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="qt5-6b-u1c" secondAttribute="trailing" id="YuP-tr-9ct"/>
+                <constraint firstItem="uU3-B9-lqy" firstAttribute="top" secondItem="qt5-6b-u1c" secondAttribute="bottom" id="afY-p8-da2"/>
                 <constraint firstItem="UlE-Vs-9eX" firstAttribute="top" secondItem="uU3-B9-lqy" secondAttribute="bottom" id="d7e-b8-NiM"/>
                 <constraint firstItem="uU3-B9-lqy" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="go6-cT-RLK"/>
                 <constraint firstAttribute="bottom" secondItem="nPQ-GW-Qsi" secondAttribute="bottom" id="hbx-Sr-r1J"/>
@@ -473,6 +508,7 @@
         </tapGestureRecognizer>
     </objects>
     <resources>
+        <image name="icon_inter" width="20" height="20"/>
         <image name="liwu_icon_bijini" width="70" height="70"/>
         <image name="liwu_icon_hunsha" width="70" height="70"/>
         <image name="liwu_icon_lanseyaoji" width="70" height="70"/>

+ 32 - 28
千模/Main/TabbarController.m

@@ -20,7 +20,7 @@
 
 @interface TabbarController () <NIMSystemNotificationManagerDelegate, NIMConversationManagerDelegate, UITabBarControllerDelegate>
 @property(nonatomic, assign) NSInteger sessionUnreadCount;
-@property(nonatomic, assign) BOOL firstIn;
+@property(nonatomic, assign) BOOL showAd;
 @end
 
 @implementation TabbarController {
@@ -43,6 +43,7 @@
     [[NIMSDK sharedSDK].conversationManager addDelegate:self];
     // Do any additional setup after loading the view.
     self.delegate = self;
+    self.showAd = YES;
 }
 
 - (void)initTabbar {
@@ -117,36 +118,39 @@
 }
 
 - (void)getTopActivity {
-    [[AHHttpManager sharedManager]
-            POST:[NSString stringWithFormat:@"%@activity?action=dogettoppartty", webURL]
-      parameters:nil
-         success:^(id responseObject) {
-             if ([[responseObject objectForKey:@"msg"] isEqualToString:@"success"]) {
-                 NSArray *data = responseObject[@"data"];
-                 for (NSUInteger i = 0; i < data.count; ++i) {
-                     long beg = MIN([data[i][@"SBeg"] longValue], [data[i][@"Beg"] longValue]);
-                     long end = MAX([data[i][@"Sendt"] longValue], [data[i][@"Endt"] longValue]);
-                     NSDate *date = [NSDate dateWithTimeIntervalSinceNow:0];
-                     NSTimeInterval time = [date timeIntervalSince1970] * 1000;
-                     if (time >= beg && time <= end) {
-                         AdViewController *adViewController = [[AdViewController alloc] init];
-                         adViewController.model = data[i];
-                         adViewController.callback = ^(void) {
-                             WebViewController *webVC = [[WebViewController alloc] init];
-                             webVC.url = data[i][@"url"];
-                             webVC.activityPK = data[i][@"PK"];
-                             webVC.hidesBottomBarWhenPushed = YES;
-                             [(UINavigationController *) self.selectedViewController pushViewController:webVC animated:YES];
-                         };
-                         [self presentViewController:adViewController animated:YES completion:nil];
-                         return;
+    if (self.showAd) {
+        self.showAd = NO;
+        [[AHHttpManager sharedManager]
+                POST:[NSString stringWithFormat:@"%@activity?action=dogettoppartty", webURL]
+          parameters:nil
+             success:^(id responseObject) {
+                 if ([[responseObject objectForKey:@"msg"] isEqualToString:@"success"]) {
+                     NSArray *data = responseObject[@"data"];
+                     for (NSUInteger i = 0; i < data.count; ++i) {
+                         long beg = MIN([data[i][@"SBeg"] longValue], [data[i][@"Beg"] longValue]);
+                         long end = MAX([data[i][@"Sendt"] longValue], [data[i][@"Endt"] longValue]);
+                         NSDate *date = [NSDate dateWithTimeIntervalSinceNow:0];
+                         NSTimeInterval time = [date timeIntervalSince1970] * 1000;
+                         if (time >= beg && time <= end) {
+                             AdViewController *adViewController = [[AdViewController alloc] init];
+                             adViewController.model = data[i];
+                             adViewController.callback = ^(void) {
+                                 WebViewController *webVC = [[WebViewController alloc] init];
+                                 webVC.url = data[i][@"url"];
+                                 webVC.activityPK = data[i][@"PK"];
+                                 webVC.hidesBottomBarWhenPushed = YES;
+                                 [(UINavigationController *) self.selectedViewController pushViewController:webVC animated:YES];
+                             };
+                             [self presentViewController:adViewController animated:YES completion:nil];
+                             return;
+                         }
                      }
                  }
              }
-         }
-         failure:^(NSError *error) {
-             NSLog(@"error = %@", error);
-         }];
+             failure:^(NSError *error) {
+                 NSLog(@"error = %@", error);
+             }];
+    }
 }
 
 - (NSString *)getSystemVersion {

+ 17 - 1
千模/Main/WebViewController.m

@@ -17,7 +17,7 @@
 #import "ModelFansViewController.h"
 #import "UIImage+Common.h"
 
-@interface WebViewController () <ShareDelegate, WKUIDelegate, WKScriptMessageHandler>
+@interface WebViewController () <ShareDelegate, WKUIDelegate, WKScriptMessageHandler, WKNavigationDelegate>
 @property(nonatomic, strong) WKWebView *webView;
 @end
 
@@ -42,6 +42,7 @@
         make.bottom.equalTo(self.mas_bottomLayoutGuide);
     }];
     webView.UIDelegate = self;
+    webView.navigationDelegate = self;
     [[webView configuration].userContentController addScriptMessageHandler:[[WeakScriptMessageDelegate alloc] initWithDelegate:self] name:@"chmo"];
 
     [webView addObserver:self forKeyPath:@"title" options:NSKeyValueObservingOptionNew context:NULL];
@@ -100,6 +101,21 @@
     }
 }
 
+- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
+    if ([@"tel" isEqualToString:navigationAction.request.URL.scheme]) {
+        if (@available(iOS 10.0, *)) {
+            [[UIApplication sharedApplication] openURL:navigationAction.request.URL options:@{} completionHandler:nil];
+        } else {
+            if (![[UIApplication sharedApplication] canOpenURL:navigationAction.request.URL]) {
+                [[UIApplication sharedApplication] openURL:navigationAction.request.URL];
+            }
+        }
+        decisionHandler(WKNavigationActionPolicyCancel);
+    } else {
+        decisionHandler(WKNavigationActionPolicyAllow);
+    }
+}
+
 - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
     NSLog(@"name = %@, body = %@", message.name, message.body);
     NSString *action = message.body[@"action"];

+ 4 - 4
千模/MyInfo/AboutUsViewController.m

@@ -73,7 +73,7 @@
     UIButton *telButton = [[UIButton alloc]init];
     telButton.layer.cornerRadius = 5;
     telButton.backgroundColor = [UIColor whiteColor];
-    [telButton setTitle:@"客服电话:15805170379" forState:UIControlStateNormal];
+    [telButton setTitle:@"客服电话:17768144625" forState:UIControlStateNormal];
     [telButton setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal];
     [telButton setImage:[UIImage imageNamed:@"youjiantou"] forState:UIControlStateNormal];
     [telButton setTitleEdgeInsets:UIEdgeInsetsMake(5, 10, 5, ScreenWidth-200)];
@@ -136,16 +136,16 @@
 
 -(void)clickTel{
     
-    NSString* PhoneStr = [NSString stringWithFormat:@"tel://%@",@"15805170379"];
+    NSString* PhoneStr = [NSString stringWithFormat:@"tel://%@",@"17768144625"];
     UIApplication * app = [UIApplication sharedApplication];
     if ([app canOpenURL:[NSURL URLWithString:PhoneStr]]) {
         [app openURL:[NSURL URLWithString:PhoneStr]];
     }
     
-//    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"联系客服\n15805170379" message: nil preferredStyle:UIAlertControllerStyleAlert];
+//    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"联系客服\n17768144625" message: nil preferredStyle:UIAlertControllerStyleAlert];
 //    // 添加按钮
 //    [alert addAction:[UIAlertAction actionWithTitle:@"呼叫" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-//        NSString* PhoneStr = [NSString stringWithFormat:@"tel://%@",@"15805170379"];
+//        NSString* PhoneStr = [NSString stringWithFormat:@"tel://%@",@"17768144625"];
 //        UIApplication * app = [UIApplication sharedApplication];
 //        if ([app canOpenURL:[NSURL URLWithString:PhoneStr]]) {
 //            [app openURL:[NSURL URLWithString:PhoneStr]];