|
@@ -121,29 +121,11 @@ $(function(){
|
|
|
// $("#pushfrequency li:gt(0)").toggleClass("checked");
|
|
|
// saveData();
|
|
|
//});
|
|
|
- //
|
|
|
- $("#apptip>img").click(function(){
|
|
|
- var parentLi = $(this).parent();
|
|
|
- if($(this).hasClass("turn-on")){
|
|
|
- if(!retainOneWay("apptip")){
|
|
|
- EasyAlert.show(keepOneTipWayMsg);
|
|
|
- return;
|
|
|
- }
|
|
|
- parentLi.removeClass("on");
|
|
|
- parentLi.children(".turn-off").show();
|
|
|
- parentLi.children(".turn-on").hide();
|
|
|
- }else{
|
|
|
- parentLi.addClass("on");
|
|
|
- parentLi.children(".turn-on").show();
|
|
|
- parentLi.children(".turn-off").hide();
|
|
|
- }
|
|
|
- saveData();
|
|
|
- });
|
|
|
//微信提醒
|
|
|
$("#wxtip>img").click(function(){
|
|
|
var parentLi = $(this).parent();
|
|
|
if($(this).hasClass("turn-on")){
|
|
|
- if(!retainOneWay("wxtip")){
|
|
|
+ if(!$("#emailtip").hasClass("on")){
|
|
|
EasyAlert.show(keepOneTipWayMsg);
|
|
|
return;
|
|
|
}
|
|
@@ -161,7 +143,7 @@ $(function(){
|
|
|
$("#emailtip>img").click(function(){
|
|
|
var parentLi = $(this).parent();
|
|
|
if($(this).hasClass("turn-on")){
|
|
|
- if(!retainOneWay("emailtip")){
|
|
|
+ if(!$("#wxtip").hasClass("on")){
|
|
|
EasyAlert.show(keepOneTipWayMsg);
|
|
|
return;
|
|
|
}
|
|
@@ -209,23 +191,6 @@ $(function(){
|
|
|
//
|
|
|
});
|
|
|
//
|
|
|
-function retainOneWay(thisId){
|
|
|
- var wayIds = ["emailtip","wxtip","apptip"];
|
|
|
- var offCount = 0;
|
|
|
- for(var i=0;i<wayIds.length;i++){
|
|
|
- if(wayIds[i]==thisId){
|
|
|
- continue;
|
|
|
- }
|
|
|
- if(!$("#"+wayIds[i]).hasClass("on")){
|
|
|
- offCount++;
|
|
|
- }
|
|
|
- }
|
|
|
- if(offCount==2){
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
-}
|
|
|
-//
|
|
|
function numScroller(){
|
|
|
$("#scroller").mobiscroll().scroller({
|
|
|
theme: 'ios',
|
|
@@ -304,36 +269,22 @@ function init(r){
|
|
|
}
|
|
|
}
|
|
|
numScroller();
|
|
|
- //接收方式:i_mode 1--微信 2--邮件 3--微信+邮件 4--app 5--app+微信 6--app+邮件 7--微信+app+邮件
|
|
|
- var hasOneOpen = false;
|
|
|
- if(this.mode == 1 || this.mode == 3 || this.mode == 5 || this.mode == 7){
|
|
|
- hasOneOpen = true
|
|
|
+ if(this.mode == 3){
|
|
|
$("#wxtip").addClass("on");
|
|
|
$("#wxtip>img.turn-on").show();
|
|
|
- }else{
|
|
|
+ }else if(this.mode == 2){
|
|
|
$("#wxtip>img.turn-off").show();
|
|
|
- }
|
|
|
- if(this.mode == 4 || this.mode == 5 || this.mode == 6 || this.mode == 7){
|
|
|
- hasOneOpen = true
|
|
|
- $("#apptip").addClass("on");
|
|
|
- $("#apptip>img.turn-on").show();
|
|
|
}else{
|
|
|
- $("#apptip>img.turn-off").show();
|
|
|
+ $("#wxtip").addClass("on");
|
|
|
+ $("#wxtip>img.turn-on").show();
|
|
|
}
|
|
|
- if(this.mode == 2 || this.mode == 3 || this.mode == 6 || this.mode == 7){
|
|
|
- hasOneOpen = true
|
|
|
- if(email != ""){
|
|
|
- $(".emailset").show();
|
|
|
- }
|
|
|
+ if(this.mode != 1 && email != ""){
|
|
|
+ $(".emailset").show();
|
|
|
$("#emailtip").addClass("on");
|
|
|
$("#emailtip>img.turn-on").show();
|
|
|
}else{
|
|
|
$("#emailtip>img.turn-off").show();
|
|
|
}
|
|
|
- if(!hasOneOpen){
|
|
|
- $("#wxtip").addClass("on");
|
|
|
- $("#wxtip>img.turn-on").show();
|
|
|
- }
|
|
|
$("#email").val(email);
|
|
|
$(".emailset>span").css("max-width",$("#emailtip").width()-80).text(email);
|
|
|
}
|
|
@@ -358,17 +309,11 @@ function saveData(){
|
|
|
param["rmend"] = def2;
|
|
|
}
|
|
|
//
|
|
|
- var modeArray = [];
|
|
|
- if($("#apptip").hasClass("on")){
|
|
|
- modeArray.push(4);
|
|
|
- }
|
|
|
- if($("#wxtip").hasClass("on")){
|
|
|
- modeArray.push(1);
|
|
|
+ if($("#wxtip").hasClass("on") && $("#emailtip").hasClass("on")){
|
|
|
+ param["mode"] = 3;
|
|
|
+ }else if($("#emailtip").hasClass("on")){
|
|
|
+ param["mode"] = 2;
|
|
|
}
|
|
|
- if($("#emailtip").hasClass("on")){
|
|
|
- modeArray.push(2);
|
|
|
- }
|
|
|
- param["mode"] = modeArray.join(",");
|
|
|
$.post("/wxkeyset/ajaxReq",param,function(r){
|
|
|
|
|
|
});
|
|
@@ -468,11 +413,6 @@ function docheck(n,th){
|
|
|
<div id="pushway">
|
|
|
<ul class="navchoose">
|
|
|
<li><img src="/images/wxkeyset/pushway.png">推送方式</li>
|
|
|
- <li id="apptip">
|
|
|
- APP提醒<font>(需要先下载APP)</font>
|
|
|
- <img src="/images/wxkeyset/turn-on.png" class="turn-on">
|
|
|
- <img src="/images/wxkeyset/turn-off.png" class="turn-off">
|
|
|
- </li>
|
|
|
<li id="wxtip">
|
|
|
微信提醒
|
|
|
<img src="/images/wxkeyset/turn-on.png" class="turn-on">
|
|
@@ -483,7 +423,7 @@ function docheck(n,th){
|
|
|
<img src="/images/wxkeyset/turn-on.png" class="turn-on">
|
|
|
<img src="/images/wxkeyset/turn-off.png" class="turn-off">
|
|
|
<div class="emailset">
|
|
|
- <span>mulangshenjun@vip.qq.com</span>
|
|
|
+ <span></span>
|
|
|
<img src="/images/wx/editemail.png">
|
|
|
</div>
|
|
|
</li>
|