From 00b028cd95350e93c64befe30e53b265a4642b9c Mon Sep 17 00:00:00 2001 From: liaoxinyu Date: Fri, 11 Apr 2025 16:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A0=E8=BD=BD=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/member.js | 2 +- element/index.js | 4 +- pages/auth/certification.vue | 110 +++++++++++++++++++++++++++++++++-- pages/base/mine.vue | 1 + 4 files changed, 110 insertions(+), 7 deletions(-) diff --git a/api/member.js b/api/member.js index 400aba0..f2ccebc 100644 --- a/api/member.js +++ b/api/member.js @@ -86,7 +86,7 @@ class Member { */ static uploadImage(data) { - return server.uploadFile(`/uploadImage`,data); + return server.uploadFile(`/uploadImage`,data,{loading:false}); } // 页面底部信息 diff --git a/element/index.js b/element/index.js index 95bac85..0a11747 100644 --- a/element/index.js +++ b/element/index.js @@ -1,6 +1,6 @@ // 导入自己需要的组件 -import { Slider,Steps,Step,Select,Option } from 'element-ui' -const components = [Slider,Steps,Step,Select,Option] +import { Slider,Progress,Steps,Step,Select,Option } from 'element-ui' +const components = [Slider,Progress,Steps,Step,Select,Option] const element = { install: function (Vue) { // Vue.use(Slider) diff --git a/pages/auth/certification.vue b/pages/auth/certification.vue index 9d6fbcb..1a29ccf 100644 --- a/pages/auth/certification.vue +++ b/pages/auth/certification.vue @@ -76,7 +76,7 @@ -
+
1、{{$t('auth.b5')}}
@@ -88,8 +88,15 @@
+
-
+
2、{{$t('auth.b6')}}
@@ -101,6 +108,13 @@
+
{ + if (this.uploadProgress < 100&&name=='front_img'&&this.continueUploading) { + this.uploadProgress += Math.floor(Math.random() * 3) + 1; + setTimeout(() => { + this.continueUploading = false; + // 暂停3秒后继续累加 + setTimeout(() => { + this.continueUploading = true; + }, 1000); // 这里的3000毫秒表示暂停3秒后继续 + }, 1000); + }else if(this.uploadProgress1 < 100&&name=='back_img'&&this.continueUploading1){ + this.uploadProgress1 += Math.floor(Math.random() * 4) + 1; + setTimeout(() => { + this.continueUploading1 = false; + // 暂停3秒后继续累加 + setTimeout(() => { + this.continueUploading1 = true; + }, 1600); // 这里的3000毫秒表示暂停3秒后继续 + }, 1000); + } + }, 50); + Member.uploadImage(chooseImageRes).then((res) => { this.form[name] = res.data.url; - this.$toast.success(this.$t('auth.c1')); - }); + if(res.data.url){ + if(name=='front_img'){ + setTimeout(() => { + this.uploadStatus = 'success' + this.uploadProgress = 100 + clearInterval(this.progressInterval); // 清除之前的定时器 + setTimeout(() => { + this.boll = false + },3000) + }, 2000) + }else{ + setTimeout(() => { + this.uploadStatus1 = 'success' + this.uploadProgress1 = 100 + clearInterval(this.progressInterval); // 清除之前的定时器 + setTimeout(() => { + this.boll1 = false + },3000) + }, 2000) + } + } + // this.$toast.success(this.$t('auth.c1')); + }).catch(() => { + if(name=='front_img'){ + this.uploadStatus = 'exception' + this.uploadProgress = 100 + }else{ + this.uploadStatus1 = 'exception' + this.uploadProgress1 = 100 + } + }); }, getAuthInfo() { Profile.getAuthInfo().then((res) => { @@ -379,4 +465,20 @@ // object-fit: cover; } } + + .el-progress { + position: absolute; + bottom: 8px; + right:-15px; + width: 300rpx; + // margin-top: 10px; + + &-bar { + padding-right: 45px; + } + + &__text { + font-size: 12px!important; + } + } \ No newline at end of file diff --git a/pages/base/mine.vue b/pages/base/mine.vue index 216ce17..b080195 100644 --- a/pages/base/mine.vue +++ b/pages/base/mine.vue @@ -429,6 +429,7 @@ export default { }, methods: { price1(item,index){ + if (this.hideMoney) return "******"; if (item) { let price = item.toFixed(index).toString(); let parts = price.split(".");