Browse Source

Merge remote-tracking branch 'origin/liusw-account-v1.0.10.19' into liusw-account-v1.0.10.19

liusw 8 years ago
parent
commit
a2ddfb2fbf

+ 17 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -1306,6 +1306,23 @@ define(['app/app'], function(app) {
         $scope.checkSuccess2 = true;
       };
 
+		$scope.deleteImg =function () {
+			$scope.user.idImgUrl = '';
+		};
+
+		// 查看范例
+		$scope.showImg = function(imgUrl) {
+			debugger;
+			var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
+			box.show();
+			box.find('img').attr('src', src);
+			box.find('a').click(function(){
+				box.hide();
+			});
+			box.dblclick(function(){
+				box.hide();
+			});
+		};
 		//保存
       $scope.ok = function () {
         User.updateRealAuth({userName:$scope.user.userName,userIdcode:$scope.user.userIdcode,idImgUrl:$scope.user.idImgUrl},{},function(){

+ 57 - 2
src/main/webapp/resources/view/vendor/modal/updateRealAuth.html

@@ -76,6 +76,55 @@
         font-size: 14px;
         margin-left: 85px;
     }
+    /*遮罩层*/
+    .realAuth .hover-show{
+        position: absolute;
+        width: 117px;
+        height: 117px;
+        right: 144px;
+        bottom: 15px;
+        background: rgba(0,0,0,.5);
+        z-index: 10;
+        display: block;
+    }
+    .realAuth .logoImg:hover .hover-show{
+        top: 0;
+        z-index: 10;
+    }
+    .realAuth .hover-show .delete{
+        position: absolute;
+        top: 2px;
+        right: 0px;
+        padding: 0;
+        width: 30px;
+        height: 30px;
+        float: right;
+        text-align: center;
+        cursor: pointer;
+    }
+    .realAuth .hover-show .delete i{
+        color: #fff;
+        font-size: 18px;
+    }
+    .realAuth .hover-show .view{
+        position: absolute;
+        display: inline-block;
+        top: 50%;
+        left: 50%;
+        margin-top: -8px;
+        margin-left: -21px;
+        font-size: 14px;
+        color: #fff;
+        text-align: center;
+        cursor: pointer;
+    }
+    .realAuth .hover-show a i{
+        position: absolute;
+        left: 5px;
+        top: 22px;
+        margin-right: 5px;
+        font-size: 16px;
+    }
 </style>
 <div class="modal-header">
     <img src="static/img/user/images/realAuth.png" alt="">
@@ -115,8 +164,14 @@
         <div class="upload-area">
             <div class="area-header">请上传一张本人手持身份证照片:</div>
             <input type="hidden" name="idImgUrl" ng-model="user.idImgUrl"/>
-            <div  image-upload data-src="static/img/vendor/images/upload.png" on-success="onUploadID($data)"></div>
-            <!--<span class="help-block font-size-12 text-inverse">建议图片大小在3M以内,支持图片格式jpg、png、gif</span>-->
+            <div>
+                <div  image-upload data-src="static/img/vendor/images/upload.png" on-success="onUploadID($data)"></div>
+                <!--<span class="help-block font-size-12 text-inverse">建议图片大小在3M以内,支持图片格式jpg、png、gif</span>-->
+                <div class="hover-show" ng-if="user.idImgUrl&&user.idImgUrl!=''">
+                    <span class="delete" title="删除" ng-click="deleteImg()"><i class="fa fa-trash" ng-click="deleteImg()"></i></span>
+                    <span class="view" ng-click="showImg(user.idImgUrl)"><i class="fa fa-search" style="margin-right: 5px;"></i>查看</span>
+                </div>
+            </div>
             </div>
             <div class="col-md-4 col-sm-4 col">
             </div>