| | |
| | | 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" |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | private func payment(type:PayType,paymentId:Int? = nil){ |
| | | let ids = students.map({"\($0.id)"}).joined(separator: ",") |
| | | let ids = students.map({"\($0.id)"}).joined(separator: ";") |
| | | Services.paymentCompetition(id: activityDetailModel.id, userIds: ids, payType: type,coursePaymentId: paymentId).subscribe(onNext: {[weak self] data in |
| | | NotificationCenter.default.post(name: StudentRefresh_Nofi, object: nil) |
| | | if let m = data.data{ |
| | |
| | | if weeklyCourseItemModel.type == 1{ |
| | | btn_handle.setTitle("请假", for: .normal) |
| | | btn_handle.isEnabled = true |
| | | // btn_handle.backgroundColor = UIColor(hexStr: "#6CC366") |
| | | |
| | | let handleColor = weeklyCourseItemModel.isType == 1 ? UIColor.gray.withAlphaComponent(0.5):UIColor(hexStr: "#6CC366") |
| | | btn_handle.backgroundColor = handleColor |
| | | btn_handle.isHidden = weeklyCourseItemModel.isType == 1 |
| | | } |
| | | |
| | | if weeklyCourseItemModel.type == 2{ |
| | |
| | | btn_handle.backgroundColor = UIColor(hexStr: "#C0C0C0") |
| | | } |
| | | |
| | | btn_handle.isHidden = (weeklyCourseItemModel.courseType == 2 && weeklyCourseItemModel.type == 2) |
| | | // btn_handle.isHidden = (weeklyCourseItemModel.courseType == 2 && weeklyCourseItemModel.type == 2) |
| | | //visibility = if ((data.courseType != 1&&data.type == 2)||(data.type == 1&&data.isType == 1)) View.GONE else View.VISIBLE //||(data.isType == 0) 1、假期班隐藏:报名 按钮 2、报名体验购课,需隐藏按钮:请假 |
| | | btn_handle.isHidden = weeklyCourseItemModel.courseType != 1 && weeklyCourseItemModel.type == 2 || weeklyCourseItemModel.type == 1 && weeklyCourseItemModel.type == 2 |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | if let m = signUpModel{ |
| | | classHours = m.chooseHours |
| | | |
| | | //默认选择传递过来的课时数 |
| | | for (index,clas) in m.list.enumerated(){ |
| | | if clas.classHours == classHours{ |
| | | selectClassIndex = index;break |
| | | } |
| | | } |
| | | |
| | | if m.payStatus == .unPayment{ |
| | | btn_handleBtn.setTitle("待支付", for: .normal) |
| | | btn_addStudent.isHidden = true |
| | |
| | | .add(string: "\(subM.playPaiCoin * studentCount)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString |
| | | |
| | | case .cash: |
| | | label_coin.isHidden = true;fallthrough |
| | | fallthrough |
| | | case .cashCoin: |
| | | if subM.originalPrice == 0 || subM.originalPrice == subM.paymentPrice{ |
| | | label_originPrice.isHidden = true |
| | |
| | | label_originPrice.isHidden = false |
| | | } |
| | | // label_originPrice.isHidden = (subM.paymentPrice == subM.originalPrice && subM.paymentPrice != 0 && subM.originalPrice != 0) |
| | | label_coin.isHidden = subM.payType == .coin |
| | | label_coin.isHidden = subM.payType == .cash |
| | | //玩湃币 |
| | | label_coin.attributedText = AttributedStringbuilder.build() |
| | | .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")) |
| | |
| | | .add(string: "\(subM.playPaiCoin )币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString |
| | | |
| | | case .cash: |
| | | label_coin.isHidden = true;fallthrough |
| | | fallthrough |
| | | case .cashCoin: |
| | | if subM.originalPrice == 0 || subM.originalPrice == subM.paymentPrice{ |
| | | label_originPrice.isHidden = true |
| | | }else{ |
| | | label_originPrice.isHidden = false |
| | | } |
| | | label_coin.isHidden = subM.payType == .coin |
| | | label_coin.isHidden = subM.payType == .cash |
| | | //玩湃币 |
| | | label_coin.attributedText = AttributedStringbuilder.build() |
| | | .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")) |
| | |
| | | extension CourseInfoScheduleVC:UICollectionViewDelegate{ |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | currentSelectDate = dates[indexPath.row] |
| | | guard Date.jq_CalByDays(startDate: Date(), endDate: currentSelectDate!) >= 0 else {return} |
| | | if let date = currentSelectDate{ |
| | | clouse?(date) |
| | | } |
| | |
| | | label_stu_wei.attributedText = setAttribute(t1: "\(m.weight)", t2: "kg") |
| | | label_stu_BMI.attributedText = setAttribute(t1: m.bmi.jq_formatFloat, t2: m.bodyStatus) |
| | | |
| | | if m.courseList.count > 0{ |
| | | pageMenu.removeAllItems() |
| | | if !view_menu.subviews.contains(where: {$0 == self.pageMenu}){ |
| | | pageMenu.frame = CGRect(origin: .zero, size: CGSize(width: JQ_ScreenW - 100, height: 25)) |
| | | pageMenu.delegate = self |
| | | view_menu.addSubview(pageMenu) |
| | | cons_menuHeight.constant = 25 |
| | | pageMenu.setItems(m.courseList.map({$0.courseName}), selectedItemIndex: 0) |
| | | } |
| | | |
| | | pageMenu.setItems(m.courseList.map({$0.courseName}), selectedItemIndex: 0) |
| | | view_menuDetail.isHidden = m.courseList.count == 0 |
| | | |
| | | view_menu.addSubview(btn_dispatchCourse) |
| | | btn_dispatchCourse.snp.makeConstraints { make in |
| | | make.right.equalTo(-19) |
| | |
| | | UserDefaults.standard.setValue(id, forKey: "currentStuId") |
| | | UserDefaults.standard.synchronize() |
| | | Services.startCourseSwitch(id: id).subscribe(onNext: { data in |
| | | NotificationCenter.default.post(name: StudentUpdate_Nofi, object: nil) |
| | | NotificationCenter.default.post(name: StudentRefresh_Nofi, object: nil) |
| | | self.navigationController?.popViewController() |
| | | }).disposed(by: disposeBag) |
| | | } |
| | |
| | | |
| | | var price = 0.01 |
| | | #if !DEBUG |
| | | price = 0.01 |
| | | price = 199 |
| | | #endif |
| | | |
| | | PaymentView.show(money: (ali:price,wx:price,coin:nil,course:nil,integral:nil)) { type in |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="tzt-Qb-9Zd"> |
| | | <rect key="frame" x="111.00000000000001" y="46" width="60.666666666666671" height="37"/> |
| | | <rect key="frame" x="111" y="46" width="205" height="37"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="满--元可用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gEm-JU-PoK"> |
| | | <rect key="frame" x="0.0" y="0.0" width="60.666666666666664" height="17"/> |
| | | <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="gEm-JU-PoK"> |
| | | <rect key="frame" x="0.0" y="0.0" width="205" height="17"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="17" id="YNJ-Sa-gNn"/> |
| | | <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="17" id="YNJ-Sa-gNn"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" 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="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Qw-dg-xym"> |
| | | <rect key="frame" x="0.0" y="20" width="60.666666666666664" height="17"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="有效期至--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Qw-dg-xym"> |
| | | <rect key="frame" x="0.0" y="20" width="205" height="17"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="17" id="aQU-SY-iID"/> |
| | | <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="17" id="aQU-SY-iID"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | <constraint firstItem="tzt-Qb-9Zd" firstAttribute="leading" secondItem="OYF-uW-SFs" secondAttribute="leading" id="5Xl-ko-The"/> |
| | | <constraint firstAttribute="trailing" secondItem="s4d-Hy-Gra" secondAttribute="trailing" id="7Pe-n1-Bgi"/> |
| | | <constraint firstItem="OKL-S9-8uc" firstAttribute="leading" secondItem="mnx-Jv-DFb" secondAttribute="leading" id="8o8-p8-KaY"/> |
| | | <constraint firstItem="DLn-XT-0Qj" firstAttribute="leading" secondItem="tzt-Qb-9Zd" secondAttribute="trailing" constant="3" id="BU9-ko-IjI"/> |
| | | <constraint firstItem="943-VV-dPw" firstAttribute="top" secondItem="OKL-S9-8uc" secondAttribute="top" constant="8" id="CYz-xI-ZqO"/> |
| | | <constraint firstItem="OYF-uW-SFs" firstAttribute="top" secondItem="mnx-Jv-DFb" secondAttribute="top" constant="18" id="Hju-WD-yhZ"/> |
| | | <constraint firstItem="s4d-Hy-Gra" firstAttribute="top" secondItem="mnx-Jv-DFb" secondAttribute="top" id="MJ4-G1-ATN"/> |
| | |
| | | case .voucher: |
| | | break |
| | | case .experience: |
| | | label_price.text = couponModel.name |
| | | label_price.text = couponModel.ruleModel?.experienceName ?? "" |
| | | break |
| | | } |
| | | } |
| | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "充值中心" |
| | | cellW = (view.size.width - 100.0) / 3.0 |
| | | cellH = (view.size.width - 100.0) / 3.0 * 0.5148 |
| | | cellW = (JQ_ScreenW - 100.0) / 3.0 |
| | | cellH = (JQ_ScreenW - 100.0) / 3.0 * 0.5148 |
| | | |
| | | Services.benefitHome().subscribe(onNext: {[weak self] data in |
| | | if let m = data.data{ |
| | |
| | | guard let weakSelf = self else { return } |
| | | Services.cancelMySite(id: id).subscribe(onNext: { data in |
| | | weakSelf.getData() |
| | | NotificationCenter.default.post(name: RefreshBooking_Noti, object: nil) |
| | | }) { error in |
| | | |
| | | }.disposed(by: weakSelf.disposeBag) |
| | |
| | | guard let weakSelf = self else { return } |
| | | Services.continuePayment(id: id, payType: paytype).subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | | NotificationCenter.default.post(name: RefreshBooking_Noti, object: nil) |
| | | switch paytype { |
| | | case .aliPay: |
| | | YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in |