Commit 8d52234e by 张立顺

1.3订单上传bug修复

1 parent 61e64b9e
......@@ -112,5 +112,8 @@
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body>
<script>
</script>
</html>
\ No newline at end of file
......@@ -9,7 +9,11 @@ export default {
name: 'App',
created() {
// console.log(abcd.efg)
const that = this
window.onstorage = function (e) {
// console.log(`The ${e.key} key has been changed from ${e.oldValue} to ${e.newValue} .`)
that.$router.push('/login')
}
},
methods: {
......@@ -19,6 +23,7 @@ export default {
<style lang="scss">
@import "~@/assets/style/public-class.scss";
.el_table {
thead {
th {
......
......@@ -26,8 +26,8 @@ const orderExportApi = (data) => {
const pictureUpload = (data) => {
data.method = "glsx.accounts.biz.common.pictureUpload"
// return request(data, "post")
return request(data)
return request(data, "post", ["file"])
// return request(data)
}
// 导入对账单
......
......@@ -30,6 +30,7 @@ const request = (
"glsx.accounts.biz.common.pictureUpload": "common"
}
const baseApiName = mappingName[apiName]
// console.log(baseApiName, "baseApiName")
// params.appKey = baseConfig[baseApiName].appkey
if (baseApiName == "common") {
params.app_key = baseConfig[baseApiName].appkey
......@@ -55,19 +56,19 @@ const request = (
const signWay = {
"dj.smartcarlife": "sha1",
dj: "sha1",
scrm: "md5",
scrm: "sha1",
glsx: "md5",
"glsx.accounts.biz.common.pictureUpload": "md5"
}
// console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret
// const signWay = baseConfig[baseApiName].signWay
var reqData =
method === RequestMethods.POST
? {
baseURL: "/",
data: sign(params, noSignAttr, secret, signWay[baseApiName])
data: sign(params, noSignAttr, secret, signWay[apiName])
}
: { params: sign(params, noSignAttr, secret, signWay[baseApiName]) }
: { params: sign(params, noSignAttr, secret, signWay[apiName]) }
reqData = reqData = Object.assign(reqData, options, {})
// console.log(method === RequestMethods.POST)
// console.log(url)
......
......@@ -10,6 +10,7 @@ import qs from "qs"
import { deepClone } from "@/common/util"
const sign = (params, noSignAttr = [], secret, way = "sha1") => {
// console.log(way, "way")
delete params.sign
var objStr = qs.stringify(deepClone(params), {
arrayFormat: "indices",
......
......@@ -131,12 +131,14 @@ service.interceptors.response.use(
return Promise.reject(new Error("登录超时,请重新登录"))
// return Promise.reject(new Error(response.message || 'Error'))
}
switch (+dataAxios[ruleResult.code_key]) {
const codeValue = dataAxios[ruleResult.code_key] || dataAxios.returnCode
switch (+codeValue) {
case ruleResult.code_success_value:
// [ 示例 ] code === 0 代表没有错误
return dataAxios[ruleResult.data_key]
default:
// 不是正确的 code
console.log(dataAxios)
errorCreate(`${dataAxios[ruleResult.message_key]}`)
break
}
......
......@@ -416,9 +416,10 @@ export default {
if (res) {
this.fileForm.fileUrl = res
}
const refName = "file" + row.id
// const refName = "file" + row.id
// const refName = "file"
e.target.value = ""
this.$refs[refName].value = ""
// this.$refs[refName].value = ""
})
document.getElementById("fileUpload").value = ""
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!