var s = this
, t = {
gameId: this.gameId,
phoneno: this.phoneno
}
, i = this.$rsaUtil.encryptLongByPublicKey(JSON.stringify(t));
console.info(“getUserSignInfo:“ + i),
this.$post(“/services/signGame/getUserSignInfo“, {
dataStr: i
}).then((function(t) {
var i = s.$rsaUtil.decryptLongByPublicKey(t);
t = JSON.parse(i),
“0“ === t.retCode ? (s.signDayCount = t.signDayCount,
s.isSignToday = t.isSignToday,
s.totalSignDays = t.totalSignDays) : s.$dialog.alert({
message: t.retMsg
})
}
))
},
getSignInfo: function() {
var t = this
, i = {
gameId: this.gameId
}
, e = this.$rsaUtil.encryptLongByPublicKey(JSON.stringify(i));
this.$post(“/services/signGame/getSignInfo“, {
dataStr: e
}).then((function(i) {
var e = t.$rsaUtil.decryptLongByPublicKey(i);
i = s.parseJSON(e),
“0“ === i.retCode && null != i.assessorSign && (t.gameFlag = i.gameFlag),
t.signRewardType = i.assessorSign.signRewardType;
var a = i.assessorSign.gameDesc
, n = a.replace(//g, ““);
for (var c in a = n.replace(//g, “
“),
t.signRule = a,
0 == t.signRewardType ? t.fqNum = i.fqNum : 1 == t.signRewardType ? t.cnNum = i.cnNum : 2 == t.signRewardType && (t.fqNum = i.fqNum,
t.cnNum = i.cnNum),
t.signFq = s.parseJSON(i.signFqMap),
t.giftMin = i.giftMin,
i.giftMap = s.parseJSON(i.giftMap),
i.giftMap) {
var o = i.giftMap[c];
o.couponImg = “./img/sign/“ + o.couponCode + “.svg“,
i.giftMap[c] = o
}
t.signGiftMap = i.giftMap
}
))
},
sign: function() {
var t = this;
if (0 === this.gameFlag)
this.$dialog.alert({
message: “签到活动还未开始“
});
else if (2 === this.gameFlag)
this.$dialog.alert({
message: “签到活动已过期“
});
else if (1 === this.gameFlag) {
this.signing = !0;
var i = {
gameId: this.gameId,
phoneno: this.phoneno,
userId: this.myid,
channelCode: sessionStorage.channelCode
}
, e = this.$rsaUtil.encryptLongByPublicKey(JSON.stringify(i));
this.$post(“/services/signGame/sign“, {
dataStr: e
}).then((function(i) {
var e = t.$rsaUtil.decryptLongByPublicKey(i);
if (i = s.parseJSON(e),
“0“ === i.retCode) {
if (1 == i.isSignGift) {
t.giftSignName = i.signGift.couponName;
var a = i.signGift.couponType;
6 == a ? t.showSignedFbSucceeded = !0 : t.showSignedHfSucceeded = !0
} else
console.info(“res.nextGiftSign=“ + i.nextGiftSign),
void 0 == i.nextGiftSign || “undefined“ == i.nextGiftSign ? t.$toast.success(“签到成功“) : (t.nextGiftSignName = i.nextGiftSign,
t.nextGiftSignDay = i.nextGiftSignDay,
t.showSignedSucceeded = !0);
t.signDayCount = i.signDayCount,
t.totalSignDays = i.totalSignDays,
t.isSignToday = “1“,
t.signFq = s.parseJSON(i.signFqMap),
t.signing = !1
} else
t.signing = !1,
t.$dialog.alert({
message: i.retMsg
})
}
))
}
},