younger_times
2023-07-17 a0071c0c7726d3e6742bc7c4c30536302766626a
WanPai/Root/Activity/View/StoresInfoView.swift
@@ -28,7 +28,7 @@
        let storesView = StoresInfoView.jq_loadNibView()
        storesView.frame = screnDelegate?.window?.frame ?? .zero
        storesView.img_logo.sd_setImage(with: URL(string: detailModel.coverDrawing)!)
        storesView.img_logo.sd_setImage(with: URL(string: detailModel.coverDrawing))
        storesView.label_title.text = detailModel.name
        storesView.label_address.text = detailModel.storeAddress
        storesView.label_distance.text = String(format: "距你%.2lfkm", detailModel.distance)
@@ -40,6 +40,23 @@
            storesView.alpha = 1
        }
    }
    static func show(_ activityModel:ActivityDetailModel,clouse:@escaping (Bool)->Void){
        let storesView = StoresInfoView.jq_loadNibView()
        storesView.frame = screnDelegate?.window?.frame ?? .zero
        storesView.img_logo.sd_setImage(with: URL(string: activityModel.storeCoverDrawing))
        storesView.label_title.text = activityModel.name
        storesView.label_address.text = activityModel.storeAddress
        storesView.label_distance.text = String(format: "距你%.2lfkm", activityModel.distance)
        storesView.clouse = clouse
        screnDelegate?.window?.addSubview(storesView)
        UIView.animate(withDuration: 0.4) {
            storesView.view_container.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
            storesView.alpha = 1
        }
    }
    
    @IBAction func cancelAction(_ sender: UIButton) {
        close()