无故事王国
2023-09-26 c86ac49db2969495ec21fae2a27956cad9499752
修改
42个文件已修改
2个文件已添加
872 ■■■■ 已修改文件
WanPai.xcodeproj/project.pbxproj 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/AppDelegate.swift 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Category/FinanceTrafer.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/BaseTableView.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/Def.swift 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/Enums.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/WeChatTools.swift 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Info.plist 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Model/CommonModels.swift 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/Services.swift 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityDetailVC.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityDetailVC.xib 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivitySignupDetailVC.swift 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivitySignupDetailVC.xib 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseBooking_1_TCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseTCell.swift 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseTCell.xib 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailApplyVC.swift 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailApplyVC.xib 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.swift 153 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.xib 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseVC.swift 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseVideoDetailVC.swift 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseVideoDetailVC.xib 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/StudentReportVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/VC/HomeVC.swift 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Login/VC/LoginVC.swift 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/VC/PaymentResultVC.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/VC/ProfileVC.swift 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/TCell/SearchStoreDetail_1_TCell.swift 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/SearchVC.swift 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/SearchVC.xib 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/CoinStoreCenterVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/TCell/YardBookingTCell.swift 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/TCell/YardBookingTCell.xib 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingDetailVC.swift 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingDetailVC.xib 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardDetailVC.swift 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardDetailVC.xib 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/SceneDelegate.swift 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/WanPaiDebug.entitlements 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai.xcodeproj/project.pbxproj
@@ -28,6 +28,7 @@
        131732B72A405DED00F722AF /* YardDetailDateTimeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131732B62A405DED00F722AF /* YardDetailDateTimeVC.swift */; };
        131732BA2A405EF800F722AF /* CalendarDateTimeTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131732B82A405EF800F722AF /* CalendarDateTimeTCell.swift */; };
        131732BB2A405EF800F722AF /* CalendarDateTimeTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 131732B92A405EF800F722AF /* CalendarDateTimeTCell.xib */; };
        1319386B2AC2EC8300FC63F1 /* WeChatTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1319386A2AC2EC8300FC63F1 /* WeChatTools.swift */; };
        13272DCB2A40076300AC6481 /* YardBookingTimeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13272DCA2A40076300AC6481 /* YardBookingTimeView.swift */; };
        13272DCD2A40076900AC6481 /* YardBookingTimeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13272DCC2A40076900AC6481 /* YardBookingTimeView.xib */; };
        13272DD02A4034A300AC6481 /* YardDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13272DCE2A4034A300AC6481 /* YardDetailVC.swift */; };
@@ -313,6 +314,8 @@
        131732B62A405DED00F722AF /* YardDetailDateTimeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YardDetailDateTimeVC.swift; sourceTree = "<group>"; };
        131732B82A405EF800F722AF /* CalendarDateTimeTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarDateTimeTCell.swift; sourceTree = "<group>"; };
        131732B92A405EF800F722AF /* CalendarDateTimeTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CalendarDateTimeTCell.xib; sourceTree = "<group>"; };
        131938692AC2D9B700FC63F1 /* WanPaiDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WanPaiDebug.entitlements; sourceTree = "<group>"; };
        1319386A2AC2EC8300FC63F1 /* WeChatTools.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeChatTools.swift; sourceTree = "<group>"; };
        13272DCA2A40076300AC6481 /* YardBookingTimeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YardBookingTimeView.swift; sourceTree = "<group>"; };
        13272DCC2A40076900AC6481 /* YardBookingTimeView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = YardBookingTimeView.xib; sourceTree = "<group>"; };
        13272DCE2A4034A300AC6481 /* YardDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YardDetailVC.swift; sourceTree = "<group>"; };
@@ -990,6 +993,7 @@
        8D8400D02A2F1430003AF6A2 /* WanPai */ = {
            isa = PBXGroup;
            children = (
                131938692AC2D9B700FC63F1 /* WanPaiDebug.entitlements */,
                134BD51F2A6008BA00786819 /* YYPaymentManager */,
                13FB93B72A5C0270009F558A /* Category */,
                137546412A57F564001FA77A /* Model */,
@@ -1117,6 +1121,7 @@
                8DAEB54F2A305AEF00814766 /* Def.swift */,
                8DAEB5512A305B2D00814766 /* Fronts.swift */,
                8DA51DF62A32BE270085F4BA /* Enums.swift */,
                1319386A2AC2EC8300FC63F1 /* WeChatTools.swift */,
            );
            path = Config;
            sourceTree = "<group>";
@@ -1730,6 +1735,7 @@
                131732BA2A405EF800F722AF /* CalendarDateTimeTCell.swift in Sources */,
                8D6C50232A372B21007EC2D9 /* IDCardView.swift in Sources */,
                1353D5752A56CA0A00539FCA /* Services.swift in Sources */,
                1319386B2AC2EC8300FC63F1 /* WeChatTools.swift in Sources */,
                13801CBE2A4D20D20041454D /* ChooseStoreView.swift in Sources */,
                137801932A3B0D3C00414959 /* CourseOnlineCCell.swift in Sources */,
                136FD9AD2A4C2F0500933B7C /* RechargeItemCCell.swift in Sources */,
@@ -1902,6 +1908,7 @@
            buildSettings = {
                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
                CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiDebug.entitlements;
                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
                CODE_SIGN_STYLE = Manual;
                CURRENT_PROJECT_VERSION = 1;
@@ -1915,9 +1922,9 @@
                INFOPLIST_FILE = WanPai/Info.plist;
                INFOPLIST_KEY_CFBundleDisplayName = "玩湃生活";
                INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.sports";
                INFOPLIST_KEY_NSCameraUsageDescription = "WanPai需要使用使用使用相机,来上传学员头像、评论图片";
                INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店";
                INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "WanPai需要使用使用使用相册,来上传学员头像、评论图片";
                INFOPLIST_KEY_NSCameraUsageDescription = "$(PRODUCT_NAME)需要使用使用使用相机,来上传学员头像、评论图片";
                INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "$(PRODUCT_NAME)需要使用使用定位,来推荐、搜索您附近的门店";
                INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "$(PRODUCT_NAME)需要使用使用使用相册,来上传学员头像、评论图片";
                INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
                INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
                INFOPLIST_KEY_UIMainStoryboardFile = Main;
@@ -2077,9 +2084,9 @@
                INFOPLIST_FILE = WanPai/Info.plist;
                INFOPLIST_KEY_CFBundleDisplayName = "玩湃生活";
                INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.sports";
                INFOPLIST_KEY_NSCameraUsageDescription = "WanPai需要使用使用使用相机,来上传学员头像、评论图片";
                INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店";
                INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "WanPai需要使用使用使用相册,来上传学员头像、评论图片";
                INFOPLIST_KEY_NSCameraUsageDescription = "$(PRODUCT_NAME)需要使用使用使用相机,来上传学员头像、评论图片";
                INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "$(PRODUCT_NAME)需要使用使用定位,来推荐、搜索您附近的门店";
                INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "$(PRODUCT_NAME)需要使用使用使用相册,来上传学员头像、评论图片";
                INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
                INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
                INFOPLIST_KEY_UIMainStoryboardFile = Main;
WanPai/AppDelegate.swift
@@ -11,7 +11,7 @@
import AMapFoundationKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
class AppDelegate: UIResponder, UIApplicationDelegate,WXApiDelegate {
    var window: UIWindow?
    var orientation:UIInterfaceOrientationMask = .portrait
@@ -52,12 +52,23 @@
        return YYPaymentManager.shared.handleApplication(application, open: url, sourceApplication: sourceApplication, annotation: annotation)
    }
    func application(_ application: UIApplication, handleOpen url: URL) -> Bool {
        if ((url.scheme?.contains("wechat")) != nil){
            return WXApi.handleOpen(url, delegate: self)
        }
        return YYPaymentManager.shared.handleApplication(application, handleOpen: url)
    }
    // NOTE: 9.0以后使用新API接口
    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
        if ((url.scheme?.contains("wechat")) != nil){
            return WXApi.handleOpen(url, delegate: self)
        }
        return YYPaymentManager.shared.handleApplication(app, open: url, options: options)
    }
    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
        return WXApi.handleOpenUniversalLink(userActivity, delegate: self)
    }
}
extension AppDelegate{
@@ -97,3 +108,13 @@
    }
}
extension AppDelegate{
    func onReq(_ req: BaseReq) {
    }
    func onResp(_ resp: BaseResp) {
    }
}
WanPai/Category/FinanceTrafer.swift
@@ -34,7 +34,7 @@
        formatter.groupingSeparator = ","
        formatter.groupingSize = 3
        formatter.positivePrefix = "¥"
        return formatter.string(from: NSNumber(value: Darwin.floor(self))) ?? "¥0"
        return formatter.string(from: NSNumber(value: self)) ?? "¥0"
    }
    func currencyNotPrefix()->String{
        let formatter = NumberFormatter()
WanPai/Common/View/BaseTableView.swift
@@ -7,12 +7,13 @@
import UIKit
import EmptyDataSet_Swift
import JQTools
class BaseTableView:UITableView{
    public func jq_setEmptyView( _ noticeStr:String? = nil,image:UIImage? = UIImage(named: "icon_empty"),foregroundColor:UIColor = UIColor.gray.withAlphaComponent(0.5),clouse:((EmptyDataSetView)->Void)? = nil) {
    public func jq_setEmptyView( _ noticeStr:String? = nil,image:UIImage? = UIImage(named: "icon_LOGO")?.jq_imageWithTintColor(color: .gray),foregroundColor:UIColor = UIColor.gray,clouse:((EmptyDataSetView)->Void)? = nil) {
        self.separatorStyle = .none
        self.emptyDataSetView { (emptyDataSetView) in
            emptyDataSetView.titleLabelString(NSAttributedString.init(string: (noticeStr != nil) ? noticeStr! : "暂无数据", attributes: [.font:UIFont.systemFont(ofSize: 16), .foregroundColor:foregroundColor as Any]))
            emptyDataSetView.titleLabelString(NSAttributedString.init(string: (noticeStr != nil) ? noticeStr! : "暂无数据", attributes: [.font:UIFont.systemFont(ofSize: 18,weight: .medium), .foregroundColor:foregroundColor as Any]))
                .image(image)
                .dataSetBackgroundColor(UIColor.white)
                .verticalOffset(0)
@@ -30,9 +31,9 @@
}
class BaseCollectionView:UICollectionView{
    public func jq_setEmptyView( _ noticeStr:String? = nil,image:UIImage? = UIImage(named: "icon_empty"),foregroundColor:UIColor = UIColor.gray.withAlphaComponent(0.5),clouse:((EmptyDataSetView)->Void)? = nil) {
    public func jq_setEmptyView( _ noticeStr:String? = nil,image:UIImage? = UIImage(named: "icon_LOGO")?.jq_imageWithTintColor(color: .gray),foregroundColor:UIColor = UIColor.gray,clouse:((EmptyDataSetView)->Void)? = nil) {
        self.emptyDataSetView { (emptyDataSetView) in
            emptyDataSetView.titleLabelString(NSAttributedString.init(string: (noticeStr != nil) ? noticeStr! : "暂无数据", attributes: [.font:UIFont.systemFont(ofSize: 16), .foregroundColor:foregroundColor as Any]))
            emptyDataSetView.titleLabelString(NSAttributedString.init(string: (noticeStr != nil) ? noticeStr! : "暂无数据", attributes: [.font:UIFont.systemFont(ofSize: 18,weight: .medium), .foregroundColor:foregroundColor as Any]))
                .image(image)
                .dataSetBackgroundColor(UIColor.white)
                .verticalOffset(0)
WanPai/Config/Def.swift
@@ -12,11 +12,13 @@
import QMUIKit
let SHAKEY = "BT7NPhA0f775uzcUuftWjCE1TYZlWmHZ"
let WechatUniversalLinks = ""
let WechatUniversalLinks = "https://www.weparklife.com/app/"
let WeChatAPPID = "WX41D32F362BA0F911"
let WeChatSecrect = ""
let APPScheme = "weparklife"
let AMapKey = "a2aff8a000be5543e410555c548793b8"
let WeChatMinProgram = "gh_fea25aea0fc8" //
let WeChatMinProgramPath = "pages-sub/web/index"
let app = UIApplication.shared.delegate as! AppDelegate
WanPai/Config/Enums.swift
@@ -219,7 +219,7 @@
    var strTitle:String{
        switch self {
            case .allUser:return "全部用户"
            case .allUser:return "全部用户参与"
            case .vip:return "仅限年度会员参与"
            case .student:return "仅限学员参与"
        }
@@ -419,7 +419,7 @@
        switch self {
            case .normal: return "常规班"
            case .vocation:return "假期班"
            case .experience:return "体验班"
            case .experience:return "体验课"
            default:return ""
        }
    }
WanPai/Config/WeChatTools.swift
New file
@@ -0,0 +1,201 @@
//
//  WeChatTools.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/9/26.
//
import Foundation
import HandyJSON
typealias WeachatClosure = (WechatModel?)->(Void)
typealias WechatUserClosure = (WechatUserInfoModel?)->(Void)
struct WechatModel:HandyJSON{
    var access_token = ""
    var expires_in = 0
    var openid = ""
    var refresh_token = ""
    var scope = ""
    var unionid = ""
}
struct WechatUserInfoModel:HandyJSON{
    var openid = ""
    var nickname = ""
    var sex = 1
    var province = ""
    var city = ""
    var country = ""
    var headimgurl = ""
    var privilege = ""
    var unionid = ""
}
class WeChatTools{
        /// 授权登录
    static func sendAuthRequest(){
        let sendAuthReq = SendAuthReq()
        sendAuthReq.scope = "snsapi_userinfo"
        sendAuthReq.state = "WeParkLife_iOS"
        WXApi.send(sendAuthReq)
    }
        /// 完成授权登录,获取token
    static func getAccessToken(_ resp:SendAuthResp, loginInfo:WeachatClosure?){
        guard resp.code != nil else {
            return
        }
        let url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=\(WeChatAPPID)&secret=\(WeChatSecrect)&code=\(resp.code!)&grant_type=authorization_code"
        let Url = URL(string: url)
        let session = URLSession.shared
        let task = session.dataTask(with: Url!) { (data, response, error) in
            if error != nil{
                return
            }
            do{
                if let dataAsJSON = try JSONSerialization.jsonObject(with: data!) as? Dictionary<String, Any>{
                    let model = WechatModel.deserialize(from: dataAsJSON)
                    loginInfo?(model)
                }else{
                    loginInfo?(nil)
                }
            }catch{
                loginInfo?(nil)
            }
        }
        task.resume()
    }
        /// 获取用资料
    static func getUserInfo(access_token:String,openId:String,userInfo:WechatUserClosure?){
        guard !access_token.isEmpty else {
            return
        }
        guard !openId.isEmpty else {
            return
        }
        let url = "https://api.weixin.qq.com/sns/userinfo?access_token=\(access_token)&openid=\(openId)"
        let Url = URL(string: url)
        let session = URLSession.shared
        let task = session.dataTask(with: Url!) { (data, response, error) in
            if error != nil{
                return
            }
            do{
                if let dataAsJSON = try JSONSerialization.jsonObject(with: data!) as? Dictionary<String, Any>{
                    let model = WechatUserInfoModel.deserialize(from: dataAsJSON)
                    userInfo?(model)
                }else{
                    userInfo?(nil)
                }
            }catch{
                userInfo?(nil)
            }
        }
        task.resume()
    }
        /// 分享文本
    static func shareText(_ text:String,scene:WXScene = WXSceneSession){
        let req = SendMessageToWXReq()
        req.bText = true
        req.text = text
        req.scene = Int32(scene.rawValue)
        WXApi.send(req)
    }
        /// 分享图片
    static func sharePic(_ img:UIImage,thumb:UIImage,scale:CGFloat = 0.6,scene:WXScene = WXSceneTimeline){
        let imageObject = WXImageObject()
        imageObject.imageData = img.jpegData(compressionQuality: scale)!
        let mediaMessage = WXMediaMessage()
        mediaMessage.thumbData = thumb.jpegData(compressionQuality: scale)
        mediaMessage.mediaObject = imageObject
        let req = SendMessageToWXReq()
        req.bText = false
        req.message = mediaMessage
        req.scene = Int32(scene.rawValue)
        WXApi.send(req)
    }
        /// 分享音乐
    static func shareMusic(_ musicUrl:String,musicLowBandUrl:String,title:String,desc:String,thumb:UIImage,scene:WXScene = WXSceneSession){
        let musicObject = WXMusicObject()
        musicObject.musicUrl = musicUrl
        musicObject.musicLowBandUrl = musicLowBandUrl
        let mediaMessage  = WXMediaMessage()
        mediaMessage.title = title
        mediaMessage.description = desc
        mediaMessage.setThumbImage(thumb)
        mediaMessage.mediaObject = musicObject
        let req = SendMessageToWXReq()
        req.bText = false
        req.message = mediaMessage
        req.scene = Int32(scene.rawValue)
        WXApi.send(req)
    }
        /// 分享音乐
    static func shareMusic(_ musicData:String,musicLowBandData:String,title:String,desc:String,thumb:UIImage,scene:WXScene = WXSceneSession){
        let musicObject = WXMusicObject()
        musicObject.musicDataUrl = musicData
        musicObject.musicLowBandUrl = musicLowBandData
        let mediaMessage  = WXMediaMessage()
        mediaMessage.title = title
        mediaMessage.description = desc
        mediaMessage.setThumbImage(thumb)
        mediaMessage.mediaObject = musicObject
        let req = SendMessageToWXReq()
        req.bText = false
        req.message = mediaMessage
        req.scene = Int32(scene.rawValue)
        WXApi.send(req)
    }
    static func shareUrl(_ url:String,title:String,desc:String,thumb:UIImage,scene:WXScene = WXSceneSession){
        let webpageObject  = WXWebpageObject()
        webpageObject.webpageUrl = url
        let mediaMessage  = WXMediaMessage()
        mediaMessage.title = title
        mediaMessage.description = desc
        mediaMessage.setThumbImage(thumb)
        mediaMessage.mediaObject = webpageObject
        let req = SendMessageToWXReq()
        req.bText = false
        req.message = mediaMessage
        req.scene = Int32(scene.rawValue)
        WXApi.send(req)
    }
    static func shareVideo(_ url:String,videoLowBandUrl:String,title:String,desc:String,thumb:UIImage, scene:WXScene = WXSceneSession){
        let videoObject = WXVideoObject()
        videoObject.videoUrl = url
        videoObject.videoLowBandUrl = videoLowBandUrl
        let mediaMessage  = WXMediaMessage()
        mediaMessage.title = title
        mediaMessage.description = desc
        mediaMessage.setThumbImage(thumb)
        mediaMessage.mediaObject = videoObject
        let req = SendMessageToWXReq()
        req.bText = false
        req.message = mediaMessage
        req.scene = Int32(scene.rawValue)
        WXApi.send(req)
    }
}
WanPai/Info.plist
@@ -12,6 +12,14 @@
                <string>weparklife</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>WX41D32F362BA0F911</string>
            </array>
        </dict>
    </array>
    <key>LSApplicationQueriesSchemes</key>
    <array>
WanPai/Model/CommonModels.swift
@@ -47,6 +47,7 @@
    var vipAmount: Int = 0
    var weeks: String?
    var wpGold: Int = 0
    var paymentPrice:Double = 0
}
struct CourseDetailModel:HandyJSON {
@@ -357,6 +358,7 @@
    var stuSex: GenderType = .man
    var totalNums: Int = 0
    var weight: Int = 0
    var bodyStatus = ""
}
struct StartClouseListModel:HandyJSON{
@@ -379,6 +381,7 @@
    var height:Int = 0
    var url = ""
    var weight:Int = 0
    var bodyStatus = ""
}
class StartClouseExploreModel:HandyJSON{
@@ -420,7 +423,7 @@
struct SearchStoreDetailCourseModel:HandyJSON{
    var applicantsNumber: Int = 0
    var classHours: Int = 0
    var classStartTime = [String]()
    var classStartTime:String?
    var courseId: Int = 0
    var coverDrawing: String = ""
    var name: String = ""
WanPai/Network/Services.swift
@@ -12,7 +12,7 @@
import JQTools
#if DEBUG
let All_Url = "http://192.168.110.22:56666"
let All_Url = "http://f0uc18f73ou5.guyubao.com"
let Game_Url = "https://try.daowepark.com"
//let All_Url = "https://console-mock.apipost.cn/mock/b5b2dee0-5564-40ae-f082-a352d502a153"
//let All_Url = "http://192.168.110.165:10393/mock/b5b2dee0-5564-40ae-f082-a352d502a153"
@@ -787,6 +787,8 @@
            .append(key: "storeId", value: storeId)
            .append(key: "startTime", value: startTime)
            .append(key: "endTime", value: endTime)
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -66,7 +66,7 @@
        label_duetime.text = activityDetailModel.registerEndTime
        label_starttime.text = activityDetailModel.startTime
        label_endtime.text = activityDetailModel.endTime
        label_ageScope.text = activityDetailModel.age
        label_ageScope.text = activityDetailModel.age + "岁"
        label_introducion.text = activityDetailModel.introduction
        label_city.text = activityDetailModel.province + "|" + activityDetailModel.city
        label_money.text = String(format: "%@/人", activityDetailModel.cashPrice.currency())
WanPai/Root/Activity/VC/ActivityDetailVC.swift
@@ -48,7 +48,7 @@
            label_duetime.text = activityDetailModel.registerEndTime
            label_starttime.text = activityDetailModel.startTime
            label_endtime.text = activityDetailModel.endTime
            label_ageScope.text = activityDetailModel.age
            label_ageScope.text = activityDetailModel.age + "岁"
            label_introducion.text = activityDetailModel.introduction
            label_city.text = activityDetailModel.province + "|" + activityDetailModel.city
            SDWebImageDownloader.shared.downloadImage(with: URL(string: activityDetailModel.registrationNotes)!) {[weak self] image, data, error, status in
@@ -57,7 +57,7 @@
                }
                let radio = img.size.width / img.size.height
                self?.cons_imgEnrollHei.constant = radio * JQ_ScreenW
                self?.cons_imgEnrollHei.constant = JQ_ScreenW / radio
                self?.img_enrollRequired.image = img
            }
WanPai/Root/Activity/VC/ActivityDetailVC.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <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"/>
@@ -58,10 +58,10 @@
                                                    <nil key="highlightedColor"/>
                                                </label>
                                                <view contentMode="scaleToFill" horizontalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="eyg-vz-Etv">
                                                    <rect key="frame" x="334" y="15.666666666666686" width="45" height="21"/>
                                                    <rect key="frame" x="353.66666666666669" y="15.666666666666686" width="25.333333333333314" height="21"/>
                                                    <subviews>
                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0xj-gh-rFl">
                                                            <rect key="frame" x="7" y="0.0" width="31" height="21"/>
                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0xj-gh-rFl">
                                                            <rect key="frame" x="7.0000000000000009" y="0.0" width="11.333333333333336" height="21"/>
                                                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                                            <color key="textColor" red="0.99607843139999996" green="0.43137254899999999" blue="0.050980392159999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                            <nil key="highlightedColor"/>
@@ -488,7 +488,7 @@
                                                    <nil key="textColor"/>
                                                    <nil key="highlightedColor"/>
                                                </label>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BXI-8J-fD0">
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BXI-8J-fD0">
                                                    <rect key="frame" x="14" y="83" width="365" height="17"/>
                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                    <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/>
WanPai/Root/Activity/VC/ActivitySignupDetailVC.swift
@@ -52,14 +52,15 @@
            label_ageScope.text = m.age + "岁"
            label_introducion.text = m.introduction
            label_city.text = m.province + "|" + m.city
            SDWebImageDownloader.shared.downloadImage(with: URL(string: m.registrationNotes)!) {[weak self] image, data, error, status in
                guard let img = image else {
                    self?.cons_imgEnrollHei.constant = 0;return
                }
                let radio = img.size.width / img.size.height
                self?.cons_imgEnrollHei.constant = radio * JQ_ScreenW
            }
            img_enrollRequired.sd_setImage(with: URL(string: m.registrationNotes)) {[weak self] image, error, type, url in
                guard let img = image else {
                    self?.cons_imgEnrollHei.constant = 0;return
                }
                let radio = img.size.width / img.size.height
                self?.cons_imgEnrollHei.constant = JQ_ScreenW / radio
            }
            if m.cashPrice != 0 {
                label_money.text =  String(format: "%@/人", m.cashPrice.currency())
@@ -79,10 +80,27 @@
            cons_tableHei.constant = Double(m.participant.count) * 100
            tableView.reloadData()
            let name = m.apply == 1 ? "已取消":"取消"
            let color = m.apply == 1 ? UIColor.gray:Def_ThemeColor
            btn_cancel.setTitle(name, for: .normal)
            btn_cancel.backgroundColor = color
            switch m.status {
                case .prepare:
                    let name = m.apply == 1 ? "取消":"已取消"
                    let color = m.apply == 1 ? Def_ThemeColor:UIColor(hexStr: "#C0C0C0")
                    btn_cancel.isEnabled = m.apply == 1
                    btn_cancel.setTitle(name, for: .normal)
                    btn_cancel.backgroundColor = color
                case .ongoing:
                    btn_cancel.setTitle("进行中", for: .normal)
                    btn_cancel.isEnabled = false
                    btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0")
                case .over:
                    btn_cancel.setTitle("已结束", for: .normal)
                    btn_cancel.isEnabled = false
                    btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0")
                case .cancel:
                    btn_cancel.setTitle("已取消", for: .normal)
                    btn_cancel.isEnabled = false
                    btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0")
                default:break
            }
        }
    }
WanPai/Root/Activity/VC/ActivitySignupDetailVC.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <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"/>
@@ -44,7 +44,7 @@
                    <rect key="frame" x="0.0" y="59" width="393" height="759"/>
                    <subviews>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u6Z-PS-k1D">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="1105.6666666666667"/>
                            <rect key="frame" x="0.0" y="0.0" width="393" height="1153.6666666666667"/>
                            <subviews>
                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eXP-qo-kfo">
                                    <rect key="frame" x="0.0" y="0.0" width="393" height="220"/>
@@ -569,7 +569,7 @@
                                <constraint firstAttribute="trailing" secondItem="eXP-qo-kfo" secondAttribute="trailing" id="TYO-oI-a3N"/>
                                <constraint firstItem="TUv-Fz-UHV" firstAttribute="top" secondItem="eXP-qo-kfo" secondAttribute="bottom" id="bB5-yo-dCB"/>
                                <constraint firstAttribute="trailing" secondItem="TUv-Fz-UHV" secondAttribute="trailing" id="hP4-ew-7eb"/>
                                <constraint firstAttribute="bottom" secondItem="TUv-Fz-UHV" secondAttribute="bottom" id="kMo-Am-NZm"/>
                                <constraint firstAttribute="bottom" secondItem="TUv-Fz-UHV" secondAttribute="bottom" constant="48" id="kMo-Am-NZm"/>
                                <constraint firstItem="eXP-qo-kfo" firstAttribute="leading" secondItem="u6Z-PS-k1D" secondAttribute="leading" id="mLP-nR-S4H"/>
                                <constraint firstItem="TUv-Fz-UHV" firstAttribute="leading" secondItem="u6Z-PS-k1D" secondAttribute="leading" id="n5r-oF-pt8"/>
                                <constraint firstItem="eXP-qo-kfo" firstAttribute="top" secondItem="u6Z-PS-k1D" secondAttribute="top" id="xl5-mh-sQP"/>
WanPai/Root/Course/TCell/CourseBooking_1_TCell.swift
@@ -22,7 +22,7 @@
            label_status.text = studentAppointModel.status.strTitle
            btn_exercise.isHidden = studentAppointModel.status != .complete
            btn_cancel.isHidden = studentAppointModel.status != .pedding
            btn_cancel.isHidden = true
            btn_qrCode.isHidden = studentAppointModel.status != .pedding
            switch studentAppointModel.status{
WanPai/Root/Course/TCell/CourseTCell.swift
@@ -19,10 +19,10 @@
    @IBOutlet weak var label_distance: UILabel!
    @IBOutlet weak var label_originPrice: UILabel!
    @IBOutlet weak var stackView_vipPrice: UIStackView!
    @IBOutlet weak var stack_teachTime: UIStackView!
    var courseItemModel:CourseItemModel!{
        didSet{
            stackView_vipPrice.isHidden = courseItemModel.originalPrice == nil
            label_originPrice.isHidden = courseItemModel.originalPrice == nil
            label_vipPrice.text = "会员价:\(courseItemModel.vipPrice.currency())"
@@ -31,12 +31,19 @@
            label_teachTime.text = String(format: "上课时间:%@", courseItemModel.classStartTime.jq_max(size: 2).joined(separator: "|"))
            label_enrollNumber.text = String(format: "已报名:%ld人", courseItemModel.applicantsNumber)
            label_distance.text = String(format: "%.2lfkm", courseItemModel.distance)
            stack_teachTime.isHidden = courseItemModel.classStartTime.count == 0
            if courseItemModel.payType == .cash{
                label_price.text = courseItemModel.paymentPrice.currency()
            }else if courseItemModel.payType == .coin{
                label_price.text = "玩湃币 " + "\(courseItemModel.playPaiCoin)"
            }
//            if courseItemModel.payType == .cash{
//                label_price.text = courseItemModel.paymentPrice.currency()
//            }else if courseItemModel.payType == .coin{
//                label_price.text = "玩湃币 " + "\(courseItemModel.playPaiCoin)"
//            }
            if courseItemModel.paymentPrice != 0{
                label_price.text = courseItemModel.paymentPrice.currency()
            }else{
                label_price.text = "玩湃币 " + "\(courseItemModel.playPaiCoin)"
            }
            label_originPrice.attributedText = AttributedStringbuilder.build().add(string: courseItemModel.originalPrice?.currency() ?? "", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString
WanPai/Root/Course/TCell/CourseTCell.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -180,6 +180,7 @@
                <outlet property="label_title" destination="KYY-Ie-Ipd" id="qAH-3T-KMM"/>
                <outlet property="label_vipPrice" destination="iGs-ae-BBu" id="VqQ-kR-kqc"/>
                <outlet property="stackView_vipPrice" destination="4j1-WG-XCo" id="5zG-bq-8lX"/>
                <outlet property="stack_teachTime" destination="Av5-eD-vOm" id="HNg-KA-FxG"/>
            </connections>
            <point key="canvasLocation" x="135.1145038167939" y="64.08450704225352"/>
        </tableViewCell>
WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -39,6 +39,7 @@
    @IBOutlet weak var studentTableView: UITableView!
    @IBOutlet weak var view_packageList: UIView!
    @IBOutlet weak var btn_handleBtn: UIButton!
    @IBOutlet weak var view_teach: UIView!
    private var detailModel:CourseDetailModel?
    private var selectClassIndex:Int = 0
@@ -57,7 +58,7 @@
            img_cover.sd_setImage(with: URL(string: m.coverDrawing))
            label_title.text = m.name
            label_listenWeek.text = m.weeks.joined(separator: "、")
            label_listenTime.text = m.times.joined(separator: "|")
            label_listenTime.text = m.times.joined(separator: "|")
            label_store.text = m.storeName
            label_address.text = m.storeAddress
            label_vaild.text = m.time
@@ -75,7 +76,9 @@
                    view_vaildTime.isHidden = true
            }
            if let stu = m.student{studentModels.append(stu)}
            if m.student?.id != 0{
                studentModels.append(m.student!)
            }
            cons_collHei.constant = ceil(Double(m.list.count) / 3.0) * CellH + floor(Double(m.list.count) / 3.0) * 21.0
            collectionView.reloadData()
@@ -172,10 +175,10 @@
                        }
                        Services.courcePayment(conponId: weakSelf.selectCouponModel?.id, courseConfigId: model.id, id: weakSelf.detailModel!.id, price: paymentPrice, payType: payType, stuId: weakSelf.studentModels.map({$0.id})).subscribe(onNext: { data in
                            if let m = data.data{
                            if data.code == 200{
                                switch payType {
                                    case .aliPay:
                                        YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { [weak self] result in
                                        YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: data.data!.orderString)) { [weak self] result in
                                            switch result {
                                                case .success:
//                                                    self?.navigationController?.popViewController(animated: false)
@@ -213,14 +216,22 @@
    private func changePrice(_ index:Int){
        if let subM = detailModel?.list[index]{
            label_price.text = (subM.paymentPrice * Double(studentModels.count) - (selectCouponModel?.favorable ?? 0)).currency()
            var studentCount:Double = 0
            if studentModels.count == 0{
                studentCount = 1
            }else{
                studentCount = Double(studentModels.count)
            }
            label_price.text = (subM.paymentPrice * studentCount - (selectCouponModel?.favorable ?? 0)).currency()
            label_originPrice.isHidden = subM.originalPrice == nil || subM.originalPrice == 0
            label_coin.isHidden = subM.playPaiCoin == nil || subM.playPaiCoin == 0
            label_vipPrice.isHidden = subM.vipPrice == nil || subM.vipPrice == 0
                //原价
            if let originPrice =  subM.originalPrice{
                let attribute = AttributedStringbuilder.build().add(string: (originPrice * Double(studentModels.count)).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                let attribute = AttributedStringbuilder.build().add(string: (originPrice * studentCount).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                label_originPrice.attributedText = attribute.mutableAttributedString
            }
@@ -236,12 +247,13 @@
            if let vipPrice = subM.vipPrice{
                let vipAttribute = AttributedStringbuilder.build()
                    .add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                    .add(string: (vipPrice * Double(studentModels.count)).currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                    .add(string: (vipPrice * studentCount).currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                label_vipPrice.attributedText = vipAttribute.mutableAttributedString
            }
            if detailModel?.type == .experience{
                label_price.text = (subM.originalPrice ?? 0).currency()
                label_price.text = subM.paymentPrice.currency()
                view_teach.isHidden = true
                label_originPrice.isHidden = true
                label_vipPrice.isHidden = true
            }
WanPai/Root/Course/VC/CourseDetailApplyVC.xib
@@ -37,6 +37,7 @@
                <outlet property="tableView" destination="CMD-gX-7vo" id="dC7-Q4-Es3"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_packageList" destination="sWT-Ul-ugp" id="4A5-gn-RWL"/>
                <outlet property="view_teach" destination="0ER-xO-h01" id="Zjg-kH-h95"/>
                <outlet property="view_vaildTime" destination="ksP-qe-iRQ" id="yAF-1L-6L1"/>
            </connections>
        </placeholder>
@@ -473,10 +474,11 @@
                            </subviews>
                        </stackView>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dbs-38-o1O">
                            <rect key="frame" x="137" y="17.666666666666629" width="242" height="40"/>
                            <rect key="frame" x="199" y="17.666666666666629" width="180" height="40"/>
                            <color key="backgroundColor" name="FE6E0D"/>
                            <constraints>
                                <constraint firstAttribute="height" constant="40" id="bwe-LL-VPf"/>
                                <constraint firstAttribute="width" constant="180" id="tXJ-g9-Dtf"/>
                            </constraints>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
@@ -502,7 +504,7 @@
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                    <constraints>
                        <constraint firstItem="8n8-uF-nCb" firstAttribute="centerY" secondItem="O3i-VB-ddE" secondAttribute="centerY" id="518-bg-be6"/>
                        <constraint firstItem="Dbs-38-o1O" firstAttribute="leading" secondItem="8n8-uF-nCb" secondAttribute="trailing" constant="27" id="DLb-0D-YZA"/>
                        <constraint firstItem="Dbs-38-o1O" firstAttribute="leading" secondItem="8n8-uF-nCb" secondAttribute="trailing" priority="250" constant="10" id="DLb-0D-YZA"/>
                        <constraint firstItem="O3i-VB-ddE" firstAttribute="centerY" secondItem="eP1-9j-rJC" secondAttribute="centerY" id="FKw-bP-atp"/>
                        <constraint firstAttribute="trailing" secondItem="Dbs-38-o1O" secondAttribute="trailing" constant="14" id="Guv-Mo-58i"/>
                        <constraint firstItem="O3i-VB-ddE" firstAttribute="leading" secondItem="eP1-9j-rJC" secondAttribute="leading" constant="8" id="Wwu-vM-ndW"/>
WanPai/Root/Course/VC/CourseDetailVC.swift
@@ -16,12 +16,12 @@
    @IBOutlet weak var btn_local: QMUIButton!
    @IBOutlet weak var label_distance: UILabel!
    @IBOutlet weak var label_listenWeek: UILabel!
    @IBOutlet weak var label_listenTime: UILabel!
    @IBOutlet weak var view_listen: UIView!
    @IBOutlet weak var label_listenTime: UILabel!
    @IBOutlet weak var img_1: UIImageView!
    @IBOutlet weak var img_2: UIImageView!
    @IBOutlet weak var cons_img1Height: NSLayoutConstraint!
    @IBOutlet weak var cons_img2Height: NSLayoutConstraint!
    @IBOutlet weak var label_type: UILabel!
    @IBOutlet weak var label_courseType: UILabel!
    @IBOutlet weak var label_vaildTime: UILabel!
    @IBOutlet weak var view_vaildTime: UIView!
@@ -37,86 +37,92 @@
    private var id = 0
    private var signUpCourseModel:SignUpCourseItemDetailModel?
    private var detailModel:CourseDetailModel!{
    private var detailModel:CourseDetailModel?{
        didSet{
            img_cover.sd_setImage(with: URL(string: detailModel.coverDrawing))
            label_title.text = detailModel.name
            label_distance.text = String(format: "距离我%.2lfkm", detailModel.distance)
            btn_local.setTitle(detailModel.storeAddress, for: .normal)
            label_listenWeek.text = detailModel.weeks.joined(separator: "、")
            label_listenTime.text = detailModel.times.joined(separator: "|")
            label_vaildTime.text = detailModel.time
            label_courseType.text = detailModel.type.strTitle
            label_courseType.isHidden = detailModel.type == .none
            view_vaildTime.isHidden = detailModel.type == .normal
            img_1.sd_setImage(with: URL(string: detailModel.introduceDrawing)) { image, error, type, url in
                let radio = image!.size.width / image!.size.height
                self.cons_img1Height.constant = JQ_ScreenH * radio
            if let m = detailModel{
                img_cover.sd_setImage(with: URL(string: m.coverDrawing))
                label_title.text = m.name
                label_distance.text = String(format: "距离我%.2lfkm", m.distance)
                btn_local.setTitle(m.storeAddress, for: .normal)
                label_listenWeek.text = m.weeks.joined(separator: "、")
                label_listenTime.text = m.times.joined(separator: "|")
                label_vaildTime.text = m.time
                label_courseType.text = m.type.strTitle
                label_courseType.isHidden = m.type == .none
                view_vaildTime.isHidden = m.type == .normal
            }
                let w = String.jq_getWidth(text: m.type.strTitle, height: 25, font: 14)
                label_courseType.jq_cornerPartWithNib(byRoundingCorners: [.topLeft,.bottomLeft], radii: 8, size: CGSize(width: w, height: 25))
                label_courseType.layoutIfNeeded()
            img_2.sd_setImage(with: URL(string: detailModel.detailDrawing)) { image, error, type, url in
                let radio = image!.size.width / image!.size.height
                self.cons_img2Height.constant = JQ_ScreenH * radio
            }
                img_1.sd_setImage(with: URL(string: m.introduceDrawing)) { image, error, type, url in
                    let radio = image!.size.width / image!.size.height
                    self.cons_img1Height.constant = JQ_ScreenW / radio
            label_price.text = detailModel.list.first!.paymentPrice.currency()
            if let subM = detailModel.list.first {
                label_originPrice.isHidden = subM.originalPrice == nil || subM.originalPrice == 0
                label_coin.isHidden = subM.playPaiCoin == nil || subM.playPaiCoin == 0
                label_vipPrice.isHidden = subM.vipPrice == nil || subM.vipPrice == 0
                }
                    //原价
                if let originPrice =  subM.originalPrice{
                    let attribute = AttributedStringbuilder.build().add(string: originPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                    label_originPrice.attributedText = attribute.mutableAttributedString
                }
                img_2.sd_setImage(with: URL(string: m.detailDrawing)) { image, error, type, url in
                    let radio = image!.size.width / image!.size.height
                    self.cons_img2Height.constant = JQ_ScreenW / radio
                }
                label_price.text = m.list.first!.paymentPrice.currency()
                if let subM = m.list.first {
                    label_originPrice.isHidden = subM.originalPrice == nil || subM.originalPrice == 0
                    label_coin.isHidden = subM.playPaiCoin == nil || subM.playPaiCoin == 0
                    label_vipPrice.isHidden = subM.vipPrice == nil || subM.vipPrice == 0
                        //原价
                    if let originPrice =  subM.originalPrice{
                        let attribute = AttributedStringbuilder.build().add(string: originPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                        label_originPrice.attributedText = attribute.mutableAttributedString
                    }
                    //玩湃币
                if let paiCoin = subM.playPaiCoin{
                    let coinAttribute = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                        .add(string: "\(paiCoin)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                    label_coin.attributedText = coinAttribute.mutableAttributedString
                }
                        //玩湃币
                    if let paiCoin = subM.playPaiCoin{
                        let coinAttribute = AttributedStringbuilder.build()
                            .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                            .add(string: "\(paiCoin)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                        label_coin.attributedText = coinAttribute.mutableAttributedString
                    }
                //会员价
                if let vipPrice = subM.vipPrice{
                    let vipAttribute = AttributedStringbuilder.build()
                        .add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                        .add(string: vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                    label_vipPrice.attributedText = vipAttribute.mutableAttributedString
                }
            }
                        //会员价
                    if let vipPrice = subM.vipPrice{
                        let vipAttribute = AttributedStringbuilder.build()
                            .add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                            .add(string: vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                        label_vipPrice.attributedText = vipAttribute.mutableAttributedString
                    }
                }
            if detailModel.type == .experience{
                label_courseType.text = "购买当天有效"
                label_price.text = (detailModel.list.first?.originalPrice ?? 0).currency()
                label_originPrice.isHidden = true
                label_vipPrice.isHidden = true
                if m.type == .experience{
                    label_price.text = (m.list.first?.paymentPrice ?? 0).currency()
                    label_originPrice.isHidden = true
                    label_vipPrice.isHidden = true
                    label_vaildTime.text = "购买当天有效"
                    view_listen.isHidden = true
                }
                    //体验课,假期课不展示
                if m.type != .normal && signUpCourseModel != nil{
                    view_handle.isHidden = true
                    cons_handleHei.constant = 0
                }
                if let m = signUpCourseModel{
                    label_originPrice.isHidden = true
//                    label_vipPrice.isHidden = true
                    let coinAttribute = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                        .add(string: "\(m.wpGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                    label_coin.attributedText = coinAttribute.mutableAttributedString
                    label_price.text = m.paymentPrice.currency()
                    label_coin.alpha = m.wpGold == 0 ? 0:1
                }
            }
            //体验课,假期课不展示
            if detailModel.type != .normal && signUpCourseModel != nil{
                view_handle.isHidden = true
                cons_handleHei.constant = 0
            }
            if let m = signUpCourseModel{
                label_originPrice.isHidden = true
                label_vipPrice.isHidden = true
                let coinAttribute = AttributedStringbuilder.build()
                    .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                    .add(string: "\(m.wpGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                label_coin.attributedText = coinAttribute.mutableAttributedString
                label_price.text = m.amount.currency()
                label_coin.alpha = m.wpGold == 0 ? 0:1
            }
        }
    }
@@ -154,7 +160,6 @@
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        label_type.jq_addCorners(corner: [.topLeft,.bottomLeft], radius: 4, width: 58, height: 25)
    }
    @IBAction func applyAction(_ sender: UIButton) {
@@ -175,6 +180,8 @@
    
    
    @IBAction func localAction(_ sender: QMUIButton) {
        JQ_MapNavigationTool.startNav(CLLocationCoordinate2D(latitude: detailModel.lat.toDouble, longitude: detailModel.lon.toDouble), distanceName: detailModel.storeAddress, scheme: "weparklife")
        if let m = detailModel{
            JQ_MapNavigationTool.startNav(CLLocationCoordinate2D(latitude: m.lat.toDouble, longitude: m.lon.toDouble), distanceName: m.storeAddress, scheme: "weparklife")
        }
    }
}
WanPai/Root/Course/VC/CourseDetailVC.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <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"/>
@@ -21,18 +21,18 @@
                <outlet property="img_2" destination="UC8-uA-Izr" id="JBD-Yf-pWV"/>
                <outlet property="img_cover" destination="Z8w-gF-Zqx" id="8kq-hZ-b27"/>
                <outlet property="label_coin" destination="ldz-Xc-RZY" id="jPO-eU-nzM"/>
                <outlet property="label_courseType" destination="zRE-Nw-vK1" id="55x-xt-uvg"/>
                <outlet property="label_courseType" destination="9Kl-Ol-UVv" id="zMk-G4-rfa"/>
                <outlet property="label_distance" destination="IzD-lg-sfB" id="NyX-OW-yyz"/>
                <outlet property="label_listenTime" destination="6RN-lP-9js" id="PLB-BZ-cHI"/>
                <outlet property="label_listenWeek" destination="utV-MS-Xge" id="gVe-Sf-Ag9"/>
                <outlet property="label_originPrice" destination="pXk-ET-NAX" id="E4r-vs-9I7"/>
                <outlet property="label_price" destination="moa-lg-TqA" id="6OB-8j-Jl7"/>
                <outlet property="label_title" destination="AU1-6y-12Y" id="QBG-zt-Fqe"/>
                <outlet property="label_type" destination="zRE-Nw-vK1" id="3yp-hL-Lep"/>
                <outlet property="label_vaildTime" destination="ggM-zF-PfG" id="36J-8M-TPM"/>
                <outlet property="label_vipPrice" destination="Dqe-kc-hu1" id="eWc-K6-43L"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_handle" destination="wnC-bp-nci" id="udT-Ld-nz5"/>
                <outlet property="view_listen" destination="C7D-PZ-6fb" id="FjT-rY-bBt"/>
                <outlet property="view_vaildTime" destination="sLV-d8-3f1" id="Xd7-mZ-oTl"/>
            </connections>
        </placeholder>
@@ -45,7 +45,7 @@
                    <rect key="frame" x="0.0" y="59" width="393" height="684"/>
                    <subviews>
                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="4lq-ly-hwP">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="628.66666666666663"/>
                            <rect key="frame" x="0.0" y="0.0" width="393" height="646.66666666666663"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dyh-ku-yPw">
                                    <rect key="frame" x="0.0" y="0.0" width="393" height="221.66666666666666"/>
@@ -64,17 +64,17 @@
                                    </constraints>
                                </view>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g0x-NL-sDy">
                                    <rect key="frame" x="0.0" y="221.66666666666669" width="393" height="79"/>
                                    <rect key="frame" x="0.0" y="221.66666666666669" width="393" height="97"/>
                                    <subviews>
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hkJ-dZ-Dsm">
                                            <rect key="frame" x="13" y="78" width="380" height="1"/>
                                            <rect key="frame" x="13" y="96" width="380" height="1"/>
                                            <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="1" id="B6a-T3-6WC"/>
                                            </constraints>
                                        </view>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AU1-6y-12Y">
                                            <rect key="frame" x="14" y="14" width="311" height="25"/>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AU1-6y-12Y">
                                            <rect key="frame" x="14" y="14" width="339.66666666666669" height="43"/>
                                            <constraints>
                                                <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="25" id="jqk-TH-6g7"/>
                                            </constraints>
@@ -83,7 +83,7 @@
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ejk-Ik-4lo" customClass="QMUIButton">
                                            <rect key="frame" x="14" y="46" width="23" height="18"/>
                                            <rect key="frame" x="14" y="64" width="23" height="18"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="18" id="hIU-Ca-ItQ"/>
                                            </constraints>
@@ -97,22 +97,30 @@
                                            </connections>
                                        </button>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距离我0km" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IzD-lg-sfB">
                                            <rect key="frame" x="316.33333333333331" y="47.666666666666629" width="62.666666666666686" height="14.333333333333336"/>
                                            <rect key="frame" x="316.33333333333331" y="65.666666666666629" width="62.666666666666686" height="14.333333333333329"/>
                                            <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
                                            <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zRE-Nw-vK1">
                                            <rect key="frame" x="335" y="14" width="58" height="25"/>
                                        <view contentMode="scaleToFill" horizontalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="oog-Pm-lN5">
                                            <rect key="frame" x="363.66666666666669" y="23" width="29.333333333333314" height="25"/>
                                            <subviews>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Kl-Ol-UVv">
                                                    <rect key="frame" x="8" y="1.3333333333333144" width="13.333333333333336" height="22"/>
                                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                                    <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                    <nil key="highlightedColor"/>
                                                </label>
                                            </subviews>
                                            <color key="backgroundColor" name="FE6E0D"/>
                                            <constraints>
                                                <constraint firstAttribute="width" constant="58" id="Kwv-zz-G6L"/>
                                                <constraint firstAttribute="height" constant="25" id="jx2-eN-fNw"/>
                                                <constraint firstItem="9Kl-Ol-UVv" firstAttribute="top" secondItem="oog-Pm-lN5" secondAttribute="top" constant="1.5" id="18I-m2-Qvj"/>
                                                <constraint firstAttribute="bottom" secondItem="9Kl-Ol-UVv" secondAttribute="bottom" constant="1.5" id="2yN-mW-UY8"/>
                                                <constraint firstItem="9Kl-Ol-UVv" firstAttribute="leading" secondItem="oog-Pm-lN5" secondAttribute="leading" constant="8" id="f1W-vR-dz7"/>
                                                <constraint firstAttribute="height" constant="25" id="fF6-26-NL1"/>
                                                <constraint firstAttribute="trailing" secondItem="9Kl-Ol-UVv" secondAttribute="trailing" constant="8" id="yJc-tZ-DcX"/>
                                            </constraints>
                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                            <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                            <nil key="highlightedColor"/>
                                        </label>
                                        </view>
                                    </subviews>
                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                    <constraints>
@@ -120,19 +128,19 @@
                                        <constraint firstItem="ejk-Ik-4lo" firstAttribute="leading" secondItem="g0x-NL-sDy" secondAttribute="leading" constant="14" id="7zO-D7-SZz"/>
                                        <constraint firstItem="IzD-lg-sfB" firstAttribute="centerY" secondItem="ejk-Ik-4lo" secondAttribute="centerY" id="91h-GQ-Gdc"/>
                                        <constraint firstAttribute="trailing" secondItem="hkJ-dZ-Dsm" secondAttribute="trailing" id="FzS-Gj-uOv"/>
                                        <constraint firstItem="zRE-Nw-vK1" firstAttribute="centerY" secondItem="AU1-6y-12Y" secondAttribute="centerY" id="HgC-eD-JrJ"/>
                                        <constraint firstItem="ejk-Ik-4lo" firstAttribute="top" secondItem="AU1-6y-12Y" secondAttribute="bottom" constant="7" id="IHY-N9-ITJ"/>
                                        <constraint firstAttribute="bottom" secondItem="hkJ-dZ-Dsm" secondAttribute="bottom" id="JW8-P2-4I8"/>
                                        <constraint firstAttribute="trailing" secondItem="zRE-Nw-vK1" secondAttribute="trailing" id="Kb4-YE-bdD"/>
                                        <constraint firstItem="oog-Pm-lN5" firstAttribute="leading" secondItem="AU1-6y-12Y" secondAttribute="trailing" constant="10" id="N9t-Fi-yAg"/>
                                        <constraint firstItem="hkJ-dZ-Dsm" firstAttribute="leading" secondItem="g0x-NL-sDy" secondAttribute="leading" constant="13" id="XAA-BI-ZI2"/>
                                        <constraint firstItem="AU1-6y-12Y" firstAttribute="leading" secondItem="g0x-NL-sDy" secondAttribute="leading" constant="14" id="eP6-ph-r4R"/>
                                        <constraint firstAttribute="trailing" secondItem="oog-Pm-lN5" secondAttribute="trailing" id="mSK-eN-ZQu"/>
                                        <constraint firstItem="AU1-6y-12Y" firstAttribute="top" secondItem="g0x-NL-sDy" secondAttribute="top" constant="14" id="mgr-6k-VK3"/>
                                        <constraint firstItem="oog-Pm-lN5" firstAttribute="centerY" secondItem="AU1-6y-12Y" secondAttribute="centerY" id="om1-uQ-vkj"/>
                                        <constraint firstAttribute="trailing" secondItem="IzD-lg-sfB" secondAttribute="trailing" constant="14" id="qRn-yT-GcB"/>
                                        <constraint firstItem="zRE-Nw-vK1" firstAttribute="leading" secondItem="AU1-6y-12Y" secondAttribute="trailing" constant="10" id="uxX-vX-aO1"/>
                                    </constraints>
                                </view>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C7D-PZ-6fb">
                                    <rect key="frame" x="0.0" y="300.66666666666669" width="393" height="74"/>
                                    <rect key="frame" x="0.0" y="318.66666666666669" width="393" height="74"/>
                                    <subviews>
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Adp-3Y-2eN">
                                            <rect key="frame" x="13" y="73" width="380" height="1"/>
@@ -181,7 +189,7 @@
                                    </constraints>
                                </view>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sLV-d8-3f1">
                                    <rect key="frame" x="0.0" y="374.66666666666669" width="393" height="54"/>
                                    <rect key="frame" x="0.0" y="392.66666666666669" width="393" height="54"/>
                                    <subviews>
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ski-IA-mdi">
                                            <rect key="frame" x="13" y="53" width="380" height="1"/>
@@ -219,13 +227,13 @@
                                    </constraints>
                                </view>
                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="OTP-xt-gbB">
                                    <rect key="frame" x="0.0" y="428.66666666666669" width="393" height="100.00000000000006"/>
                                    <rect key="frame" x="0.0" y="446.66666666666669" width="393" height="100.00000000000006"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="100" id="ra0-2L-YY8"/>
                                    </constraints>
                                </imageView>
                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UC8-uA-Izr">
                                    <rect key="frame" x="0.0" y="528.66666666666663" width="393" height="100"/>
                                    <rect key="frame" x="0.0" y="546.66666666666663" width="393" height="100"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="100" id="xwL-l2-kBa"/>
                                    </constraints>
@@ -274,9 +282,10 @@
                            </subviews>
                        </stackView>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xz5-Ol-6OL">
                            <rect key="frame" x="137" y="17.666666666666629" width="242" height="40"/>
                            <rect key="frame" x="199" y="17.666666666666629" width="180" height="40"/>
                            <color key="backgroundColor" name="FE6E0D"/>
                            <constraints>
                                <constraint firstAttribute="width" constant="180" id="J3c-Rt-gSY"/>
                                <constraint firstAttribute="height" constant="40" id="Sr1-FR-ZcT"/>
                            </constraints>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
@@ -307,7 +316,7 @@
                        <constraint firstAttribute="trailing" secondItem="xz5-Ol-6OL" secondAttribute="trailing" constant="14" id="Fun-i5-O3g"/>
                        <constraint firstItem="AaO-wm-Phu" firstAttribute="leading" secondItem="moa-lg-TqA" secondAttribute="trailing" constant="9" id="Ndw-RN-uID"/>
                        <constraint firstItem="AaO-wm-Phu" firstAttribute="centerY" secondItem="moa-lg-TqA" secondAttribute="centerY" id="aaB-iy-BB7"/>
                        <constraint firstItem="xz5-Ol-6OL" firstAttribute="leading" secondItem="AaO-wm-Phu" secondAttribute="trailing" constant="27" id="cK4-AI-pio"/>
                        <constraint firstItem="xz5-Ol-6OL" firstAttribute="leading" secondItem="AaO-wm-Phu" secondAttribute="trailing" priority="250" constant="10" id="cK4-AI-pio"/>
                        <constraint firstAttribute="trailing" secondItem="vLx-Ym-2BT" secondAttribute="trailing" id="icl-bN-3t0"/>
                        <constraint firstAttribute="height" constant="75" id="mg0-k1-0Lc"/>
                        <constraint firstItem="vLx-Ym-2BT" firstAttribute="top" secondItem="wnC-bp-nci" secondAttribute="top" id="qyC-hn-h5m"/>
WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -118,7 +118,7 @@
            label_stu_hei.attributedText = setAttribute(t1: "\(m.height)", t2: "cm")
            label_stu_wei.attributedText = setAttribute(t1: "\(m.weight)", t2: "kg")
            label_stu_BMI.attributedText = setAttribute(t1: "\(m.bmi)", t2: "正常")
            label_stu_BMI.attributedText = setAttribute(t1: "\(m.bmi)", t2: m.bodyStatus)
            if m.courseList.count > 0{
                pageMenu.frame = CGRect(origin: .zero, size: CGSize(width: JQ_ScreenW - 100, height: 25))
WanPai/Root/Course/VC/CourseVC.swift
@@ -22,14 +22,14 @@
    var startClouseHomeModel:StartClouseHomeModel?
    override func viewDidLoad() {
        super.viewDidLoad()
        SDWebImageDownloader.shared.downloadImage(with: URL(string: startClouseHomeModel?.imgs)) { [weak self] image, data, error, status in
            if let image{
                self?.img_bg.image = image
                let radio = image.size.width / image.size.height
                self?.cons_imgHeight.constant = JQ_ScreenW * radio
            }
        }
        super.viewDidLoad()
        img_bg.sd_setImage(with: URL(string: startClouseHomeModel?.imgs)) {[weak self] image, error, type, url in
            if let image{
                self?.img_bg.image = image
                let radio = image.size.width / image.size.height
                self?.cons_imgHeight.constant = JQ_ScreenW / radio
            }
        }
    }
    override func setUI() {
WanPai/Root/Course/VC/CourseVideoDetailVC.swift
@@ -76,11 +76,11 @@
                        self?.label_studyState.textColor = Def_ThemeColor
                    }
                    SDWebImageDownloader.shared.downloadImage(with: URL(string: model.introductionDrawing)) { image, data, error, state in
                    self?.img_introduceCover.sd_setImage(with: URL(string: model.introductionDrawing)) {[weak self] image, error, type, url in
                        if let img = image{
                            self?.img_introduceCover.image = img
                            let radio = img.size.width / img.size.height
                            self?.cons_imgHei.constant = JQ_ScreenW * radio
                            self?.cons_imgHei.constant = JQ_ScreenW / radio
                        }
                    }
                }
@@ -111,13 +111,13 @@
                        self?.label_studyState.textColor = Def_ThemeColor
                    }
                    SDWebImageDownloader.shared.downloadImage(with: URL(string: model.detailedDiagram)) { image, data, error, state in
                    self?.img_introduceCover.sd_setImage(with: URL(string: model.detailedDiagram), completed: {[weak self] image, error, type, url in
                        if let img = image{
                            self?.img_introduceCover.image = img
                            let radio = img.size.width / img.size.height
                            self?.cons_imgHei.constant = JQ_ScreenW * radio
                            self?.cons_imgHei.constant = JQ_ScreenW / radio
                        }
                    }
                    })
                }
            }).disposed(by: disposeBag)
        }
WanPai/Root/Course/VC/CourseVideoDetailVC.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -49,8 +49,8 @@
                                                <constraint firstAttribute="height" constant="1" id="2he-Dl-fs6"/>
                                            </constraints>
                                        </view>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QR3-va-22V">
                                            <rect key="frame" x="14" y="14" width="45" height="25"/>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QR3-va-22V">
                                            <rect key="frame" x="13.999999999999998" y="14" width="16.333333333333329" height="25"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="25" id="Pn3-Ra-oZL"/>
                                            </constraints>
@@ -59,7 +59,7 @@
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9B3-fo-SmJ">
                                            <rect key="frame" x="64" y="18" width="37.666666666666657" height="17"/>
                                            <rect key="frame" x="35.333333333333343" y="18" width="37.666666666666657" height="17"/>
                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                            <color key="textColor" red="0.93333333330000001" green="0.043137254899999998" blue="0.043137254899999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                            <nil key="highlightedColor"/>
@@ -81,7 +81,7 @@
                                                <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/>
                                            </userDefinedRuntimeAttributes>
                                        </label>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="otm-WL-Xfs">
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="otm-WL-Xfs">
                                            <rect key="frame" x="14" y="44" width="374" height="14.333333333333336"/>
                                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                            <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/>
WanPai/Root/Course/VC/StudentReportVC.swift
@@ -37,7 +37,7 @@
            if let m = data.data{
                self?.label_stu_hei.attributedText = self?.setAttribute(t1: "\(m.height)", t2: "cm")
                self?.label_stu_wei.attributedText = self?.setAttribute(t1: "\(m.weight)", t2: "kg")
                self?.label_stu_BMI.attributedText = self?.setAttribute(t1: "\(m.bmi)", t2: "正常")
                self?.label_stu_BMI.attributedText = self?.setAttribute(t1: "\(m.bmi)", t2:m.bodyStatus)
                SDWebImageDownloader.shared.downloadImage(with: URL(string: m.url)) {[weak self] image, data, error, status in
                    if let image{
WanPai/Root/Home/VC/HomeVC.swift
@@ -44,7 +44,7 @@
        super.viewDidLoad()
        viewModel.configure(collectionView,needMore: false)
//        startLocation()
        startLocation()
        viewModel.dataSource.subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
@@ -52,19 +52,19 @@
            weakSelf.items = data
            let group = DispatchGroup()
            for m in weakSelf.items{
                let queue = DispatchQueue(label: "1")
                queue.async(group: group) {
                    group.enter()
                    m.radio = m.type.defaultImg.size.width / m.type.defaultImg.size.height //默认比例
                    SDWebImageDownloader.shared.downloadImage(with: URL(string: m.backgroundImage),options: .scaleDownLargeImages,progress: nil) { image, data, error, status in
                        if let i = image{
                            m.radio = i.size.width / i.size.height
                        }
                        group.leave()
                    }
                }
            }
//            for m in weakSelf.items{
//                let queue = DispatchQueue(label: "1")
//                queue.async(group: group) {
//                    group.enter()
//                    m.radio = m.type.defaultImg.size.width / m.type.defaultImg.size.height //默认比例
//                    SDWebImageDownloader.shared.downloadImage(with: URL(string: m.backgroundImage),options: .scaleDownLargeImages,progress: nil) { image, data, error, status in
//                        if let i = image{
//                            m.radio = i.size.width / i.size.height
//                        }
//                        group.leave()
//                    }
//                }
//            }
            Services.homeInfo2(storeId: weakSelf.viewModel.storeId.value).subscribe(onNext: {data in
                
@@ -124,20 +124,31 @@
        collectionView.dataSource = self
        collectionView.backgroundColor = .white
        collectionView.register(UINib(nibName: "HomeCCell", bundle: nil), forCellWithReuseIdentifier: "_HomeCCell")
        collectionView.jq_setEmptyView("无数据", image: UIImage(named: "icon_empty"), foregroundColor: .gray, clouse: nil)
        collectionView.jq_setEmptyView("无数据", image: UIImage(named: "icon_LOGO")?.jq_imageWithTintColor(color: .gray), foregroundColor: .gray, clouse: nil)
    }
    private func getStoreInfo(){
        Services.homeInfo().subscribe(onNext: {[weak self] data in
            if let m = data.data{
                self?.storeModel = m
                self?.label_store.text = m.name.isEmpty ? "门店获取失败":m.name
                var text = "欢迎来到 快乐运动俱乐部"
                if m.isVip == 0{text.append("\n加入我们 成为会员")}
                self?.label_vipInfo.text = text
                var text = "欢迎来到 快乐运动俱乐部"
                if m.storeId != 0{
                    self?.viewModel.storeId.accept(m.storeId)
                    if let storeStr = UserDefaults.standard.object(forKey: "CurrentStore") as? String{
                        if let deserModel = HomeStoreModel.deserialize(from: storeStr){
                            self?.label_store.text = deserModel.name.isEmpty ? "门店获取失败":deserModel.name
                            self?.viewModel.storeId.accept(deserModel.storeId)
                            self?.storeModel = deserModel
                            if deserModel.isVip == 0{text.append("\n加入我们 成为会员")}
                            self?.label_vipInfo.text = text
                        }
                    }else{
                        self?.viewModel.storeId.accept(m.storeId)
                        self?.label_store.text = m.name.isEmpty ? "门店获取失败":m.name
                        UserDefaults.standard.set(m.toJSONString(), forKey: "CurrentStore")
                        UserDefaults.standard.synchronize()
                        self?.storeModel = m
                        if m.isVip == 0{text.append("\n加入我们 成为会员")}
                        self?.label_vipInfo.text = text
                    }
                    self?.viewModel.beginRefresh()
                }else{
                    self?.defaultData()
WanPai/Root/Login/VC/LoginVC.swift
@@ -153,9 +153,15 @@
    }
    
    @IBAction func wechatLoginAcion(_ sender: QMUIButton) {
        CommonAlertView.show(title: "提示", content: "11231231231231231") { _ in
//        let req = SendAuthReq()
//        req.scope = "snsapi_userinfo"
//        req.state = "weparkLife_iOS"
//        WXApi.send(req)
        CommonAlertView.show(title: "提示", content: "账号权限正在审核中") { _ in
        }
        
    }
WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -171,6 +171,12 @@
                handleVC?.navigationController?.tabBarController?.selectedIndex = 1
                handleVC?.navigationController?.popToRootViewController(animated: true)
                dismiss(animated:true)
            case "查看报名":
                dismiss(animated:true){ [weak self] in
                    let vc = ActivitySignupListVC()
                    self?.handleVC?.navigationController?.pushViewController(vc)
                }
            default:break
        }
    }
WanPai/Root/Other/VC/ProfileVC.swift
@@ -42,7 +42,8 @@
        CommonAlertView.show(title: "退出登录", content: "是否退出当前账号?") { status in
            if status{
                UserViewModel.clearToken()
                app.needLogin()
            }
        }
    }
WanPai/Root/Search/TCell/SearchStoreDetail_1_TCell.swift
@@ -6,6 +6,7 @@
//
import UIKit
import JQTools
class SearchStoreDetail_1_TCell: UITableViewCell {
@@ -13,11 +14,12 @@
        didSet{
            img_cover.sd_setImage(with: URL(string: detailCourseModel.coverDrawing))
            label_title.text = detailCourseModel.name
            label_teachTime.text = "上课时间:" + detailCourseModel.classStartTime.joined(separator: ",")
            label_hasNum.text = "包含课时数:\(detailCourseModel.classHours)"
            label_teachTime.text = "上课时间:" + (detailCourseModel.classStartTime ?? "")
            label_enrollNum.text = "已报名\(detailCourseModel.applicantsNumber)人"
            let price = String(format: "%@|详情", detailCourseModel.originalPrice.currency())
            let price = String(format: "%@|详情", detailCourseModel.originalPrice.currency())
            btn_price.setTitle(price, for: .normal)
            label_hasNum.attributedText = AttributedStringbuilder.build().add(string: "包含课时数:", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#737373")).add(string: "\(detailCourseModel.classHours)课时", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#F11010")).mutableAttributedString
        }
    }
WanPai/Root/Search/VC/SearchVC.swift
@@ -13,7 +13,7 @@
    @IBOutlet weak var banner_collectionView: UICollectionView!
    @IBOutlet weak var label_empty: UILabel!
    @IBOutlet weak var view_container: UIView!
    @IBOutlet weak var cons_CollectionAspect: NSLayoutConstraint!
//    @IBOutlet weak var cons_CollectionAspect: NSLayoutConstraint!
    private var models = [StartClouseExploreModel]()
    private lazy var mapView:MAMapView = {
@@ -81,6 +81,22 @@
        push(vc: vc)
    }
    @IBAction func aboutMinProgram(_ sender: Any) {
        CommonAlertView.show(title: "提示", content: "即将打开小程序,是否继续?") { status in
            if status{
                let miniProgam = WXLaunchMiniProgramReq()
                miniProgam.userName = WeChatMinProgram
//                miniProgam.path = WeChatMinProgramPath
                WXApi.send(miniProgam) { s in
                    if !s{
                        alert(msg: "打开失败")
                    }
                }
            }
        }
    }
    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .darkContent
    }
WanPai/Root/Search/VC/SearchVC.xib
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <accessibilityOverrides/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -142,7 +142,7 @@
                                                <action selector="customerAction:" destination="-1" eventType="touchUpInside" id="af3-AY-43v"/>
                                            </connections>
                                        </view>
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V7G-4l-CVL">
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V7G-4l-CVL" customClass="TapBtn" customModule="WanPai" customModuleProvider="target">
                                            <rect key="frame" x="178.66666666666663" y="0.0" width="162.33333333333337" height="162"/>
                                            <subviews>
                                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_aboutUs" translatesAutoresizingMaskIntoConstraints="NO" id="VHu-Vv-jwl">
@@ -182,6 +182,9 @@
                                                    <real key="value" value="12"/>
                                                </userDefinedRuntimeAttribute>
                                            </userDefinedRuntimeAttributes>
                                            <connections>
                                                <action selector="aboutMinProgram:" destination="-1" eventType="touchUpInside" id="e1R-22-FZ6"/>
                                            </connections>
                                        </view>
                                    </subviews>
                                    <constraints>
@@ -252,7 +255,7 @@
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
        <systemColor name="systemGroupedBackgroundColor">
            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </systemColor>
    </resources>
</document>
WanPai/Root/Welfare/VC/CoinStoreCenterVC.swift
@@ -57,6 +57,7 @@
        title = "积分商城"
        headView.viewModel = viewModel
        headView.innerView = self.view
        viewModel.configure(collectionView)
        collectionView.jq_setEmptyView()
        viewModel.beginRefresh()
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift
@@ -80,13 +80,13 @@
                weakSelf.label_coin.attributedText = AttributedStringbuilder.build().add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: "\(model.wanpaiGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
                SDWebImageDownloader.shared.downloadImage(with: URL(string: model.introduceDrawing)) { [weak self] image, data, error, status in
                    if let img = image{
                        self?.img_intro.image = img
                        let radio = img.size.width / img.size.height
                        self?.cons_imgIntroHei.constant = JQ_ScreenW * radio
                    }
                }
                weakSelf.img_intro.sd_setImage(with: URL(string: model.introduceDrawing)) {[weak self] image, error, type, url in
                    if let img = image{
                        self?.img_intro.image = img
                        let radio = img.size.width / img.size.height
                        self?.cons_imgIntroHei.constant = JQ_ScreenW / radio
                    }
                }
            }
        }).disposed(by: disposeBag)
        
WanPai/Root/Yard/TCell/YardBookingTCell.swift
@@ -17,7 +17,8 @@
    @IBOutlet weak var label_price: UILabel!
    @IBOutlet weak var label_status: UILabel!
    @IBOutlet weak var btn_payment: UIButton!
//    @IBOutlet weak var btn_cancel: UIButton!
    @IBOutlet weak var btn_detail: UIButton!
        //    @IBOutlet weak var btn_cancel: UIButton!
    private var timer:Timer?
    var indexPath:IndexPath!
@@ -31,6 +32,7 @@
            label_price.text = yardBookingModel.payMoney.currency()
            label_status.text = yardBookingModel.status.titleRaw
            label_bookingTime.text = String(format: "预约时间:%@", yardBookingModel.appointment)
            btn_detail.isHidden = yardBookingModel.status == .cancel
            switch yardBookingModel.status{
                case .none:break
WanPai/Root/Yard/TCell/YardBookingTCell.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -199,6 +199,7 @@
                </constraints>
            </tableViewCellContentView>
            <connections>
                <outlet property="btn_detail" destination="g9Q-HA-dpz" id="aiN-cV-sBv"/>
                <outlet property="btn_payment" destination="Z37-Ah-lZf" id="6m4-bk-p8f"/>
                <outlet property="label_address" destination="SYI-XM-6au" id="RSd-ec-F2w"/>
                <outlet property="label_bookingTime" destination="2RG-jN-KoP" id="THZ-p2-UxB"/>
WanPai/Root/Yard/VC/YardBookingDetailVC.swift
@@ -26,6 +26,7 @@
    @IBOutlet weak var view_qrCode: UIView!
    @IBOutlet weak var btn_cancel: UIButton!
    @IBOutlet weak var btn_payment: UIButton!
    @IBOutlet weak var view_halfYard: UIView!
    var yardBookingModel:YardBookingModel!
@@ -54,6 +55,7 @@
            if let model = data.data{
                self?.label_yardName.text = model.nextName
                self?.label_bookingType.text = model.isHalf == 1 ? "半场":"全场"
                self?.view_halfYard.isHidden = model.isHalf != 1
                self?.label_halfYardName.text = model.halfName
                self?.label_bookingPerson.text = model.booker
                self?.label_contact.text = model.phone
WanPai/Root/Yard/VC/YardBookingDetailVC.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -27,6 +27,7 @@
                <outlet property="label_usedState" destination="sQU-vw-kAC" id="YJV-oc-jwv"/>
                <outlet property="label_yardName" destination="7h1-Dw-eHi" id="zti-Dx-dlW"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_halfYard" destination="nqL-6S-ZE7" id="dSS-cN-Fyb"/>
                <outlet property="view_qrCode" destination="1hl-Kq-mul" id="8Ro-IP-cgz"/>
            </connections>
        </placeholder>
WanPai/Root/Yard/VC/YardDetailVC.swift
@@ -11,6 +11,7 @@
import FFPage
import RxRelay
import RxSwift
import WebKit
class YardDetailDateManager {
@@ -64,7 +65,8 @@
    @IBOutlet weak var cons_yardTypeHei: NSLayoutConstraint!
    @IBOutlet weak var view_halfYard: UIView!
    @IBOutlet weak var view_selectYardType: UIView!
    @IBOutlet weak var label_introduce: UILabel!
    @IBOutlet weak var web_introduce: WKWebView!
    @IBOutlet weak var cons_webHei: NSLayoutConstraint!
    
    private var coupons = [CouponInfoModel]()
    private var selectCouponModel:CouponInfoModel?
@@ -139,8 +141,9 @@
                weakSelf.collection_halfYard.reloadData()
                weakSelf.collection_yardType.reloadData()
                weakSelf.label_introduce.text = model.introduce
                weakSelf.web_introduce.loadHTMLString(model.introduce.jq_wrapHtml(), baseURL: nil)
                weakSelf.view_banner.frame = CGRect(origin: .zero, size: CGSize(width: JQ_ScreenW, height: JQ_ScreenW * 0.56))
                weakSelf.view_banner.setImages(images: model.imgs.components(separatedBy: ",")) { index in
                }
@@ -167,6 +170,17 @@
                weakSelf.label_price.text = "¥-/-币"
            }
        }).disposed(by: disposeBag)
        web_introduce.scrollView.rx.observe(CGSize.self, "contentSize").map { (size) -> CGFloat? in
            if let size = size{
                return size.height
            }
            return nil
        }.subscribe(onNext: { [unowned self](height) in
            if let height = height{
                self.cons_webHei.constant = height
            }
        }).disposed(by: disposeBag)
    }
    override func setUI() {
WanPai/Root/Yard/VC/YardDetailVC.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <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"/>
@@ -21,12 +21,12 @@
                <outlet property="collection_yardType" destination="iTt-0L-WWa" id="Mqm-06-FEB"/>
                <outlet property="cons_halfYardHei" destination="4dv-bi-SsN" id="2pj-Uc-E5Z"/>
                <outlet property="cons_pagesHei" destination="qft-kh-wVx" id="1Du-Xa-Bko"/>
                <outlet property="cons_webHei" destination="tkN-1P-oj8" id="kM5-ua-gj0"/>
                <outlet property="cons_yardTypeHei" destination="qR2-Gx-1gR" id="JMf-al-ado"/>
                <outlet property="label_address" destination="ABf-uR-SlT" id="vyV-vd-fqU"/>
                <outlet property="label_cashPrice" destination="2xn-tO-Yya" id="5fc-MF-K3M"/>
                <outlet property="label_coinPrice" destination="qTF-Bj-PLk" id="6Lh-p8-qdY"/>
                <outlet property="label_datetime" destination="N2q-3h-Yvf" id="CN5-H5-VAs"/>
                <outlet property="label_introduce" destination="BqS-al-1YA" id="7ch-Jq-Hk9"/>
                <outlet property="label_name" destination="weU-mS-qsX" id="AzG-WP-rGE"/>
                <outlet property="label_price" destination="ats-7F-9UX" id="fUw-1m-wUI"/>
                <outlet property="label_selectTimes" destination="uWS-Ys-05D" id="gTd-6q-zvn"/>
@@ -42,6 +42,7 @@
                <outlet property="view_pages" destination="Mb1-vO-8eh" id="LAB-Hh-xOV"/>
                <outlet property="view_selectYardType" destination="mor-oH-zNK" id="Nlg-ku-edb"/>
                <outlet property="view_yardType" destination="46U-50-FZk" id="b2U-n9-Cry"/>
                <outlet property="web_introduce" destination="oRE-1Z-WlN" id="wFs-WF-f9y"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -53,7 +54,7 @@
                    <rect key="frame" x="0.0" y="59" width="393" height="758.99999999999977"/>
                    <subviews>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9j6-1C-tRQ">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="1467.6666666666667"/>
                            <rect key="frame" x="0.0" y="0.0" width="393" height="1432.6666666666667"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M0Z-qf-aKm">
                                    <rect key="frame" x="0.0" y="220" width="393" height="89"/>
@@ -427,7 +428,7 @@
                                    <nil key="highlightedColor"/>
                                </label>
                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="vgf-ew-f1K">
                                    <rect key="frame" x="0.0" y="1056" width="393" height="411.66666666666674"/>
                                    <rect key="frame" x="0.0" y="1056" width="393" height="376.66666666666674"/>
                                    <subviews>
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mAI-wI-5me">
                                            <rect key="frame" x="0.0" y="0.0" width="393" height="50"/>
@@ -610,7 +611,7 @@
                                            </constraints>
                                        </view>
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Dm-wG-zL9">
                                            <rect key="frame" x="0.0" y="261.66666666666674" width="393" height="150"/>
                                            <rect key="frame" x="0.0" y="261.66666666666674" width="393" height="115"/>
                                            <subviews>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="场地说明" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MCU-6e-poI">
                                                    <rect key="frame" x="14.000000000000004" y="17" width="57.333333333333343" height="20"/>
@@ -621,21 +622,25 @@
                                                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
                                                    <nil key="highlightedColor"/>
                                                </label>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="场地说明...." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BqS-al-1YA">
                                                    <rect key="frame" x="14" y="51" width="365" height="85"/>
                                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                                    <color key="textColor" red="0.37254901960784315" green="0.37254901960784315" blue="0.37254901960784315" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                    <nil key="highlightedColor"/>
                                                </label>
                                                <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oRE-1Z-WlN">
                                                    <rect key="frame" x="14" y="51" width="365" height="50"/>
                                                    <constraints>
                                                        <constraint firstAttribute="height" constant="50" id="tkN-1P-oj8"/>
                                                    </constraints>
                                                    <wkWebViewConfiguration key="configuration">
                                                        <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
                                                        <wkPreferences key="preferences"/>
                                                    </wkWebViewConfiguration>
                                                </wkWebView>
                                            </subviews>
                                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                            <constraints>
                                                <constraint firstAttribute="trailing" secondItem="BqS-al-1YA" secondAttribute="trailing" constant="14" id="TLe-4V-6Gi"/>
                                                <constraint firstAttribute="bottom" secondItem="oRE-1Z-WlN" secondAttribute="bottom" constant="14" id="GKU-b4-XpY"/>
                                                <constraint firstAttribute="trailing" secondItem="oRE-1Z-WlN" secondAttribute="trailing" constant="14" id="HHA-EF-4Wo"/>
                                                <constraint firstItem="oRE-1Z-WlN" firstAttribute="top" secondItem="MCU-6e-poI" secondAttribute="bottom" constant="14" id="Rg5-L2-8Sa"/>
                                                <constraint firstItem="MCU-6e-poI" firstAttribute="leading" secondItem="0Dm-wG-zL9" secondAttribute="leading" constant="14" id="WCY-oz-OZk"/>
                                                <constraint firstItem="BqS-al-1YA" firstAttribute="top" secondItem="MCU-6e-poI" secondAttribute="bottom" constant="14" id="fZy-W0-wPe"/>
                                                <constraint firstItem="oRE-1Z-WlN" firstAttribute="leading" secondItem="0Dm-wG-zL9" secondAttribute="leading" constant="14" id="kQ4-fU-rsW"/>
                                                <constraint firstItem="MCU-6e-poI" firstAttribute="top" secondItem="0Dm-wG-zL9" secondAttribute="top" constant="17" id="nTj-pX-nMs"/>
                                                <constraint firstItem="BqS-al-1YA" firstAttribute="leading" secondItem="0Dm-wG-zL9" secondAttribute="leading" constant="14" id="ynu-t2-H6y"/>
                                                <constraint firstAttribute="bottom" secondItem="BqS-al-1YA" secondAttribute="bottom" constant="14" id="zFb-XP-X4z"/>
                                            </constraints>
                                        </view>
                                    </subviews>
WanPai/SceneDelegate.swift
@@ -9,7 +9,7 @@
import SVProgressHUD
import JQTools
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
class SceneDelegate: UIResponder, UIWindowSceneDelegate,WXApiDelegate {
    
    var window: UIWindow?
    
@@ -38,7 +38,11 @@
        }
        
    }
    func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
        WXApi.handleOpenUniversalLink(userActivity, delegate: app)
    }
    func sceneDidDisconnect(_ scene: UIScene) {
        
    }
WanPai/WanPaiDebug.entitlements
New file
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.developer.associated-domains</key>
    <array>
        <string>applinks:www.weparklife.com</string>
    </array>
</dict>
</plist>