SharePoint 之 rest api 之得到根据当前表名得到表的GUID

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012571917/article/details/69399278
    $scope.shareFile = function (file) {
        var allurl;
        var listurl;
        $http.get(config.AppUrl+'_api/web/lists/getbytitle(\'file\')', { headers: { 'accept': 'application/json;odata=verbose' } }).then(
            function (response) {
                listurl = response.data.d.Id
                allurl = "../_layouts/15/User.aspx?List={" + listurl + "}&obj={" + listurl + "}," + file.ID + ",LISTITEM";
                $window.open(encodeURI(allurl), '_blank')
            },
            function (response) {
            })
    }

猜你喜欢

转载自blog.csdn.net/u012571917/article/details/69399278
今日推荐