From c490a22b7cf6949a0b45eb8ee732bace1c023eeb Mon Sep 17 00:00:00 2001
From: 无故事王国 <841720330@qq.com>
Date: 星期五, 22 十二月 2023 09:54:50 +0800
Subject: [PATCH] fix bug

---
 WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift     |    6 
 WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift |   22 ++
 WanPai/Network/Services.swift                           |   10 
 WanPai/Root/Course/VC/CourseDetailApplyVC.swift         |    6 
 WanPai/Root/Yard/VC/YardDetailVC.swift                  |    4 
 WanPai/Common/View/PaymentView.swift                    |   40 ++++
 WanPai/Root/Home/VC/HomeVC.swift                        |   32 +++
 WanPai/Root/Course/VC/CourseOnlineListVC.swift          |    2 
 WanPai/Root/Yard/TCell/YardBookingTCell.swift           |    4 
 WanPai/Root/Welfare/VC/RechargeCenterVC.swift           |    2 
 WanPai/Root/Games/TCell/GamesTCell.swift                |    2 
 WanPai/Config/Enums.swift                               |    1 
 WanPai.xcodeproj/project.pbxproj                        |   13 +
 WanPai/WanPaiRelease.entitlements                       |   10 +
 WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib   |    7 
 WanPai/Root/Login/VC/LoginVC.swift                      |   17 +
 WanPai/Root/Yard/VC/YardBookingDetailVC.swift           |   11 
 WanPai/Root/Games/GamesVC.swift                         |    4 
 WanPai/Root/Welfare/VC/WelfareVC.swift                  |    8 
 WanPai/Common/VC/CommonScanQRCodeVC.swift               |   82 ++++-----
 WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift         |    2 
 WanPai/Info.plist                                       |    2 
 WanPai/Root/Search/VC/SearchVC.swift                    |    2 
 WanPai/Root/Search/VC/SearchVC.xib                      |   75 +--------
 WanPai/Root/Welfare/VC/WelfareVC.xib                    |   82 ---------
 WanPai/Root/Login/VC/LoginVC.xib                        |    4 
 26 files changed, 203 insertions(+), 247 deletions(-)

diff --git a/WanPai.xcodeproj/project.pbxproj b/WanPai.xcodeproj/project.pbxproj
index 9a92be7..2c02c1f 100644
--- a/WanPai.xcodeproj/project.pbxproj
+++ b/WanPai.xcodeproj/project.pbxproj
@@ -320,6 +320,7 @@
 		1304B85B2A4EB0F8000D4F2E /* SearchBannerCCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchBannerCCell.xib; sourceTree = "<group>"; };
 		1304B85E2A4EB59F000D4F2E /* SearchStoreListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchStoreListVC.swift; sourceTree = "<group>"; };
 		1304B85F2A4EB59F000D4F2E /* SearchStoreListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchStoreListVC.xib; sourceTree = "<group>"; };
+		1306580A2B22C1BB008B2500 /* WanPaiRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WanPaiRelease.entitlements; sourceTree = "<group>"; };
 		130CE4512A4823AC00394384 /* StudentMedalCCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentMedalCCell.swift; sourceTree = "<group>"; };
 		130CE4522A4823AC00394384 /* StudentMedalCCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StudentMedalCCell.xib; sourceTree = "<group>"; };
 		130CE4552A4925AB00394384 /* StudentVideoCCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentVideoCCell.swift; sourceTree = "<group>"; };
@@ -1034,6 +1035,7 @@
 		8D8400D02A2F1430003AF6A2 /* WanPai */ = {
 			isa = PBXGroup;
 			children = (
+				1306580A2B22C1BB008B2500 /* WanPaiRelease.entitlements */,
 				131938692AC2D9B700FC63F1 /* WanPaiDebug.entitlements */,
 				134BD51F2A6008BA00786819 /* YYPaymentManager */,
 				13FB93B72A5C0270009F558A /* Category */,
@@ -1975,7 +1977,7 @@
 				CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiDebug.entitlements;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 7;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2MWV8K39DV;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -1987,6 +1989,7 @@
 				INFOPLIST_KEY_CFBundleDisplayName = "玩湃生活";
 				INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.sports";
 				INFOPLIST_KEY_NSCameraUsageDescription = "WanPai需要使用使用使用相机,来上传学员头像、评论图片、扫描二维码";
+				INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店";
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "WanPai需要使用使用使用相册,来上传学员头像、评论图片、扫描二维码";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
@@ -2003,7 +2006,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay",
 				);
-				MARKETING_VERSION = 1.0;
+				MARKETING_VERSION = 1.0.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -2135,9 +2138,10 @@
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+				CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiRelease.entitlements;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 7;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2MWV8K39DV;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -2149,6 +2153,7 @@
 				INFOPLIST_KEY_CFBundleDisplayName = "玩湃生活";
 				INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.sports";
 				INFOPLIST_KEY_NSCameraUsageDescription = "WanPai需要使用使用使用相机,来上传学员头像、评论图片、扫描二维码";
+				INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店";
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "WanPai需要使用使用使用相册,来上传学员头像、评论图片、扫描二维码";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
@@ -2165,7 +2170,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay",
 				);
-				MARKETING_VERSION = 1.0;
+				MARKETING_VERSION = 1.0.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
diff --git a/WanPai/Common/VC/CommonScanQRCodeVC.swift b/WanPai/Common/VC/CommonScanQRCodeVC.swift
index aeec397..7771867 100644
--- a/WanPai/Common/VC/CommonScanQRCodeVC.swift
+++ b/WanPai/Common/VC/CommonScanQRCodeVC.swift
@@ -7,6 +7,8 @@
 
 import UIKit
 import AVKit
+import JQTools
+import SceneKit
 
 class CommonScanQRCodeVC: BaseVC,AVCaptureMetadataOutputObjectsDelegate {
 
@@ -41,44 +43,49 @@
 	public override func viewDidLoad() {
 		super.viewDidLoad()
 		title = "扫描二维码"
+		if UIImagePickerController.isSourceTypeAvailable(.camera){
 
-		if borderView == nil {
-			borderView = UIImageView(image: UIImage(named: "ty_qrcode_bg"))
-		}
-
-		if scanLineView == nil {
-			scanLineView = UIImageView(image: UIImage(named: "ty_qrcode_line"))
-		}
-
-		if closeBtn == nil &&  modalPresentationStyle == .fullScreen && self.presentationController != nil {
-			closeBtn = UIButton(type: .custom)
-			closeBtn!.addTarget(self, action: #selector(closeView), for: .touchUpInside)
-			let image = Bundle.JQ_Bundle(icon: "close_btn")
-			closeBtn!.setImage(image, for: .normal)
-			view.addSubview(closeBtn!)
-			closeBtn!.snp.makeConstraints { (make) in
-				make.top.equalTo(30)
-				make.left.equalTo(20)
-				make.width.height.equalTo(30)
+			if borderView == nil {
+				borderView = UIImageView(image: UIImage(named: "ty_qrcode_bg"))
 			}
-		}
 
-		let authStatus = AVCaptureDevice.authorizationStatus(for: AVMediaType.video)
-		if authStatus == AVAuthorizationStatus.notDetermined {
-			AVCaptureDevice.requestAccess(for: AVMediaType.video) { (granted) in
-				if granted{
-					self.limitSuccess()
-				}else{
-					self.limitFaild()
+			if scanLineView == nil {
+				scanLineView = UIImageView(image: UIImage(named: "ty_qrcode_line"))
+			}
+
+			if closeBtn == nil &&  modalPresentationStyle == .fullScreen && self.presentationController != nil {
+				closeBtn = UIButton(type: .custom)
+				closeBtn!.addTarget(self, action: #selector(closeView), for: .touchUpInside)
+				let image = Bundle.JQ_Bundle(icon: "close_btn")
+				closeBtn!.setImage(image, for: .normal)
+				view.addSubview(closeBtn!)
+				closeBtn!.snp.makeConstraints { (make) in
+					make.top.equalTo(30)
+					make.left.equalTo(20)
+					make.width.height.equalTo(30)
 				}
 			}
-		} else if authStatus == AVAuthorizationStatus.restricted || authStatus == AVAuthorizationStatus.denied {
-			limitFaild()
-		} else {
-			limitSuccess()
+
+			let authStatus = AVCaptureDevice.authorizationStatus(for: AVMediaType.video)
+			if authStatus == AVAuthorizationStatus.notDetermined {
+				AVCaptureDevice.requestAccess(for: AVMediaType.video) { (granted) in
+					if granted{
+						self.limitSuccess()
+					}else{
+						self.limitFaild()
+					}
+				}
+			} else if authStatus == AVAuthorizationStatus.restricted || authStatus == AVAuthorizationStatus.denied {
+				limitFaild()
+			} else {
+				limitSuccess()
+			}
+		}else{
+			alertError(msg: "当前环境相机不可用")
+			DispatchQueue.main.asyncAfter(deadline: .now()+1) {
+				self.navigationController?.popViewController()
+			}
 		}
-
-
 
 
 //		if(!checkCameraAuth()){
@@ -160,17 +167,6 @@
 		alertController.addAction(cancelAction)
 		alertController.addAction(okAction)
 		self.present(alertController, animated: true, completion: nil)
-	}
-
-	public override func viewWillAppear(_ animated: Bool) {
-		firstResult = true
-		if let session = self.session {
-			let queue = DispatchQueue(label: "startRun")
-			queue.async {
-				session.startRunning()
-			}
-		}
-		scanTimer?.fireDate = NSDate.distantPast
 	}
 
 	func checkCameraAuth() -> Bool {
diff --git a/WanPai/Common/View/PaymentView.swift b/WanPai/Common/View/PaymentView.swift
index cefc9b6..1212b45 100644
--- a/WanPai/Common/View/PaymentView.swift
+++ b/WanPai/Common/View/PaymentView.swift
@@ -10,6 +10,16 @@
 
 class PaymentView: UIView,JQNibView{
 
+	enum PaymentEnumType {
+	case course //课程
+	case yard //场地
+	case joinMember //会员加入
+	case game //游戏
+	case recharge //充值
+	case goods(ExchangeType)
+	case activity
+	}
+
     @IBOutlet weak var view_container: UIView!
     @IBOutlet weak var cons_bottom: NSLayoutConstraint!
     @IBOutlet weak var btn_wechat: UIButton!
@@ -32,7 +42,9 @@
 	@IBOutlet weak var btn_integral: UIButton!
 	private var hasNotStudent:Bool = false
     private var clouse:((PayType)->Void)?
-    private var payType:PayType?
+    private var payType:PayType!
+	private var paymentEnumType:PaymentEnumType!
+	private var customType = [PayType]() //支付项目
 
 	override func awakeFromNib() {
 		super.awakeFromNib()
@@ -47,10 +59,11 @@
 		layoutIfNeeded()
 	}
 
-	static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),hasNotStudent:Bool = false,_ clouse:@escaping (PayType)->Void){
+	static func show(enumType:PaymentEnumType,money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),hasNotStudent:Bool = false,_ clouse:@escaping (PayType)->Void){
         let paymentView = PaymentView.jq_loadNibView()
         paymentView.frame = sceneDelegate?.window?.frame ?? .zero
         paymentView.clouse = clouse
+		paymentView.paymentEnumType = enumType
 //		paymentView.view_wechat.isHidden = (money.wx == nil || money.wx == 0)
         paymentView.view_coin.isHidden = (money.coin == nil || money.coin == 0)
         paymentView.view_course.isHidden = (money.course == nil || money.course == 0)
@@ -69,7 +82,7 @@
 		if !paymentView.view_alipay.isHidden{customType.append(.aliPay)}
 		if !paymentView.view_wechat.isHidden{customType.append(.wechat)}
 		if !paymentView.view_coin.isHidden{customType.append(.coin)}
-
+		paymentView.customType = customType
 		paymentView.btn_course.isUserInteractionEnabled = !hasNotStudent
 
 		paymentView.payType = customType.first
@@ -127,7 +140,26 @@
     }
     
     @IBAction func paymentAction(_ sender: UIButton) {
-        guard payType != nil else {alertError(msg: "请选择支付方式");return}
+		//场地,游戏,门票 可免费,根据上面的金额,展示了哪些条目判断,如果都没展示,金额全部会是0
+		switch paymentEnumType {
+			case .yard,.game:
+				if payType == nil && customType.count == 0{
+					payType = .coin
+				}else{
+					guard payType != nil else {alertError(msg: "请选择支付方式");return}
+				}
+			case .goods(let type):
+				if type == .ticket{
+					if payType == nil && customType.count == 0{
+						payType = .coin
+					}else{
+						guard payType != nil else {alertError(msg: "请选择支付方式");return}
+					}
+				}else{
+					guard payType != nil else {alertError(msg: "请选择支付方式");return}
+				}
+			default:guard payType != nil else {alertError(msg: "请选择支付方式");return}
+		}
         clouse?(payType!)
         hidden()
     }
diff --git a/WanPai/Config/Enums.swift b/WanPai/Config/Enums.swift
index ace2d05..0952f4b 100644
--- a/WanPai/Config/Enums.swift
+++ b/WanPai/Config/Enums.swift
@@ -26,6 +26,7 @@
 
     /// 支付方式
 enum PayType:Int,HandyJSONEnum{
+	case free = 0 //特殊状态:免费
 	case wechat = 1
     case aliPay = 2
     case coin = 3
diff --git a/WanPai/Info.plist b/WanPai/Info.plist
index e2e4fef..1bd3226 100644
--- a/WanPai/Info.plist
+++ b/WanPai/Info.plist
@@ -29,6 +29,8 @@
 			<array/>
 		</dict>
 	</array>
+	<key>ITSAppUsesNonExemptEncryption</key>
+	<false/>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>weixin</string>
diff --git a/WanPai/Network/Services.swift b/WanPai/Network/Services.swift
index 9355b17..b6b2959 100644
--- a/WanPai/Network/Services.swift
+++ b/WanPai/Network/Services.swift
@@ -12,16 +12,14 @@
 import JQTools
 
 #if DEBUG
-let All_Url = "http://192.168.110.27:56666" //罗易胜
-//let All_Url = "http://8.137.22.229:56666" //正式地址
+//let All_Url = "http://192.168.110.27:56666" //罗易胜
+let All_Url = "http://8.137.22.229:56666" //正式地址
 let Game_Url = "https://try.daowepark.com"
-
-
 	//let Socket_Url = "192.168.110.22"
 #else
 let All_Url = "http://8.137.22.229:56666" //正式地址
-//let Game_Url = "https://port.daowepark.com"//正式地址
-let Game_Url = "https://try.daowepark.com" //测试地址
+let Game_Url = "https://port.daowepark.com"//正式地址
+//let Game_Url = "https://try.daowepark.com" //测试地址
 
 	//let Socket_Url = "192.168.110.22"
 #endif
diff --git a/WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift b/WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
index bf3bc79..a877286 100644
--- a/WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
+++ b/WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -149,7 +149,7 @@
 						return
 					}
 
-					PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in
+					PaymentView.show(enumType: .activity, money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in
 						guard let weakSelf = self else { return }
 						if type == .courseNum{
 							PaymentCourseView.show(id: weakSelf.activityDetailModel.id,number:course) { id in
@@ -181,7 +181,7 @@
 					}
 
 					let isStudent = weakSelf.students.filter({$0.isStudent == 0}).count > 0 ? true:false
-					PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in
+					PaymentView.show(enumType: .activity, money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in
 						guard let weakSelf = self else { return }
 						if type == .courseNum{
 							PaymentCourseView.show(id: weakSelf.activityDetailModel.id,number:course) { id in
@@ -221,7 +221,7 @@
 							}
 						}
 					case .wechat:break
-					case .coin:
+					case .coin,.free:
 						let vc = PaymentResultVC(result: .success, objType: .activityApply)
 						self?.push(vc: vc)
 					case .courseNum:
diff --git a/WanPai/Root/Course/VC/CourseDetailApplyVC.swift b/WanPai/Root/Course/VC/CourseDetailApplyVC.swift
index 1ab73d7..cb35b2e 100644
--- a/WanPai/Root/Course/VC/CourseDetailApplyVC.swift
+++ b/WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -254,7 +254,7 @@
 						coin = weakSelf.signUpModel?.coinPrice ?? 0
 					}
 
-					PaymentView.show(money: (ali:discountPrice,wx:discountPrice,coin:coin,course:nil,integral:nil)) { [weak self] payType in
+					PaymentView.show(enumType: .course, money: (ali:discountPrice,wx:discountPrice,coin:coin,course:nil,integral:nil)) { [weak self] payType in
 						guard let weakSelf = self else { return }
 
 						var resultPayPrice:Double = 0
@@ -269,7 +269,7 @@
 
 							case .coin:
 								resultPayPrice = Double(coin)
-							case .courseNum,.integral:break
+							default:break
 						}
 
 						Services.courcePayment(conponId: weakSelf.selectCouponModel?.id, courseConfigId: model.id, id: weakSelf.detailModel!.id, price: resultPayPrice, payType: payType, stuId: weakSelf.studentModels.map({$0.id}),orderId: weakSelf.signUpModel?.coursePayId).subscribe(onNext: { data in
@@ -296,7 +296,7 @@
 										let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id)
 										vc.isExtend = self?.signUpModel?.payStatus == .paymented
 										self?.push(vc: vc)
-									case .courseNum,.integral:break
+									default:break
 								}
 							}else{
 								alertError(msg: data.msg)
diff --git a/WanPai/Root/Course/VC/CourseOnlineListVC.swift b/WanPai/Root/Course/VC/CourseOnlineListVC.swift
index 5816b09..c8f257c 100644
--- a/WanPai/Root/Course/VC/CourseOnlineListVC.swift
+++ b/WanPai/Root/Course/VC/CourseOnlineListVC.swift
@@ -99,7 +99,7 @@
         collectionView.delegate = self
         collectionView.dataSource = self
 		collectionView.backgroundColor = .white
-		collectionView.contentInset = UIEdgeInsets(top: 0, left: 14, bottom: 14, right: 14)
+		collectionView.contentInset = UIEdgeInsets(top: JQ_ScreenW * 0.564 + 57, left: 14, bottom: 14, right: 14)
 
         view.addSubview(collectionView)
         collectionView.snp.makeConstraints { make in
diff --git a/WanPai/Root/Games/GamesVC.swift b/WanPai/Root/Games/GamesVC.swift
index 45b121d..a311e92 100644
--- a/WanPai/Root/Games/GamesVC.swift
+++ b/WanPai/Root/Games/GamesVC.swift
@@ -59,6 +59,10 @@
 	}
 
 	@IBAction func scanAction(_ sender: UIButton) {
+		guard UIImagePickerController.isSourceTypeAvailable(.camera) else {
+			alertError(msg: "当前环境相机不可用");return
+		}
+
 		let scan = CommonScanQRCodeVC {[weak self] text, status in
 			if status{
 
diff --git a/WanPai/Root/Games/TCell/GamesTCell.swift b/WanPai/Root/Games/TCell/GamesTCell.swift
index 411920b..acc841f 100644
--- a/WanPai/Root/Games/TCell/GamesTCell.swift
+++ b/WanPai/Root/Games/TCell/GamesTCell.swift
@@ -39,7 +39,7 @@
 	@IBAction func launchGameAction(_ sender: UIButton) {
 		GamesPayView.show(price: gameListModel.cash, coin: gameListModel.playCoin,integral: gameListModel.integral) {[weak self] () in
 			guard let weakSelf = self else { return }
-			PaymentView.show(money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.playCoin, course: nil,integral:weakSelf.gameListModel.integral)) { [weak self] payType in
+			PaymentView.show(enumType:.game,money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.playCoin, course: nil,integral:weakSelf.gameListModel.integral)) { [weak self] payType in
 				guard let weakSelf = self else { return }
 				Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.storeId, sutuId: weakSelf.sutuId, type: payType).subscribe(onNext: {data in
 					switch payType {
diff --git a/WanPai/Root/Home/VC/HomeVC.swift b/WanPai/Root/Home/VC/HomeVC.swift
index 9ea51d1..ad30d09 100644
--- a/WanPai/Root/Home/VC/HomeVC.swift
+++ b/WanPai/Root/Home/VC/HomeVC.swift
@@ -163,14 +163,36 @@
 
 		group.notify(queue: .main) {
 			self.items = self.items.sorted { v1, v2 in
-				if let m1 = v1 as? HomeStoreTopBannerModel,let m2 = v2 as? HomeStoreConfigModel{
-					return m1.sort < m2.sort
+
+				var sort1 = 0
+				var sort2 = 0
+
+				if let m = v1 as? HomeStoreTopBannerModel{
+					sort1 = m.sort
 				}
 
-				if let m1 = v1 as? HomeStoreConfigModel,let m2 = v2 as? HomeStoreTopBannerModel{
-					return m1.sort < m2.sort
+				if let m = v1 as? HomeStoreConfigModel{
+					sort1 = m.sort
 				}
-				return false
+
+				if let m = v2 as? HomeStoreTopBannerModel{
+					sort2 = m.sort
+				}
+
+				if let m = v2 as? HomeStoreConfigModel{
+					sort2 = m.sort
+				}
+				return sort1 < sort2
+			}
+
+			let v = self.items.compactMap { any in
+				if let m = any as? HomeStoreTopBannerModel{
+					return "\(m.sort)"
+				}
+				if let m = any as? HomeStoreConfigModel{
+					return "\(m.sort)"
+				}
+				return ""
 			}
 
 			self.layout.collectionView?.reloadData()
diff --git a/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift b/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift
index 63ab0cf..d124bec 100644
--- a/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift
+++ b/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift
@@ -41,7 +41,7 @@
 		price = 199
 #endif
 
-		PaymentView.show(money: (ali:price,wx:price,coin:nil,course:nil,integral:nil)) { type in
+		PaymentView.show(enumType: .joinMember, money: (ali:price,wx:price,coin:nil,course:nil,integral:nil)) { type in
 			Services.enrollMember(paytype: type).subscribe(onNext: {data in
 				switch type {
 					case .aliPay:
diff --git a/WanPai/Root/Login/VC/LoginVC.swift b/WanPai/Root/Login/VC/LoginVC.swift
index 2c37123..07b0dbd 100644
--- a/WanPai/Root/Login/VC/LoginVC.swift
+++ b/WanPai/Root/Login/VC/LoginVC.swift
@@ -47,18 +47,29 @@
         
         
         textView_treaty.isEditable = false
-		textView_treaty.linkTextAttributes = [.foregroundColor:UIColor.black.withAlphaComponent(0.8)]
+		textView_treaty.linkTextAttributes = [.foregroundColor:UIColor(hexStr: "#3a9edc").withAlphaComponent(0.8)]
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineBreakMode = NSLineBreakMode.byCharWrapping
-		paragraphStyle.lineSpacing = 3
+		paragraphStyle.lineSpacing = 5
 
-        let content = "我已阅读并同意《隐私协议》《用户协议》《运动安全告知书》"
+        let content = "我已阅读并同意\n《隐私协议》\n《用户协议》\n《运动安全告知书》"
         let attribute = NSMutableAttributedString(string: content)
 		attribute.addAttribute(.foregroundColor, value: UIColor.black.withAlphaComponent(0.6), range: NSRange(location: 0, length: content.count))
 		attribute.addAttribute(.font, value: UIFont.systemFont(ofSize: 12, weight: .medium), range: NSRange(location: 0, length: content.count))
 		attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://treaty")!], range: content.jq_subRange("《隐私协议》")!)
+		attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《隐私协议》")!)
+		attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《隐私协议》")!)
+
         attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://user")!], range: content.jq_subRange("《用户协议》")!)
+		attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《用户协议》")!)
+		attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《用户协议》")!)
+
+
         attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://sportSafety")!], range: content.jq_subRange("《运动安全告知书》")!)
+		attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《运动安全告知书》")!)
+		attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《运动安全告知书》")!)
+
+
         attribute.addAttributes([.paragraphStyle:paragraphStyle], range: _NSRange(location: 0, length: content.count))
         self.textView_treaty.attributedText = attribute
         self.textView_treaty.delegate = self
diff --git a/WanPai/Root/Login/VC/LoginVC.xib b/WanPai/Root/Login/VC/LoginVC.xib
index f52750f..f43252a 100644
--- a/WanPai/Root/Login/VC/LoginVC.xib
+++ b/WanPai/Root/Login/VC/LoginVC.xib
@@ -320,10 +320,10 @@
                     </constraints>
                 </view>
                 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="我已阅读并同意《隐私协议》《用户协议》《运动安全告知书》" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="BqB-Az-Ez1">
-                    <rect key="frame" x="64" y="484" width="287" height="45"/>
+                    <rect key="frame" x="64" y="484" width="287" height="110"/>
                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="45" id="rzR-7J-NJs"/>
+                        <constraint firstAttribute="height" constant="110" id="rzR-7J-NJs"/>
                     </constraints>
                     <color key="textColor" systemColor="labelColor"/>
                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
diff --git a/WanPai/Root/Search/VC/SearchVC.swift b/WanPai/Root/Search/VC/SearchVC.swift
index c8d417d..7aba96f 100644
--- a/WanPai/Root/Search/VC/SearchVC.swift
+++ b/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 btn_special: UIButton!
+//	@IBOutlet weak var btn_special: UIButton!
 	@IBOutlet weak var btn_userLocal: UIButton!
 		//	@IBOutlet weak var cons_CollectionAspect: NSLayoutConstraint!
 
diff --git a/WanPai/Root/Search/VC/SearchVC.xib b/WanPai/Root/Search/VC/SearchVC.xib
index bad550d..1ed3efb 100644
--- a/WanPai/Root/Search/VC/SearchVC.xib
+++ b/WanPai/Root/Search/VC/SearchVC.xib
@@ -5,7 +5,6 @@
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
-        <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"/>
     </dependencies>
@@ -13,7 +12,6 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SearchVC" customModule="WanPai" customModuleProvider="target">
             <connections>
                 <outlet property="banner_collectionView" destination="GVG-mQ-5A4" id="keS-lx-iWt"/>
-                <outlet property="btn_special" destination="5WV-eT-XUG" id="OzE-I1-cJB"/>
                 <outlet property="btn_userLocal" destination="G6c-mm-jtO" id="AS9-Qs-vFK"/>
                 <outlet property="label_empty" destination="FYv-6M-gC5" id="SA6-TH-Aqp"/>
                 <outlet property="scrollView" destination="Jbe-CY-MmI" id="MM5-aA-VjT"/>
@@ -30,60 +28,10 @@
                     <rect key="frame" x="0.0" y="0.0" width="393" height="818"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="w1y-Zq-96N">
-                            <rect key="frame" x="0.0" y="0.0" width="393" height="1034.3333333333333"/>
+                            <rect key="frame" x="0.0" y="0.0" width="393" height="838.66666666666663"/>
                             <subviews>
-                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EPq-uU-JgH">
-                                    <rect key="frame" x="0.0" y="0.0" width="393" height="195.33333333333334"/>
-                                    <subviews>
-                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_search" translatesAutoresizingMaskIntoConstraints="NO" id="DGE-Vl-Na6">
-                                            <rect key="frame" x="0.0" y="0.0" width="393" height="195.33333333333334"/>
-                                        </imageView>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="立刻开通玩湃生活会员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uWB-gY-2cI">
-                                            <rect key="frame" x="110.00000000000001" y="65" width="173.33333333333337" height="20.333333333333329"/>
-                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                            <color key="textColor" red="0.20392156862745098" green="0.3411764705882353" blue="0.42352941176470588" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5WV-eT-XUG">
-                                            <rect key="frame" x="163.66666666666666" y="91.333333333333329" width="66" height="22"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="22" id="BR2-cJ-9Ba"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                            <state key="normal" title="查看特权">
-                                                <color key="titleColor" name="FE6E0D"/>
-                                            </state>
-                                            <connections>
-                                                <action selector="privilegeAction:" destination="-1" eventType="touchUpInside" id="Z4c-Kv-KQQ"/>
-                                            </connections>
-                                        </button>
-                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GgO-kO-a8k">
-                                            <rect key="frame" x="163.66666666666666" y="115.33333333333333" width="66" height="1"/>
-                                            <color key="backgroundColor" name="FE6E0D"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="1" id="5yd-wv-Of4"/>
-                                            </constraints>
-                                        </view>
-                                    </subviews>
-                                    <color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                    <constraints>
-                                        <constraint firstItem="uWB-gY-2cI" firstAttribute="centerX" secondItem="DGE-Vl-Na6" secondAttribute="centerX" id="1As-tk-5Wg"/>
-                                        <constraint firstItem="DGE-Vl-Na6" firstAttribute="top" secondItem="EPq-uU-JgH" secondAttribute="top" id="2se-HH-eQh"/>
-                                        <constraint firstItem="5WV-eT-XUG" firstAttribute="leading" secondItem="GgO-kO-a8k" secondAttribute="leading" id="4Ik-Gv-p1R"/>
-                                        <constraint firstAttribute="trailing" secondItem="DGE-Vl-Na6" secondAttribute="trailing" id="I9h-e1-P3P"/>
-                                        <constraint firstAttribute="width" secondItem="EPq-uU-JgH" secondAttribute="height" multiplier="1:0.4974" id="JV4-yx-f0F"/>
-                                        <constraint firstItem="uWB-gY-2cI" firstAttribute="top" secondItem="EPq-uU-JgH" secondAttribute="top" constant="65" id="Ljo-ro-H0i"/>
-                                        <constraint firstItem="DGE-Vl-Na6" firstAttribute="leading" secondItem="EPq-uU-JgH" secondAttribute="leading" id="XMG-o9-rS5"/>
-                                        <constraint firstItem="5WV-eT-XUG" firstAttribute="top" secondItem="uWB-gY-2cI" secondAttribute="bottom" constant="6" id="hcm-Wy-ZCQ"/>
-                                        <constraint firstItem="GgO-kO-a8k" firstAttribute="top" secondItem="5WV-eT-XUG" secondAttribute="bottom" constant="2" id="kGP-ew-4Ur"/>
-                                        <constraint firstAttribute="bottom" secondItem="DGE-Vl-Na6" secondAttribute="bottom" id="qiC-fw-sLe"/>
-                                        <constraint firstItem="5WV-eT-XUG" firstAttribute="trailing" secondItem="GgO-kO-a8k" secondAttribute="trailing" id="sMv-ZJ-Lmf"/>
-                                        <constraint firstItem="5WV-eT-XUG" firstAttribute="centerX" secondItem="uWB-gY-2cI" secondAttribute="centerX" id="zeI-yT-QNR"/>
-                                    </constraints>
-                                </view>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="前往玩湃" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DLd-us-4A3">
-                                    <rect key="frame" x="23" y="237.33333333333334" width="65.333333333333329" height="22.000000000000028"/>
+                                    <rect key="frame" x="23" y="42" width="65.333333333333329" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="MPB-gD-l4i"/>
                                     </constraints>
@@ -92,7 +40,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kz4-Kz-Gzm">
-                                    <rect key="frame" x="23" y="276.33333333333331" width="347" height="194.66666666666669"/>
+                                    <rect key="frame" x="23" y="81" width="347" height="194.66666666666663"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前城市暂无门店" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FYv-6M-gC5">
                                             <rect key="frame" x="0.0" y="0.0" width="347" height="194.66666666666666"/>
@@ -101,7 +49,7 @@
                                             <nil key="highlightedColor"/>
                                         </label>
                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="G6c-mm-jtO">
-                                            <rect key="frame" x="312" y="159.66666666666669" width="30" height="30"/>
+                                            <rect key="frame" x="312" y="159.66666666666666" width="30" height="30"/>
                                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                             <state key="normal" image="btn_map_local"/>
                                             <connections>
@@ -121,7 +69,7 @@
                                     </constraints>
                                 </view>
                                 <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="W2A-PE-Zq8">
-                                    <rect key="frame" x="26" y="817.33333333333337" width="341" height="162"/>
+                                    <rect key="frame" x="26" y="621.66666666666663" width="341" height="162"/>
                                     <subviews>
                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lz2-Km-ydI" customClass="TapBtn" customModule="WanPai" customModuleProvider="target">
                                             <rect key="frame" x="0.0" y="0.0" width="162.66666666666666" height="162"/>
@@ -217,7 +165,7 @@
                                     </constraints>
                                 </stackView>
                                 <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="GVG-mQ-5A4">
-                                    <rect key="frame" x="0.0" y="503" width="393" height="257.33333333333326"/>
+                                    <rect key="frame" x="0.0" y="307.66666666666669" width="393" height="257.00000000000006"/>
                                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                     <constraints>
                                         <constraint firstAttribute="width" secondItem="GVG-mQ-5A4" secondAttribute="height" multiplier="1:0.6541" id="r90-ek-NTR"/>
@@ -234,19 +182,16 @@
                             <constraints>
                                 <constraint firstItem="GVG-mQ-5A4" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" id="17N-sE-wz0"/>
                                 <constraint firstItem="kz4-Kz-Gzm" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" constant="23" id="3Uf-8q-OAN"/>
-                                <constraint firstItem="EPq-uU-JgH" firstAttribute="top" secondItem="w1y-Zq-96N" secondAttribute="top" id="A23-af-LgB"/>
                                 <constraint firstItem="W2A-PE-Zq8" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" constant="26" id="AtV-Kr-OEc"/>
                                 <constraint firstItem="GVG-mQ-5A4" firstAttribute="top" secondItem="kz4-Kz-Gzm" secondAttribute="bottom" constant="32" id="Igg-1d-nE8"/>
                                 <constraint firstAttribute="bottom" secondItem="W2A-PE-Zq8" secondAttribute="bottom" constant="55" id="K5D-B5-JBH"/>
+                                <constraint firstItem="DLd-us-4A3" firstAttribute="top" secondItem="w1y-Zq-96N" secondAttribute="top" constant="42" id="LL4-80-YhX"/>
                                 <constraint firstAttribute="trailing" secondItem="GVG-mQ-5A4" secondAttribute="trailing" id="OvB-FO-WkW"/>
-                                <constraint firstItem="DLd-us-4A3" firstAttribute="top" secondItem="EPq-uU-JgH" secondAttribute="bottom" constant="42" id="RmO-Er-nzk"/>
-                                <constraint firstItem="EPq-uU-JgH" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" id="TN8-uj-rSh"/>
                                 <constraint firstItem="kz4-Kz-Gzm" firstAttribute="top" secondItem="DLd-us-4A3" secondAttribute="bottom" constant="17" id="TYk-Ic-7l5"/>
                                 <constraint firstAttribute="trailing" secondItem="W2A-PE-Zq8" secondAttribute="trailing" constant="26" id="Yfu-Bf-75b"/>
                                 <constraint firstItem="DLd-us-4A3" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" constant="23" id="fiq-V8-p3c"/>
                                 <constraint firstAttribute="trailing" secondItem="kz4-Kz-Gzm" secondAttribute="trailing" constant="23" id="rbO-WH-9CE"/>
                                 <constraint firstItem="W2A-PE-Zq8" firstAttribute="top" secondItem="GVG-mQ-5A4" secondAttribute="bottom" constant="57" id="ve8-5z-kaa"/>
-                                <constraint firstAttribute="trailing" secondItem="EPq-uU-JgH" secondAttribute="trailing" id="zD3-4X-jiI"/>
                             </constraints>
                         </view>
                     </subviews>
@@ -270,18 +215,14 @@
         </view>
     </objects>
     <resources>
-        <image name="bg_search" width="390" height="194"/>
         <image name="btn_map_local" width="30" height="30"/>
         <image name="icon_aboutUs" width="48" height="36"/>
         <image name="icon_customer" width="45" height="38"/>
-        <namedColor name="FE6E0D">
-            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </namedColor>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
         <systemColor name="systemGroupedBackgroundColor">
-            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
     </resources>
 </document>
diff --git a/WanPai/Root/Welfare/VC/RechargeCenterVC.swift b/WanPai/Root/Welfare/VC/RechargeCenterVC.swift
index 3c0d665..cca4c28 100644
--- a/WanPai/Root/Welfare/VC/RechargeCenterVC.swift
+++ b/WanPai/Root/Welfare/VC/RechargeCenterVC.swift
@@ -103,7 +103,7 @@
 
     @IBAction func rechargeAction(_ sender: UIButton) {
         let item = items[selectIndex]
-        PaymentView.show(money: (ali:item.money,wx:item.money,coin:nil,course:nil,integral:nil)) {[weak self] type in
+		PaymentView.show(enumType: .recharge, money: (ali:item.money,wx:item.money,coin:nil,course:nil,integral:nil)) {[weak self] type in
 			guard let weakSelf = self else { return }
 			Services.useBenefitPayment(amount: item.money, payType:type).subscribe(onNext: {data in
 				if let m = data.data{
diff --git a/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift b/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift
index 2f39a47..b969186 100644
--- a/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift
+++ b/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift
@@ -28,6 +28,7 @@
     @IBOutlet weak var label_courseHours: UILabel!
     @IBOutlet weak var view_courseHours: UIView!
     @IBOutlet weak var view_exchangeStore: UIView!
+	@IBOutlet weak var view_vaildTime: UIView!
     @IBOutlet weak var webView: WKWebView!
     @IBOutlet weak var label_storeName: UILabel!
     @IBOutlet weak var cons_webHei: NSLayoutConstraint!
@@ -65,6 +66,10 @@
     override func viewDidLoad() {
         super.viewDidLoad()
         title = "商品详情"
+
+		if goodsType == .ticket{
+			view_vaildTime.isHidden = true //临时隐藏
+		}
 
 		//全局隐藏,目前不需要
 		view_exchangeStore.isHidden = true
@@ -259,17 +264,18 @@
 			guard state else {return}
 			guard let weakSelf = self else { return }
 
+			let goodsType = weakSelf.exchangeGoodsModel!.goodType
 			var n = num
-			if weakSelf.exchangeGoodsModel?.goodType == .course{
+			if goodsType == .course{
 				n = num * weakSelf.studentModels.count
 			}
 
 
 			if weakSelf.exchangeGoodsModel!.exchangeType == .coin{
-				Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: n, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in
+				Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: goodsType, num: n, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in
 					guard let weakSelf = self else { return }
 					let vc = PaymentResultVC(result: .success, objType: .exchange)
-					vc.otherInfo = ["id":data.data?.returnId ?? 0,"goodsType":weakSelf.exchangeGoodsModel!.goodType.rawValue]
+					vc.otherInfo = ["id":data.data?.returnId ?? 0,"goodsType":goodsType.rawValue]
 						self?.push(vc: vc)
 					self?.exchangeSuccessUI()
 					NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil)
@@ -289,7 +295,7 @@
 				}).disposed(by: weakSelf.disposeBag)
 			}else {
 				//支付金额
-				PaymentView.show(money: (ali:cash,wx:cash,coin:nil,course:nil,integral:nil)) { payType in
+				PaymentView.show(enumType: .goods(goodsType), money: (ali:cash,wx:cash,coin:nil,course:nil,integral:nil)) { payType in
 					Services.exchangeOperation(exchangeType: weakSelf.exchangeGoodsModel!.exchangeType, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: n, payType: payType, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","), storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in
 						if let m = data.data{
 							switch payType {
@@ -321,9 +327,13 @@
 										}
 									}
 								case .wechat:break
-								case .coin:break
+								case .coin:
+									let vc = PaymentResultVC(result: .success, objType: .exchange)
+									vc.otherInfo = ["id":m.returnId,"goodsType":weakSelf.exchangeGoodsModel!.goodType.rawValue]
+									self?.push(vc: vc)
+									self?.exchangeSuccessUI()
 								case .courseNum:break
-								case .integral:break
+								default:break
 							}
 						}
 					},onError: { error in
diff --git a/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib b/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib
index 8b5aeb1..1c8af2b 100644
--- a/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib
+++ b/WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="22130"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
         <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"/>
@@ -37,6 +37,7 @@
                 <outlet property="view_selectStoreHei" destination="k25-Gd-ndU" id="XnP-Bn-wNP"/>
                 <outlet property="view_students" destination="0QQ-kQ-0an" id="cy7-oc-Uw9"/>
                 <outlet property="view_ticketType" destination="DXe-Ah-4gm" id="Zdx-tC-AKo"/>
+                <outlet property="view_vaildTime" destination="eTp-S5-gYB" id="2rY-96-r61"/>
                 <outlet property="webView" destination="tQn-lc-7cb" id="xcY-cg-bKR"/>
             </connections>
         </placeholder>
@@ -490,7 +491,7 @@
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
         <systemColor name="systemGroupedBackgroundColor">
-            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
     </resources>
 </document>
diff --git a/WanPai/Root/Welfare/VC/WelfareVC.swift b/WanPai/Root/Welfare/VC/WelfareVC.swift
index 37acc84..9c4879c 100644
--- a/WanPai/Root/Welfare/VC/WelfareVC.swift
+++ b/WanPai/Root/Welfare/VC/WelfareVC.swift
@@ -22,8 +22,8 @@
     @IBOutlet weak var coinCollectionView: UICollectionView!
     @IBOutlet weak var btn_coupon: UIButton!
 //    @IBOutlet weak var btn_shoppping: UIButton!
-    @IBOutlet weak var btn_weekly: UIButton!
-    @IBOutlet weak var btn_todayFree: UIButton!
+//    @IBOutlet weak var btn_weekly: UIButton!
+//    @IBOutlet weak var btn_todayFree: UIButton!
 
     private var timerOffsetX:Double = 0
 	private let cellW = 144.0
@@ -74,11 +74,11 @@
 				}
 
 				if let weeksBenefit = model.image?.weeksBenefit{
-					self?.btn_weekly.sd_setImage(with: URL(string: weeksBenefit), for: .normal, placeholderImage: nil, context: nil)
+//					self?.btn_weekly.sd_setImage(with: URL(string: weeksBenefit), for: .normal, placeholderImage: nil, context: nil)
 				}
 
 				if let todayFree = model.image?.todayFree{
-					self?.btn_todayFree.sd_setImage(with: URL(string: todayFree), for: .normal, placeholderImage: nil, context: nil)
+//					self?.btn_todayFree.sd_setImage(with: URL(string: todayFree), for: .normal, placeholderImage: nil, context: nil)
 				}
 			}
 		}) { error in
diff --git a/WanPai/Root/Welfare/VC/WelfareVC.xib b/WanPai/Root/Welfare/VC/WelfareVC.xib
index f956980..4461419 100644
--- a/WanPai/Root/Welfare/VC/WelfareVC.xib
+++ b/WanPai/Root/Welfare/VC/WelfareVC.xib
@@ -12,9 +12,7 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WelfareVC" customModule="WanPai" customModuleProvider="target">
             <connections>
                 <outlet property="btn_coupon" destination="Kte-Xd-tVd" id="Xg6-k9-w88"/>
-                <outlet property="btn_todayFree" destination="r4f-Ay-EGJ" id="zTX-Pu-U2q"/>
                 <outlet property="btn_vip" destination="6lk-Nd-Tug" id="fed-2F-KP6"/>
-                <outlet property="btn_weekly" destination="hBk-90-GU4" id="R7h-4s-dyR"/>
                 <outlet property="coinCollectionView" destination="yBw-of-rdU" id="g6s-C7-Axj"/>
                 <outlet property="img_userProfile" destination="7GZ-X8-dwC" id="nYH-xs-aFt"/>
                 <outlet property="label_coin" destination="5GZ-Mz-c7r" id="XTu-31-9ux"/>
@@ -33,7 +31,7 @@
                     <rect key="frame" x="0.0" y="59" width="393" height="759"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1kO-ug-2Gd">
-                            <rect key="frame" x="0.0" y="0.0" width="393" height="1284.6666666666667"/>
+                            <rect key="frame" x="0.0" y="0.0" width="393" height="715"/>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qtJ-Db-Js8">
                                     <rect key="frame" x="0.0" y="0.0" width="393" height="152"/>
@@ -148,7 +146,7 @@
                                             <color key="textColor" red="0.18823529410000001" green="0.3294117647" blue="0.38823529410000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                             <nil key="highlightedColor"/>
                                         </label>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bgn-Mv-nv3">
+                                        <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bgn-Mv-nv3">
                                             <rect key="frame" x="90.333333333333329" y="116" width="51.999999999999986" height="22"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="22" id="nYC-Nx-coY"/>
@@ -175,30 +173,6 @@
                                                 <action selector="rechargeAction:" destination="-1" eventType="touchUpInside" id="Vwg-Z8-yj2"/>
                                             </connections>
                                         </button>
-                                        <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cWO-5E-szA">
-                                            <rect key="frame" x="291" y="116" width="52" height="22"/>
-                                            <constraints>
-                                                <constraint firstAttribute="width" constant="52" id="Tto-xt-EoC"/>
-                                                <constraint firstAttribute="height" constant="22" id="gzD-OM-r2g"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="10"/>
-                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                            <state key="normal" title="积分任务">
-                                                <color key="titleColor" red="0.18823529410000001" green="0.3294117647" blue="0.38823529410000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                            </state>
-                                            <userDefinedRuntimeAttributes>
-                                                <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/>
-                                                <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB">
-                                                    <real key="value" value="11"/>
-                                                </userDefinedRuntimeAttribute>
-                                                <userDefinedRuntimeAttribute type="color" keyPath="jq_xibBorderColor">
-                                                    <color key="value" name="FE6E0D"/>
-                                                </userDefinedRuntimeAttribute>
-                                                <userDefinedRuntimeAttribute type="number" keyPath="jq_xibBorderWidth">
-                                                    <real key="value" value="1"/>
-                                                </userDefinedRuntimeAttribute>
-                                            </userDefinedRuntimeAttributes>
-                                        </button>
                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KrQ-RG-f2e">
                                             <rect key="frame" x="31" y="23" width="174" height="62"/>
                                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
@@ -208,8 +182,6 @@
                                         </button>
                                     </subviews>
                                     <constraints>
-                                        <constraint firstItem="cWO-5E-szA" firstAttribute="centerY" secondItem="fYH-IU-RDd" secondAttribute="centerY" id="0K4-94-Qu9"/>
-                                        <constraint firstItem="cWO-5E-szA" firstAttribute="leading" secondItem="FKV-jp-n9Z" secondAttribute="trailing" constant="5" id="1ir-Ro-5p5"/>
                                         <constraint firstItem="fYH-IU-RDd" firstAttribute="centerY" secondItem="joc-Xf-ULn" secondAttribute="centerY" id="8es-JY-3wH"/>
                                         <constraint firstItem="FKV-jp-n9Z" firstAttribute="leading" secondItem="ft0-mn-MrN" secondAttribute="trailing" constant="5" id="Bje-9P-TL6"/>
                                         <constraint firstAttribute="height" constant="152" id="DLs-yR-39v"/>
@@ -287,71 +259,23 @@
                                         </button>
                                     </subviews>
                                 </stackView>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本周福利" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="01D-ex-NB6">
-                                    <rect key="frame" x="40.999999999999993" y="752" width="65.333333333333314" height="22"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="22" id="cZB-Sn-Vhw"/>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
-                                    <color key="textColor" red="0.28235294119999998" green="0.28235294119999998" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                    <nil key="highlightedColor"/>
-                                </label>
-                                <button opaque="NO" contentMode="scaleAspectFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hBk-90-GU4">
-                                    <rect key="frame" x="41" y="793" width="311" height="203"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" secondItem="hBk-90-GU4" secondAttribute="height" multiplier="1:0.6525" id="iMt-GH-OCP"/>
-                                    </constraints>
-                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                    <connections>
-                                        <action selector="welfareWeeklyAction:" destination="-1" eventType="touchUpInside" id="bXl-Yh-tq4"/>
-                                    </connections>
-                                </button>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今日免费" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8KD-JW-do0">
-                                    <rect key="frame" x="40.999999999999993" y="1031" width="65.333333333333314" height="22"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="22" id="pc0-0u-NIz"/>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
-                                    <color key="textColor" red="0.28235294119999998" green="0.28235294119999998" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                    <nil key="highlightedColor"/>
-                                </label>
-                                <button opaque="NO" contentMode="scaleAspectFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="r4f-Ay-EGJ">
-                                    <rect key="frame" x="41" y="1072" width="311" height="202.66666666666674"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" secondItem="r4f-Ay-EGJ" secondAttribute="height" multiplier="1:0.6525" id="WOq-qS-ptG"/>
-                                    </constraints>
-                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                    <connections>
-                                        <action selector="freeTodayAction:" destination="-1" eventType="touchUpInside" id="CF2-ok-0h8"/>
-                                    </connections>
-                                </button>
                             </subviews>
                             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                             <constraints>
                                 <constraint firstItem="15P-Xn-N3C" firstAttribute="top" secondItem="qtJ-Db-Js8" secondAttribute="bottom" constant="21" id="1vm-8y-gxJ"/>
                                 <constraint firstItem="yBw-of-rdU" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" id="2v6-zk-jO5"/>
                                 <constraint firstAttribute="trailing" secondItem="qtJ-Db-Js8" secondAttribute="trailing" id="3Ja-c5-h01"/>
-                                <constraint firstItem="8KD-JW-do0" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="3oG-S6-2FT"/>
-                                <constraint firstItem="01D-ex-NB6" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="4mE-Yh-4C3"/>
-                                <constraint firstAttribute="trailing" secondItem="hBk-90-GU4" secondAttribute="trailing" constant="41" id="65D-Zy-aO7"/>
                                 <constraint firstItem="qtJ-Db-Js8" firstAttribute="top" secondItem="1kO-ug-2Gd" secondAttribute="top" id="ArH-VK-Ih1"/>
-                                <constraint firstItem="hBk-90-GU4" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="DM6-A0-eq8"/>
                                 <constraint firstItem="15P-Xn-N3C" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="30" id="E7I-5W-IU3"/>
-                                <constraint firstAttribute="trailing" secondItem="r4f-Ay-EGJ" secondAttribute="trailing" constant="41" id="IEF-Ks-rrX"/>
                                 <constraint firstAttribute="trailing" secondItem="yBw-of-rdU" secondAttribute="trailing" id="IP4-Gn-Ai6"/>
                                 <constraint firstItem="3kA-cL-Ed9" firstAttribute="top" secondItem="GiC-Xf-dhQ" secondAttribute="bottom" constant="11" id="Kru-uw-J4P"/>
-                                <constraint firstItem="r4f-Ay-EGJ" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="Oze-fE-LkT"/>
                                 <constraint firstItem="3kA-cL-Ed9" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" id="WeR-P6-ZdV"/>
                                 <constraint firstAttribute="trailing" secondItem="3kA-cL-Ed9" secondAttribute="trailing" id="bts-6y-Zk6"/>
+                                <constraint firstAttribute="bottom" secondItem="3kA-cL-Ed9" secondAttribute="bottom" constant="10" id="eyB-YC-OJF"/>
                                 <constraint firstItem="GiC-Xf-dhQ" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="30" id="gY0-D8-1VM"/>
-                                <constraint firstItem="01D-ex-NB6" firstAttribute="top" secondItem="3kA-cL-Ed9" secondAttribute="bottom" constant="47" id="nA0-zN-Mne"/>
                                 <constraint firstItem="GiC-Xf-dhQ" firstAttribute="top" secondItem="yBw-of-rdU" secondAttribute="bottom" constant="17" id="nqA-X1-BoF"/>
-                                <constraint firstItem="hBk-90-GU4" firstAttribute="top" secondItem="01D-ex-NB6" secondAttribute="bottom" constant="19" id="p7O-Nf-d3F"/>
-                                <constraint firstItem="r4f-Ay-EGJ" firstAttribute="top" secondItem="8KD-JW-do0" secondAttribute="bottom" constant="19" id="rIa-aO-Ceb"/>
                                 <constraint firstItem="yBw-of-rdU" firstAttribute="top" secondItem="15P-Xn-N3C" secondAttribute="bottom" constant="9" id="tn6-cH-k2u"/>
                                 <constraint firstItem="qtJ-Db-Js8" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" id="vz9-lC-ac4"/>
-                                <constraint firstItem="8KD-JW-do0" firstAttribute="top" secondItem="hBk-90-GU4" secondAttribute="bottom" constant="35" id="wOz-Xc-Sdq"/>
-                                <constraint firstAttribute="bottom" secondItem="r4f-Ay-EGJ" secondAttribute="bottom" constant="10" id="y44-d4-HxC"/>
                             </constraints>
                         </view>
                     </subviews>
diff --git a/WanPai/Root/Yard/TCell/YardBookingTCell.swift b/WanPai/Root/Yard/TCell/YardBookingTCell.swift
index 157b737..295b323 100644
--- a/WanPai/Root/Yard/TCell/YardBookingTCell.swift
+++ b/WanPai/Root/Yard/TCell/YardBookingTCell.swift
@@ -82,7 +82,7 @@
     @IBAction func paymentAction(_ sender: UIButton) {
         Services.continuePaymentPrice(id: yardBookingModel.id).subscribe(onNext: { data in
             if let model = data.data{
-                PaymentView.show(money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in
+				PaymentView.show(enumType: .yard, money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in
                     guard let weakSelf = self else { return }
                     Services.continuePayment(id: weakSelf.yardBookingModel.id, payType: paytype).subscribe(onNext: {data in
                         if let m = data.data{
@@ -102,7 +102,7 @@
                                         }
                                     }
 								case .wechat,.integral:break
-                                case .coin:
+								case .coin,.free:
 									NotificationCenter.default.post(name: RefreshBooking_Noti, object: weakSelf.indexPath)
 									let vc = PaymentResultVC(result: .success, objType: .activityApply)
 									JQ_currentViewController().jq_push(vc: vc)
diff --git a/WanPai/Root/Yard/VC/YardBookingDetailVC.swift b/WanPai/Root/Yard/VC/YardBookingDetailVC.swift
index b31f90d..a8b8425 100644
--- a/WanPai/Root/Yard/VC/YardBookingDetailVC.swift
+++ b/WanPai/Root/Yard/VC/YardBookingDetailVC.swift
@@ -113,7 +113,7 @@
 						self?.label_paymentPrice.text = model.payMoney.string + "课时"
 					case .coin:
 						self?.label_paymentPrice.text = model.payMoney.int.string + "币"
-					case .integral:break
+					default:break
 				}
 
 				self?.label_bookingTime.text = model.times
@@ -253,7 +253,7 @@
 
 		Services.continuePaymentPrice(id: id).subscribe(onNext: {data in
 			if let model = data.data{
-				PaymentView.show(money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in
+				PaymentView.show(enumType: .yard, money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in
 					guard let weakSelf = self else { return }
 					Services.continuePayment(id: id, payType: paytype).subscribe(onNext: {data in
 						if let m = data.data{
@@ -273,15 +273,14 @@
 										}
 									}
 								case .wechat:break
-								case .coin:
+								case .coin,.free:
 									let vc = PaymentResultVC(result: .success, objType: .activityApply)
 									self?.push(vc: vc)
 								case .courseNum:break
-								case .integral:break
+								default:break
 							}
 						}
-					}) { error in
-						guard let weakSelf = self else { return }
+					}) {[weak self] error in
 						if let er = error as? NetworkRequest.NetRequestError{
 							switch er {
 								case .Other(let code,let string):
diff --git a/WanPai/Root/Yard/VC/YardDetailVC.swift b/WanPai/Root/Yard/VC/YardDetailVC.swift
index 8c02655..6549a96 100644
--- a/WanPai/Root/Yard/VC/YardDetailVC.swift
+++ b/WanPai/Root/Yard/VC/YardDetailVC.swift
@@ -389,7 +389,7 @@
 				}
 
 
-				PaymentView.show(money: (ali:price,wx:price,coin:coin,course:nil,integral:nil)) { [weak self] type in
+				PaymentView.show(enumType: .yard, money: (ali:price,wx:price,coin:coin,course:nil,integral:nil)) { [weak self] type in
 					guard let weakSelf = self else { return }
 					Services.reservationSite(booker: weakSelf.tf_person.text!, couponId: weakSelf.selectCouponModel?.id, id: weakSelf.siteDetailModel.id, payType: type, phone: weakSelf.tf_phone.text!, times: datetimes.joined(separator: ";"),halfName:halfName,isHalf:isHalf,nextName:nextName).subscribe(onNext: { data in
 						if let m = data.data{
@@ -417,7 +417,7 @@
 									}
 
 								case .wechat,.integral:break
-								case .coin:
+								case .coin,.free:
 									NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil)
 									let vc = YardBookingDetailVC(siteBookingId: m.siteBooking)
 									weakSelf.push(vc: vc)
diff --git a/WanPai/WanPaiRelease.entitlements b/WanPai/WanPaiRelease.entitlements
new file mode 100644
index 0000000..b365c36
--- /dev/null
+++ b/WanPai/WanPaiRelease.entitlements
@@ -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>webcredentials:www.weparklife.com/</string>
+	</array>
+</dict>
+</plist>

--
Gitblit v1.7.1