Authored by yyq

bind style

@@ -29,7 +29,7 @@ export default { @@ -29,7 +29,7 @@ export default {
29 29
30 // queryString中携带bind_code,则弹出绑定弹框 30 // queryString中携带bind_code,则弹出绑定弹框
31 if (this.$route.query.bind_code) { 31 if (this.$route.query.bind_code) {
32 - this.$createThirdBind().show(); 32 + this.$root.$createThirdBind().open();
33 } 33 }
34 }, 34 },
35 watch: { 35 watch: {
@@ -47,7 +47,7 @@ export default { @@ -47,7 +47,7 @@ export default {
47 .route-view-forword-leave-active, 47 .route-view-forword-leave-active,
48 .route-view-back-enter-active, 48 .route-view-back-enter-active,
49 .route-view-back-leave-active { 49 .route-view-back-leave-active {
50 - will-change: true; 50 + will-change: transform;
51 width: 100%; 51 width: 100%;
52 height: 100%; 52 height: 100%;
53 position: absolute; 53 position: absolute;
@@ -57,12 +57,12 @@ export default { @@ -57,12 +57,12 @@ export default {
57 57
58 .route-view-forword-leave-active, 58 .route-view-forword-leave-active,
59 .route-view-back-leave-active { 59 .route-view-back-leave-active {
60 - transition: all 200ms; 60 + transition: all 300ms ease;
61 } 61 }
62 62
63 .route-view-forword-enter-active, 63 .route-view-forword-enter-active,
64 .route-view-back-enter-active { 64 .route-view-back-enter-active {
65 - transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1); 65 + transition: all 300ms cubic-bezier(0.165, 0.84, 0.44, 1);
66 } 66 }
67 67
68 .route-view-forword-enter { 68 .route-view-forword-enter {
@@ -79,12 +79,16 @@ export default { @@ -79,12 +79,16 @@ export default {
79 } 79 }
80 80
81 .route-view-back-enter { 81 .route-view-back-enter {
82 - z-index: -1;  
83 transform: translate3d(-30%, 0, 0); 82 transform: translate3d(-30%, 0, 0);
84 } 83 }
85 84
  85 +.route-view-back-enter-active {
  86 + z-index: -1;
  87 +}
  88 +
86 .route-view-back-leave-active { 89 .route-view-back-leave-active {
87 transform: translate3d(100%, 0, 0); 90 transform: translate3d(100%, 0, 0);
88 z-index: 2; 91 z-index: 2;
89 } 92 }
  93 +
90 </style> 94 </style>
1 <template> 1 <template>
2 - <div v-if="showBind" class="third-bind-wrapper"> 2 + <div v-if="dialogEnable" class="third-bind-wrapper">
3 <div class="bind-dialog"> 3 <div class="bind-dialog">
4 <p class="bind-title">关联有货UFO账户</p> 4 <p class="bind-title">关联有货UFO账户</p>
5 <div class="under-row"> 5 <div class="under-row">
6 <div class="left-row-title"> 6 <div class="left-row-title">
7 - <CubeSelect class="area-code-select" v-model="code" :options="options" :title="selectTitle"></CubeSelect> 7 + <span @click="chooseArea">{{code}}</span>
  8 + <span class="iconfont icondownn"></span>
8 </div> 9 </div>
9 <CubeInput class="bind-input" :class="phone ? '' : 'bind-input-phone'" v-model="phone"></CubeInput> 10 <CubeInput class="bind-input" :class="phone ? '' : 'bind-input-phone'" v-model="phone"></CubeInput>
10 </div> 11 </div>
@@ -24,74 +25,44 @@ @@ -24,74 +25,44 @@
24 25
25 <script> 26 <script>
26 27
27 -import { Button, Input, Select } from 'cube-ui'; 28 +import { Button, Input } from 'cube-ui';
28 import { mapActions, mapState } from 'vuex'; 29 import { mapActions, mapState } from 'vuex';
29 30
30 -const areaList = [{  
31 - value: '+61',  
32 - name: '澳大利亚'  
33 - }, {  
34 - value: '+82',  
35 - text: '韩国'  
36 - }, {  
37 - value: '+1',  
38 - text: '加拿大'  
39 - }, {  
40 - value: '+60',  
41 - text: '马来西亚'  
42 - }, {  
43 - value: '+1',  
44 - text: '美国'  
45 - }, {  
46 - value: '+81',  
47 - text: '日本'  
48 - }, {  
49 - value: '+65',  
50 - text: '新加坡'  
51 - }, {  
52 - value: '+44',  
53 - text: '英国'  
54 - }, {  
55 - value: '+86',  
56 - text: '中国'  
57 - }, {  
58 - value: '+853',  
59 - text: '中国澳门'  
60 - }, {  
61 - value: '+886',  
62 - text: '中国台湾'  
63 - }, {  
64 - value: '+852',  
65 - text: '中国香港'  
66 - }];  
67 -  
68 export default { 31 export default {
69 name: 'ThirdBind', 32 name: 'ThirdBind',
70 data() { 33 data() {
71 return { 34 return {
72 showBind: false, 35 showBind: false,
73 code: '+86', 36 code: '+86',
74 - options: areaList,  
75 - selectTitle: '选择国家和地区',  
76 phone: '', 37 phone: '',
77 smsCode: '', 38 smsCode: '',
78 - sendBtnText: '' 39 + sendBtnText: '',
  40 + binded: false
79 } 41 }
80 }, 42 },
81 computed: { 43 computed: {
  44 + dialogEnable() {
  45 + return this.showBind && !this.binded;
  46 + },
82 submitDisable() { 47 submitDisable() {
83 return !(this.phone && this.smsCode); 48 return !(this.phone && this.smsCode);
84 } 49 }
85 }, 50 },
86 methods: { 51 methods: {
87 ...mapActions(['sendBindSms', 'submitThirdBind']), 52 ...mapActions(['sendBindSms', 'submitThirdBind']),
88 - show() { 53 + open() {
89 this.bindCode = this.$route.query.bind_code; 54 this.bindCode = this.$route.query.bind_code;
90 - this.showBind = true; 55 + this.phone = '';
  56 + this.smsCode = '';
  57 + this.clearSendTimer();
  58 + this.show();
91 }, 59 },
92 close() { 60 close() {
93 this.showBind = false; 61 this.showBind = false;
94 }, 62 },
  63 + show() {
  64 + this.showBind = true;
  65 + },
95 toast(msg, time = 2000) { 66 toast(msg, time = 2000) {
96 this.$createToast && this.$createToast({ 67 this.$createToast && this.$createToast({
97 txt: msg, 68 txt: msg,
@@ -99,14 +70,22 @@ export default { @@ -99,14 +70,22 @@ export default {
99 time 70 time
100 }).show(); 71 }).show();
101 }, 72 },
  73 + chooseArea() {
  74 + this.$router.push({
  75 + name: 'passport.area'
  76 + });
  77 + },
  78 + changeArea(code) {
  79 + code && (this.code = code);
  80 + },
102 sendSMS() { 81 sendSMS() {
103 let total = 60; 82 let total = 60;
104 - let timer = setInterval(() => { 83 +
  84 + this.timer = setInterval(() => {
105 if (--total) { 85 if (--total) {
106 this.sendBtnText = '重发' + total; 86 this.sendBtnText = '重发' + total;
107 } else { 87 } else {
108 - this.sendBtnText = '';  
109 - clearInterval(timer); 88 + this.clearSendTimer();
110 } 89 }
111 }, 1000); 90 }, 1000);
112 this.sendBtnText = '重发' + total; 91 this.sendBtnText = '重发' + total;
@@ -116,6 +95,10 @@ export default { @@ -116,6 +95,10 @@ export default {
116 bindCode: this.bindCode 95 bindCode: this.bindCode
117 }); 96 });
118 }, 97 },
  98 + clearSendTimer() {
  99 + this.sendBtnText = '';
  100 + clearInterval(this.timer);
  101 + },
119 bindSubmit() { 102 bindSubmit() {
120 if (this.phone && this.smsCode) { 103 if (this.phone && this.smsCode) {
121 this.submitThirdBind({ 104 this.submitThirdBind({
@@ -124,6 +107,7 @@ export default { @@ -124,6 +107,7 @@ export default {
124 bindCode: this.bindCode 107 bindCode: this.bindCode
125 }).then(res => { 108 }).then(res => {
126 if (res.code === 200) { 109 if (res.code === 200) {
  110 + this.binded = true;
127 this.close(); 111 this.close();
128 } else { 112 } else {
129 this.toast(res.message); 113 this.toast(res.message);
@@ -136,7 +120,6 @@ export default { @@ -136,7 +120,6 @@ export default {
136 }, 120 },
137 components: { 121 components: {
138 CubeInput: Input, 122 CubeInput: Input,
139 - CubeSelect: Select,  
140 CubeButton: Button 123 CubeButton: Button
141 } 124 }
142 }; 125 };
@@ -183,17 +166,9 @@ export default { @@ -183,17 +166,9 @@ export default {
183 flex-shrink: 0; 166 flex-shrink: 0;
184 color: #999; 167 color: #999;
185 } 168 }
186 -}  
187 -  
188 -.area-code-select {  
189 - display: inline-block;  
190 -  
191 - &:after {  
192 - border: 0;  
193 - }  
194 169
195 - /deep/ .cube-select-text {  
196 - font-size: 14px; 170 + .iconfont {
  171 + font-size: 28px;
197 } 172 }
198 } 173 }
199 174
@@ -47,6 +47,7 @@ export default { @@ -47,6 +47,7 @@ export default {
47 font-size: 24px; 47 font-size: 24px;
48 display: flex; 48 display: flex;
49 flex-direction: column; 49 flex-direction: column;
  50 + background-color: #fff;
50 51
51 .layout-context { 52 .layout-context {
52 flex: 1; 53 flex: 1;
@@ -121,6 +121,13 @@ router.onReady(() => { @@ -121,6 +121,13 @@ router.onReady(() => {
121 } 121 }
122 122
123 router.beforeResolve((to, from, next) => { 123 router.beforeResolve((to, from, next) => {
  124 +
  125 + if (from.query.bind_code) {
  126 + app.$createThirdBind().close();
  127 + } else if (to.query.bind_code) {
  128 + app.$createThirdBind().show();
  129 + }
  130 +
124 try { 131 try {
125 trackPage(to.fullPath); 132 trackPage(to.fullPath);
126 const matched = router.getMatchedComponents(to); 133 const matched = router.getMatchedComponents(to);
  1 +<template>
  2 + <LayoutApp class="yohoufo-area-choose-page" title="选择国家或地区">
  3 + <div class="area-list">
  4 + <div class="area-item" v-for="(item, index) in list" :key="index" @click="chooseArea(item.value)">
  5 + <span class="code">{{item.value}}</span>
  6 + {{item.name}}
  7 + </div>
  8 + </div>
  9 + </LayoutApp>
  10 +</template>
  11 +
  12 +<script>
  13 +const areaList = [{
  14 + value: '+61',
  15 + name: '澳大利亚'
  16 +}, {
  17 + value: '+82',
  18 + name: '韩国'
  19 +}, {
  20 + value: '+1',
  21 + name: '加拿大'
  22 +}, {
  23 + value: '+60',
  24 + name: '马来西亚'
  25 +}, {
  26 + value: '+1',
  27 + name: '美国'
  28 +}, {
  29 + value: '+81',
  30 + name: '日本'
  31 +}, {
  32 + value: '+65',
  33 + name: '新加坡'
  34 +}, {
  35 + value: '+44',
  36 + name: '英国'
  37 +}, {
  38 + value: '+86',
  39 + name: '中国'
  40 +}, {
  41 + value: '+853',
  42 + name: '中国澳门'
  43 +}, {
  44 + value: '+886',
  45 + name: '中国台湾'
  46 +}, {
  47 + value: '+852',
  48 + name: '中国香港'
  49 +}];
  50 +
  51 +export default {
  52 + name: 'areaChoose',
  53 + data() {
  54 + return {
  55 + list: areaList
  56 + };
  57 + },
  58 + mounted() {
  59 + // this.$yoho.authRealName();
  60 + },
  61 + methods: {
  62 + chooseArea(code) {
  63 + this.$root.$createThirdBind().changeArea(code);
  64 + this.$router.go(-1);
  65 + }
  66 + }
  67 +};
  68 +</script>
  69 +
  70 +
  71 +<style lang="scss" scoped>
  72 +.area-list {
  73 + padding: 0 40px;
  74 + max-height: 100%;
  75 + overflow-y: scroll;
  76 +}
  77 +
  78 +.area-item {
  79 + height: 100px;
  80 + line-height: 100px;
  81 + font-size: 32px;
  82 + color: #222;
  83 + border-bottom: 1px solid #e8e8e8;
  84 +
  85 + &:last-child {
  86 + border-bottom: 0;
  87 + }
  88 +
  89 + .code {
  90 + float: right;
  91 + }
  92 +}
  93 +
  94 +</style>
1 <template> 1 <template>
2 - <LayoutApp class="  
3 -  
4 -  
5 -"> 2 + <LayoutApp class="yohoufo-real-auth-page" title="实名认证">
6 <div class="auth-content"> 3 <div class="auth-content">
7 - <div class="auth-title">实名认证</div>  
8 - <p class="auth-sub-title">信息仅用于身份验证,不对外展示,有货UFO平台将严保您的信息安全,请认证填写如下信息,确保上传的图片文字清晰可见。</p> 4 + <p class="auth-sub-title">UFO平台将严格保密您的认证信息,请按照种类分别填写以下信息,保证上传的图片文字清晰可见。</p>
9 <div class="auth-form"> 5 <div class="auth-form">
10 <p class="form-title">姓名</p> 6 <p class="form-title">姓名</p>
11 <div class="form-input-block"> 7 <div class="form-input-block">
12 - <CubeInput class="auth-input" v-model="name" :disabled="!!certName" placeholder="请输入真实姓名"></CubeInput> 8 + <CubeInput class="auth-input" v-model="name" :disabled="!!certName" placeholder="请填写姓名"></CubeInput>
13 </div> 9 </div>
14 <p class="form-title">身份证号</p> 10 <p class="form-title">身份证号</p>
15 <div class="form-input-block"> 11 <div class="form-input-block">
16 - <CubeInput class="auth-input" v-model="idCode" :disabled="!!certIdCode" placeholder="请输入身份证号"></CubeInput> 12 + <CubeInput class="auth-input" v-model="idCode" :disabled="!!certIdCode" placeholder="请填写身份证号"></CubeInput>
17 </div> 13 </div>
18 - <p class="form-title">上传身份证正面照片 <a :href="exampleLink" class="upload-intro">示例照片</a></p> 14 + <p class="form-title">上传身份证正面照片 <a :href="exampleLink" class="upload-intro"><span class="iconfont iconquestion"></span>示例照片</a></p>
19 <div class="form-input-block"> 15 <div class="form-input-block">
20 <div class="upload-btn" @click="uploadFrontCard"> 16 <div class="upload-btn" @click="uploadFrontCard">
21 <div v-if="idCardFrontUrl" class="delete-img" @click.stop="clearInfo(['idCardFront', 'idCardFrontUrl'])">ㄨ</div> 17 <div v-if="idCardFrontUrl" class="delete-img" @click.stop="clearInfo(['idCardFront', 'idCardFrontUrl'])">ㄨ</div>
@@ -173,24 +169,18 @@ export default { @@ -173,24 +169,18 @@ export default {
173 }; 169 };
174 </script> 170 </script>
175 171
176 -  
177 <style lang="scss" scoped> 172 <style lang="scss" scoped>
178 .auth-content { 173 .auth-content {
179 - height: calc(100% - 200px); 174 + height: calc(100% - 144px);
180 padding: 0 40px; 175 padding: 0 40px;
181 overflow-y: scroll; 176 overflow-y: scroll;
182 177
183 - .auth-title {  
184 - font-size: 68px;  
185 - line-height: 96px;  
186 - font-weight: 900;  
187 - }  
188 -  
189 .auth-sub-title { 178 .auth-sub-title {
190 font-size: 24px; 179 font-size: 24px;
191 color: #999; 180 color: #999;
192 line-height: 1.5; 181 line-height: 1.5;
193 - margin-top: 20px; 182 + margin: 40px 0 10px;
  183 + text-align: center;
194 } 184 }
195 185
196 .auth-form { 186 .auth-form {
@@ -201,11 +191,12 @@ export default { @@ -201,11 +191,12 @@ export default {
201 font-size: 36px; 191 font-size: 36px;
202 padding-top: 40px; 192 padding-top: 40px;
203 line-height: 1.6; 193 line-height: 1.6;
  194 + font-weight: 500;
204 } 195 }
205 196
206 .form-input-block { 197 .form-input-block {
207 padding-bottom: 16px; 198 padding-bottom: 16px;
208 - border-bottom: 1px solid #f6f6f6; 199 + border-bottom: 1px solid #eee;
209 position: relative; 200 position: relative;
210 } 201 }
211 202
@@ -223,10 +214,19 @@ export default { @@ -223,10 +214,19 @@ export default {
223 } 214 }
224 215
225 .upload-intro { 216 .upload-intro {
226 - font-size: 28px; 217 + font-size: 24px;
227 line-height: 58px; 218 line-height: 58px;
228 color: #999; 219 color: #999;
229 float: right; 220 float: right;
  221 + display: flex;
  222 + align-items: center;
  223 + font-weight: 300;
  224 +
  225 + .iconfont {
  226 + font-size: 30px;
  227 + color: #d8d8d8;
  228 + margin-right: 10px;
  229 + }
230 } 230 }
231 231
232 .upload-btn { 232 .upload-btn {
@@ -319,11 +319,18 @@ export default { @@ -319,11 +319,18 @@ export default {
319 } 319 }
320 320
321 .auth-footer { 321 .auth-footer {
322 - padding: 40px; 322 + padding: 28px 40px;
323 323
324 .submit-btn { 324 .submit-btn {
325 - height: 120px; 325 + height: 88px;
  326 + line-height: 88px;
  327 + padding: 0;
326 background: #022c46; 328 background: #022c46;
  329 + border-radius: 44px;
  330 +
  331 + &:after {
  332 + border: 0;
  333 + }
327 334
328 &.cube-btn_disabled { 335 &.cube-btn_disabled {
329 background: #ccc; 336 background: #ccc;
1 -<template>  
2 - <div class="yohoufo-bind-page">  
3 - <div class="ufo-logo">UFO飞碟好物</div>  
4 -  
5 -  
6 - </div>  
7 -</template>  
8 -  
9 -<script>  
10 -export default {  
11 - name: 'bind',  
12 - activated() {  
13 - },  
14 - beforeRouteUpdate(to, from, next) {  
15 - },  
16 - mounted() {  
17 - // this.$yoho.authRealName();  
18 - },  
19 - methods: {  
20 - }  
21 -};  
22 -</script>  
1 export default [{ 1 export default [{
2 - name: 'passport.bind',  
3 - path: '/xianyu/passport/bind',  
4 - component: () => import(/* webpackChunkName: "passport.bind" */ './bind') 2 + name: 'passport.area',
  3 + path: '/xianyu/passport/area/choose',
  4 + component: () => import(/* webpackChunkName: "passport.area" */ './area')
5 }, { 5 }, {
6 name: 'passport.auth', 6 name: 'passport.auth',
7 path: '/xianyu/passport/real/auth', 7 path: '/xianyu/passport/real/auth',