|
|
@@ -16,6 +16,9 @@ class QSLGuideusersToCommentManager: NSObject {
|
|
|
|
|
|
static let commentShare = QSLGuideusersToCommentManager()
|
|
|
|
|
|
+ //归因渠道
|
|
|
+ public var clickCompanyChannel : String = ""
|
|
|
+
|
|
|
var guideGobalModel: QSLGuideIsTriggeredModel = QSLGuideIsTriggeredModel()
|
|
|
var commentType: QSLGuideusersToCommentType = .member
|
|
|
private var timer: Timer?
|
|
|
@@ -87,8 +90,11 @@ class QSLGuideusersToCommentManager: NSObject {
|
|
|
let guideIsModel: QSLGuideIsTriggeredModel = response.mapObject(QSLGuideIsTriggeredModel.self, modelKey: "data")
|
|
|
self.commentType = showType
|
|
|
self.guideGobalModel = guideIsModel
|
|
|
- if guideIsModel.trigger {
|
|
|
- if showType == .member {
|
|
|
+ if guideIsModel.trigger && self.areThisTwoChannel(){
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ self.noMemberPositiveReviewPopWindow()
|
|
|
+ }
|
|
|
+ /*if showType == .member {
|
|
|
DispatchQueue.main.async {
|
|
|
self.memberPositiveReviewPopWindow()
|
|
|
}
|
|
|
@@ -96,12 +102,20 @@ class QSLGuideusersToCommentManager: NSObject {
|
|
|
DispatchQueue.main.async {
|
|
|
self.noMemberPositiveReviewPopWindow()
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
} fail: { code, msg in
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //判断是不是这两个渠道 ASA渠道和自然流量两个渠道
|
|
|
+ func areThisTwoChannel() -> Bool {
|
|
|
+ if self.clickCompanyChannel == "Apple Search Ads" || self.clickCompanyChannel == "natural" {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ }
|
|
|
+
|
|
|
///领取好评引导奖励请求
|
|
|
func requestForReceivingGoodReviewGuidance() {
|
|
|
QSLNetwork().request(.guideReceiveReward(dict: [String: Any]())) { response in
|
|
|
@@ -156,13 +170,13 @@ extension QSLGuideusersToCommentManager {
|
|
|
inputtr.append(titleTwoAttr)
|
|
|
|
|
|
if let currentWindow = UIApplication.keyWindow {
|
|
|
- QSLVipAlertView.alert(view: currentWindow, title: "", titleAttring: inputtr, content: "你的一条五星好评是我们前进的动力", isOneBtn: true, oneBtnText: "立即好评", oneBtnClosure: { [weak self] in
|
|
|
+ QSLVipAlertView.alert(view: currentWindow, title: "", titleAttring: inputtr, content: "你的一条五星好评是我们前进的动力", isOneBtn: true, oneBtnText: "立即好评", oneBtnClosure: {
|
|
|
// 同步调用
|
|
|
QSLInAppReviewmanager.requestReview()
|
|
|
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
|
|
+ /*DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
|
|
self?.requestForReceivingGoodReviewGuidance()
|
|
|
- }
|
|
|
+ }*/
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -186,15 +200,14 @@ extension QSLGuideusersToCommentManager {
|
|
|
inputtr.append(titleOneAttr)
|
|
|
|
|
|
if let currentWindow = UIApplication.keyWindow {
|
|
|
- QSLVipAlertView.alert(view: currentWindow, title: "", titleAttring: inputtr, content: "我们将回馈用户更多的优惠福利", isOneBtn: true, oneBtnText: "立即好评", oneBtnClosure: { [weak self] in
|
|
|
-
|
|
|
+ QSLVipAlertView.alert(view: currentWindow, title: "", titleAttring: inputtr, content: "我们将回馈用户更多的优惠福利", isOneBtn: true, oneBtnText: "立即好评", oneBtnClosure: {
|
|
|
// 同步调用
|
|
|
QSLInAppReviewmanager.requestReview()
|
|
|
|
|
|
// 延迟1秒执行
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
|
|
+ /*DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
|
|
self?.requestForReceivingGoodReviewGuidance()
|
|
|
- }
|
|
|
+ }*/
|
|
|
//self?.requestAddFri()
|
|
|
})
|
|
|
}
|