Browse Source

邀请注册QQ分享增加关闭页面功能

hejq 8 years ago
parent
commit
a114a8c9ee

+ 8 - 3
src/main/webapp/resources/js/index/app.js

@@ -1418,7 +1418,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
     /**
      * QQ分享
      */
-    app.controller('QQShareCtrl', ['$scope', 'InvitationRecord', function($scope, InvitationRecord) {
+    app.controller('QQShareCtrl', ['$scope', 'InvitationRecord', '$modalInstance',  function($scope, InvitationRecord, $modalInstance) {
         InvitationRecord.getInviteUrl({}, function(data) {
             $scope.inviteUrl = data.url;
             var p = {
@@ -1442,11 +1442,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 window.open("http://connect.qq.com/widget/shareqq/index.html?" + s)
             }
         });
+
+        $scope.close = function() {
+            $modalInstance.dismiss();
+        }
     }]);
 
+    /**
+     * 再次邀请
+     */
     app.controller('ReInviteCtrl', ['$scope', 'toaster', '$modalInstance', 'id', 'InvitationRecord', function ($scope, toaster, $modalInstance, id, InvitationRecord) {
-
-
         var loadData = function (id) {
             InvitationRecord.getRecordById({id: id}, {}, function (data) {
                 if (data.user !== null) {

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/modal/QQshare_modal.html

@@ -77,7 +77,7 @@
 <div class="share">
     <div class="modal-header">
         <span>分享邀请链接</span>
-        <a class="close">&times;</a>
+        <a class="close" ng-click="close()">&times;</a>
     </div>
     <div class="modal-body">
         <div class="content">