diff --git a/pages/home/index.vue b/pages/home/index.vue index 1387a5e..a356f66 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -903,8 +903,10 @@ } .btnDiv { - margin: 32rpx 34rpx; - + margin: 32rpx 20rpx; + display: flex; + justify-content: space-between; + flex-wrap: nowrap; .item { display: inline-block; width: 172rpx; diff --git a/pages/withdrawal/addOrEditBankCard.vue b/pages/withdrawal/addOrEditBankCard.vue index 2a446a1..700ed4d 100644 --- a/pages/withdrawal/addOrEditBankCard.vue +++ b/pages/withdrawal/addOrEditBankCard.vue @@ -30,24 +30,17 @@ {{ i18n.IDcard }} - - - + + + + mode="" class="add" v-if="bankInfo.certImg"> + + + @@ -159,6 +152,10 @@ // 新增图片 async afterRead(event) { + uni.showLoading({ + title: this.$t("withdrawal").shang, + mask: true, + }) // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 let lists = [].concat(event.file) console.log(event) @@ -166,8 +163,8 @@ lists.map((item) => { this[`fileList${event.name}`].push({ ...item, - status: 'uploading', - message: '上传中' + // status: 'uploading', + // message: '上传中' }) }) for (let i = 0; i < lists.length; i++) { @@ -195,11 +192,13 @@ api.uploadImg({ img: res }).then(res => { + uni.hideLoading() this.bankInfo.certImg=res }) }) }) .catch(error => { + uni.hideLoading() console.error(error) }) @@ -242,61 +241,8 @@ }) }, - // 上传图片 - uploadImg() { - uni.chooseImage({ - success: async (chooseImageRes) => { - console.log(111) - // chooseImageRes: '上传的图片列表', 小程序只支持一次一次选择一个 - const tempFiles = chooseImageRes.tempFiles; - const tempFilePaths = tempFiles[0].path; - const FilePaths = tempFiles[0]; - let resSize = tempFiles[0].size; - console.log(tempFiles) - console.log(FilePaths) - let base = await this.getBase64(FilePaths) - - console.log(base) - base = base.replace('data:image/png;base64,', '') - console.log(base) - // if (resSize > 10485760) { - // uni.showToast({ - // title: "上传图片大小不能超过10MB", - // icon: 'error' - // }); - // return - // } - - uni.showLoading({ - title: '正在上传图片', - mask: true - }) - api.uploadImg({ - img: base - }).then(res => { - this.imgJson.push(res) - }) - - }, - fail: (res) => { - uni.hideLoading() - } - }); - - - }, - //放大浏览图片 - previewImg(currentIndex) { - let urls = [] - if (this.imgJson != '') { - urls.push(this.imgJson.url) - } - uni.previewImage({ - current: currentIndex, //传的值可以是索引,也可以是图片连接 - urls, //需要显示的全部图片链接 - }) - }, - + + // 获取银行卡信息 getBank() { @@ -339,47 +285,21 @@