Commit 1b44ac51f95f8c2d1503eb591397155d5bc5f6f7
1 parent
7f3bad7f
add 信用等级 实名认证form表单
Showing
4 changed files
with
193 additions
and
4 deletions
pages.json
| ... | ... | @@ -208,7 +208,7 @@ |
| 208 | 208 | "path" : "pages/addTitle/addTitle", |
| 209 | 209 | "style" : |
| 210 | 210 | { |
| 211 | - "navigationBarTitleText": "", | |
| 211 | + "navigationBarTitleText": "添加抬头", | |
| 212 | 212 | "enablePullDownRefresh": false |
| 213 | 213 | } |
| 214 | 214 | |
| ... | ... | @@ -222,6 +222,24 @@ |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | } |
| 225 | + ,{ | |
| 226 | + "path" : "pages/creditRating/creditRating", | |
| 227 | + "style" : | |
| 228 | + { | |
| 229 | + "navigationBarTitleText": "信用等级", | |
| 230 | + "enablePullDownRefresh": false | |
| 231 | + } | |
| 232 | + | |
| 233 | + } | |
| 234 | + ,{ | |
| 235 | + "path" : "pages/nameAuthentication/nameAuthentication", | |
| 236 | + "style" : | |
| 237 | + { | |
| 238 | + "navigationBarTitleText": "实名认证", | |
| 239 | + "enablePullDownRefresh": false | |
| 240 | + } | |
| 241 | + | |
| 242 | + } | |
| 225 | 243 | ], |
| 226 | 244 | "globalStyle": { |
| 227 | 245 | "navigationBarTextStyle": "black", | ... | ... |
pages/creditRating/creditRating.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view> | |
| 3 | + <uni-section title="实名认证" type="line"> | |
| 4 | + <uni-list> | |
| 5 | + <uni-list-item title="信用等级" :rightText="ratingText" clickable showArrow @click="ratingCell()" /> | |
| 6 | + </uni-list> | |
| 7 | + </uni-section> | |
| 8 | + </view> | |
| 9 | +</template> | |
| 10 | + | |
| 11 | +<script> | |
| 12 | + export default { | |
| 13 | + data() { | |
| 14 | + return { | |
| 15 | + ratingText:"未认证" | |
| 16 | + }; | |
| 17 | + }, | |
| 18 | + methods:{ | |
| 19 | + ratingCell(){ | |
| 20 | + uni.navigateTo({ | |
| 21 | + url: '../nameAuthentication/nameAuthentication' | |
| 22 | + }); | |
| 23 | + } | |
| 24 | + } | |
| 25 | + } | |
| 26 | +</script> | |
| 27 | + | |
| 28 | +<style lang="scss"> | |
| 29 | + | |
| 30 | +</style> | ... | ... |
pages/index/index.vue
| ... | ... | @@ -50,7 +50,12 @@ |
| 50 | 50 | </view> |
| 51 | 51 | <view class="index-title">发票申领</view> |
| 52 | 52 | </view> |
| 53 | - | |
| 53 | + <view class="flex-item" @click="toRatingPage"> | |
| 54 | + <view class=""> | |
| 55 | + <image src="../../static/me/me-aboutus.png" class="index-icon"></image> | |
| 56 | + </view> | |
| 57 | + <view class="index-title">信用等级</view> | |
| 58 | + </view> | |
| 54 | 59 | </view> |
| 55 | 60 | </view> |
| 56 | 61 | </view> |
| ... | ... | @@ -81,9 +86,15 @@ |
| 81 | 86 | toInvoicePage() { |
| 82 | 87 | uni.navigateTo({ |
| 83 | 88 | url: '../invoiceClaim/invoiceClaim' |
| 84 | - | |
| 89 | + | |
| 85 | 90 | }); |
| 86 | - } | |
| 91 | + }, | |
| 92 | + toRatingPage() { | |
| 93 | + uni.navigateTo({ | |
| 94 | + url: '../creditRating/creditRating' | |
| 95 | + | |
| 96 | + }); | |
| 97 | + }, | |
| 87 | 98 | } |
| 88 | 99 | } |
| 89 | 100 | </script> | ... | ... |
pages/nameAuthentication/nameAuthentication.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view> | |
| 3 | + <uni-section title="实名认证" type="line"> | |
| 4 | + <view class="paddinglr30"> | |
| 5 | + <!-- 基础用法,不包含校验规则 --> | |
| 6 | + <uni-forms ref="baseForm" :rules="rules" :modelValue="baseFormData"> | |
| 7 | + <uni-forms-item label="姓名" name="username" required> | |
| 8 | + <uni-easyinput v-model="baseFormData.username" placeholder="请输入姓名" /> | |
| 9 | + </uni-forms-item> | |
| 10 | + <uni-forms-item label="身份证号" name="userId" required> | |
| 11 | + <uni-easyinput v-model="baseFormData.userId" placeholder="请输入身份证号" /> | |
| 12 | + </uni-forms-item> | |
| 13 | + <uni-file-picker | |
| 14 | + v-model="baseFormData.fontimageValue" | |
| 15 | + fileMediatype="image" | |
| 16 | + | |
| 17 | + :image-styles="imageStyles" | |
| 18 | + return-type="array" | |
| 19 | + file-extname="png,jpg" | |
| 20 | + :limit="1" | |
| 21 | + @select="select" | |
| 22 | + @progress="progress" | |
| 23 | + @success="success" | |
| 24 | + @fail="fail" | |
| 25 | + title="身份证正面" /> | |
| 26 | + | |
| 27 | + <uni-file-picker | |
| 28 | + v-model="baseFormData.sideimageValue" | |
| 29 | + fileMediatype="image" | |
| 30 | + | |
| 31 | + :image-styles="imageStyles" | |
| 32 | + return-type="array" | |
| 33 | + file-extname="png,jpg" | |
| 34 | + :limit="1" | |
| 35 | + @select="select" | |
| 36 | + @progress="progress" | |
| 37 | + @success="success" | |
| 38 | + @fail="fail" | |
| 39 | + title="身份证反面" /> | |
| 40 | + | |
| 41 | + </uni-forms> | |
| 42 | + </view> | |
| 43 | + </uni-section> | |
| 44 | + <view class="paddinglr30 margin-top-30 uni-common-mb"> | |
| 45 | + <button type="primary" @click="submit('baseForm')">确认</button> | |
| 46 | + </view> | |
| 47 | + </view> | |
| 48 | +</template> | |
| 49 | + | |
| 50 | +<script> | |
| 51 | + export default { | |
| 52 | + data() { | |
| 53 | + return { | |
| 54 | + baseFormData: { | |
| 55 | + invoicetitle: '', | |
| 56 | + userId: '', | |
| 57 | + fontimageValue:[], | |
| 58 | + sideimageValue:[], | |
| 59 | + }, | |
| 60 | + // 校验规则 | |
| 61 | + rules: { | |
| 62 | + username: { | |
| 63 | + rules: [{ | |
| 64 | + required: true, | |
| 65 | + errorMessage: '姓名不能为空' | |
| 66 | + }] | |
| 67 | + }, | |
| 68 | + userId: { | |
| 69 | + rules: [{ | |
| 70 | + required: true, | |
| 71 | + errorMessage: '身份证号不能为空' | |
| 72 | + }, { | |
| 73 | + format: 'number', | |
| 74 | + errorMessage: '身份证号只能输入数字' | |
| 75 | + }] | |
| 76 | + }, | |
| 77 | + }, | |
| 78 | + imageStyles: { | |
| 79 | + width: 300, | |
| 80 | + height: 200, | |
| 81 | + // 线条样式 | |
| 82 | + borderStyle: { | |
| 83 | + width: 1, | |
| 84 | + color: 'blue', | |
| 85 | + style: 'dashed', | |
| 86 | + radius: 2 | |
| 87 | + } | |
| 88 | + }, | |
| 89 | + | |
| 90 | + } | |
| 91 | + | |
| 92 | + }, | |
| 93 | + methods: { | |
| 94 | + // 获取上传状态 | |
| 95 | + select(e) { | |
| 96 | + console.log('选择文件:', e) | |
| 97 | + }, | |
| 98 | + // 获取上传进度 | |
| 99 | + progress(e) { | |
| 100 | + console.log('上传进度:', e) | |
| 101 | + }, | |
| 102 | + | |
| 103 | + // 上传成功 | |
| 104 | + success(e) { | |
| 105 | + console.log('上传成功') | |
| 106 | + }, | |
| 107 | + | |
| 108 | + // 上传失败 | |
| 109 | + fail(e) { | |
| 110 | + console.log('上传失败:', e) | |
| 111 | + }, | |
| 112 | + | |
| 113 | + // 提交 | |
| 114 | + submit(ref) { | |
| 115 | + this.$refs[ref].validate().then(res => { | |
| 116 | + console.log('success', res); | |
| 117 | + uni.showToast({ | |
| 118 | + title: `校验通过` | |
| 119 | + }) | |
| 120 | + }).catch(err => { | |
| 121 | + console.log('err', err); | |
| 122 | + }) | |
| 123 | + } | |
| 124 | + } | |
| 125 | + } | |
| 126 | +</script> | |
| 127 | + | |
| 128 | +<style lang="scss"> | |
| 129 | + | |
| 130 | +</style> | ... | ... |