| | |
| | | <span>{{ '真实姓名:' }}</span> |
| | | </div> |
| | | <div class="rights"> |
| | | <input type="text" v-model="form.name" /> |
| | | <input v-if="showBtn" type="text" v-model="form.name" /> |
| | | |
| | | <input v-if="!showBtn" type="text" v-model="form.name" readonly /> |
| | | </div> |
| | | </div> |
| | | <div class="bank_name"> |
| | |
| | | <span>{{ '身份证号:' }}</span> |
| | | </div> |
| | | <div class="rights"> |
| | | <input type="text" v-model="form.idCard" /> |
| | | <input v-if="showBtn" type="text" v-model="form.idCard" /> |
| | | <input v-if="!showBtn" type="text" v-model="form.idCard" readonly /> |
| | | </div> |
| | | </div> |
| | | <div class="uploads"> |
| | | <div class="lefts"> |
| | | <el-upload |
| | | :with-credentials="true" |
| | | class="avatar-uploader" |
| | | :action="admin+'/user/upload.do'" |
| | | list-type="picture-card" |
| | | name="upload_file" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess" |
| | | :on-error="handleError" |
| | | :before-upload="beforeAvatarUpload" |
| | | :disabled="!showBtn" |
| | | > |
| | | <el-upload :with-credentials="true" class="avatar-uploader" :action="admin + '/user/upload.do'" |
| | | list-type="picture-card" name="upload_file" :show-file-list="false" :on-success="handleAvatarSuccess" |
| | | :on-error="handleError" :before-upload="beforeAvatarUpload" :disabled="!showBtn"> |
| | | <img v-if="form.img1key" :src="form.img1key" class="id-img avatar" /> |
| | | <i v-else class="iconfont icon-zhaopian"></i> |
| | | <span v-if="!form.img1key && !imgStatus" class="btn-title">身份证正面</span> |
| | |
| | | </el-upload> |
| | | </div> |
| | | <div class="rights"> |
| | | <el-upload |
| | | :with-credentials="true" |
| | | class="avatar-uploader" |
| | | :action="admin+'/user/upload.do'" |
| | | list-type="picture-card" |
| | | name="upload_file" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess2" |
| | | :on-error="handleError2" |
| | | :before-upload="beforeAvatarUpload2" |
| | | :disabled="!showBtn" |
| | | > |
| | | <el-upload :with-credentials="true" class="avatar-uploader" :action="admin + '/user/upload.do'" |
| | | list-type="picture-card" name="upload_file" :show-file-list="false" :on-success="handleAvatarSuccess2" |
| | | :on-error="handleError2" :before-upload="beforeAvatarUpload2" :disabled="!showBtn"> |
| | | <img v-if="form.img2key" :src="form.img2key" class="id-img avatar" /> |
| | | <i v-else class="iconfont icon-zhaopian"></i> |
| | | <span v-if="!form.img2key && !imgStatus2" class="btn-title">身份证背面</span> |
| | |
| | | <span>{{ '认证失败,请重新认证' }}</span> |
| | | </div> |
| | | <div class="bft"> |
| | | <span>失败原因:{{this.$store.state.userInfo.authMsg}}</span> |
| | | <span>失败原因:{{ this.$store.state.userInfo.authMsg }}</span> |
| | | </div> |
| | | </div> |
| | | </van-notify> |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getUserInfo(); |
| | | if ( |
| | | this.$store.state.userInfo.isActive === 1 || |
| | | this.$store.state.userInfo.isActive === 2 |
| | | ) { |
| | | this.form.idCard = this.$store.state.userInfo.idCard; |
| | | this.form.name = this.$store.state.userInfo.realName; |
| | | this.form.img1key = this.$store.state.userInfo.img1Key; |
| | | this.form.img2key = this.$store.state.userInfo.img2Key; |
| | | // this.form.img3key = this.$store.state.userInfo.img3Key |
| | | this.showBtn = false; |
| | | } |
| | | this.$store.state.userInfo.isActive === 1 || |
| | | this.$store.state.userInfo.isActive === 2 |
| | | ) { |
| | | this.form.idCard = this.$store.state.userInfo.idCard; |
| | | this.form.name = this.$store.state.userInfo.realName; |
| | | this.form.img1key = this.$store.state.userInfo.img1Key; |
| | | this.form.img2key = this.$store.state.userInfo.img2Key; |
| | | // this.form.img3key = this.$store.state.userInfo.img3Key |
| | | this.showBtn = false; |
| | | } |
| | | }, |
| | | |
| | | beforeDestroy() { |
| | | if (this.$state.theme == "red") { |
| | | document.body.classList.remove("red-bg"); |
| | |
| | | return false; |
| | | } else { |
| | | this.form.img2key = URL.createObjectURL(file); |
| | | compress(file, function(val) {}); |
| | | compress(file, function (val) { }); |
| | | } |
| | | }, |
| | | handleError2() { |
| | |
| | | handleAvatarSuccess3(res, file) { |
| | | this.form.img3key = res.data.url; // URL.createObjectURL(file.raw); |
| | | }, |
| | | beforeAvatarUpload3(file) {}, |
| | | async getUserInfo() { |
| | | // 获取用户信息 |
| | | let data = await api.getUserInfo(); |
| | | if (data.status === 0) { |
| | | // 判断是否登录 |
| | | this.$store.commit('dialogVisible', false); |
| | | this.$store.state.userInfo = data.data; |
| | | this.userInfo = data.data; |
| | | if ( |
| | | this.$store.state.userInfo.isActive === 1 || |
| | | this.$store.state.userInfo.isActive === 2 |
| | | ) { |
| | | this.form.idCard = this.$store.state.userInfo.idCard; |
| | | this.form.name = this.$store.state.userInfo.realName; |
| | | this.form.img1key = this.$store.state.userInfo.img1Key; |
| | | this.form.img2key = this.$store.state.userInfo.img2Key; |
| | | // this.form.img3key = this.$store.state.userInfo.img3Key |
| | | this.showBtn = false; |
| | | } |
| | | } else { |
| | | //this.$store.commit('dialogVisible',true); |
| | | //跳转到login |
| | | this.$router.push({ path: "/login" }); |
| | | } |
| | | }, |
| | | beforeAvatarUpload3(file) { }, |
| | | // 上传 |
| | | handleFile: function(e) { |
| | | handleFile: function (e) { |
| | | // var that = this |
| | | let $target = e.target || e.srcElement; |
| | | let file = $target.files[0]; |
| | |
| | | height: 100%; |
| | | background: #fff; |
| | | position: relative; |
| | | |
| | | .content { |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 0 0.6rem; |
| | | |
| | | .top_back { |
| | | width: 100%; |
| | | height: 2rem; |
| | | > div { |
| | | |
| | | >div { |
| | | width: 10%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | img { |
| | | width: 0.6rem; |
| | | height: 0.6rem; |
| | | } |
| | | } |
| | | |
| | | .titles { |
| | | width: 100%; |
| | | height: 1.5rem; |
| | | font-size: 0.641rem; |
| | | margin-top: 1rem; |
| | | |
| | | span { |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bank_name { |
| | | width: 100%; |
| | | height: 1.5rem; |
| | |
| | | background: rgb(247, 247, 247); |
| | | border-radius: 0.2rem; |
| | | margin-top: 0.3rem; |
| | | |
| | | .lefts { |
| | | width: 25%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 0.3846rem; |
| | | |
| | | span { |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | |
| | | .rights { |
| | | width: 75%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bank_name.bind { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | background: #2d6ae9; |
| | | font-size: 0.4103rem; |
| | | color: #fff; |
| | | |
| | | span { |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | |
| | | .uploads { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 0.3rem; |
| | | > div { |
| | | |
| | | >div { |
| | | width: 48%; |
| | | background: rgb(247, 247, 247); |
| | | } |
| | | } |
| | | |
| | | /deep/ .el-upload--picture-card { |
| | | background: none; |
| | | width: 100%; |
| | | height: 1.6rem; |
| | | line-height: 1.6rem; |
| | | } |
| | | |
| | | /deep/ .el-upload__input { |
| | | display: none; |
| | | } |
| | | |
| | | .pass { |
| | | width: 70%; |
| | | height: 4rem; |
| | | height: auto; |
| | | position: absolute; |
| | | top: 3.5rem; |
| | | top: 1.72rem; |
| | | right: .2rem; |
| | | opacity: 0.2; |
| | | |
| | | .top_t { |
| | | width: 100%; |
| | | height: 20%; |
| | | height: auto; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | font-size: 3.2821rem; |
| | | color: #99b8f5; |
| | | align-items: flex-end; |
| | | } |
| | | |
| | | .ise_pass { |
| | | font-size: 2.2rem; |
| | | } |