Commit 60ab037a37a35df02be447fb6e48dade874eda8f

Authored by niudaojian
1 parent 130bcfd2

添加数据库

... ... @@ -35,6 +35,8 @@ target 'metaCode' do
35 35 pod 'Qiniu'
36 36 #加载GIF
37 37 pod 'SwiftGifOrigin', '~> 1.7.0'
  38 + #数据库存储
  39 + pod 'WCDB.swift'
38 40 #分类滚动切换视图
39 41 pod 'JXSegmentedView', :git => 'https://gitee.com/mirrors/JXSegmentedView.git'
40 42 pod 'JXPagingView/Paging'
... ...
metaCode.xcodeproj/project.pbxproj
... ... @@ -62,6 +62,7 @@
62 62 7C4931342A307B58000E44B4 /* slide_down.gif in Resources */ = {isa = PBXBuildFile; fileRef = 7C4931332A307B58000E44B4 /* slide_down.gif */; };
63 63 7C4931362A307B60000E44B4 /* slide_up.gif in Resources */ = {isa = PBXBuildFile; fileRef = 7C4931352A307B60000E44B4 /* slide_up.gif */; };
64 64 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */; };
  65 + 7C7C62F62A4D72E9007A912E /* CNMetaCodeDB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C7C62F52A4D72E9007A912E /* CNMetaCodeDB.swift */; };
65 66 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675282A270F6A008354C1 /* WJColorChange.m */; };
66 67 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */; };
67 68 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675382A2740B0008354C1 /* CNMainView.swift */; };
... ... @@ -158,6 +159,7 @@
158 159 7C4931332A307B58000E44B4 /* slide_down.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = slide_down.gif; sourceTree = "<group>"; };
159 160 7C4931352A307B60000E44B4 /* slide_up.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = slide_up.gif; sourceTree = "<group>"; };
160 161 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNHomePageGuideView.swift; sourceTree = "<group>"; };
  162 + 7C7C62F52A4D72E9007A912E /* CNMetaCodeDB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNMetaCodeDB.swift; sourceTree = "<group>"; };
161 163 7CD675262A270F69008354C1 /* metaCode-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "metaCode-Bridging-Header.h"; sourceTree = "<group>"; };
162 164 7CD675272A270F6A008354C1 /* WJColorChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WJColorChange.h; sourceTree = "<group>"; };
163 165 7CD675282A270F6A008354C1 /* WJColorChange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WJColorChange.m; sourceTree = "<group>"; };
... ... @@ -327,6 +329,7 @@
327 329 7963988A2A260B3300D045EB /* Classes */ = {
328 330 isa = PBXGroup;
329 331 children = (
  332 + 7C7C62F42A4D72BA007A912E /* DB */,
330 333 7C2703342A3AFD130061EC50 /* Environment */,
331 334 7C2703312A36CC430061EC50 /* GlobalBlock */,
332 335 798A44F32A3077ED00815935 /* CustomView */,
... ... @@ -470,6 +473,14 @@
470 473 path = Environment;
471 474 sourceTree = "<group>";
472 475 };
  476 + 7C7C62F42A4D72BA007A912E /* DB */ = {
  477 + isa = PBXGroup;
  478 + children = (
  479 + 7C7C62F52A4D72E9007A912E /* CNMetaCodeDB.swift */,
  480 + );
  481 + path = DB;
  482 + sourceTree = "<group>";
  483 + };
473 484 7CD675212A26F844008354C1 /* HomePage */ = {
474 485 isa = PBXGroup;
475 486 children = (
... ... @@ -829,6 +840,7 @@
829 840 790D01822A2D88FC00C5978D /* CNLiveConfigMacro.swift in Sources */,
830 841 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */,
831 842 790D019F2A2DD66E00C5978D /* CNLiveLoginViewModel.swift in Sources */,
  843 + 7C7C62F62A4D72E9007A912E /* CNMetaCodeDB.swift in Sources */,
832 844 790B1FB62A41938F0074CF00 /* UIImage+CNLiveColorImage.swift in Sources */,
833 845 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */,
834 846 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */,
... ...
metaCode/Classes/DB/CNMetaCodeDB.swift 0 → 100644
  1 +//
  2 +// CNMetaCodeDB.swift
  3 +// metaCode
  4 +// 数据库
  5 +// Created by daojian on 2023/6/29.
  6 +//
  7 +
  8 +import Foundation
  9 +
... ...
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
... ... @@ -151,6 +151,9 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
151 151 }
152 152 override func viewWillAppear(_ animated: Bool) {
153 153 super.viewWillAppear(animated)
  154 +
  155 + print("uid = ",UserInfoManager.shared.userInfo.uid)
  156 + print("1111")
154 157 }
155 158 override func viewDidAppear(_ animated: Bool) {
156 159 super.viewDidAppear(animated)
... ...