jufubao-admin-library 1.1.140 → 1.1.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@
37
37
  <el-button
38
38
  type="primary"
39
39
  size="small"
40
- @click="handleOperate(item.action,scope.row.serial_no,scope.row.download_url)"
40
+ @click="handleOperate(item.action,scope.row.serial_no,scope.row.download_url, scope.row)"
41
41
  v-for="(item,index) in scope.row.buttons"
42
42
  :key="index"
43
43
  >{{item.title}}</el-button>
@@ -296,10 +296,10 @@ export default {
296
296
  /**
297
297
  *按钮操作
298
298
  **/
299
- handleOperate (action, serial_no, url) {
299
+ handleOperate (action, serial_no, url , {file_name,file_ext }) {
300
300
  if (action === 'retry') {
301
301
  //重新执行
302
- this.asyncRetry({
302
+ this.asyncRetry({
303
303
  serial_no: serial_no,
304
304
  // #ifdef open-dist
305
305
  app_id:xdCookie.get('app_value'),
@@ -315,20 +315,25 @@ export default {
315
315
  console.log(err, 'err')
316
316
  })
317
317
 
318
- } else if (action === 'download') {
318
+ }
319
+ else if (action === 'download') {
319
320
  let loading = this.$loading({})
320
321
  this.getDownloadUrl({serial_no})
321
322
  .then(res=>{
323
+ let download_url = ''
322
324
  //#ifdef partner-site
323
- if(res.download_url) {
324
- window.open(res.download_url)
325
+ if(res['download_url']) {
326
+ download_url = res['download_url']
325
327
  }
326
328
  // #endif
327
329
  //#ifndef partner-site
328
- if(res.data.download_url) {
329
- window.open(res.data.download_url)
330
+ if(res.data['download_url']) {
331
+ download_url = res.data['download_url']
330
332
  }
331
333
  // #endif
334
+ let fileName = '';
335
+ if(file_name && file_ext) fileName = `${file_name}.${file_ext}`;
336
+ downloadJs(download_url,fileName);
332
337
  loading.close()
333
338
  }).catch(err=>{
334
339
  loading.close()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.140",
3
+ "version": "1.1.141",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {