Selaa lähdekoodia

上传处理

临城职教中职
liangkun 2 vuotta sitten
vanhempi
commit
c2fe08d34a
4 muutettua tiedostoa jossa 12 lisäystä ja 11 poistoa
  1. +6
    -5
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js
  2. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js
  3. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js
  4. +3
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js

+ 6
- 5
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js Näytä tiedosto

@@ -211,7 +211,7 @@ export default {
const fileType = fileInfo.F_FileType
const fileSize = fileInfo.F_FileSize

const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true)
const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true)

fileList.push({ path, type: fileType, uid, size: fileSize })
}
@@ -274,13 +274,14 @@ export default {

case 'upload':
const uploadUid = []
for (const { path, uid } of val) {
if (uid) {
uploadUid.push(uid)
// { path, uid }
for (const item of val) {
if (item.uid) {
uploadUid.push(item.uid)
continue
}

const fileId = await this.HTTP_UPLOAD(path)
const fileId = await this.HTTP_UPLOAD(item.path||item)
if (fileId) {
uploadUid.push(fileId)
}


+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js Näytä tiedosto

@@ -256,7 +256,7 @@ export default {
const fileType = fileInfo.F_FileType
const fileSize = fileInfo.F_FileSize

const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true)
const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true)

fileList.push({ path, type: fileType, uid, size: fileSize })
}


+ 2
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js Näytä tiedosto

@@ -259,7 +259,7 @@ export default {
// filePath 为临时文件的路径
// formData 为请求附带的提交数据
async HTTP_UPLOAD(filePath, formData) {
const [err, res] = await this.UPLOAD('/annexes/wxupload', filePath, formData)
const [err, res] = await this.UPLOAD('/learun/adms/annexes/wxupload', filePath, formData)

return this.handleResult(err, res)
},
@@ -276,7 +276,7 @@ export default {
// url 为请求地址
// formData 为请求附带的提交数据
async HTTP_DOWNLOAD(formData) {
const [err, res] = await this.DOWNLOAD('/annexes/wxdown', formData)
const [err, res] = await this.DOWNLOAD('/learun/adms/annexes/wxdown', formData)

return this.handleResult(err, res)
},


+ 3
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js Näytä tiedosto

@@ -21,10 +21,10 @@ export default {
// "http://192.168.2.98:8088/"
// ],
"apiHost": [
// "http://localhost:31173/"
"http://192.168.10.85:8088/"
"http://localhost:31173/"
// "http://192.168.10.85:8088/"
],
"webHost":"http://192.168.10.85:8087/",
"webHost":"http://localhost:20472/",
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示
"devAccount": [
// 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428


Ladataan…
Peruuta
Tallenna