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

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

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

+ 51 - 54
src/main/pc-space/src/components/LoginInfo.vue

@@ -127,7 +127,7 @@
                     >
                 </div>
                 <div class="sub-btn" style="width: 300px" v-else>
-                    <el-button type="primary" class="btn-block" @click="password">确定</el-button>
+                    <el-button type="primary" class="btn-block" @click="passwordFn2">确定</el-button>
                     <el-button
                         style="background: #f2f3f5; color: #292c33"
                         type="info"
@@ -182,38 +182,35 @@ export default {
             this.flag = true;
             this.flag1 = true;
         },
+        // 忘记密码
         passwordFn() {
             this.flag = true;
             this.flag1 = false;
-            this.form.phone = '';
-            this.form.password = '';
-            this.form.password2 = '';
+            // this.form.phone = '';
+            // this.form.password = '';
+            // this.form.password2 = '';
         },
+        // 注册
         doRegister() {
-            this.$http;
-            this.verifyMsg(this.form.phone, this.form.code)
-                .then(() => {
-                    return this.$http.post(
-                        '/auth/phoneRegister?phone=' +
-                            this.form.phone +
-                            '&password=' +
-                            this.form.password +
-                            '&code=' +
-                            this.form.code
-                    );
+            // console.log(this.form.phone, this.form.password);
+            // this.$http;
+            // this.verifyMsg(this.form.phone, this.form.code)
+            // .then(() => {
+            this.$http
+                .post('/user/phoneRegister', {
+                    phone: this.form.phone,
+                    password: this.form.password,
+                    code: this.form.code
                 })
+                // })
                 .then(res => {
                     console.log(res);
-                    localStorage.setItem('nineToken', res);
+                    localStorage.setItem('webToken', res);
                     return this.$store.dispatch('getUserInfo');
                 })
                 .then(() => {
                     this.$message.warning('注册成功');
                     this.flag = false;
-                    // this.form = '';
-                    // setTimeout(() => {
-                    //     this.$router.back();
-                    // }, 1500);
                 })
                 .catch(e => {
                     if (e) {
@@ -221,64 +218,64 @@ export default {
                     }
                 });
         },
+        // 验证码
         send() {
             this.sendMsg(this.form.phone);
         },
+        // 修改密码
+        passwordFn2() {
+            // this.verifyMsg(this.form.phone, this.form.code)
+            // .then(() => {
+            //  return
+            this.$http
+                .post('/user/bindPhone?phone=' + this.form.phone)
+                // })
+                .then(() => {
+                    this.$toast.success('修改成功');
+                    // setTimeout(() => {
+                    //     this.$router.back();
+                    // }, 1500);
+                })
+                .catch(e => {
+                    if (e) {
+                        this.$toast(e.error);
+                    }
+                });
+        },
+        // 密码登录
         Login2() {
             this.loading = true;
             this.$http
-                .post('/auth/login', {
+                .post('/user/loginByPhonePwd', {
                     phone: this.form.phone,
                     password: this.form.password
                 })
                 .then(res => {
                     localStorage.setItem('webToken', res);
                     this.$message.warning('登录成功');
-                    // this.$store.commit('loginTypeFn', true);
                     return this.$store.dispatch('getUserInfo');
                 })
-                // .then(() => {
-                //     this.$router.replace('/');
-                // })
                 .catch(e => {
                     this.loading = false;
                     this.$message.error(e.error);
                 });
         },
+        // 验证码登录
         loginPhone() {
-            // return this.$http
-            //     .post('/auth/phoneLogin', {
-            //         phone: this.form.phone,
-            //         code: this.form.code
-            //     })
-            //     .catch(e => {
-            //         if (e) {
-            //             this.$message.error(e.error);
-            //         }
-            //         return Promise.reject();
-            //     })
-            //     .then(res => {
-            //         localStorage.setItem('nineToken', res);
-            //         return this.$store.dispatch('getUserInfo');
-            //     });
-            // this.$toast.loading({
-            //     message: '加载中...',
-            //     forbidClick: true
-            // });
-            this.verifyMsg(this.form.phone, this.form.code)
-                .then(() => {
-                    return this.$http.post('/user/bindPhone?phone=' + this.form.phone);
-                })
-                .then(() => {
-                    this.$toast.success('修改成功');
-                    // setTimeout(() => {
-                    //     this.$router.back();
-                    // }, 1500);
+            return this.$http
+                .post('/user/phoneLogin', {
+                    phone: this.form.phone,
+                    code: this.form.code
                 })
                 .catch(e => {
                     if (e) {
-                        this.$toast(e.error);
+                        this.$message.error(e.error);
                     }
+                    return Promise.reject();
+                })
+                .then(res => {
+                    localStorage.setItem('nineToken', res);
+                    return this.$store.dispatch('getUserInfo');
                 });
         },
         closeDialog() {

+ 1 - 1
src/main/pc-space/src/components/SearchInfo.vue

@@ -22,7 +22,7 @@
 export default {
     data() {
         return {
-            input: ''
+            search: ''
         };
     },
     methods: {

+ 25 - 25
src/main/pc-space/src/styles/list.less

@@ -26,31 +26,31 @@
         padding: 60px 0;
         font-family: ZhenyanGB;
     }
-    .tabs {
-        display: flex;
-        align-items: center;
-        padding-bottom: 30px;
-        text-align: center;
-        .tab {
-            width: 140px;
-            border: 1px solid #939599;
-            height: 42px;
-            font-size: 18px;
-            font-weight: bold;
-            color: #949699;
-            line-height: 42px;
-            &.active {
-                color: #ffffff;
-                background: linear-gradient(46deg, #00ffcb 0%, #006eff 100%);
-            }
-            &:first-child {
-                border-radius: 8px 0px 0px 8px;
-            }
-            &:last-child {
-                border-radius: 0px 8px 8px 0px;
-            }
-        }
-    }
+    // .tabs {
+    //     display: flex;
+    //     align-items: center;
+    //     // padding-bottom: 30px;
+    //     text-align: center;
+    //     .tab {
+    //         width: 140px;
+    //         border: 1px solid #939599;
+    //         height: 42px;
+    //         font-size: 18px;
+    //         font-weight: bold;
+    //         color: #949699;
+    //         line-height: 42px;
+    //         &.active {
+    //             color: #ffffff;
+    //             background: linear-gradient(46deg, #00ffcb 0%, #006eff 100%);
+    //         }
+    //         &:first-child {
+    //             border-radius: 8px 0px 0px 8px;
+    //         }
+    //         &:last-child {
+    //             border-radius: 0px 8px 8px 0px;
+    //         }
+    //     }
+    // }
     .border {
         height: 1px;
         background: #494a4d;

+ 1 - 2
src/main/pc-space/src/views/Blindsbox.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="container">
+    <div class="container center-content">
         <div class="title">欢迎来到 NFT 盲盒市场</div>
         <search-info></search-info>
         <goods-info></goods-info>
@@ -18,7 +18,6 @@ export default {
 </script>
 <style lang="less" scoped>
 .container {
-
     .title {
         height: 42px;
         font-size: 32px;

+ 2 - 2
src/main/pc-space/src/views/Collection.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="container">
         <div class="title" ref="anchor">欢迎来到 NFT 市场</div>
-        <div class="tabs">
+        <!-- <div class="tabs">
             <div
                 class="tab"
                 :class="{ active: active === item }"
@@ -11,7 +11,7 @@
             >
                 {{ item }}
             </div>
-        </div>
+        </div> -->
         <el-radio-group class="menu" v-model="type" size="normal">
             <el-radio-button v-for="(item, index) in typeList" :key="index" :label="item.value">
                 <div class="radio-item">

+ 2 - 5
src/main/pc-space/src/views/Home.vue

@@ -26,7 +26,7 @@
             <img class="img2" src="../assets/img/888.jpg" alt="" />
             <img class="img2" src="../assets/img/888.jpg" alt="" />
         </div>
-        <div class="content">
+        <div class="content center-content">
             <div class="hot">最HOT收藏品</div>
             <goods-info></goods-info>
             <div class="all all1">
@@ -35,7 +35,7 @@
                 <img class="img1" src="../assets/img/icon_inter@3x (3).png" alt="" />
             </div>
         </div>
-        <div class="content1">
+        <div class="content1 center-content">
             <div class="hot">官方活动</div>
             <div class="imgBox">
                 <img class="imgBox1" src="../assets/img/888.jpg" alt="" />
@@ -154,7 +154,6 @@ export default {
     }
 }
 .introduce {
-    // padding: 0 200px;
     display: flex;
     align-items: center;
     justify-content: space-between;
@@ -197,7 +196,6 @@ export default {
 }
 .content {
     background: #0f1111;
-    padding: 0 200px;
     .hot {
         font-size: 24px;
         text-align: center;
@@ -228,7 +226,6 @@ export default {
     }
 }
 .content1 {
-    padding: 0 200px;
     .hot {
         font-size: 24px;
         text-align: center;

+ 1 - 1
src/main/pc-space/src/views/Index.vue

@@ -6,7 +6,7 @@
                 <router-view />
             </el-main>
             <el-footer>
-                <div class="footer">
+                <div class="footer center-content">
                     <div class="footer-l">
                         <img class="logo" src="../assets/img/nav_logo@3x.png" alt="" />
                         <div>

+ 1 - 1
src/main/pc-space/src/views/My.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="container">
+    <div class="container center-content">
         <div class="title">我的 NFT</div>
         <div class="tabs">
             <div

+ 1 - 1
src/main/pc-space/src/views/StoreDetail.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="container">
+    <div class="container center-content">
         <div class="top">
             <div>
                 <img class="imgBox" src="../assets/img/888.jpg" alt="" />