Browse Source

合并

master
j1ack 3 years ago
parent
commit
f0e8629aea
  1. 6
      pages/home/index.vue
  2. 130
      pages/withdrawal/addOrEditBankCard.vue
  3. BIN
      static/home/id.png
  4. 2
      utils/language/en_US.js
  5. 2
      utils/language/vi_VN.js
  6. 4
      utils/language/zh_TW.js

6
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;

130
pages/withdrawal/addOrEditBankCard.vue

@ -30,24 +30,17 @@
<view class="title">{{ i18n.IDcard }}</view>
<!-- <u-form-item :border-bottom="false">
<view class="imageList">
<view class="upload" @click="uploadImg" :key="index">
<image class="add" src="/static/home/icon-ADD-18.png" mode=""></image>
</view>
<view class="" v-for="item,index in imgJson">
<image class="add" :src="baseURL+item" mode="" ></image>
</view>
</view>
</u-form-item> -->
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1">
<image class="add" src="/static/home/id.png" mode="aspectFit" v-if="!bankInfo.certImg"></image>
<image :src="baseURL+bankInfo.certImg"
mode="" style="width: 160rpx;height: 160rpx;" v-if="bankInfo.certImg"></image>
mode="" class="add" v-if="bankInfo.certImg"></image>
</u-upload>
<view class="">
</view>
</view>
<view class="inputBody">
@ -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,60 +241,7 @@
})
},
//
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, //
})
},
//
@ -339,47 +285,21 @@
</script>
<style lang="scss" scoped>
.imageList {
margin-top: 30rpx;
display: flex;
.image-item {
position: relative;
margin-right: 26rpx;
image {
width: 100rpx;
height: 100rpx;
border-radius: 8rpx;
}
.del {
position: absolute;
right: -10rpx;
top: -10rpx;
width: 36rpx;
height: 36rpx;
}
/deep/ .uicon-camera-fill{
display:none !important;
}
.upload {
background-color: #323045;
border-radius: 8rpx;
width: 100rpx;
height: 100rpx;
text-align: center;
line-height: 110rpx;
/deep/ .u-upload{
position:relative;
.add{
width: 36rpx;
height: 36rpx;
}
width: 620rpx !important;
height: 360rpx !important;
}
}
/deep/ .u-upload__wrap__preview__image {
width: 160rpx !important;
height: 160rpx !important;
width: 620rpx !important;
height: 360rpx !important;
}
/deep/ .u-icon__icon {
@ -387,8 +307,8 @@
}
/deep/ .u-upload__button {
width: 160rpx !important;
height: 160rpx !important;
width: 620rpx !important;
height: 360rpx !important;
background-color: #323045 !important;
}

BIN
static/home/id.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

2
utils/language/en_US.js

@ -254,7 +254,7 @@ export default {
// withdrawal
withdrawal: {
IDcard:'ID card',
IDcard:'Upload photo ID front',
shang:'Uploading',
// 漏掉的国际化
Underreview:'Underreview',

2
utils/language/vi_VN.js

@ -251,7 +251,7 @@ export default {
// withdrawal
withdrawal: {
IDcard:'Th nhận diện',
IDcard:'Tải ảnh nhận diện',
shang:'Gửi',
// 漏掉的国际化
Underreview: 'Đang xem xét',

4
utils/language/zh_TW.js

@ -157,7 +157,7 @@ export default {
ExpectLoss: '預計虧損 ',
Highest:'24H 最高價',
Lowest:'24H 最低價',
Amount:'24H 最低價',
Amount:'24H 成交量',
MarketTrades:'市場交易',
Quantity:'數量',
BuyingPrice:'買價',
@ -257,7 +257,7 @@ export default {
// withdrawal
withdrawal: {
IDcard:'身份證',
IDcard:'上傳證件照正面',
shang:'上傳中',
// 漏掉的国际化
Underreview:'審核中',

Loading…
Cancel
Save