Skip to content

Commit

Permalink
docmee.cn
Browse files Browse the repository at this point in the history
  • Loading branch information
veasion committed Jul 23, 2024
1 parent dab2584 commit b2cf1d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h1>🤖 AI智能生成PPT演示文稿</h1>
<script src="static/pako.js"></script>
<script src="static/marked.js"></script>
<script>
const apiKey = '9664f0ea9a4cee65c'
const apiKey = '17t2c9ma8a3ceo0ks'
var pptxId = null
var outline = ''
var templateId = ''
Expand Down
11 changes: 10 additions & 1 deletion ppt2json.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<script src="static/geometry.js"></script>
<script src="static/ppt2svg.js"></script>
<script>
const apiKey = '9664f0ea9a4cee65c'
const apiKey = '17t2c9ma8a3ceo0ks'
var editor = new JSONEditor(document.querySelector('#json'), {}, {})

var pptxObj = null
Expand Down Expand Up @@ -142,6 +142,15 @@
if (this.status == 200) {
download_pptx.innerText = '渲染pptx并下载'
let blob = this.response
if (blob.type == 'application/json') {
const reader = new FileReader()
reader.onload = function(e) {
let json = JSON.parse(e.target.result)
alert('下载失败:' + json.message)
}
reader.readAsText(blob)
return
}
let a = document.createElement('a')
a.href = window.URL.createObjectURL(blob)
let name = 'download'
Expand Down

0 comments on commit b2cf1d6

Please sign in to comment.