Просмотр исходного кода

Merge branch 'master' of http://git.izouma.com/xiongzhu/9th

panhui 4 лет назад
Родитель
Сommit
f06c4c9f76

+ 25 - 25
src/main/nine-space/src/components/order/OrderInfo.vue

@@ -61,31 +61,31 @@ export default {
             this.$emit('delFn');
         },
         del() {
-            // this.Dialog.confirm({
-            //     title: '确定删除吗?',
-            //     message: '删除此记录将消失'
-            // }).then(() => {
-            //     this.$http
-            //         .post('/order/hide/', {
-            //             id: this.info.id
-            //         })
-            //         .then(() => {
-            //             this.$toast.success('删除成功');
-            //             setTimeout(() => {
-            //                 this.delInit();
-            //             }, 1000);
-            //         });
-            // });
-            this.$http
-                .post('/order/hide/', {
-                    id: this.info.id
-                })
-                .then(() => {
-                    this.$toast.success('删除成功');
-                    setTimeout(() => {
-                        this.delInit();
-                    }, 1000);
-                });
+            this.Dialog.confirm({
+                title: '确定删除吗?',
+                message: '删除此记录将消失'
+            }).then(() => {
+                this.$http
+                    .post('/order/hide/', {
+                        id: this.info.id
+                    })
+                    .then(() => {
+                        this.$toast.success('删除成功');
+                        setTimeout(() => {
+                            this.delInit();
+                        }, 1000);
+                    });
+            });
+            // this.$http
+            //     .post('/order/hide/', {
+            //         id: this.info.id
+            //     })
+            //     .then(() => {
+            //         this.$toast.success('删除成功');
+            //         setTimeout(() => {
+            //             this.delInit();
+            //         }, 1000);
+            //     });
         },
         likeProduct() {
             if (!this.info.liked) {

+ 43 - 54
src/main/pc-space/src/components/PageHeader.vue

@@ -60,10 +60,10 @@
 </template>
 <script>
 import LoginInfo from '../components/LoginInfo.vue';
-import pageableTable from '@/mixins/pageableTable';
+// import pageableTable from '@/mixins/pageableTable';
 import { mapState, mapMutations } from 'vuex';
 export default {
-    mixins: [pageableTable],
+    // mixins: [pageableTable],
     components: { LoginInfo },
     watch: {
         $route() {
@@ -76,6 +76,7 @@ export default {
             active: '',
             show: false,
             activeName: '',
+            lists: '',
             url: '/identityAuth/all',
             menus: [
                 {
@@ -105,52 +106,46 @@ export default {
         ...mapState(['userInfo']),
         avatarBox() {
             return this.userInfo.avatar;
-        },
-        type() {
-            return this.userInfo.authorities.find(item => {
-                return item.name == 'ROLE_INSTITUTION' || item.name == 'ROLE_PERSONAL';
-            });
         }
+        // type() {
+        //     return this.lists[0].org;
+        // }
     },
     mounted() {
         this.$EventBus.$on('login', () => {
             this.show = true;
         });
         this.getActive();
+        setTimeout(() => {
+            this.add();
+        }, 1000);
     },
     methods: {
-        beforeData() {
-            return {
-                query: {
-                    userId: this.userInfo.id
-                }
-            };
-        },
-        setList(list) {
-            this.lists = list.filter(item => {
-                return item.userId === this.userInfo.id;
-            });
-            console.log(this.lists);
-            this.org = this.lists[0].org;
-            console.log(this.lists[0].org);
-            console.log(this.org);
+        add() {
+            this.$http
+                .post(
+                    '/identityAuth/all',
+                    {
+                        query: {
+                            userId: this.userInfo.id
+                        },
+                        sort: 'createdAt,desc',
+                        size: 1,
+                        page: 0
+                    },
+                    {
+                        body: 'json'
+                    }
+                )
+                .then(res => {
+                    this.lists = res.content[0].org;
+                    console.log(this.lists);
+                });
         },
         Login() {
             this.$refs.ref.flag();
         },
         ...mapMutations(['updateUserInfo']),
-        // tab(item) {
-        //     this.active = item;
-        //     if (item === '铸造者') {
-        //         this.$router.push('/casting');
-        //     } else if (item === '收藏探索') {
-        //         this.$router.push('/collection');
-        //     } else if (item === '数字盲盒') {
-        //         this.$router.push('/collection?type=BLIND_BOX');
-        //     } else if (item === '我的NFT') {
-        //         this.$router.push('/my');
-        //     }
-        // },
         batchRead() {},
         onCommand(command) {
             if (command === 'edit') {
@@ -162,30 +157,24 @@ export default {
                 this.updateUserInfo(null);
                 this.$router.push('/');
             } else if (command === 'supply') {
-                // this.setList();
-                // this.$router.go(0);
+                this.add();
                 if (this.userInfo.authStatus === 'NOT_AUTH') {
                     this.$router.push('/authentication');
                 } else {
                     this.$nextTick(() => {
-                        if (this.userInfo.authStatus !== 'NOT_AUTH' && this.org == false) {
-                            console.log(this.lists[0]);
-                            console.log(this.org);
-                            console.log('个人');
-                            this.$router.push('/userauthentication');
-                        }
-                        //  else {
-                        //     console.log(this.lists[0]);
-                        //     console.log(this.org);
-                        //     console.log('企业');
-                        //     this.$router.push('/enterpriseauthentication');
-                        // }
-                        if (this.userInfo.authStatus !== 'NOT_AUTH' && this.org == true) {
-                            console.log(this.lists[0]);
-                            console.log(this.org);
-                            console.log('企业');
-                            this.$router.push('/enterpriseauthentication');
-                        }
+                        console.log(this.lists);
+                        setTimeout(() => {
+                            if (this.userInfo.authStatus !== 'NOT_AUTH' && this.lists == false) {
+                                this.add();
+                                this.$router.push('/userauthentication');
+                            }
+                        }, 1000);
+                        setTimeout(() => {
+                            if (this.userInfo.authStatus !== 'NOT_AUTH' && this.lists == true) {
+                                this.add();
+                                this.$router.push('/enterpriseauthentication');
+                            }
+                        }, 1000);
                     });
                 }
             }

+ 42 - 20
src/main/pc-space/src/views/user/AccountData.vue

@@ -160,7 +160,6 @@
 import { mapState } from 'vuex';
 import resolveUrl from 'resolve-url';
 import user from '../../mixins/user';
-import pageableTable from '@/mixins/pageableTable';
 import Clipboard from 'clipboard';
 // import FansInfo from '../../components/FansInfo.vue';
 export default {
@@ -168,12 +167,12 @@ export default {
         this.uploadUrl = resolveUrl(this.$baseUrl, 'upload/file');
     },
     // components: { FansInfo },
-    mixins: [user, pageableTable],
+    mixins: [user],
     data() {
         return {
             tabs: ['粉丝', '关注'],
             active: '',
-            list: [],
+            list: '',
             empty: false,
             value: '',
             url: '/identityAuth/all',
@@ -187,9 +186,7 @@ export default {
             return this.userInfo.phone.slice(0, 3) + ' **** ' + this.userInfo.phone.slice(7, 11);
         },
         type() {
-            return this.userInfo.authorities.find(item => {
-                return item.name == 'ROLE_INSTITUTION' || item.name == 'ROLE_PERSONAL';
-            });
+            return this.lists[0].org;
         },
         Status() {
             if (this.userInfo.authStatus === 'NOT_AUTH') {
@@ -204,9 +201,32 @@ export default {
         }
     },
     mounted() {
-        this.beforeData();
+        setTimeout(() => {
+            this.add();
+        }, 1000);
     },
     methods: {
+        add() {
+            this.$http
+                .post(
+                    '/identityAuth/all',
+                    {
+                        query: {
+                            userId: this.userInfo.id
+                        },
+                        sort: 'createdAt,desc',
+                        size: 1,
+                        page: 0
+                    },
+                    {
+                        body: 'json'
+                    }
+                )
+                .then(res => {
+                    this.lists = res.content[0].org;
+                    console.log(this.lists);
+                });
+        },
         beforeAvatarUpload(file) {
             this.updateFile(file, 100).then(img => {
                 this.updateUser({ avatar: img }).then(res => {
@@ -252,23 +272,25 @@ export default {
                 }
             };
         },
-        setList(list) {
-            this.lists = list.filter(item => {
-                return item.userId === this.userInfo.id;
-            });
-            this.org = this.lists[0].org;
-            // console.log(this.lists);
-            console.log(this.org);
-        },
         Auths() {
             if (this.userInfo.authStatus === 'NOT_AUTH') {
                 this.$router.push('/authentication');
             } else {
-                if (this.userInfo.authStatus !== 'NOT_AUTH' && this.org == false) {
-                    this.$router.push('/userauthentication');
-                } else {
-                    this.$router.push('/enterpriseauthentication');
-                }
+                this.$nextTick(() => {
+                    console.log(this.lists);
+                    setTimeout(() => {
+                        if (this.userInfo.authStatus !== 'NOT_AUTH' && this.lists == false) {
+                            this.add();
+                            this.$router.push('/userauthentication');
+                        }
+                    }, 1000);
+                    setTimeout(() => {
+                        if (this.userInfo.authStatus !== 'NOT_AUTH' && this.lists == true) {
+                            this.add();
+                            this.$router.push('/enterpriseauthentication');
+                        }
+                    }, 1000);
+                });
             }
             // ROLE_INSTITUTION 企业
             // ROLE_PERSONAL 个人

+ 72 - 60
src/main/pc-space/src/views/user/EnterpriseAuthentication.vue

@@ -24,68 +24,72 @@
                 <div class="botn" v-if="userInfo.authStatus !== 'FAIL'" @click="all('accountdata')">返回</div>
                 <div class="botn" v-if="userInfo.authStatus === 'FAIL'" @click="Jump2">重新认证</div>
             </div>
-            <div v-if="userInfo.authStatus === 'NOT_AUTH'">
-                <el-form ref="form" :label-position="labelPosition" :model="sizeForm" :rules="registerRule">
-                    <el-form-item label="法人姓名" prop="realName">
-                        <el-input
-                            style="width: 300px"
-                            placeholder="请输入您的真实姓名"
-                            v-model="sizeForm.realName"
-                        ></el-input>
-                    </el-form-item>
-                    <el-form-item label="法人身份证号" prop="idNo">
-                        <el-input
-                            style="width: 300px"
-                            placeholder="请输入18位身份证号"
-                            v-model="sizeForm.idNo"
-                        ></el-input>
-                    </el-form-item>
+            <!-- v-loading="loading"
+    element-loading-text="拼命加载中" -->
+            <div>
+                <div v-if="userInfo.authStatus === 'NOT_AUTH'">
+                    <el-form ref="form" :label-position="labelPosition" :model="sizeForm" :rules="registerRule">
+                        <el-form-item label="法人姓名" prop="realName">
+                            <el-input
+                                style="width: 300px"
+                                placeholder="请输入您的真实姓名"
+                                v-model="sizeForm.realName"
+                            ></el-input>
+                        </el-form-item>
+                        <el-form-item label="法人身份证号" prop="idNo">
+                            <el-input
+                                style="width: 300px"
+                                placeholder="请输入18位身份证号"
+                                v-model="sizeForm.idNo"
+                            ></el-input>
+                        </el-form-item>
 
-                    <el-form-item label="法人身份证 (正面图)" prop="idFront">
-                        <single-upload class="upload" v-model="sizeForm.idFront"></single-upload>
-                    </el-form-item>
-                    <div class="description">{{ explain }}</div>
-                    <el-form-item label="法人身份证 (反面图)" prop="idBack">
-                        <single-upload class="upload" v-model="sizeForm.idBack"></single-upload>
-                    </el-form-item>
-                    <div class="description">{{ explain }}</div>
-                    <el-form-item label="企业名称" prop="orgName">
-                        <el-input
-                            style="width: 300px"
-                            placeholder="请输入企业名称"
-                            v-model="sizeForm.orgName"
-                        ></el-input>
-                    </el-form-item>
-                    <el-form-item label="工商营业执照注册号/统一社会信用代码" prop="orgNo">
-                        <el-input
-                            style="width: 300px"
-                            placeholder="工商营业执照注册号/统一社会信用代码"
-                            v-model="sizeForm.orgNo"
-                        ></el-input>
-                    </el-form-item>
-                    <div class="content">
-                        <el-form-item @change="Price" prop="orgLicenseExpire" label="工商营业执照有效日期截止时间">
-                            <el-date-picker
-                                v-model="sizeForm.orgLicenseExpire"
-                                :disabled="sizeForm.negotiateDirectly"
-                                type="date"
+                        <el-form-item label="法人身份证 (正面图)" prop="idFront">
+                            <single-upload class="upload" v-model="sizeForm.idFront"></single-upload>
+                        </el-form-item>
+                        <div class="description">{{ explain }}</div>
+                        <el-form-item label="法人身份证 (反面图)" prop="idBack">
+                            <single-upload class="upload" v-model="sizeForm.idBack"></single-upload>
+                        </el-form-item>
+                        <div class="description">{{ explain }}</div>
+                        <el-form-item label="企业名称" prop="orgName">
+                            <el-input
+                                style="width: 300px"
+                                placeholder="请输入企业名称"
+                                v-model="sizeForm.orgName"
+                            ></el-input>
+                        </el-form-item>
+                        <el-form-item label="工商营业执照注册号/统一社会信用代码" prop="orgNo">
+                            <el-input
                                 style="width: 300px"
-                                value-format="yyyy-MM-dd"
-                                placeholder="选择日期"
-                            >
-                            </el-date-picker>
+                                placeholder="工商营业执照注册号/统一社会信用代码"
+                                v-model="sizeForm.orgNo"
+                            ></el-input>
                         </el-form-item>
-                        <el-checkbox @change="Directly" v-model="sizeForm.negotiateDirectly">长期</el-checkbox>
+                        <div class="content">
+                            <el-form-item @change="Price" prop="orgLicenseExpire" label="工商营业执照有效日期截止时间">
+                                <el-date-picker
+                                    v-model="sizeForm.orgLicenseExpire"
+                                    :disabled="sizeForm.negotiateDirectly"
+                                    type="date"
+                                    style="width: 300px"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择日期"
+                                >
+                                </el-date-picker>
+                            </el-form-item>
+                            <el-checkbox @change="Directly" v-model="sizeForm.negotiateDirectly">长期</el-checkbox>
+                        </div>
+                        <div class="description">证照有效截止日期需大于60天,如证照上日期为长期或无,请勾选长期</div>
+                        <el-form-item label="营业执照" prop="orgLicense">
+                            <single-upload class="upload" v-model="sizeForm.orgLicense"></single-upload>
+                        </el-form-item>
+                        <div class="description">请上传清晰图片,格式JPG或PNG,大小不得超过 2 M</div>
+                    </el-form>
+                    <div class="btn">
+                        <el-button type="primary" @click="onSubmit">提交审核</el-button>
+                        <div class="btn1" @click="Jump">返回</div>
                     </div>
-                    <div class="description">证照有效截止日期需大于60天,如证照上日期为长期或无,请勾选长期</div>
-                    <el-form-item label="营业执照" prop="orgLicense">
-                        <single-upload class="upload" v-model="sizeForm.orgLicense"></single-upload>
-                    </el-form-item>
-                    <div class="description">请上传清晰图片,格式JPG或PNG,大小不得超过 2 M</div>
-                </el-form>
-                <div class="btn">
-                    <el-button type="primary" @click="onSubmit">提交审核</el-button>
-                    <div class="btn1" @click="Jump">返回</div>
                 </div>
             </div>
         </div>
@@ -94,9 +98,11 @@
 
 <script>
 import { mapState } from 'vuex';
+
 export default {
     data() {
         return {
+            loading: true,
             labelPosition: 'right',
             sizeForm: {
                 realName: '',
@@ -204,7 +210,13 @@ export default {
         onSubmit() {
             this.$refs.form.validate(valid => {
                 if (valid) {
-                    this.$confirm('提交资料需要审核,确定吗?', '提示', { type: 'warning' }).then(() => {
+                    this.loading = true;
+                    this.$confirm(
+                        '保证提交的所有资料证真实有效且确属本人,如有假冒信息,一切法律后果自行承担!',
+                        '提示',
+                        { type: 'warning' }
+                    ).then(() => {
+                        this.loading = false;
                         this.preservation();
                     });
                 }
@@ -216,7 +228,7 @@ export default {
             form.userId = this.userInfo.id;
             form.status = 'PENDING';
             form.org = true;
-            console.log(form);
+            // console.log(form);
             this.$http
                 .post('/identityAuth/apply', {
                     ...form

+ 1 - 0
src/main/pc-space/src/views/user/UserAuthentication.vue

@@ -144,6 +144,7 @@ export default {
                     return Promise.reject();
                 });
         },
+        // 340321199705124693
         onSubmit() {
             this.$refs.form.validate(valid => {
                 if (valid) {