Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
beb7cc87
authored
May 26, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
账期
parent
4982b2c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
156 additions
and
19 deletions
pages/mine/zqsx.vue
util/api.js
pages/mine/zqsx.vue
View file @
beb7cc87
...
...
@@ -11,28 +11,28 @@
<text
class=
"t1"
>
*
</text>
<text
class=
"t2"
>
公司名称:
</text>
</view>
<view><input
type=
"text"
placeholder=
"请输入公司名称"
class=
"uni-input"
/></view>
<view><input
type=
"text"
placeholder=
"请输入公司名称"
class=
"uni-input"
v-model=
"formParams.com_name"
/></view>
</view>
<view
class=
"input-box column"
>
<view
class=
"text"
>
<text
class=
"t1"
>
*
</text>
<text
class=
"t2"
>
联系人:
</text>
</view>
<view><input
type=
"text"
placeholder=
"请输入联系人"
class=
"uni-input"
/></view>
<view><input
type=
"text"
placeholder=
"请输入联系人"
class=
"uni-input"
v-model=
"formParams.linkman"
/></view>
</view>
<view
class=
"input-box column"
>
<view
class=
"text"
>
<text
class=
"t1"
>
*
</text>
<text
class=
"t2"
>
联系电话:
</text>
</view>
<view><input
type=
"text"
placeholder=
"请输入联系电话"
class=
"uni-input"
/></view>
<view><input
type=
"text"
placeholder=
"请输入联系电话"
class=
"uni-input"
v-model=
"formParams.mobile"
/></view>
</view>
<view
class=
"input-box column"
>
<view
class=
"text"
>
<text
class=
"t1"
>
*
</text>
<text
class=
"t2"
>
邮箱:
</text>
</view>
<view><input
type=
"text"
placeholder=
"请输入邮箱"
class=
"uni-input"
/></view>
<view><input
type=
"text"
placeholder=
"请输入邮箱"
class=
"uni-input"
v-model=
"formParams.email"
/></view>
</view>
<view
class=
"input-box column"
>
<view
class=
"text"
>
...
...
@@ -40,9 +40,9 @@
<text
class=
"t2"
>
公司性质:
</text>
</view>
<view
class=
"select-box"
>
<picker
@
change=
"bindPickerChange"
:value=
"index"
:range=
"array"
>
<picker
@
change=
"bindPickerChange"
:value=
"index"
:range=
"array"
:range-key=
"'name'"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"uni-input row verCenter"
>
{{
array
[
index
]
}}
</view>
<view
class=
"uni-input row verCenter"
>
{{
index
==
-
1
?
'请选择'
:
array
[
index
].
name
}}
</view>
<view
class=
"iconfont icon-arrbot"
></view>
</view>
</picker>
...
...
@@ -54,15 +54,13 @@
<text
class=
"t2"
>
营业执照:
</text>
</view>
<view
class=
"upload-box row"
>
<view
class=
"default row rowCenter verCenter"
><text
class=
"iconfont icon-juxing4"
></text></view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202305/20/441caaf538f3f5fb4c7b9e735d2401f2.jpg"
mode=
"aspectFill"
></image>
<view
class=
"delete row rowCenter verCenter"
><text
class=
"iconfont icon-del"
></text></view>
</view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202305/20/441caaf538f3f5fb4c7b9e735d2401f2.jpg"
mode=
"aspectFill"
></image>
<view
class=
"delete row rowCenter verCenter"
><text
class=
"iconfont icon-del"
></text></view>
<template
v-if=
"image_list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in image_list"
:key=
"index"
>
<image
:src=
"item"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<view
class=
"delete row rowCenter verCenter"
@
click=
"deletePic(index)"
><text
class=
"iconfont icon-del"
></text></view>
</view>
</
template
>
<view
class=
"default row rowCenter verCenter"
@
click=
"chooseImageChange()"
v-if=
"image_list.length < maxNum"
><text
class=
"iconfont icon-juxing4"
></text></view>
</view>
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submit()"
>
提交
</view>
...
...
@@ -85,13 +83,23 @@
</template>
<
script
>
import
{
Api_Url
}
from
'@/util/api.js'
;
import
{
Api_Url
,
Oss_Url
}
from
'@/util/api.js'
;
export
default
{
data
()
{
return
{
index
:
0
,
array
:
[
'0086'
,
'00886'
,
'00853'
,
'00852'
]
index
:
-
1
,
array
:
[{
name
:
'代理商'
,
value
:
3
},
{
name
:
'终端采购商'
,
value
:
1
},
{
name
:
'代工厂'
,
value
:
2
},
{
name
:
'学校、科研机构'
,
value
:
4
},
{
name
:
'贸易商'
,
value
:
5
},
{
name
:
'个人'
,
value
:
0
},
{
name
:
'其他'
,
value
:
6
}],
image_list
:
[],
//图片列表
maxNum
:
10
,
//最大上传图片数量
formParams
:
{
com_name
:
''
,
linkman
:
''
,
mobile
:
''
,
email
:
''
,
com_nature
:
''
,
business_license_src
:
''
}
};
},
onShow
()
{},
...
...
@@ -99,6 +107,7 @@ export default {
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
this
.
formParams
.
com_nature
=
this
.
array
[
e
.
detail
.
value
].
name
;
},
open
()
{
this
.
$refs
.
popup
.
open
(
'center'
);
...
...
@@ -106,8 +115,131 @@ export default {
close
()
{
this
.
$refs
.
popup
.
close
();
},
/**
* 删除图片
* @param {Object} index
*/
deletePic
(
index
)
{
this
.
image_list
.
splice
(
index
,
1
);
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange
(
img
,
index
)
{
this
.
noexebshowFalg
=
false
;
uni
.
previewImage
({
current
:
index
,
urls
:
img
});
},
/**
* 选择图片
*/
chooseImageChange
()
{
this
.
noexebshowFalg
=
false
;
var
self
=
this
;
uni
.
chooseImage
({
count
:
self
.
maxNums
,
sourceType
:
[
'album'
,
'camera'
],
success
:
chooseImageRes
=>
{
uni
.
showLoading
({
title
:
'上传中...'
});
const
tempFilePaths
=
chooseImageRes
.
tempFilePaths
;
let
maxNum
=
tempFilePaths
.
length
*
1
+
self
.
image_list
.
length
*
1
;
if
(
maxNum
>
self
.
maxNum
)
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
'图片不超过'
+
self
.
maxNum
+
'张'
,
icon
:
'error'
});
return
false
;
}
for
(
let
i
=
0
;
i
<
tempFilePaths
.
length
;
i
++
)
{
uni
.
uploadFile
({
url
:
Oss_Url
+
'/uploadFile?sys_type=4'
,
filePath
:
tempFilePaths
[
i
],
name
:
'file'
,
header
:
{
'Content-Type'
:
'multipart/form-data'
},
success
:
uploadFileRes
=>
{
uni
.
hideLoading
();
var
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
0
)
{
self
.
image_list
.
push
(
data
.
data
.
oss_file_url
);
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
icon
:
'error'
});
}
},
fail
:
error
=>
{
uni
.
hideLoading
();
}
});
}
}
});
},
submit
()
{
if
(
!
this
.
formParams
.
com_name
)
{
uni
.
showToast
({
title
:
'请填写公司名称'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
linkman
)
{
uni
.
showToast
({
title
:
'请填写联系人'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
mobile
)
{
uni
.
showToast
({
title
:
'请填写电话'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
email
)
{
uni
.
showToast
({
title
:
'请填写邮箱'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
com_nature
)
{
uni
.
showToast
({
title
:
'请选择公司性质'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
Api_Url
+
'/help/help/addCreditApply'
,
'POST'
,
this
.
formParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'提交成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
open
();
},
2000
);
}
else
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
res
.
err_msg
,
showCancel
:
false
});
}
});
}
}
};
...
...
util/api.js
View file @
beb7cc87
...
...
@@ -3,6 +3,8 @@ var Api_Url = ''; //api项目url
var
Api_Es
=
''
;
//api项目url
var
Api_ES_Go
=
''
;
//型号联想
var
Code_Url
=
''
;
//图形验证码
var
Oss_Url
=
''
;
//oss系统
switch
(
window
.
location
.
hostname
)
{
...
...
@@ -12,14 +14,15 @@ switch (window.location.hostname) {
Api_Es
=
"//so12.ichunt.com"
Api_ES_Go
=
"https://s.ichunt.com"
Code_Url
=
"https://www.ichunt.com/v3/public/verify"
;
Oss_Url
=
"https://file.ichunt.net"
;
break
;
default
:
//本地proxy配置参考vue.config.js
Ichunt_Api
=
'/v3'
Api_Url
=
'/apis'
;
Api_Es
=
"/esapi"
;
Api_ES_Go
=
"http://192.168.1.237:9008"
;
Code_Url
=
"http://www.liexin.com/v3/public/verify"
;
Oss_Url
=
"http://file.liexindev.net"
;
}
...
...
@@ -28,5 +31,6 @@ module.exports = {
Api_Url
,
Api_Es
,
Api_ES_Go
,
Code_Url
Code_Url
,
Oss_Url
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment