Browse Source

计量支付附件、短信合并

增加map文件,去除短信页面请求脚本最后一个数组的逗号分隔符,IE11报错。
增加类名判断,
NoNZero 8 years atrás
parent
commit
3c3f716821

+ 1 - 2
protected/config/sms.conf.php

@@ -1,5 +1,4 @@
 <?php
 $config['SMS_URL'] = 'http://sms.haotingyun.com/v2/sms/single_send.json';
 $config['SMS_AUTHKEY'] = 'fb5ef483e44b9556512a9febef376051';
-$config['SMS_TIPS'] = array('AUDIT_NOTICE' => '【纵横通行账号】您的验证码是', 'END_MSG' => ',15分钟内有效。', 'AUDIT_NOTICE_AUDITOR' => ',已审批通过,请您继续审批。');
-
+$config['SMS_TIPS'] = array('AUDIT_NOTICE' => '【纵横通行账号】您的验证码是', 'END_MSG' => ',15分钟内有效。', 'AUDIT_NOTICE_AUDITOR' => ',已审批通过。请您继续审批。');

+ 1 - 1
protected/controller/ClientController.php

@@ -768,7 +768,7 @@ class ClientController extends DooController
                                             // SMS Start
                                             $verifyUserArray = $this->profile->getVerifiedMobile($auditUserArray[$k + 1]['auditoruid']);
                                             $pmnameArray = $this->actmeasure->getRowByPmid($auditUserArray[$k + 1]['pmid']);
-                                            if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {
+                                            if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
                                                 $this->__auditNotice($verifyUserArray['mobile'], $pmnameArray["pmname"] . ',' . $verifyUserArray["name"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR"]);
                                             }
                                             // SMS End

+ 8 - 3
protected/controller/RProjectController.php

@@ -461,9 +461,14 @@ class RProjectController extends DooController
                                     $this->measureauditact->updateMastatus($auditUserArray[$k + 1]['maid']);
                                     // SMS Start
                                     $verifyUserArray = $this->profile->getVerifiedMobile($auditUserArray[$k + 1]['auditoruid']);
+                                    // var_dump($verifyUserArray);
                                     $pmnameArray = $this->actmeasure->getRowByPmid($auditUserArray[$k + 1]['pmid']);
-                                    if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {
-                                        $this->__auditNotice($verifyUserArray['mobile'], $pmnameArray["pmname"] . ',' . $verifyUserArray["name"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR"]);
+                                    // var_dump($pmnameArray);
+                                    if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// XXXX(标段名),陈特,已审批通过。请您继续审批。
+                                        $retval = $this->__auditNotice($verifyUserArray['mobile'], $pmnameArray["pmname"] . ',' . $verifyUserArray["name"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR"]);
+                                        // var_dump($pmnameArray["pmname"] . ',' . $verifyUserArray["name"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR"]);
+                                        // var_dump($retval);
+                                        // var_dump($this->sms->getErrors());
                                     }
                                     // SMS End
                                 }
@@ -540,4 +545,4 @@ class RProjectController extends DooController
     }
 }
 
-?>
+?>

+ 2 - 2
protected/controller/UserController.php

@@ -245,7 +245,7 @@ class UserController extends DooController
             if (isset($vmArray) && $vmArray) {
                 if (md5($_POST['mobile'] . $_POST['verifycode']) == md5($vmArray['mobile'] . $vmArray['code'])) {
                     $this->profile->updateMobile($this->auth->getUid(), $vmArray['mobile']);
-                    return Doo::conf()->APP_URL . 'user/profile/sms';
+                    die(json_encode(array('status'=> true)));
                 }
             }
         }
@@ -544,4 +544,4 @@ class UserController extends DooController
 
 }
 
-?>
+?>

+ 52 - 44
protected/view/edit-profile-sms.html

@@ -100,16 +100,17 @@
                 dataType: "json",
                 cache: false,
                 data: {"mobile": $(this).val()},
-                url: "{{rootUrl}}user/profile/check/mobile"
-            }).done(function(data){
-                if (data["mobile"] > 0) {
-                    $("#input_error").addClass('error');
-                    $("#help-inline").html('手机号码已被使用');
-                    $("#help-inline").show();
-                } else {
-                    $("#input_error").removeClass('error');
-                    $("#help-inline").hide();
-                }
+                url: "{{rootUrl}}user/profile/check/mobile",
+                success: function(data){
+                    if (data["mobile"] > 0) {
+                        $("#input_error").addClass('error');
+                        $("#help-inline").html('手机号码已被使用');
+                        $("#help-inline").show();
+                    } else {
+                        $("#input_error").removeClass('error');
+                        $("#help-inline").hide();
+                    }
+              	}
             });
         });
 
@@ -145,36 +146,40 @@
                 dataType: "json",
                 cache: false,
                 data: {"mobile": $("#mobile").val()},
-                url: "{{rootUrl}}user/profile/check/mobile"
-            }).done(function(data) {
-                if (data["mobile"] > 0) {
-                    $("#input_error").addClass('error');
-                    $("#help-inline").html('手机号码已被使用');
-                    $("#help-inline").show();
-                    return false;
-                } else {
-                    $("#input_error").removeClass('error');
-                    $("#help-inline").hide();
-                    $.ajax({
-                        type: "POST",
-                        dataType: "json",
-                        cache: false,
-                        data: {"mobile": $("#mobile").val()},
-                        url: "{{rootUrl}}user/profile/sms/send/verify"
-                    }).done(function (data) {
-                    });
-                    var count = 60;
-                    var resend = setInterval(function () {
-                        count--;
-                        if (count > 0) {
-                            btn.val('重新获取 ' + count + 's');
-                            $.cookie("sms", count, {path: '/', expires: (1 / 86400) * count});
-                        } else {
-                            clearInterval(resend);
-                            btn.val("获取验证码").removeAttr('disabled style');
-                        }
-                    }, 1000);
-                    btn.attr('disabled', true).css('cursor', 'not-allowed');
+                url: "{{rootUrl}}user/profile/check/mobile",
+                success: function(data){
+                  if (data["mobile"] > 0) {
+                      $("#input_error").addClass('error');
+                      $("#help-inline").html('手机号码已被使用');
+                      $("#help-inline").show();
+                      return false;
+                  } else {
+                      $("#input_error").removeClass('error');
+                      $("#help-inline").hide();
+                      $.ajax({
+                          type: "POST",
+                          dataType: "json",
+                          cache: false,
+                          data: {"mobile": $("#mobile").val()},
+                          url: "{{rootUrl}}user/profile/sms/send/verify",
+                          success: function(data){
+                            if(data["verify"]==true){
+                              var count = 60;
+                              var resend = setInterval(function () {
+                                  count--;
+                                  if (count > 0) {
+                                      btn.val('重新获取 ' + count + 's');
+                                      $.cookie("sms", count, {path: '/', expires: (1 / 86400) * count});
+                                  } else {
+                                      clearInterval(resend);
+                                      btn.val("获取验证码").removeAttr('disabled style');
+                                  }
+                              }, 1000);
+                              btn.attr('disabled', true).css('cursor', 'not-allowed');
+                            }
+                          }
+                      });
+                  }
                 }
             });
         });
@@ -186,10 +191,13 @@
                 dataType: "json",
                 cache: false,
                 data: {"mobile": $("#mobile").val(), "verifycode": $("#verifycode").val()},
-                url: "{{rootUrl}}user/profile/sms"
-            }).done(function (data) {
-//                window.location.href = "{{rootUrl}}user/profile/sms";
-                window.location.reload();
+                url: "{{rootUrl}}user/profile/sms",
+                error: function (err) {
+                    alert(err);
+                },
+                success: function () {
+                    window.location.href = "{{rootUrl}}user/profile/sms";
+                }
             });
         });
     });