Browse Source

账户管理新需求调整,删除测试代码

liusw 8 years ago
parent
commit
84b9d1fe2d

+ 3 - 3
src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -1742,15 +1742,15 @@ define([ 'app/app' ], function(app) {
    */
 	app.controller('leftNavCtrl', ["$scope", "toaster", function($scope, toaster){
 		$scope.promptUpdate = function() {
-			if(!$scope.userInfo.pwdEnable){
+			if (!$scope.userInfo.pwdEnable) {
         toaster.pop("info", '提示', "请修改登录密码");
         return;
 			}
-      if(!$scope.userInfo.userEmail){
+      if (!$scope.userInfo.userEmail) {
         toaster.pop("info", '提示', "请绑定邮箱");
         return;
       }
-      if(!$scope.userInfo.haveUserQuestion){
+      if (!$scope.userInfo.haveUserQuestion) {
         toaster.pop("info", '提示',  "请修改登录密码");
         return;
       }

+ 2 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_home_ctrl.js

@@ -6,7 +6,7 @@ define(['app/app', 'calendar'], function(app) {
     app.register.controller('homeCtrl', ['$scope', '$rootScope', 'Recommendation', 'ShippingAddress', 'Bill', '$q', 'toaster', '$modal', 'Goods', 'StoreInfo', function ($scope, $rootScope, Recommendation, ShippingAddress, Bill, $q, toaster, $modal, Goods, StoreInfo) {
         $rootScope.active = 'home';
         document.title='买家中心-优软商城';
-      $scope.userInfo.userEmail = null;
+        $scope.userInfo = $rootScope.userInfo;
         var getRecommendComps = function (userUU, usedFor, pageable) {
             Recommendation.getRecommendComps({page: pageable.page, size: pageable.size}, function (data) {
                 $scope.recommendComps = data.content;
@@ -29,7 +29,7 @@ define(['app/app', 'calendar'], function(app) {
       }
 
         //安全级别
-        if(!($scope.userInfo.pwdEnable && $scope.userInfo.haveUserQuestion && ($scope.userInfo.userEmail==null?false:true))){
+        if(!($scope.userInfo.pwdEnable && $scope.userInfo.haveUserQuestion && $scope.userInfo.userEmail)){
           $scope.openHomeCenterModel();
         }
 

+ 7 - 7
src/main/webapp/resources/view/usercenter/forstore/account_manager.html

@@ -219,7 +219,7 @@
 					<i ng-if="userInfo.secLevel==5 || userInfo.secLevel==6">强</i>
 					<!--完成<a href="javascript:void(0)"> 密保设置</a>,提升账户安全。-->
 				</span>
-        <span ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && (userInfo.userEmail==null?false:true)">
+        <span ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail">
           你的账户的安全等级过低,请 <span ng-hide="userInfo.pwdEnable" ng-click="goLink('pwd')"> 修改密码 </span>
           <span ng-hide="userInfo.haveUserQuestion" ng-click="goLink('question')"> 设置密保问题 </span>
           <span  ng-hide="userInfo.userEmail" ng-click="goLink('email')"> 绑定邮箱 </span>
@@ -248,14 +248,14 @@
 			</li>
 			<li>
 				<span>
-					<h5 ng-show="userInfo.userEmail==null?false:true"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
-					<h5 ng-hide="userInfo.userEmail==null?false:true"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-show="userInfo.userEmail"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-hide="userInfo.userEmail"><img src="static/img/user/images/safe.png"/></h5>
 					<font>邮箱认证:</font>
-					<span ng-show="userInfo.userEmail==null?false:true"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
-					<span ng-hide="userInfo.userEmail==null?false:true">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
+					<span ng-show="userInfo.userEmail"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
+					<span ng-hide="userInfo.userEmail">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
 				</span>
-				<a ng-show="userInfo.userEmail==null?false:true" ng-click="updateUserEmail()">修改</a>
-				<a ng-hide="userInfo.userEmail==null?false:true" ng-click="updateUserEmail()">立即设置</a>
+				<a ng-show="userInfo.userEmail" ng-click="updateUserEmail()">修改</a>
+				<a ng-hide="userInfo.userEmail" ng-click="updateUserEmail()">立即设置</a>
 			</li>
 			<li>
 				<span>

+ 29 - 36
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -598,79 +598,72 @@
 					<i ng-if="userInfo.secLevel==5 || userInfo.secLevel==6">强</i>
           <!--完成<a href="javascript:void(0)"> 密保设置</a>,提升账户安全。-->
 				</span>
-          <span ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && (userInfo.userEmail==null?false:true)">
+          <span ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail">
           你的账户的安全等级过低,请 <span ng-hide="userInfo.pwdEnable" ng-click="goLink('pwd')"> 修改密码 </span>
           <span ng-hide="userInfo.haveUserQuestion" ng-click="goLink('question')"> 设置密保问题 </span>
           <span  ng-hide="userInfo.userEmail" ng-click="goLink('email')"> 绑定邮箱 </span>
           来保障您的账户安全!
         </span>
         </li>
-        <li ng-switch="userInfo.idEnable">
-				<span>
-					<h5 ng-switch-when="1"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
-					<h5 ng-switch-when="0"><img src="static/img/user/images/safe.png"/></h5>
-					<h5 ng-switch-when="2"><img src="static/img/user/images/safe.png"/></h5>
-					<font>实名认证:</font>
-					<span>实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</span>
-				</span>
-          <a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即设置</a>
-          <a ng-switch-when="1">审核通过</a>
-          <a ng-switch-when="2">待审核</a>
-        </li>
         <li>
 				<span>
-					<h5 ng-show="userInfo.pwdEnable"><img class="ok-icon"
-                                                src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-show="userInfo.pwdEnable"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
 					<h5 ng-hide="userInfo.pwdEnable"><img src="static/img/user/images/safe.png"/></h5>
 					<font>登录密码:</font>
 					<span>安全性高的密码可以使账号更安全,建议您定期更换密码,并且设置一个包含数字和字母,长度超过8位以上的密码。</span>
 				</span>
-          <a ng-click="updatePassword()">修改</a>
+          <a ng-show="userInfo.pwdEnable" ng-click="updatePassword()">修改</a>
+          <a ng-hide="userInfo.pwdEnable" ng-click="updatePassword()" class="mall-btn-default">立即设置</a>
         </li>
         <li>
 				<span>
-					<h5 ng-show="userInfo.haveUserQuestion"><img class="ok-icon"
-                                                       src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-show="userInfo.haveUserQuestion"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
 					<h5 ng-hide="userInfo.haveUserQuestion"><img src="static/img/user/images/safe.png"/></h5>
 					<font>密保问题:</font>
 					<span>是您找回登录密码的方法之一。建议您设置一个容易记住,且最不容易被他人获取的问题及答案。</span>
 				</span>
-          <a ng-hide="userInfo.haveUserQuestion" ng-click="updateUserQuestion()"
-             class="mall-btn-default">立即设置</a>
+          <a ng-hide="userInfo.haveUserQuestion" ng-click="updateUserQuestion()" class="mall-btn-default">立即设置</a>
           <a ng-show="userInfo.haveUserQuestion" ng-click="updateUserQuestion()">修改</a>
         </li>
+        <li>
+				<span>
+					<h5 ng-show="userInfo.userEmail"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-hide="userInfo.userEmail"><img src="static/img/user/images/safe.png"/></h5>
+					<font>邮箱认证:</font>
+					<span ng-show="userInfo.userEmail"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
+					<span ng-hide="userInfo.userEmail">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
+				</span>
+          <a ng-show="userInfo.userEmail" ng-click="updateUserEmail()">修改</a>
+          <a ng-hide="userInfo.userEmail" ng-click="updateUserEmail()">立即设置</a>
+        </li>
         <li>
 				<span>
 					<h5><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
 					<font>手机验证:</font>
-					<span>您绑定的手机:{{userInfo.userTel}}。若已丢失或停用,请立即更换,避免账户被盗。</span>
+					<span>您绑定的手机:<i ng-modal="userInfo.userTel" style="color:#666;">{{userInfo.userTel}}</i>。若已丢失或停用,请立即更换,避免账户被盗。</span>
 				</span>
           <a ng-click="updateUserTel()">修改</a>
         </li>
-        <li>
+        <li ng-switch="userInfo.idEnable">
 				<span>
-					<h5 ng-show="userInfo.userEmail==null?false:true"><img class="ok-icon"
-                                                                 src="static/img/user/images/ok-account.png"/></h5>
-					<h5 ng-hide="userInfo.userEmail==null?false:true"><img
-              src="static/img/user/images/safe.png"/></h5>
-					<font>邮箱认证:</font>
-					<span ng-show="userInfo.userEmail==null?false:true">{{userInfo.userEmail}}</span>
-					<span
-              ng-hide="userInfo.userEmail==null?false:true">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
+					<h5 ng-switch-when="1"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-switch-when="0"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-switch-when="2"><img src="static/img/user/images/safe.png"/></h5>
+					<font>实名认证:</font>
+					<span>实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</span>
 				</span>
-          <a ng-show="userInfo.userEmail==null?false:true" ng-click="updateUserEmail()">修改</a>
-          <a ng-hide="userInfo.userEmail==null?false:true" ng-click="updateUserEmail()">立即设置</a>
+          <a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即设置</a>
+          <a ng-switch-when="1">审核通过</a>
+          <a ng-switch-when="2">待审核</a>
         </li>
         <li>
 				<span>
-					<h5 ng-show="userInfo.havePayPwd"><img class="ok-icon"
-                                                 src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-show="userInfo.havePayPwd"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
 					<h5 ng-hide="userInfo.havePayPwd"><img src="static/img/user/images/safe.png"/></h5>
 					<font>支付密码:</font>
 					<span>在使用账户中余额或确认收货时,需输入支付密码。</span>
 				</span>
-          <a ng-hide="userInfo.havePayPwd" ng-click="updateUserPay()"
-             class="mall-btn-default">立即设置</a>
+          <a ng-hide="userInfo.havePayPwd" ng-click="updateUserPay()" class="mall-btn-default">立即设置</a>
           <a ng-show="userInfo.havePayPwd" ng-click="updateUserPay()">修改</a>
         </li>
       </ul>