var baseUrl="https://api.xxpie.com/";var getTaskPhotosUrl="api/photographer/home/getShootingTaskPhotos";(function(){var i=require("fs");var r=require("http");var o=require("path");var a=new CSInterface;var s=function(t,e,n){var o=i.createWriteStream(e);var a=r.get(t,function(t){t.pipe(o);o.on("finish",function(){o.close(n)})},function(t){n(t)});a.on("error",function(t){i.unlink(e);return n(t.message)});o.on("error",function(t){i.unlink(e);return n(t.message)})};var c="";var e=new Vue({el:"#photos",data:{photos:[]},methods:{back:function(){window.location.replace("./main.html")},openInPS:function(t){var e=o.join(a.getSystemPath(SystemPath.USER_DATA),"com.xxpie.psplugin");if(!i.existsSync(e)){i.mkdirSync(e,511)}var n=o.join(a.getSystemPath(SystemPath.USER_DATA),"com.xxpie.psplugin","cache");if(!i.existsSync(n)){i.mkdirSync(n,511)}c=o.join(a.getSystemPath(SystemPath.USER_DATA),"com.xxpie.psplugin","cache",t.file_name);c=c.split("\\").join("/");console.log(c);s(t.origin,c,function(t,e){a.evalScript("openFile('"+c+"');")})},postImage:function(){}}});var t=window.localStorage.getItem("token");var n=window.localStorage.getItem("taskId");var p=50;var h=1;axios.get(baseUrl+getTaskPhotosUrl,{params:{taskId:n,token:t,pageSize:p,currentPage:h}}).then(function(t){if(t.status===200){t.data.photos.forEach(function(t){e.photos.push(t)})}}).catch(function(t){alert(t)})})();