File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
admin/src/views/api_excel Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,8 @@ export default {
157157 },
158158 created () {
159159 this .listQuery = this .$route .query
160- this .currentpage = parseInt (this .listQuery .page )
160+ const page = parseInt (this .listQuery .page )
161+ this .currentpage = isNaN (page) ? 1 : page
161162 const perPage = parseInt (this .$route .query .perPage )
162163 this .perpage = isNaN (perPage) ? this .perpage : perPage
163164 // this.fetchData()
@@ -222,7 +223,7 @@ export default {
222223 },
223224 initWebSocket () { // 初始化 weosocket
224225 if (' WebSocket' in window ) {
225- const url = process .env .WEBSOCKET + ' ?action=api_excel&token=' + getToken ()
226+ const url = process .env .WEBSOCKET + ' ?action=api_excel&token=' + getToken () + ' &page= ' + this . currentpage + ' &perPage= ' + this . perpage
226227 this .websock = new WebSocket (url)
227228 this .websock .onmessage = this .onmessage
228229 this .websock .onopen = this .onopen
You can’t perform that action at this time.
0 commit comments