Commit 8d52234e by 张立顺

1.3订单上传bug修复

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