Commit baf36381 by 梁建民

bug

parent bbddab16
...@@ -33,7 +33,6 @@ Page({ ...@@ -33,7 +33,6 @@ Page({
placeholderText: '请输入营业执照上完整的公司名称', placeholderText: '请输入营业执照上完整的公司名称',
tip: "请上传企业营业执照、商用租赁合同、相关证明资料等扫描图片或照片,所提交资料越详尽,审核通过越快(单张图片大小不超过2M)", tip: "请上传企业营业执照、商用租赁合同、相关证明资料等扫描图片或照片,所提交资料越详尽,审核通过越快(单张图片大小不超过2M)",
name: '', name: '',
imgSrc: '',
disabled: false, disabled: false,
loading: false, loading: false,
checked: 2, checked: 2,
...@@ -56,9 +55,10 @@ Page({ ...@@ -56,9 +55,10 @@ Page({
if (res.errcode === 0) { if (res.errcode === 0) {
this.setData({ this.setData({
status: false, uploaderNum: res.data.auth_img.length,
uploaderList: res.data.auth_img,
name: res.data.company_type_val, name: res.data.company_type_val,
imgSrc: res.data.auth_img, auth_img: res.data.auth_img,
checked: res.data.auth_type, checked: res.data.auth_type,
companyTypeText: res.data.company_type_val, companyTypeText: res.data.company_type_val,
placeholderText: res.data.auth_type == 1 ? '请输入姓名或昵称' : '请输入营业执照上完整的公司名称', placeholderText: res.data.auth_type == 1 ? '请输入姓名或昵称' : '请输入营业执照上完整的公司名称',
...@@ -159,29 +159,6 @@ Page({ ...@@ -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) { calcForm: function (val) {
...@@ -200,16 +177,6 @@ Page({ ...@@ -200,16 +177,6 @@ Page({
return false; return false;
} }
if (!company_type) {
wx.showToast({
title: '请选择经营性质',
icon: 'none',
duration: 2000
});
return false;
}
if (this.data.uploaderList.length <= 0) { if (this.data.uploaderList.length <= 0) {
...@@ -230,6 +197,7 @@ Page({ ...@@ -230,6 +197,7 @@ Page({
*/ */
formSubmit: function (e) { formSubmit: function (e) {
if (this.calcForm(e.detail.value)) { if (this.calcForm(e.detail.value)) {
this.setData({ this.setData({
...@@ -345,6 +313,8 @@ Page({ ...@@ -345,6 +313,8 @@ Page({
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
let tempFilePaths = res.tempFilePaths; let tempFilePaths = res.tempFilePaths;
let uploaderList = that.data.uploaderList.concat(tempFilePaths); let uploaderList = that.data.uploaderList.concat(tempFilePaths);
if (uploaderList.length == 6) { if (uploaderList.length == 6) {
that.setData({ that.setData({
showUpload: false showUpload: false
...@@ -365,7 +335,6 @@ Page({ ...@@ -365,7 +335,6 @@ Page({
*多张图片上传 *多张图片上传
*/ */
uploadimg: function (url, data) { uploadimg: function (url, data) {
console.log(data.length)
wx.showLoading({ wx.showLoading({
title: '上传中...', title: '上传中...',
mask: true, mask: true,
...@@ -384,20 +353,27 @@ Page({ ...@@ -384,20 +353,27 @@ Page({
}, },
success: (res) => { success: (res) => {
wx.hideLoading(); wx.hideLoading();
if (this.data.auth_img.length >= 6) {
return false;
}
var data = JSON.parse(res.data); var data = JSON.parse(res.data);
if (data.errcode === 103200) { if (data.errcode === 103200) {
this.data.auth_img.push(data.data[0]); this.data.auth_img.push(data.data[0]);
} }
}, },
fail: (res) => { fail: (res) => {
}, },
complete: () => { complete: () => {
i++; i++;
if (i == data.length) { if (i >= data.length) {
console.log('执行完毕'); console.log('执行完毕');
return false;
} else { } else {
data.i = i; data.i = i;
that.uploadimg(apis.ossupload, data); that.uploadimg(apis.ossupload, data);
......
.certification { .certification {
padding-bottom: 30rpx;
.flex-a { .flex-a {
flex: 1; flex: 1;
} }
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
</view> </view>
</view> </view>
<view class="upload-box column rowCenter verCenter"> <view class="upload-box column rowCenter verCenter">
<block wx:if="{{status}}">
<view class='ui_uploader_cell'> <view class='ui_uploader_cell'>
<!-- 根据已选择的图片临时路径数组展示图片 --> <!-- 根据已选择的图片临时路径数组展示图片 -->
<view class='ui_uploader_item' wx:for="{{uploaderList}}" wx:key="{{index}}"> <view class='ui_uploader_item' wx:for="{{uploaderList}}" wx:key="{{index}}">
...@@ -62,13 +61,6 @@ ...@@ -62,13 +61,6 @@
<!-- 上传按钮+框 --> <!-- 上传按钮+框 -->
<view class='ui_uploader' bindtap='upload' wx:if="{{showUpload}}"></view> <view class='ui_uploader' bindtap='upload' wx:if="{{showUpload}}"></view>
</view> </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>
<text class="txt">{{tip}}</text> <text class="txt">{{tip}}</text>
</view> </view>
<button class="btn" form-type="submit" disabled="{{disabled}}" loading="{{loading}}"> <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%} .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 \ No newline at end of file
...@@ -478,6 +478,13 @@ ...@@ -478,6 +478,13 @@
"id": -1, "id": -1,
"name": "pages/person/certification/addcertification/index", "name": "pages/person/certification/addcertification/index",
"pathName": "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 "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