Commit baf36381 by 梁建民

bug

parent bbddab16
......@@ -33,7 +33,6 @@ Page({
placeholderText: '请输入营业执照上完整的公司名称',
tip: "请上传企业营业执照、商用租赁合同、相关证明资料等扫描图片或照片,所提交资料越详尽,审核通过越快(单张图片大小不超过2M)",
name: '',
imgSrc: '',
disabled: false,
loading: false,
checked: 2,
......@@ -56,9 +55,10 @@ Page({
if (res.errcode === 0) {
this.setData({
status: false,
uploaderNum: res.data.auth_img.length,
uploaderList: res.data.auth_img,
name: res.data.company_type_val,
imgSrc: res.data.auth_img,
auth_img: res.data.auth_img,
checked: res.data.auth_type,
companyTypeText: res.data.company_type_val,
placeholderText: res.data.auth_type == 1 ? '请输入姓名或昵称' : '请输入营业执照上完整的公司名称',
......@@ -159,29 +159,6 @@ Page({
}
},
/**
* 上传资料
*/
uploadImg: function () {
chooseImg(apis.ossupload, 3, (res) => {
if (res) {
this.setData({
imgSrc: res,
status: false
});
}
});
},
/**
* 删除资料
*/
deleteImg: function () {
this.setData({
imgSrc: '',
status: true
})
},
/**
* 验证字段
*/
calcForm: function (val) {
......@@ -200,16 +177,6 @@ Page({
return false;
}
if (!company_type) {
wx.showToast({
title: '请选择经营性质',
icon: 'none',
duration: 2000
});
return false;
}
if (this.data.uploaderList.length <= 0) {
......@@ -230,6 +197,7 @@ Page({
*/
formSubmit: function (e) {
if (this.calcForm(e.detail.value)) {
this.setData({
......@@ -345,6 +313,8 @@ Page({
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
let tempFilePaths = res.tempFilePaths;
let uploaderList = that.data.uploaderList.concat(tempFilePaths);
if (uploaderList.length == 6) {
that.setData({
showUpload: false
......@@ -365,7 +335,6 @@ Page({
*多张图片上传
*/
uploadimg: function (url, data) {
console.log(data.length)
wx.showLoading({
title: '上传中...',
mask: true,
......@@ -384,11 +353,17 @@ Page({
},
success: (res) => {
wx.hideLoading();
if (this.data.auth_img.length >= 6) {
return false;
}
var data = JSON.parse(res.data);
if (data.errcode === 103200) {
this.data.auth_img.push(data.data[0]);
}
},
fail: (res) => {
......@@ -396,8 +371,9 @@ Page({
},
complete: () => {
i++;
if (i == data.length) {
if (i >= data.length) {
console.log('执行完毕');
return false;
} else {
data.i = i;
that.uploadimg(apis.ossupload, data);
......
.certification {
padding-bottom: 30rpx;
.flex-a {
flex: 1;
}
......
......@@ -48,27 +48,19 @@
</view>
</view>
<view class="upload-box column rowCenter verCenter">
<block wx:if="{{status}}">
<view class='ui_uploader_cell'>
<!-- 根据已选择的图片临时路径数组展示图片 -->
<view class='ui_uploader_item' wx:for="{{uploaderList}}" wx:key="{{index}}">
<!-- 删除 -->
<view class="ic">
<text class='icon iconfont iconiconxiantiaoshouji7' bindtap='clearImg' data-index="{{index}}" type="clear"></text>
</view>
<!-- 图片 -->
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
<view class='ui_uploader_cell'>
<!-- 根据已选择的图片临时路径数组展示图片 -->
<view class='ui_uploader_item' wx:for="{{uploaderList}}" wx:key="{{index}}">
<!-- 删除 -->
<view class="ic">
<text class='icon iconfont iconiconxiantiaoshouji7' bindtap='clearImg' data-index="{{index}}" type="clear"></text>
</view>
<!-- 上传按钮+框 -->
<view class='ui_uploader' bindtap='upload' wx:if="{{showUpload}}"></view>
<!-- 图片 -->
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</block>
<block wx:else>
<view class="view column rowCenter verCenter">
<image src="{{imgSrc}}" class="img"></image>
<text class="icon iconfont iconiconxiantiaoshouji7" bind:tap="deleteImg"></text>
</view>
</block>
<!-- 上传按钮+框 -->
<view class='ui_uploader' bindtap='upload' wx:if="{{showUpload}}"></view>
</view>
<text class="txt">{{tip}}</text>
</view>
<button class="btn" form-type="submit" disabled="{{disabled}}" loading="{{loading}}">
......
.certification .flex-a{flex:1}.certification .flex-b{flex:2}.certification .prompt{padding:0 24rpx;height:68rpx;background:#FFF6E6}.certification .prompt .iconiconxiantiaoshouji12{font-size:30rpx;color:#EAAD37}.certification .prompt .t1{font-size:24rpx;color:#EAA217;margin-left:12rpx}.certification .prompt .iconiconxiantiaoshouji13{font-size:30rpx;color:#D8DFE6}.certification .hr{height:10rpx;background:#F5F9FC}.certification .item{padding:0 24rpx 0 0;margin-left:24rpx;height:100rpx}.certification .item .radio-group .radio-wrap{font-size:28rpx;color:#515559;font-weight:400}.certification .item .t1{font-size:28rpx;color:#515559;font-weight:400}.certification .item .t2{font-size:28rpx;color:#8A9299;font-weight:400}.certification .item .inp{width:492r px;height:100rpx}.certification .item .radio-wrap:first-child{margin-right:50rpx}.certification .item .radio-wrap:first-child .radio-text{font-size:28rpx;font-weight:400;color:#515559}.certification .item .iconChevron{font-size:27rpx;color:#ADB6BF;margin-left:12rpx}.certification .item.bor{border-bottom:1px solid #F5F9FC}.certification .upload-box{margin-top:60rpx;margin-bottom:60rpx}.certification .upload-box .ic{position:absolute;right:-15rpx;top:-12rpx;font-size:30rpx;color:#fff;width:44rpx;height:44rpx;background:#EA1717;border-radius:50%;text-align:center;line-height:44rpx;z-index:99}.certification .upload-box .add{width:220rpx;height:220rpx;background:#F0F6FA}.certification .upload-box .add .iconiconxiantiaoshouji15{width:44rpx;height:44rpx;font-size:80rpx;color:#ADB6BF}.certification .upload-box .add .t1{margin-top:19rpx;font-size:24rpx;color:#8A9299}.certification .upload-box .view{position:relative;width:220rpx;height:220rpx}.certification .upload-box .view .img{width:220rpx;height:220rpx}.certification .upload-box .view .iconiconxiantiaoshouji7{position:absolute;right:-15rpx;top:-12rpx;font-size:30rpx;color:#fff;width:44rpx;height:44rpx;background:#EA1717;border-radius:50%;text-align:center;line-height:44rpx;z-index:99}.certification .upload-box .txt{margin-top:24rpx;font-size:24rpx;color:#8A9299;width:80%}.certification .btn{margin:0 55rpx;height:98rpx;background:#0d84d1 !important;box-shadow:0 6rpx 10rpx 0 rgba(97,160,242,0.3) !important;border-radius:8rpx;font-size:32rpx;color:#FFFFFF !important;text-align:center;line-height:89rpx}.ui_uploader_cell{margin-top:30rpx;background:#fff;width:100%;padding:40rpx;box-sizing:border-box}.ui_uploader_cell:after{clear:both;content:'';display:table}.ui_uploader_item{float:left;position:relative;margin-right:30rpx;margin-bottom:30rpx;width:165rpx;height:165rpx}.ui_uploader{float:left;position:relative;margin-right:25rpx;margin-bottom:25rpx;width:165rpx;height:165rpx;border:2rpx solid #d9d9d9;box-sizing:border-box}.ui_uploader:before{content:" ";position:absolute;width:4rpx;height:79rpx;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);background-color:#d9d9d9}.ui_uploader:after{content:" ";position:absolute;height:4rpx;width:79rpx;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);background-color:#d9d9d9}.ui_uploader_item_icon{position:absolute;right:-20rpx;top:-20rpx;background:#fff;border-radius:50%;width:44rpx;height:44rpx}.ui_uploader_item image{width:100%;height:100%}
\ No newline at end of file
.certification{padding-bottom:30rpx}.certification .flex-a{flex:1}.certification .flex-b{flex:2}.certification .prompt{padding:0 24rpx;height:68rpx;background:#FFF6E6}.certification .prompt .iconiconxiantiaoshouji12{font-size:30rpx;color:#EAAD37}.certification .prompt .t1{font-size:24rpx;color:#EAA217;margin-left:12rpx}.certification .prompt .iconiconxiantiaoshouji13{font-size:30rpx;color:#D8DFE6}.certification .hr{height:10rpx;background:#F5F9FC}.certification .item{padding:0 24rpx 0 0;margin-left:24rpx;height:100rpx}.certification .item .radio-group .radio-wrap{font-size:28rpx;color:#515559;font-weight:400}.certification .item .t1{font-size:28rpx;color:#515559;font-weight:400}.certification .item .t2{font-size:28rpx;color:#8A9299;font-weight:400}.certification .item .inp{width:492r px;height:100rpx}.certification .item .radio-wrap:first-child{margin-right:50rpx}.certification .item .radio-wrap:first-child .radio-text{font-size:28rpx;font-weight:400;color:#515559}.certification .item .iconChevron{font-size:27rpx;color:#ADB6BF;margin-left:12rpx}.certification .item.bor{border-bottom:1px solid #F5F9FC}.certification .upload-box{margin-top:60rpx;margin-bottom:60rpx}.certification .upload-box .ic{position:absolute;right:-15rpx;top:-12rpx;font-size:30rpx;color:#fff;width:44rpx;height:44rpx;background:#EA1717;border-radius:50%;text-align:center;line-height:44rpx;z-index:99}.certification .upload-box .add{width:220rpx;height:220rpx;background:#F0F6FA}.certification .upload-box .add .iconiconxiantiaoshouji15{width:44rpx;height:44rpx;font-size:80rpx;color:#ADB6BF}.certification .upload-box .add .t1{margin-top:19rpx;font-size:24rpx;color:#8A9299}.certification .upload-box .view{position:relative;width:220rpx;height:220rpx}.certification .upload-box .view .img{width:220rpx;height:220rpx}.certification .upload-box .view .iconiconxiantiaoshouji7{position:absolute;right:-15rpx;top:-12rpx;font-size:30rpx;color:#fff;width:44rpx;height:44rpx;background:#EA1717;border-radius:50%;text-align:center;line-height:44rpx;z-index:99}.certification .upload-box .txt{margin-top:24rpx;font-size:24rpx;color:#8A9299;width:80%}.certification .btn{margin:0 55rpx;height:98rpx;background:#0d84d1 !important;box-shadow:0 6rpx 10rpx 0 rgba(97,160,242,0.3) !important;border-radius:8rpx;font-size:32rpx;color:#FFFFFF !important;text-align:center;line-height:89rpx}.ui_uploader_cell{margin-top:30rpx;background:#fff;width:100%;padding:40rpx;box-sizing:border-box}.ui_uploader_cell:after{clear:both;content:'';display:table}.ui_uploader_item{float:left;position:relative;margin-right:30rpx;margin-bottom:30rpx;width:165rpx;height:165rpx}.ui_uploader{float:left;position:relative;margin-right:25rpx;margin-bottom:25rpx;width:165rpx;height:165rpx;border:2rpx solid #d9d9d9;box-sizing:border-box}.ui_uploader:before{content:" ";position:absolute;width:4rpx;height:79rpx;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);background-color:#d9d9d9}.ui_uploader:after{content:" ";position:absolute;height:4rpx;width:79rpx;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);background-color:#d9d9d9}.ui_uploader_item_icon{position:absolute;right:-20rpx;top:-20rpx;background:#fff;border-radius:50%;width:44rpx;height:44rpx}.ui_uploader_item image{width:100%;height:100%}
\ No newline at end of file
......@@ -478,6 +478,13 @@
"id": -1,
"name": "pages/person/certification/addcertification/index",
"pathName": "pages/person/certification/addcertification/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/certification/certificationmanage/index",
"pathName": "pages/person/certification/certificationmanage/index",
"scene": null
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment