Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-merchant-data
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 90f19a5f
authored
Jul 01, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
41e1d80e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
41 deletions
src/views/customer/businessDetails/index.vue
src/views/customer/businessDetails/index.vue
View file @
90f19a5
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
alt=
""
alt=
""
@
click=
"handleImg()"
@
click=
"handleImg()"
>
>
<gl-upload
<
!--
<
gl-upload
id=
"upload"
id=
"upload"
v-if=
"isEdit"
v-if=
"isEdit"
class=
"upload-demo"
class=
"upload-demo"
...
@@ -74,13 +74,18 @@
...
@@ -74,13 +74,18 @@
<gl-button
<gl-button
size=
"small"
size=
"small"
>
上传图片
</gl-button>
>
上传图片
</gl-button>
</gl-upload>
</gl-upload>
-->
<!--
<input
v-if=
"isEdit"
type=
"file"
id=
"id"
name=
"image"
class=
"getImgUrl_file"
@
change=
"shangc($event)"
accept=
"image/jpg,image/jpeg,image/png"
>
-->
<!--
<form
id=
"uploadForm"
enctype=
"application/x-www-form-urlencoded"
>
<input
type=
"file"
id=
"id"
name=
"image"
class=
"getImgUrl_file"
accept=
"image/jpg,image/jpeg,image/png"
>
<button
id=
"upload"
type=
"button"
@
click=
"aa($event)"
>
upload
</button>
</form>
-->
<!--
<form
v-if=
"isEdit"
method=
"post"
action=
"http://gfs.test.glsx.com.cn/file/upstring"
>
<input
type=
"file"
id=
"id"
name=
"image"
class=
"getImgUrl_file"
@
change=
"shangc($event)"
accept=
"image/jpg,image/jpeg,image/png"
>
<input
type=
"file"
id=
"id"
name=
"image"
class=
"getImgUrl_file"
@
change=
"shangc($event)"
accept=
"image/jpg,image/jpeg,image/png"
>
<form
method=
"post"
action=
"http://gfs.test.glsx.com.cn/file/upstring"
>
<input
name=
"systemSign"
value=
"mechantData"
><br>
<input
type=
"systemSign"
name=
""
/>
<input
name=
"files"
v-model=
"fileImg"
><br>
<br/><br/>
<input
type=
"submit"
value=
"登录"
>
<input
type=
"files"
name=
""
/>
</form>
-->
</form>
</span>
</span>
<gl-select
<gl-select
v-else-if=
"i.name == 'merchantChannelName' && isEdit"
v-else-if=
"i.name == 'merchantChannelName' && isEdit"
...
@@ -216,6 +221,7 @@ export default {
...
@@ -216,6 +221,7 @@ export default {
editOptions
:
[
'address'
,
'contactor'
,
'contactPhone'
,
'phone'
,
'email'
],
editOptions
:
[
'address'
,
'contactor'
,
'contactPhone'
,
'phone'
,
'email'
],
channelList
:
[],
channelList
:
[],
fileInfo
:
{
fileType
:
''
,
fileBase
:
''
},
fileInfo
:
{
fileType
:
''
,
fileBase
:
''
},
fileImg
:
''
,
List
:
[
List
:
[
{
{
name
:
'merchantName'
,
name
:
'merchantName'
,
...
@@ -674,33 +680,37 @@ export default {
...
@@ -674,33 +680,37 @@ export default {
// console.log(this.fileInfo.fileType)
// console.log(this.fileInfo.fileType)
// console.log(this.fileInfo.fileBase)
// console.log(this.fileInfo.fileBase)
const
fileParams
=
this
.
fileInfo
.
fileType
+
'@'
+
this
.
fileInfo
.
fileBase
const
fileParams
=
this
.
fileInfo
.
fileType
+
'@'
+
this
.
fileInfo
.
fileBase
this
.
fileImg
=
this
.
fileInfo
.
fileType
+
'@'
+
this
.
fileInfo
.
fileBase
const
aa
=
{
const
aa
=
{
systemSign
:
'mechantData'
,
systemSign
:
'mechantData'
,
files
:
fileParams
files
:
fileParams
}
}
const
fileTemp
=
JSON
.
stringify
(
aa
)
console
.
log
(
aa
)
console
.
log
(
fileTemp
)
// const fileTemp = JSON.stringify(aa)
// console.log(fileTemp)
// var formData = new FormData()
// formData.append('systemSign', 'mechantData')
// formData.append('files', fileParams)
// axios({
// axios({
// method: 'post',
// method: 'post',
// headers: {
// headers: {
// 'Content-Type': 'application/
json
'
// 'Content-Type': 'application/
x-www-form-urlencoded
'
// },
// },
// transformRequest: [function(data) {
//
//
transformRequest: [function(data) {
// console.log('---------')
//
//
console.log('---------')
// data = JSON.stringify(data)
//
//
data = JSON.stringify(data)
// return data
//
//
return data
// }],
//
//
}],
// url: 'http://gfs.test.glsx.com.cn/file/upstring',
// url: 'http://gfs.test.glsx.com.cn/file/upstring',
// params: {},
// data: aa,
// data: {
// // dataType: 'json', // jsonp会把请求类型强制转换为get请求
// 'systemSign': 'mechantData',
// // contentType: false,
// 'files': fileParams
// processData: false
// }
// })
// })
// axios.post('http://gfs.test.glsx.com.cn/file/upstring',
{ fileTemp }
,
// axios.post('http://gfs.test.glsx.com.cn/file/upstring',
formData
,
// {
// {
// headers: {
// headers: {
// '
content-t
ype': 'application/x-www-form-urlencoded'
// '
Content-T
ype': 'application/x-www-form-urlencoded'
// }
// }
// // requestType: 'jsonString'
// // requestType: 'jsonString'
// }).then(res => {
// }).then(res => {
...
@@ -708,25 +718,25 @@ export default {
...
@@ -708,25 +718,25 @@ export default {
// }).catch(err => {
// }).catch(err => {
// console.log(err)
// console.log(err)
// })
// })
axios
({
//
axios({
method
:
'post'
,
//
method: 'post',
url
:
'http://gfs.test.glsx.com.cn/file/upstring'
,
//
url: 'http://gfs.test.glsx.com.cn/file/upstring',
data
:
aa
,
//
data: aa,
// headers: {
//
// headers: {
// 'content-type': 'application/x-www-form-urlencoded'
//
// 'content-type': 'application/x-www-form-urlencoded'
// },
//
// },
transformRequest
:
[
function
(
data
)
{
//
transformRequest: [function(data) {
console
.
log
(
data
)
//
console.log(data)
data
=
JSON
.
stringify
(
data
)
//
data = JSON.stringify(data)
console
.
log
(
data
)
//
console.log(data)
return
data
//
return data
}]
//
}]
// requestType: 'jsonString'
//
// requestType: 'jsonString'
}).
then
(
res
=>
{
//
}).then(res => {
console
.
log
(
res
)
//
console.log(res)
}).
catch
(
err
=>
{
//
}).catch(err => {
console
.
log
(
err
)
//
console.log(err)
})
//
})
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment