فهرست منبع

商家入驻入口

zwp 8 ماه پیش
والد
کامیت
7065cb50a9

+ 38 - 0
.cursor/rules/my-rules.mdc

@@ -0,0 +1,38 @@
+---
+alwaysApply: true
+---
+
+# Role
+你是一名精通iOS开发的高级工程师,拥有20年的移动应用开发经验。你的任务是帮助一位同样是iOS开发工程师的用户高效、高质量完成iOS应用的开发。你的工作对用户来说非常重要。
+
+# Goal
+你的目标是准确识别提供的UI设计稿,准确理解需求,并能以比较高的还原度完成页面设计和功能开发,帮助他们完成iOS应用的设计和开发工作。
+在理解用户需求、编写代码和解决问题时,你应始终遵循以下原则:
+
+## 需求分析和开发
+### 理解用户需求时:
+- 准确识别UI设计稿,并能以比较高的还原度完成页面设计。
+- 充分理解用户需求,站在用户角度思考。
+- 作为产品经理,分析需求是否存在缺漏,与用户讨论并完善需求。
+- 选择最简单的解决方案来满足用户需求。
+
+### 编写代码时:
+- 遵循当前项目的代码风格,保证代码风格统一。
+- 使用最新的Objective-C语言和Masonry框架进行iOS应用开发。
+- 遵循Apple的人机界面指南(Human Interface Guidelines)设计用户界面。
+- 实现适当的应用生命周期管理,确保应用在前台和后台都能正常运行。
+- 实现适配不同iOS设备的自适应布局,在设置控件宽高和间距时,为了适配不同屏幕,请使用kRealValue宏对数值进行缩放。
+- 准确识别UI设计稿,并能查找资源目录,自动匹配图片资源,图片在BuguLive/Assets.xcassets/Store目录下。
+- 整体理解类之间的继承关系,合理复用代码。
+- 请用懒加载的方式创建属性。
+- 对字体大小不要用缩放,直接设置数值就可以了。
+- 在代码中添加必要的错误处理和日志记录。
+- 实现适当的内存管理,避免内存泄漏。
+- 请实现多语言适配,目前只需要实现中文和英文,在构建页面时所有的文案应更新到对应的文件,对应的文件是BuguLive/Class/General/zh-Hans.lproj和BuguLive/Class/General/en.lproj
+
+### 解决问题时:
+- 全面阅读相关代码文件,理解所有代码的功能和逻辑。
+- 分析导致错误的原因,提出解决问题的思路。
+- 与用户进行多次交互,根据反馈调整解决方案。
+
+在整个过程中,始终参考@Apple开发者文档,确保使用最新的iOS开发最佳实践。

+ 3 - 3
BuguLive/AppchangeHeader.h

@@ -104,7 +104,7 @@
 // 腾讯IM账号
 #define     TXYSdkAccountType       @"0"
 // 腾讯IM账号ID
-#define     TXYSdkAppId             @"20026248"// @"20021670"//@"20012221"
+#define     TXYSdkAppId             @"20026444"// @"20021670"//@"20012221"
 //@"1400039135"
 
 //声网
@@ -112,9 +112,9 @@
 
 
 //腾讯SDK appid
-#define TXSDKAppID 20026248 // 20021670 // 20012221
+#define TXSDKAppID 20026444 // 20021670 // 20012221
 //推送服务 客户端key 不是服务端的
-#define TXSDKAppIDKey @"af7cdf2edada2e2c61153a6763f174ab2ab7a28a7b63ad1d9a300d196f03302b"
+#define TXSDKAppIDKey @"a2f26b5ffab0d2a85c82bc44abf9b205d111baa1e651b9d837461236a8b200f0"
 
 //直播SDK Licence
 //#define TXRTMPKey @"4455812430ce35c17ea78ee79f7071e1"

+ 11 - 1
BuguLive/Class/Sections/Me/Controller/MineViewController.m

@@ -40,6 +40,8 @@
 #import "BogoInviteViewController.h"
 #import "UIImageView+RTL.h"
 #import "IconInfoView.h"
+#import "MerchantEnrollViewController.h"
+
 @interface MineViewController ()<PerfectInfoPopViewDelegate>
 @property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
 
@@ -70,6 +72,7 @@
 @property (weak, nonatomic) IBOutlet QMUIButton *setBtn;
 @property (weak, nonatomic) IBOutlet QMUIButton *openVipBtn;
 @property (weak, nonatomic) IBOutlet QMUIButton *serverBtn;
+@property (weak, nonatomic) IBOutlet QMUIButton *merchantsAuthBtn;
 
 @property(nonatomic, strong) userPageModel *userModel;
 
@@ -175,7 +178,8 @@
     self.setBtn.imagePosition = QMUIButtonImagePositionTop;
     self.serverBtn.imagePosition = QMUIButtonImagePositionTop;
     self.earningsBtn.imagePosition = QMUIButtonImagePositionTop;
-
+    self.merchantsAuthBtn.imagePosition = QMUIButtonImagePositionTop;
+    
 //    self.openVipBtn.imagePosition = QMUIButtonImagePositionRight;
     self.signBtn.imagePosition = QMUIButtonImagePositionLeft;
     
@@ -197,6 +201,7 @@
     self.logBtn.spacingBetweenImageAndTitle = 5;
     self.setBtn.spacingBetweenImageAndTitle = 5;
     self.serverBtn.spacingBetweenImageAndTitle = 5;
+    self.merchantsAuthBtn.spacingBetweenImageAndTitle = 5;
     
     [self.nobleNameLabel sizeToFit];
     [self.nobleNameLabel setAdjustsFontSizeToFitWidth:YES];
@@ -722,6 +727,11 @@
     setViewController.userID = self.userModel.user_id;
     [[AppDelegate sharedAppDelegate] pushViewController:setViewController animated:YES];
 }
+- (IBAction)merchantsAuthBtnClick:(QMUIButton *)sender {
+    MerchantEnrollViewController *vc = [[MerchantEnrollViewController alloc] init];
+    vc.hidesBottomBarWhenPushed = YES;
+    [self.navigationController pushViewController:vc animated:YES];
+}
 
 #pragma mark - 我的账户
 - (void)accountViewAction{

+ 31 - 13
BuguLive/Class/Sections/Me/Controller/MineViewController.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
         <capability name="Named colors" minToolsVersion="9.0"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -27,6 +27,7 @@
                 <outlet property="levelBtn" destination="b9D-MF-Ryc" id="KcX-EE-CnS"/>
                 <outlet property="levelImgV" destination="k6h-V1-1x3" id="OnY-zE-SN1"/>
                 <outlet property="logBtn" destination="ZlJ-7w-85Z" id="50C-MS-Pf6"/>
+                <outlet property="merchantsAuthBtn" destination="MSX-Rl-3I8" id="eOv-ZN-zeb"/>
                 <outlet property="nameLabel" destination="WxJ-kV-w2U" id="skr-ii-PMD"/>
                 <outlet property="nobleCenterBtn" destination="TIj-vl-yQf" id="4f9-ag-51f"/>
                 <outlet property="nobleImageView" destination="a3r-ZX-QVJ" id="XJM-fr-J5e"/>
@@ -58,7 +59,7 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ekd-L8-SUp">
-                    <rect key="frame" x="0.0" y="0.0" width="414" height="862"/>
+                    <rect key="frame" x="0.0" y="0.0" width="414" height="828"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KPD-Sh-4uA">
                             <rect key="frame" x="0.0" y="0.0" width="414" height="844"/>
@@ -240,13 +241,13 @@
                                                     </constraints>
                                                 </imageView>
                                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_shimingiconBg" translatesAutoresizingMaskIntoConstraints="NO" id="uji-GL-Nnl" userLabel="shiming Image View">
-                                                    <rect key="frame" x="49" y="0.5" width="46" height="16"/>
+                                                    <rect key="frame" x="49" y="0.5" width="45.5" height="16"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="16" id="alH-IP-Dts"/>
                                                     </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="Jce-Wg-H6P">
-                                                    <rect key="frame" x="69.5" y="2.5" width="20.5" height="12"/>
+                                                    <rect key="frame" x="69.5" y="2.5" width="20" height="12"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="10"/>
                                                     <color key="textColor" name="xy_sub_text_color"/>
                                                     <nil key="highlightedColor"/>
@@ -317,7 +318,7 @@
                                             <rect key="frame" x="0.0" y="0.0" width="192" height="63"/>
                                         </imageView>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的收益" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="adf-iG-OQj">
-                                            <rect key="frame" x="15" y="10" width="62" height="18"/>
+                                            <rect key="frame" x="15" y="10" width="60" height="18"/>
                                             <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
                                             <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                             <nil key="highlightedColor"/>
@@ -329,7 +330,7 @@
                                             <nil key="highlightedColor"/>
                                         </label>
                                         <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bogo_me_top_income" translatesAutoresizingMaskIntoConstraints="NO" id="zi2-R1-bW5">
-                                            <rect key="frame" x="149" y="18" width="26" height="26"/>
+                                            <rect key="frame" x="155" y="18" width="20" height="22.5"/>
                                         </imageView>
                                     </subviews>
                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -359,13 +360,13 @@
                                             <rect key="frame" x="0.0" y="0.0" width="192" height="63"/>
                                         </imageView>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的账户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1MR-4K-ir4">
-                                            <rect key="frame" x="15" y="10" width="61.5" height="18"/>
+                                            <rect key="frame" x="15" y="10" width="60" height="18"/>
                                             <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
                                             <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="钻石余额" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wiU-JC-loC">
-                                            <rect key="frame" x="15" y="33" width="50" height="15"/>
+                                            <rect key="frame" x="15" y="33" width="48" height="15"/>
                                             <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                             <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                             <nil key="highlightedColor"/>
@@ -467,7 +468,7 @@
                                     <rect key="frame" x="10" y="543" width="394" height="200"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="更多功能" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wVS-Wq-Huq">
-                                            <rect key="frame" x="10" y="15" width="65.5" height="19.5"/>
+                                            <rect key="frame" x="10" y="15" width="64" height="19.5"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
                                             <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
@@ -523,7 +524,7 @@
                                             </connections>
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2mf-Lt-dx9" customClass="QMUIButton">
-                                            <rect key="frame" x="0.0" y="115" width="87" height="70"/>
+                                            <rect key="frame" x="0.0" y="115" width="98.5" height="70"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="70" id="hib-OZ-Ufh"/>
                                             </constraints>
@@ -535,6 +536,19 @@
                                                 <action selector="setBtnAction:" destination="-1" eventType="touchUpInside" id="izo-5G-G9y"/>
                                             </connections>
                                         </button>
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MSX-Rl-3I8" customClass="QMUIButton">
+                                            <rect key="frame" x="98.5" y="115" width="98.5" height="70"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="70" id="t7O-Gd-XZE"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                                            <state key="normal" title="商家认证" image="my_实名认证">
+                                                <color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                                            </state>
+                                            <connections>
+                                                <action selector="merchantsAuthBtnClick:" destination="-1" eventType="touchUpInside" id="URG-jL-I61"/>
+                                            </connections>
+                                        </button>
                                     </subviews>
                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
@@ -548,17 +562,21 @@
                                         <constraint firstItem="S3W-Tf-aag" firstAttribute="width" secondItem="NPg-ud-oaz" secondAttribute="width" id="Sb0-LL-nNQ"/>
                                         <constraint firstItem="R2U-oU-DBe" firstAttribute="leading" secondItem="ZlJ-7w-85Z" secondAttribute="trailing" id="TKO-X8-nVW"/>
                                         <constraint firstItem="NPg-ud-oaz" firstAttribute="leading" secondItem="S3W-Tf-aag" secondAttribute="trailing" id="VUV-QG-jfJ"/>
+                                        <constraint firstItem="MSX-Rl-3I8" firstAttribute="height" secondItem="2mf-Lt-dx9" secondAttribute="height" id="ddl-mk-KqZ"/>
                                         <constraint firstItem="YL4-Rw-IzN" firstAttribute="leading" secondItem="sHa-Sk-IFp" secondAttribute="leading" constant="10" id="eY7-Vk-Wgb"/>
                                         <constraint firstItem="R2U-oU-DBe" firstAttribute="top" secondItem="YL4-Rw-IzN" secondAttribute="bottom" id="gSd-qc-rNb"/>
+                                        <constraint firstItem="MSX-Rl-3I8" firstAttribute="centerY" secondItem="2mf-Lt-dx9" secondAttribute="centerY" id="hVv-LD-p0S"/>
+                                        <constraint firstItem="MSX-Rl-3I8" firstAttribute="leading" secondItem="2mf-Lt-dx9" secondAttribute="trailing" id="hyT-TR-3fJ"/>
                                         <constraint firstItem="R2U-oU-DBe" firstAttribute="bottom" secondItem="S3W-Tf-aag" secondAttribute="bottom" id="iVr-Ww-7Jx"/>
                                         <constraint firstAttribute="trailing" secondItem="R2U-oU-DBe" secondAttribute="trailing" id="kc8-Dc-8q9"/>
-                                        <constraint firstItem="2mf-Lt-dx9" firstAttribute="width" secondItem="S3W-Tf-aag" secondAttribute="width" multiplier="0.883249" id="mrz-fs-354"/>
+                                        <constraint firstItem="2mf-Lt-dx9" firstAttribute="width" secondItem="S3W-Tf-aag" secondAttribute="width" id="mrz-fs-354"/>
                                         <constraint firstItem="S3W-Tf-aag" firstAttribute="leading" secondItem="sHa-Sk-IFp" secondAttribute="leading" id="nnr-Yp-AkY"/>
                                         <constraint firstItem="wVS-Wq-Huq" firstAttribute="top" secondItem="sHa-Sk-IFp" secondAttribute="top" constant="15" id="oHq-W2-Cvw"/>
                                         <constraint firstItem="S3W-Tf-aag" firstAttribute="top" secondItem="YL4-Rw-IzN" secondAttribute="bottom" id="ocj-dL-FNA"/>
                                         <constraint firstItem="2mf-Lt-dx9" firstAttribute="leading" secondItem="S3W-Tf-aag" secondAttribute="leading" id="pAn-0s-9vp"/>
                                         <constraint firstItem="ZlJ-7w-85Z" firstAttribute="leading" secondItem="NPg-ud-oaz" secondAttribute="trailing" id="qas-Qa-QSq"/>
                                         <constraint firstAttribute="height" constant="200" id="sdp-3I-BX2"/>
+                                        <constraint firstItem="MSX-Rl-3I8" firstAttribute="width" secondItem="2mf-Lt-dx9" secondAttribute="width" id="yue-l1-3NV"/>
                                         <constraint firstItem="wVS-Wq-Huq" firstAttribute="leading" secondItem="sHa-Sk-IFp" secondAttribute="leading" constant="10" id="zBo-G2-ifW"/>
                                         <constraint firstItem="NPg-ud-oaz" firstAttribute="top" secondItem="YL4-Rw-IzN" secondAttribute="bottom" id="zfT-sv-SIN"/>
                                         <constraint firstItem="2mf-Lt-dx9" firstAttribute="top" secondItem="S3W-Tf-aag" secondAttribute="bottom" id="zvU-wK-ZVj"/>
@@ -625,7 +643,7 @@
     <resources>
         <image name="bogo_me_top_diamond" width="21.5" height="18"/>
         <image name="bogo_me_top_family" width="45" height="45"/>
-        <image name="bogo_me_top_income" width="26" height="26"/>
+        <image name="bogo_me_top_income" width="20" height="22.5"/>
         <image name="bogo_me_top_level" width="45" height="45"/>
         <image name="bogo_me_top_shop" width="45" height="45"/>
         <image name="bogo_me_top_vip" width="45" height="45"/>