Commit 66900eda945170daf33d416f2b9d3a777f1f3841

Authored by 张旭
1 parent 35b571a4

店铺工作台

metaCode.xcodeproj/project.pbxproj
@@ -18,6 +18,9 @@ @@ -18,6 +18,9 @@
18 19BB1FE62AEB93B80094D962 /* CNLiveShopUserInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */; }; 18 19BB1FE62AEB93B80094D962 /* CNLiveShopUserInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */; };
19 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */; }; 19 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */; };
20 19BB1FEA2AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */; }; 20 19BB1FEA2AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */; };
  21 + 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */; };
  22 + 19BB1FEE2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FED2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift */; };
  23 + 19BB1FF02AF0E5B30094D962 /* CNLiveShopDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */; };
21 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */; }; 24 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */; };
22 19CC4D492ADD06C500308E2A /* UITableView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */; }; 25 19CC4D492ADD06C500308E2A /* UITableView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */; };
23 19CC4D4B2ADD086F00308E2A /* CNUpSlideDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */; }; 26 19CC4D4B2ADD086F00308E2A /* CNUpSlideDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */; };
@@ -147,6 +150,9 @@ @@ -147,6 +150,9 @@
147 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopUserInfoModel.swift; sourceTree = "<group>"; }; 150 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopUserInfoModel.swift; sourceTree = "<group>"; };
148 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleModel.swift; sourceTree = "<group>"; }; 151 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleModel.swift; sourceTree = "<group>"; };
149 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleCell.swift; sourceTree = "<group>"; }; 152 19BB1FE92AEF7B4A0094D962 /* CNLiveShopConsoleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopConsoleCell.swift; sourceTree = "<group>"; };
  153 + 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownShopDetailController.swift; sourceTree = "<group>"; };
  154 + 19BB1FED2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailViewModel.swift; sourceTree = "<group>"; };
  155 + 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailModel.swift; sourceTree = "<group>"; };
150 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNDownSlideSingleCourseCell.swift; sourceTree = "<group>"; }; 156 19CC4D462ADD006600308E2A /* CNDownSlideSingleCourseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNDownSlideSingleCourseCell.swift; sourceTree = "<group>"; };
151 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Extension.swift"; sourceTree = "<group>"; }; 157 19CC4D482ADD06C500308E2A /* UITableView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Extension.swift"; sourceTree = "<group>"; };
152 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideDetailViewController.swift; sourceTree = "<group>"; }; 158 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideDetailViewController.swift; sourceTree = "<group>"; };
@@ -291,6 +297,7 @@ @@ -291,6 +297,7 @@
291 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */, 297 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */,
292 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */, 298 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */,
293 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */, 299 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */,
  300 + 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */,
294 ); 301 );
295 path = Model; 302 path = Model;
296 sourceTree = "<group>"; 303 sourceTree = "<group>";
@@ -596,6 +603,7 @@ @@ -596,6 +603,7 @@
596 7C83B43D2A52B8BA004BF4A4 /* CNHomePageViewModel.swift */, 603 7C83B43D2A52B8BA004BF4A4 /* CNHomePageViewModel.swift */,
597 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */, 604 1926C28E2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift */,
598 19BB1FE22AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift */, 605 19BB1FE22AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift */,
  606 + 19BB1FED2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift */,
599 ); 607 );
600 name = ViewModel; 608 name = ViewModel;
601 path = HomePage/ViewModel; 609 path = HomePage/ViewModel;
@@ -646,6 +654,7 @@ @@ -646,6 +654,7 @@
646 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */, 654 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */,
647 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */, 655 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */,
648 19BB1FE02AEB5C220094D962 /* CNLiveShopConsoleController.swift */, 656 19BB1FE02AEB5C220094D962 /* CNLiveShopConsoleController.swift */,
  657 + 19BB1FEB2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift */,
649 ); 658 );
650 name = Controller; 659 name = Controller;
651 path = HomePage/Controller; 660 path = HomePage/Controller;
@@ -954,9 +963,11 @@ @@ -954,9 +963,11 @@
954 buildActionMask = 2147483647; 963 buildActionMask = 2147483647;
955 files = ( 964 files = (
956 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */, 965 19BB1FE82AECAD060094D962 /* CNLiveShopConsoleModel.swift in Sources */,
  966 + 19BB1FEE2AF0E1EC0094D962 /* CNLiveShopDetailViewModel.swift in Sources */,
957 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */, 967 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */,
958 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */, 968 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */,
959 79F4B11C2A33036E00993C03 /* CNLiveMineInfoAlertView.swift in Sources */, 969 79F4B11C2A33036E00993C03 /* CNLiveMineInfoAlertView.swift in Sources */,
  970 + 19BB1FF02AF0E5B30094D962 /* CNLiveShopDetailModel.swift in Sources */,
960 796398942A260C0100D045EB /* AppDelegate.swift in Sources */, 971 796398942A260C0100D045EB /* AppDelegate.swift in Sources */,
961 7989B5C72A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift in Sources */, 972 7989B5C72A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift in Sources */,
962 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */, 973 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */,
@@ -1050,6 +1061,7 @@ @@ -1050,6 +1061,7 @@
1050 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, 1061 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */,
1051 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */, 1062 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */,
1052 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */, 1063 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */,
  1064 + 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */,
1053 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, 1065 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */,
1054 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */, 1066 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */,
1055 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, 1067 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */,
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
@@ -36,12 +36,12 @@ class CNLiveBaseTabBarViewController: UITabBarController @@ -36,12 +36,12 @@ class CNLiveBaseTabBarViewController: UITabBarController
36 self.setupBackgroup() 36 self.setupBackgroup()
37 } 37 }
38 38
39 - override func viewWillAppear(_ animated: Bool) {  
40 - super.viewWillAppear(animated)  
41 -  
42 - self.selectedIndex = 1  
43 -  
44 - } 39 +// override func viewWillAppear(_ animated: Bool) {
  40 +// super.viewWillAppear(animated)
  41 +//
  42 +// self.selectedIndex = 1
  43 +//
  44 +// }
45 override func viewDidAppear(_ animated: Bool) { 45 override func viewDidAppear(_ animated: Bool) {
46 super.viewDidAppear(animated) 46 super.viewDidAppear(animated)
47 print("获取用户用户数据=====>\(UserInfoManager.shared.userInfo.uid)") 47 print("获取用户用户数据=====>\(UserInfoManager.shared.userInfo.uid)")
metaCode/Classes/Config/CNLiveConfigFontMacro.swift
@@ -96,6 +96,7 @@ let BoldFont_18 = BoldFont(18) @@ -96,6 +96,7 @@ let BoldFont_18 = BoldFont(18)
96 let BoldFont_19 = BoldFont(19) 96 let BoldFont_19 = BoldFont(19)
97 let BoldFont_20 = BoldFont(20) 97 let BoldFont_20 = BoldFont(20)
98 let BoldFont_21 = BoldFont(21) 98 let BoldFont_21 = BoldFont(21)
  99 +let BoldFont_24 = BoldFont(24)
99 let BoldFont_25 = BoldFont(25) 100 let BoldFont_25 = BoldFont(25)
100 let BoldFont_30 = BoldFont(30) 101 let BoldFont_30 = BoldFont(30)
101 102
metaCode/Classes/Main/HomePage/Controller/CNLiveDownShopDetailController.swift 0 → 100644
  1 +//
  2 +// CNLiveDownShopDetailController.swift
  3 +// metaCode
  4 +//
  5 +// Created by zx on 2023/10/31.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +class CNLiveDownShopDetailController:CNLiveBaseViewController{
  11 + override func viewDidLoad() {
  12 + super.viewDidLoad()
  13 + self.getShopDetailApi()
  14 + }
  15 +
  16 +
  17 + //MARK: - 网络请求获取店铺详情
  18 + func getShopDetailApi()
  19 + {
  20 + showLoading(message: "")
  21 + CNLiveShopDetailViewModel.requestShopDetailInfo(storeId: "") { result, status in
  22 + hiddenLoading()
  23 + if status == .success{
  24 + let shopDetailModel = result as! CNLiveShopDetailModel
  25 +// if shopUserModel.type != "3"{
  26 +// //type 1商家或者8达人
  27 +// let shopConsoleModel = CNLiveShopConsoleModel()
  28 +// shopConsoleModel.initDataSource()
  29 +// self.dataModel = shopConsoleModel
  30 +// self.collectionView.reloadData()
  31 +// }
  32 + }else if (status == .failed){
  33 +// self.NetApiStatus = .apiError
  34 + }else if (status == .noNetwork){
  35 +
  36 +// self.NetApiStatus = .notNetwork
  37 + }
  38 + }
  39 + }
  40 +}
metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift
@@ -17,11 +17,11 @@ class CNCustomIndexTopView : UIView{ @@ -17,11 +17,11 @@ class CNCustomIndexTopView : UIView{
17 //MARK: - 懒加载 17 //MARK: - 懒加载
18 ///标题 18 ///标题
19 lazy var titleLabel: UILabel = { 19 lazy var titleLabel: UILabel = {
20 - let titleLabel = UILabel.init(frame: CGRectMake(10, 0, 75, 35)) 20 + let titleLabel = UILabel.init(frame: CGRectMake(0, 0, 75, 35))
21 titleLabel.bottom = self.bottom - 5 21 titleLabel.bottom = self.bottom - 5
22 titleLabel.textColor = .white 22 titleLabel.textColor = .white
23 titleLabel.textAlignment = .left 23 titleLabel.textAlignment = .left
24 - titleLabel.font = UIFont.systemFont(ofSize: 24, weight: .semibold) 24 + titleLabel.font = BoldFont_24
25 titleLabel.adjustsFontSizeToFitWidth=true 25 titleLabel.adjustsFontSizeToFitWidth=true
26 return titleLabel 26 return titleLabel
27 }() 27 }()
@@ -119,7 +119,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange @@ -119,7 +119,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange
119 self.mainView.idModel = newValue! 119 self.mainView.idModel = newValue!
120 _idModel = newValue 120 _idModel = newValue
121 self.upSlideView.type = _idModel?.downType 121 self.upSlideView.type = _idModel?.downType
122 - self.upSlideView.url = _idModel?.downPath 122 + self.upSlideView.downPath = _idModel?.downPath
123 123
124 self.downSlideView.type = _idModel?.upType 124 self.downSlideView.type = _idModel?.upType
125 self.downSlideView.downPath = _idModel?.upPath 125 self.downSlideView.downPath = _idModel?.upPath
@@ -204,8 +204,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange @@ -204,8 +204,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange
204 204
205 ///上滑显示的View 205 ///上滑显示的View
206 lazy var upSlideView : CNUpSlideView = { 206 lazy var upSlideView : CNUpSlideView = {
207 - let upSlideView = CNUpSlideView(frame: CGRectMake(-25, self.frame.size.height*2 + 120,self.frame.size.width+50, self.frame.size.height - 120))  
208 - 207 + let upSlideView = CNUpSlideView(frame: CGRectMake(-LeftGap, self.frame.size.height*2,self.frame.size.width+LeftGap*2, self.frame.size.height))
209 return upSlideView 208 return upSlideView
210 }() 209 }()
211 210
@@ -229,7 +228,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange @@ -229,7 +228,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange
229 228
230 /// 顶部自定义导航 229 /// 顶部自定义导航
231 lazy var topNavView: CNCustomIndexTopView = { 230 lazy var topNavView: CNCustomIndexTopView = {
232 - let topNavView = CNCustomIndexTopView.init(frame: CGRect(x: 0, y: 30, width: self.width, height: KNavigationHeight)) 231 + let topNavView = CNCustomIndexTopView.init(frame: CGRect(x: 0, y: KStatusBarHeight, width: self.width, height: KNavigationHeight))
233 topNavView.alpha = 0 232 topNavView.alpha = 0
234 topNavView.closeAction = { [weak self ] in 233 topNavView.closeAction = { [weak self ] in
235 self!.baseScrollView.setContentOffset(CGPoint(x: 0, y: self!.baseScrollView.height), animated: true) 234 self!.baseScrollView.setContentOffset(CGPoint(x: 0, y: self!.baseScrollView.height), animated: true)
@@ -255,13 +254,10 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange @@ -255,13 +254,10 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange
255 self.addSubview(self.downSlideViewRemindView) 254 self.addSubview(self.downSlideViewRemindView)
256 255
257 self.addSubview(self.baseScrollView) 256 self.addSubview(self.baseScrollView)
258 - self.addSubview(self.topNavView)  
259 -// self.topNavView.setTitleString(title: "志愿者")  
260 -  
261 self.baseScrollView.addSubview(self.downSlideView) 257 self.baseScrollView.addSubview(self.downSlideView)
262 self.baseScrollView.addSubview(self.mainView) 258 self.baseScrollView.addSubview(self.mainView)
263 self.baseScrollView.addSubview(self.upSlideView) 259 self.baseScrollView.addSubview(self.upSlideView)
264 - 260 + self.addSubview(self.topNavView)
265 //默认偏移到中间 261 //默认偏移到中间
266 self.baseScrollView.setContentOffset(CGPointMake(0, self.frame.size.height), animated: false) 262 self.baseScrollView.setContentOffset(CGPointMake(0, self.frame.size.height), animated: false)
267 } 263 }
@@ -423,8 +419,10 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange @@ -423,8 +419,10 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange
423 self.downSlideView.contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex)//KVCBackgroupColor 419 self.downSlideView.contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex)//KVCBackgroupColor
424 } 420 }
425 421
426 - //滑动结束 把topNavView 放到scrollView的上层  
427 - self.bringSubviewToFront(self.topNavView) 422 + //滑动结束 网页类型downType=1时把topNavView 放到scrollView的上层
  423 + if (scrollView.contentOffset.y == ceil(defaultOffset*2)) && self.idModel?.downType == 1{
  424 + self.bringSubviewToFront(self.topNavView)
  425 + }
428 426
429 //下滑提醒View回到初始位置 427 //下滑提醒View回到初始位置
430 self.downSlideViewRemindView.top = -(self.downSlideViewRemindView.height + 50) 428 self.downSlideViewRemindView.top = -(self.downSlideViewRemindView.height + 50)
metaCode/Classes/Main/HomePage/View/CNDownSlideView.swift
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 // metaCode 3 // metaCode
4 // 4 //
5 // Created by daojian on 2023/5/30. 5 // Created by daojian on 2023/5/30.
6 -// 6 +// 下滑后的上面页面
7 7
8 import Foundation 8 import Foundation
9 import UIKit 9 import UIKit
metaCode/Classes/Main/HomePage/View/CNUpSlideView.swift
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 // metaCode 3 // metaCode
4 // 4 //
5 // Created by daojian on 2023/5/31. 5 // Created by daojian on 2023/5/31.
6 -// 6 +// 上滑后的下面页面
7 7
8 import Foundation 8 import Foundation
9 import WebKit 9 import WebKit
@@ -17,43 +17,46 @@ let UpDownTypeShopControlConsole = 4///店铺控制台 @@ -17,43 +17,46 @@ let UpDownTypeShopControlConsole = 4///店铺控制台
17 class CNUpSlideView:UIView{ 17 class CNUpSlideView:UIView{
18 18
19 lazy var webView: WKWebView = { 19 lazy var webView: WKWebView = {
20 - let webView = WKWebView.init(frame: CGRectMake(10, 20, self.width - 20, self.height - 20)) 20 + let webView = WKWebView.init(frame: CGRectMake(10, KNavigationHeight+KStatusBarHeight+10, self.width - 20, self.height-KNavigationHeight-KStatusBarHeight-10))
21 webView.scrollView.showsVerticalScrollIndicator = false 21 webView.scrollView.showsVerticalScrollIndicator = false
22 webView.scrollView.showsHorizontalScrollIndicator = false 22 webView.scrollView.showsHorizontalScrollIndicator = false
23 webView.backgroundColor = .clear 23 webView.backgroundColor = .clear
  24 + webView.layer.cornerRadius = 29
  25 + webView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
  26 + webView.clipsToBounds = true
24 return webView 27 return webView
25 }() 28 }()
26 29
27 - var upSlideVC: CNUpSlideViewController = {  
28 - let upSlideVC = CNUpSlideViewController.init() 30 + var upSlideVC: CNLiveDownShopDetailController = {
  31 + let upSlideVC = CNLiveDownShopDetailController.init()
  32 + upSlideVC.view.width = KSreenWidth
  33 + upSlideVC.view.height = KSreenHeight
  34 + upSlideVC.view.backgroundColor = .white
29 return upSlideVC 35 return upSlideVC
30 }() 36 }()
31 37
32 var type:Int? 38 var type:Int?
33 39
34 - var _url:String?  
35 - var url:String? { 40 + var _downPath:String?
  41 + var downPath:String? {
36 get{ 42 get{
37 - return _url 43 + return _downPath
38 } 44 }
39 set{ 45 set{
40 - _url = newValue! 46 + _downPath = newValue!
41 if(type == UpDownTypeH5){ 47 if(type == UpDownTypeH5){
42 - if (_url != ""){  
43 - let webUrl: URL! = URL.init(string: _url!) 48 + self.addSubview(self.webView)
  49 + if (_downPath != ""){
  50 + let webUrl: URL! = URL.init(string: _downPath!)
44 webView.load(URLRequest.init(url:webUrl)) 51 webView.load(URLRequest.init(url:webUrl))
45 } 52 }
46 - self.webView.isHidden = false  
47 - self.upSlideVC.view.isHidden = true  
48 } 53 }
49 else if(type == UpDownTypePage){ 54 else if(type == UpDownTypePage){
50 - self.webView.isHidden = true  
51 - self.upSlideVC.view.isHidden = false 55 +
52 }else if(type == UpDownTypeShopDetail){ 56 }else if(type == UpDownTypeShopDetail){
53 - 57 + self.addSubview(self.upSlideVC.view)
54 }else if(type == UpDownTypeShopControlConsole){ 58 }else if(type == UpDownTypeShopControlConsole){
55 - self.webView.isHidden = true  
56 - self.upSlideVC.view.isHidden = true 59 +
57 } 60 }
58 } 61 }
59 } 62 }
@@ -70,18 +73,8 @@ class CNUpSlideView:UIView{ @@ -70,18 +73,8 @@ class CNUpSlideView:UIView{
70 73
71 func initUI() 74 func initUI()
72 { 75 {
73 - self.backgroundColor = UIColor.white;  
74 - self.clipsToBounds = true;  
75 - self.layer.cornerRadius = 20;  
76 - self.addSubview(self.webView)  
77 -// self.addSubview(self.upSlideVC.view)  
78 -  
79 -  
80 -// let imageview : UIImageView = UIImageView.init(frame: CGRect(x: 20, y: 10, width: self.width - 40, height: self.height - 20))  
81 -// imageview.image = UIImage(named: "homePage_payMoneyImage")  
82 -//  
83 -// self.addSubview(imageview)  
84 - 76 + self.backgroundColor = UIColor.clear
  77 + self.layer.cornerRadius = 20
85 } 78 }
86 79
87 } 80 }
metaCode/Classes/Main/HomePage/ViewModel/CNLiveShopDetailViewModel.swift 0 → 100644
  1 +//
  2 +// CNLiveShopDetailViewModel.swift
  3 +// metaCode
  4 +//
  5 +// Created by zx on 2023/10/31.
  6 +//
  7 +
  8 +import Foundation
  9 +import CNLiveRequestBastKit
  10 +
  11 +class CNLiveShopDetailViewModel:NSObject{
  12 + /// 店铺详情信息获取
  13 + /// - Parameters:
  14 + /// - userId: 用户ID
  15 + /// - storeId:餐厅店铺id 不是餐厅达人不需要传
  16 + static func requestShopDetailInfo(storeId:String?,resultBlock: @escaping downSlideResultBlock) {
  17 + let param = NSMutableDictionary()
  18 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid")
  19 + param.setValue(storeId ?? "", forKey: "store_id")
  20 +
  21 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  22 + CNLiveNetworking.setupShowDataResult(false)
  23 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseShopUrl+"/api/v1/index", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  24 + hiddenLoading()
  25 + if (error == nil) {
  26 + let resp = result as! NSDictionary
  27 + let dataDic = resp["data"] as! NSDictionary
  28 + let shopDetailModel = newDictionaryToModel(dataDic as! [String : Any], CNLiveShopDetailModel.self)
  29 + resultBlock(shopDetailModel,.success)
  30 + }else{
  31 + resultBlock(NSNull(),.failed)
  32 + }
  33 + }
  34 + }
  35 +}
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
@@ -149,8 +149,8 @@ final class StandListModel: BaseModel, TableCodable { @@ -149,8 +149,8 @@ final class StandListModel: BaseModel, TableCodable {
149 var cardImg: String = ""//卡片背景图 149 var cardImg: String = ""//卡片背景图
150 var cardBackgroundImg: String = ""//首页卡片背景图 150 var cardBackgroundImg: String = ""//首页卡片背景图
151 var upPath: String = ""//顶部h5 或原生页面pageId 151 var upPath: String = ""//顶部h5 或原生页面pageId
152 - var upType: Int = 0//下滑类型1:h5 2:原生页面  
153 - var downType: Int = 0//上滑类型1:h5 2:原生页面 152 + var upType: Int = 0//下滑类型1:h5 2:原生页面 3店铺详情 4 店铺控制台
  153 + var downType: Int = 0//上滑类型1:h5 2:原生页面 3店铺详情 4 店铺控制台
154 var downPath: String = ""//底部h5url 或原生页面pageId 154 var downPath: String = ""//底部h5url 或原生页面pageId
155 var auth: Bool = false//身份是否验证 155 var auth: Bool = false//身份是否验证
156 156
metaCode/Classes/Main/Model/CNLiveShopDetailModel.swift 0 → 100644
  1 +//
  2 +// CNLiveShopDetailModel.swift
  3 +// metaCode
  4 +//
  5 +// Created by zx on 2023/10/31.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +class CNLiveShopDetailModel:BaseModel{
  11 + ///banner
  12 + var banner = [CNLiveShopDetailBannerModel]()
  13 + ///是否显示申请入驻按钮组view
  14 + var is_show_btn: Bool?
  15 + ///是否显示用户信息view
  16 + var is_show_user: Bool?
  17 + ///是否显示退款订单推送提示红点
  18 + var is_show_tip: Bool?
  19 + ///快捷申请标题
  20 + var quick_title: String?
  21 + ///快捷申请url
  22 + var quick_url: String?
  23 + ///退款订单数
  24 + var order_return_num: String?
  25 + ///申请入驻按钮组
  26 + var btn = [CNLiveShopDetailBtnModel]()
  27 + ///用户信息
  28 + var user: CNLiveShopDetailUserModel?
  29 + ///空的话 跳转注册登录 有值的话 跳url
  30 + var user_btn: String?
  31 + ///是否为商家
  32 + var is_seller: Bool?
  33 + ///0老达人 1普通商家 2文创精品 3健康餐桌 8达人
  34 + var seller_type: Int = 0
  35 + ///商家数据
  36 + var seller_data: CNLiveShopDetailSellerDataModel?
  37 + ///达人动态
  38 + var dynamic = [CNLiveShopDetailDynamicModel]()
  39 + ///餐厅店铺信息
  40 + var foods_shop: CNLiveShopDetailFoodsShopModel?
  41 +}
  42 +
  43 +class CNLiveShopDetailBannerModel:BaseModel{
  44 + ///id
  45 + var id: String?
  46 + ///标题
  47 + var title: String?
  48 + ///图片
  49 + var simg: String?
  50 + ///1跳全屏url 其他不跳
  51 + var type: String?
  52 + ///url
  53 + var url: String?
  54 +}
  55 +
  56 +class CNLiveShopDetailBtnModel:BaseModel{
  57 + ///标题
  58 + var title: String?
  59 + ///图片
  60 + var image: String?
  61 + ///url
  62 + var url: String?
  63 +}
  64 +
  65 +class CNLiveShopDetailUserModel:BaseModel{
  66 + ///0 未申请过 1 未提交 2 审核中 3 审核拒绝 4 审核通过
  67 + var state: Int = 0
  68 + ///头像
  69 + var user_img: String?
  70 + ///名称
  71 + var username: String?
  72 +}
  73 +
  74 +class CNLiveShopDetailSellerDataModel:BaseModel{
  75 + ///每日订单数
  76 + var day_order: Int = 0
  77 + ///每日订单金额
  78 + var day_order_money: String?
  79 + ///电商剩余金额
  80 + var shop_money: String?
  81 + ///老达人余额
  82 + var daren_money: String?
  83 + ///总余额
  84 + var total_money: String?
  85 +
  86 +}
  87 +
  88 +class CNLiveShopDetailDynamicModel:BaseModel{
  89 + ///动态id
  90 + var id: String?
  91 + ///动态内容
  92 + var title: String?
  93 + ///用户id
  94 + var uid: String?
  95 + ///发布时间
  96 + var total_money: String?
  97 + ///总余额
  98 + var total_money: String?
  99 + ///总余额
  100 + var total_money: String?
  101 + /**
  102 +
  103 + */
  104 + @property (nonatomic,assign) NSTimeInterval addtime;
  105 + /**
  106 + 经度
  107 + */
  108 + @property (nonatomic,copy) NSString * longitude;
  109 + /**
  110 + 纬度
  111 + */
  112 + @property (nonatomic,copy) NSString * latitude;
  113 + /**
  114 + 浏览数
  115 + */
  116 + @property (nonatomic,assign) NSUInteger pv;
  117 + /**
  118 + 点赞数
  119 + */
  120 + @property (nonatomic,assign) NSUInteger upper;
  121 + /**
  122 + 评论数
  123 + */
  124 + @property (nonatomic,assign) NSUInteger comment;
  125 + /**
  126 + 定位
  127 + */
  128 + @property (nonatomic,copy) NSString * location;
  129 + /**
  130 + 视频
  131 + */
  132 + @property (nonatomic,copy) NSString * video;
  133 + /**
  134 + 是否点赞 1点赞 0没点
  135 + */
  136 + @property (nonatomic,assign) BOOL is_upper;
  137 + /**
  138 + 是否显示 1显示 0隐藏
  139 + */
  140 + @property (nonatomic,assign) BOOL state;
  141 + /**
  142 + 商品id
  143 + */
  144 + @property (nonatomic,copy) NSString * goods_id;
  145 + /**
  146 + 视频封面图
  147 + */
  148 + @property (nonatomic,copy) NSString * video_img;
  149 + /**
  150 + 封面图数组
  151 + */
  152 + @property (nonatomic,copy) NSArray<NSString*> * img;
  153 + /**
  154 + 达人信息
  155 + */
  156 + @property (nonatomic,strong) CNDSMainHPDarenDynamicShopUserModel * shop_user;
  157 + /**
  158 + 热门评论
  159 + */
  160 + @property (nonatomic,strong) CNDSMainHPDarenDynamicCommentModel * comment_content;
  161 + /**
  162 + 商品
  163 + */
  164 + @property (nonatomic,strong) CNDSMainHPDarenDynamicGoodsModel * goods;
  165 +}
  166 +
  167 +class CNLiveShopDetailFoodsShopModel:BaseModel{
  168 +
  169 +}
  170 +
  171 +
  172 +