Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
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
5e6aa52a
authored
Aug 01, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
4ae6e627
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
246 additions
and
45 deletions
pages/person/certification/addcertification/index.js
pages/person/certification/addcertification/index.less
pages/person/certification/addcertification/index.wxml
pages/person/certification/addcertification/index.wxss
pages/person/certification/certificationmanage/index.js
pages/person/certification/certificationmanage/index.wxml
project.config.json
pages/person/certification/addcertification/index.js
View file @
5e6aa52a
...
...
@@ -12,22 +12,30 @@ Page({
* 页面的初始数据
*/
data
:
{
authInfo
:
{},
status
:
true
,
nameText
:
'公司名称'
,
companyType
:
[
'贸易商'
,
'代理商'
,
'原厂'
,
'制造商'
],
index
:
0
,
companyType
:
[{
id
:
1
,
name
:
'贸易商'
},
{
id
:
2
,
name
:
'代理商'
},
{
id
:
3
,
name
:
'原厂'
},
{
id
:
4
,
name
:
'制造商'
}],
companyTypeText
:
'请选择经营性质'
,
placeholderText
:
'请输入公司名称'
,
name
:
''
,
imgSrc
:
''
,
items
:
[{
name
:
'企业'
,
value
:
2
,
checked
:
'true'
},
{
name
:
'个人'
,
value
:
1
}
]
disabled
:
false
,
loading
:
false
,
checked
:
2
},
/**
...
...
@@ -35,6 +43,40 @@ Page({
*/
onLoad
:
function
(
options
)
{
//更新认证信息
if
(
options
.
id
)
{
http
.
getData
(
apis
.
authInfo
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
status
:
false
,
name
:
res
.
data
.
company_type_val
,
imgSrc
:
res
.
data
.
auth_img
,
checked
:
res
.
data
.
auth_type
,
companyTypeText
:
res
.
data
.
company_type_val
,
placeholderText
:
res
.
data
.
auth_type
==
1
?
'请输入个人名称'
:
'请输入公司名称'
,
nameText
:
res
.
data
.
auth_type
==
1
?
'个人名称'
:
'公司名称'
,
authInfo
:
res
.
data
});
//选中经营性质
for
(
let
i
=
0
;
i
<
this
.
data
.
companyType
.
length
;
i
++
)
{
if
(
res
.
data
.
company_type_val
==
this
.
data
.
companyType
[
i
].
name
)
{
this
.
setData
({
index
:
i
});
}
}
}
},
true
,
false
,
true
);
}
},
/**
...
...
@@ -129,21 +171,100 @@ Page({
})
},
/**
* 验证字段
*/
calcForm
:
function
(
val
)
{
let
company_name
=
val
.
company_name
;
let
company_type
=
val
.
company_type
;
let
auth_img
=
this
.
data
.
imgSrc
;
if
(
!
company_name
)
{
wx
.
showToast
({
title
:
this
.
data
.
placeholderText
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
if
(
!
company_type
)
{
wx
.
showToast
({
title
:
'请选择经营性质'
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
if
(
!
auth_img
)
{
wx
.
showToast
({
title
:
'请上传资料'
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
return
true
;
},
/**
* 认证提交
*/
formSubmit
:
function
(
e
)
{
let
company_type
=
e
.
detail
.
value
.
company_type
*
1
+
1
;
if
(
this
.
calcForm
(
e
.
detail
.
value
))
{
let
params
=
Object
.
assign
({},
e
.
detail
.
value
,
{
company_type
:
company_typ
e
,
auth_img
:
this
.
data
.
imgSrc
});
this
.
setData
(
{
disabled
:
tru
e
,
loading
:
true
});
let
company_type
=
e
.
detail
.
value
.
company_type
*
1
+
1
;
http
.
getData
(
apis
.
addAuth
,
'GET'
,
params
,
(
res
)
=>
{
let
params
=
Object
.
assign
({},
e
.
detail
.
value
,
{
company_type
:
company_type
,
auth_img
:
this
.
data
.
imgSrc
});
},
false
,
false
,
true
);
http
.
getData
(
apis
.
addAuth
,
'GET'
,
params
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
wx
.
navigateTo
({
url
:
'/pages/person/certification/certificationmanage/index'
,
success
:
(
result
)
=>
{
this
.
setData
({
disabled
:
false
,
loading
:
false
});
}
});
}
else
{
this
.
setData
({
disabled
:
false
,
loading
:
false
});
wx
.
showToast
({
title
:
res
.
errmsg
,
icon
:
'none'
,
duration
:
2000
});
}
},
false
,
false
,
true
);
}
},
/**
*
...
...
@@ -152,7 +273,7 @@ Page({
bindPickerChange
:
function
(
e
)
{
this
.
setData
({
index
:
e
.
detail
.
value
,
companyTypeText
:
this
.
data
.
companyType
[
e
.
detail
.
value
]
companyTypeText
:
this
.
data
.
companyType
[
e
.
detail
.
value
]
.
name
})
}
})
\ No newline at end of file
pages/person/certification/addcertification/index.less
View file @
5e6aa52a
...
...
@@ -137,11 +137,11 @@
.btn {
margin: 0 55rpx;
height: 98rpx;
background: rgba(13, 132, 209, 1);
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3);
background: rgba(13, 132, 209, 1)
!important
;
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3)
!important
;
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
color: #FFFFFF
!important
;
text-align: center;
line-height: 89rpx;
}
...
...
pages/person/certification/addcertification/index.wxml
View file @
5e6aa52a
...
...
@@ -15,9 +15,13 @@
</view>
<view>
<radio-group class="radio-group" bindchange="radioChange" name="auth_type">
<label class="radio-wrap" wx:for="{{items}}">
<radio value="{{item.value}}" checked="{{item.checked}}" class="radio-text" />
<text class="va-m">{{item.name}}</text>
<label class="radio-wrap">
<radio value="2" checked="{{checked == 2}}" class="radio-text" />
<text class="va-m">企业</text>
</label>
<label class="radio-wrap">
<radio value="1" checked="{{checked == 1}}" class="radio-text" />
<text class="va-m">个人</text>
</label>
</radio-group>
</view>
...
...
@@ -28,7 +32,7 @@
<text class="t1">{{nameText}}</text>
</view>
<view class="flex-b">
<input placeholder="{{placeholderText}}" placeholder-class="placeholderClass" name="company_name" data-type="1" bindinput='bindinputFn' class="inp"></input>
<input
value="{{authInfo.company_name}}"
placeholder="{{placeholderText}}" placeholder-class="placeholderClass" name="company_name" data-type="1" bindinput='bindinputFn' class="inp"></input>
</view>
</view>
<view class="hr"></view>
...
...
@@ -37,7 +41,7 @@
<text class="t1">经营性质</text>
</view>
<view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{companyType}}" name="company_type">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{companyType}}" name="company_type"
range-key="{{'name'}}"
>
<text class="t2">{{companyTypeText}}</text>
<text class="icon iconfont iconChevron"></text>
</picker>
...
...
@@ -58,6 +62,6 @@
</block>
<text class="txt">请上传名片/工作,任意材料,证明您的身份信息</text>
</view>
<button class="btn" form-type="submit">提交认证</button>
<button class="btn" form-type="submit"
disabled="{{disabled}}" loading="{{loading}}"
>提交认证</button>
</form>
</view>
\ No newline at end of file
pages/person/certification/addcertification/index.wxss
View file @
5e6aa52a
...
...
@@ -110,11 +110,11 @@
.certification .btn {
margin: 0 55rpx;
height: 98rpx;
background: #0d84d1;
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3);
background: #0d84d1
!important
;
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3)
!important
;
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
color: #FFFFFF
!important
;
text-align: center;
line-height: 89rpx;
}
pages/person/certification/certificationmanage/index.js
View file @
5e6aa52a
// pages/person/certification/certificationmanage/index.js
const
http
=
require
(
'../../../../utils/util.js'
);
import
{
apis
}
from
'../../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
authinfo
:
{}
},
/**
...
...
@@ -13,6 +18,17 @@ Page({
*/
onLoad
:
function
(
options
)
{
http
.
getData
(
apis
.
authInfo
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
==
0
)
{
this
.
setData
({
authInfo
:
res
.
data
});
}
},
false
,
false
,
true
);
},
/**
...
...
@@ -62,5 +78,30 @@ Page({
*/
onShareAppMessage
:
function
()
{
},
/**
* 跳转认证信息
*/
toUrl
:
function
(
e
)
{
if
(
e
.
target
.
dataset
.
type
==
1
){
wx
.
navigateTo
({
url
:
e
.
target
.
dataset
.
url
+
'?id='
+
e
.
target
.
dataset
.
id
,
success
:
(
result
)
=>
{
}
});
}
else
if
(
e
.
target
.
dataset
.
type
==
2
){
wx
.
navigateTo
({
url
:
e
.
target
.
dataset
.
url
,
success
:
(
result
)
=>
{
}
});
}
else
if
(
e
.
target
.
dataset
.
type
==
3
){
wx
.
switchTab
({
url
:
e
.
target
.
dataset
.
url
});
}
}
})
\ No newline at end of file
pages/person/certification/certificationmanage/index.wxml
View file @
5e6aa52a
...
...
@@ -9,28 +9,52 @@
</view>
</view>
<view class="content">
<text class="time">更新时间:
2019-05-10
</text>
<text class="time">更新时间:
{{authInfo.update_time}}
</text>
<view class="status row verCenter rowCenter">
<cover-image src="/res/images/imgs/test.jpg " class="img"></cover-image>
<text class=c"></text>
</view>
<view class="error">
<text class="icon iconfont iconiconxiantiaoshouji1 va-m"></text>
<text class="t1 va-m">驳回理由:上传的资料不清晰,无法确认资质。</text>
<cover-image src="{{authInfo.auth_img}}" class="img"></cover-image>
<block wx:if="{{authInfo.status === 1}}">
<text class="a"></text>
</block>
<block wx:elif="{{authInfo.status === 3}}">
<text class="b"></text>
</block>
<block wx:elif="{{authInfo.status === 2}}">
<text class="c"></text>
</block>
</view>
<block wx:if="{{authInfo.status === 2}}">
<view class="error">
<text class="icon iconfont iconiconxiantiaoshouji1 va-m"></text>
<text class="t1 va-m">驳回理由:{{authInfo.reject_reason}}。</text>
</view>
</block>
<view class="txt">
<text class="t1 boxsiz">
深圳市猎芯科技有限公司
</text>
<text class="t1 boxsiz">
{{authInfo.company_name}}
</text>
<view class="row verCenter rowCenter mb">
<view>
<text class="t2">资质:</text>
<text class="t3 t3-mr">
企业认证
</text>
<text class="t3 t3-mr">
{{authInfo.auth_type_val}}
</text>
</view>
<view>
<text class="t2">性质:</text>
<text class="t3">
贸易商
</text>
<text class="t3">
{{authInfo.company_type_val}}
</text>
</view>
</view>
</view>
</view>
<button class="btn">更新认证信息</button>
<block wx:if="{{authInfo.status === 1}}">
<button class="btn" data-type="1" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
更新认证信息
</button>
</block>
<block wx:elif="{{authInfo.status === 3}}">
<button class="btn" data-type="3" data-id="{{authInfo.id}}" data-url='/pages/tab/home/home' bind:tap="toUrl">
返回会员中心
</button>
</block>
<block wx:elif="{{authInfo.status === 2}}">
<button class="btn" data-type="2" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
重新提交信息
</button>
</block>
</view>
\ No newline at end of file
project.config.json
View file @
5e6aa52a
...
...
@@ -48,7 +48,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
5
,
"current"
:
6
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -89,6 +89,13 @@
"id"
:
-1
,
"name"
:
"pages/person/auth/index"
,
"pathName"
:
"pages/person/auth/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/login/index"
,
"pathName"
:
"pages/person/login/index"
,
"scene"
:
null
}
]
...
...
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