Browse Source

no message

USER-20230908AJ\Administrator 10 months ago
parent
commit
a1ef2de40c

+ 0 - 26
404.html

@@ -1,26 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<title>404</title>
-<style>
-	body{
-		background-color:#444;
-		font-size:14px;
-	}
-	h3{
-		font-size:60px;
-		color:#eee;
-		text-align:center;
-		padding-top:30px;
-		font-weight:normal;
-	}
-</style>
-</head>
-
-<body>
-<h3>404!</h3>
-</body>
-</html>

+ 0 - 41
index.html

@@ -1,41 +0,0 @@
-<!doctype html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <meta name="format-detection" content="telephone=yes" />
-    <title>恭喜,站点创建成功!</title>
-    <style>
-
-        .container {
-            width: 60%;
-            margin: 10% auto 0;
-            background-color: #f0f0f0;
-            padding: 2% 5%;
-            border-radius: 10px
-        }
-
-        ul {
-            padding-left: 20px;
-        }
-
-            ul li {
-                line-height: 2.3
-            }
-
-        a {
-            color: #20a53a
-        }
-    </style>
-</head>
-<body>
-    <div class="container">
-        <h1>恭喜, 站点创建成功!</h1>
-        <h3>这是默认index.html,本页面由系统自动生成</h3>
-        <ul>
-            <li>本页面在FTP根目录下的index.html</li>
-            <li>您可以修改、删除或覆盖本页面</li>
-            <li>FTP相关信息,请到“面板系统后台 > FTP” 查看</li>
-        </ul>
-    </div>
-</body>
-</html>

BIN
public/favicon.ico


+ 5 - 5
public/index.html

@@ -2,14 +2,14 @@
 <html lang="">
 
 <head>
-  <title>振合网官方-振合网实体联盟</title>
+  <title>GMC</title>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
   <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-  <meta name="keywords" content="重庆振合网网络科技有限公司,重庆振合网,华际科技振合网,华际科技,振合网" />
-  <meta name="author" content="重庆振合网网络科技有限公司" />
-  <meta name="descriptiion" content="重庆振合网网络科技有限公司官网" />
+  <meta name="keywords" content="GMC" />
+  <meta name="author" content="GMC" />
+  <meta name="descriptiion" content="GMC" />
 </head>
 
 <body>
@@ -25,4 +25,4 @@
 
 </body>
 
-</html>
+</html>

+ 5 - 0
src/api/api/common.js

@@ -0,0 +1,5 @@
+import request from '@/utils/request'
+
+
+//获取公司信息
+export const sendEmail = (data) => request('api/common/send_email', 'post', data)

+ 0 - 0
src/api/Forestage/index.js → src/api/api/index.js


+ 7 - 0
src/api/api/member.js

@@ -0,0 +1,7 @@
+import request from '@/utils/request'
+
+
+//获取公司信息
+export const register = (data) => request('api/member/register', 'post', data)
+export const login = (data) => request('api/member/login', 'post', data)
+export const retrievePass = (data) => request('api/member/retrieve', 'post', data)

+ 4 - 4
src/components/Forestage/message.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    
+
     <el-dialog
       title=""
       :visible.sync="dialogVisible"
@@ -10,7 +10,7 @@
       :before-close="handleClose">
       <div class="pop-box">
         <div class="pop-head flex-vc">
-          
+
           <div class="pop-title animate__animated animate__zoomIn">在线留言</div>
         </div>
         <div class="pop-content flex-vh flex-direction">
@@ -44,7 +44,7 @@
             提交
           </div>
         </div>
-        
+
       </div>
     </el-dialog>
   </div>
@@ -52,7 +52,7 @@
 
 <script>
 import mixinsHomeMsg from '@/mixins/forestage/homeMsg.js'
-import { submitMessage } from '@/api/Forestage/index'
+import { submitMessage } from '@/api/api/index'
 export default {
   components: {},
   mixins: [mixinsHomeMsg],

+ 2 - 2
src/mixins/forestage/home.js

@@ -1,4 +1,4 @@
-import { getSwiperList } from '@/api/Forestage/index'
+import { getSwiperList } from '@/api/api/index'
 export default {
   data() {
     return {
@@ -20,4 +20,4 @@ export default {
       })
     }
   },
-}
+}

+ 2 - 2
src/mixins/forestage/homeMsg.js

@@ -1,4 +1,4 @@
-import { submitMessage } from '@/api/Forestage/index'
+import { submitMessage } from '@/api/api/index'
 export default {
   data() {
     return {
@@ -23,4 +23,4 @@ export default {
       return res
     }
   },
-}
+}

+ 2 - 2
src/mixins/forestage/homeNews.js

@@ -1,4 +1,4 @@
-import { getNewsList } from '@/api/Forestage/index.js'
+import { getNewsList } from '@/api/api/index.js'
 export default {
   data() {
     return {
@@ -30,4 +30,4 @@ export default {
     }
   },
 
-}
+}

+ 1 - 1
src/store/modules/user.js

@@ -1,4 +1,4 @@
-import { getCompanyInfo } from '@/api/Forestage/index.js'
+import { getCompanyInfo } from '@/api/api/index.js'
 import Cookies from 'js-cookie'
 const getDefaultState = () => {
   return {

+ 10 - 10
src/utils/request.js

@@ -9,9 +9,9 @@ const service = axios.create({
 const lang = localStorage.getItem('lang') || 'cn'
 service.interceptors.request.use(
   config => {
-    if (config.isLoading) {
-      startLoading()
-    }
+    // if (config.isLoading) {
+    //   startLoading()
+    // }
     if (localStorage.getItem('userToken')) {
       config.headers.ApiToken = localStorage.getItem('userToken')
     }
@@ -24,9 +24,9 @@ service.interceptors.request.use(
 
 service.interceptors.response.use(
   response => {
-    if (response.config.isLoading) {
-      endLoading();
-    }
+    // if (response.config.isLoading) {
+    //   endLoading();
+    // }
     const res = response.data
     if (res.code === 0) {
       Message({
@@ -37,7 +37,7 @@ service.interceptors.response.use(
     } else if (res.code === 401) {
       localStorage.clear()
       Message({
-        message: '登录信息过期,请重新登录',
+        message: 'Login information expired, please log in again',
         type: 'error',
         duration: 3 * 1000,
         onClose: () => {
@@ -55,7 +55,7 @@ service.interceptors.response.use(
       }
     } else if (res.code === 402) {
       Message({
-        message: '暂无权限访问或操作该页面',
+        message: 'error',
         type: 'error',
         duration: 3 * 1000,
       })
@@ -64,11 +64,11 @@ service.interceptors.response.use(
   },
   error => {
     Message({
-      message: '系统错误',
+      message: 'error',
       type: 'error',
       duration: 3 * 1000
     })
-    endLoading();
+    // endLoading();
     return Promise.reject(error)
   }
 )

+ 14 - 9
src/views/Forestage/login/forget-password.vue

@@ -6,14 +6,14 @@
               <img class="logo-img mr-10" src="@/assets/img/logo.png" alt="">
               <div class="fw-400 fs-18">忘记密码</div>
           </div>
-          <input type="text" placeholder="输入邮箱号码">
+          <input type="text" placeholder="输入邮箱号码" v-model="fromData.email">
           <div class="p-f">
-            <input type="text" placeholder="输入邮箱验证码">
+            <input type="text" placeholder="输入邮箱验证码" v-model="fromData.code">
             <getCheckCode class="getCheckCode" :type="'retrieve'"></getCheckCode>
           </div>
 
-          <input type="password" placeholder="设置新密码">
-          <input type="password" placeholder="再次输入新密码">
+          <input type="password" placeholder="设置新密码" v-model="fromData.pass">
+          <input type="password" placeholder="再次输入新密码" v-model="fromData.pass_two">
 
           <div class="mt-30 button-login fs-14 fc-12 text-align-center hand-cursor" @click="confirm()">确认</div>
       </div>
@@ -23,6 +23,7 @@
 <script>
   import getCheckCode from './module/getCheckCode.vue'
   import tools from "@/utils/tools";
+  import { retrievePass } from '@/api/api/member'
 
   export default {
     components: {
@@ -31,16 +32,20 @@
     data() {
       return {
         isAJAX:false,
+        fromData:{
+          email:'',
+          pass:'',
+          code:'',
+          pass_two:'',
+        }
       };
     },
     methods: {
       confirm() {
-        if (this.fromData.password === '') {
-          return tools.success('请输入密码');
-        }
-        login(this.loginForm).then((res) => {
+
+        retrievePass(this.fromData).then((res) => {
           if (res.code === 1) {
-            tools.success('密码设置成功,请重新登录');
+            tools.success(res.msg);
             this.$router.push('/login')
           } else {
            tools.error(res.msg)

+ 18 - 15
src/views/Forestage/login/login.vue

@@ -6,8 +6,8 @@
               <img class="logo-img mr-10" src="@/assets/img/logo.png" alt="">
               <div class="fw-400 fs-18">{{$t('LoginIndex.userLogin')}}</div>
           </div>
-          <input type="text" :placeholder="$t('LoginIndex.inputId')">
-          <input type="password" :placeholder="$t('LoginIndex.inputPassword')">
+          <input type="text" :placeholder="$t('LoginIndex.inputId')" v-model="fromData.email">
+          <input type="password" :placeholder="$t('LoginIndex.inputPassword')" v-model="fromData.pass">
           <div class="align-items-center justify-content-space-between mb-36">
             <div class="align-items-center hand-cursor" @click="register()">
               <div class="fs-14 fc-70">{{$t('LoginIndex.noUser')}}</div>
@@ -22,11 +22,16 @@
 
 <script>
   import tools from "@/utils/tools";
+  import { login } from '@/api/api/member'
 
   export default {
     data() {
       return {
         isAJAX:false,
+        fromData:{
+          email:'',
+          pass:'',
+        }
       };
     },
     methods: {
@@ -38,20 +43,18 @@
       },
 
       toLogin() {
-         localStorage.setItem('userToken','123456')
-         this.$router.push('/')
+         // localStorage.setItem('userToken','123456')
+         // this.$router.push('/')
 
-        // if (this.fromData.password === '') {
-        //   return tools.success('请输入密码');
-        // }
-        // login(this.loginForm).then((res) => {
-        //   if (res.code === 1) {
-        //     localStorage.setItem('token',res.data.token)
-        //     this.$router.push('/')
-        //   } else {
-        //     tools.error(res.msg)
-        //   }
-        // })
+
+        login(this.fromData).then((res) => {
+          if (res.code === 1) {
+            localStorage.setItem('token',res.data.token)
+            this.$router.push('/')
+          } else {
+            tools.error(res.msg)
+          }
+        })
       },
     },
   };

+ 32 - 37
src/views/Forestage/login/module/getCheckCode.vue

@@ -1,18 +1,27 @@
 <template>
   <!-- 获取验证码 -->
-  <div class="getCheckCode" :class="time<60?'disabledBox':''" >
-      <span class="gain" @click="getCode()">{{text}}</span>
+  <div>
+    <div class="getCheckCode" @click="getCode()" v-if="time<=0"  >
+      <span class="gain" >获取验证码</span>
+    </div>
+    <div class="getCheckCode disabledBox"  v-else  >
+      <span class="gain" >{{text}}</span>
+    </div>
   </div>
+
 </template>
 
 <script>
 // import {commonSend} from '@/api/conmmon.js'
-  export default {
+  import { sendEmail } from '@/api/api/common'
+import tools from '@/utils/tools'
+
+export default {
     props:['value','type'],
     data(){
       return{
-          text:"获取验证码",
-          time:60,
+          text:"",
+          time:0,
           phone:"",
           formData:{
             phone:'',
@@ -24,44 +33,30 @@
       this.formData.send_type = this.type
     },
     watch:{
+      type(val){
+        this.formData.send_type = val
+      },
       value(val){
         this.formData.phone = val
       },
     },
     methods:{
-      verification(){
-        // var reg_tel = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
-        var reg_tel = /^1\d{10}$/;
-        if(this.formData.phone === ''){
-          this.popFun('提示','请输入手机号','error')
-          return false
-        }
-        if(!reg_tel.test(this.formData.phone)){
-          this.popFun('提示','请输入正确的手机号','error')
-          return false
-        }
-        return true
-      },
-      popFun(title,msg,type){
-        this.$notify({title: title,message: msg,type: type,});
-      },
       getCode(){
-        if(this.verification()){
-          commonSend(this.formData).then((res)=>{
-            if(res.code === 1){
-              this.popFun('成功','获取短信验证码成功','success')
-            }
-          })
-          var timer = setInterval(()=>{
-             this.time--;
-             this.text = this.time + "秒";
-             if (this.time==0) {
-               this.time = 60;
-               clearInterval(timer);
-               this.text = "获取验证码";
-             }
-           },1000);
-        }
+        console.log(this.formData)
+        sendEmail(this.formData).then((res)=>{
+          if(res.code === 1){
+            tools.success(res.msg)
+            this.time = 60;
+            var timer = setInterval(()=>{
+              this.time--;
+              this.text = this.time + "S";
+              if (this.time===0) {
+                clearInterval(timer);
+                this.text = "";
+              }
+            },1000);
+          }
+        })
       },
 
     },

+ 14 - 10
src/views/Forestage/login/register.vue

@@ -6,13 +6,13 @@
               <img class="logo-img mr-10" src="@/assets/img/logo.png" alt="">
               <div class="fw-400 fs-18">用户注册</div>
           </div>
-          <input type="text" placeholder="输入邮箱号码">
+          <input type="text" placeholder="输入邮箱号码" v-model="fromData.email">
           <div class="p-f">
-            <input type="text" placeholder="输入验证码">
-            <getCheckCode class="getCheckCode" :type="'retrieve'"></getCheckCode>
+            <input type="text" placeholder="输入验证码" v-model="fromData.code">
+            <getCheckCode class="getCheckCode" :type="'register'"></getCheckCode>
           </div>
-
-          <input type="text" placeholder="输入邀请码">
+        <input type="password" placeholder="登录密码" v-model="fromData.pass">
+          <input type="text" placeholder="输入邀请码" v-model="fromData.inviteCode">
           <div class="align-items-center justify-content-space-between mb-36">
             <div class="align-items-center hand-cursor" @click="toLogin()">
               <div class="fs-14 fc-70">已有账号, </div>
@@ -27,6 +27,7 @@
 <script>
   import getCheckCode from './module/getCheckCode.vue'
   import tools from "@/utils/tools";
+  import { register } from '@/api/api/member'
 
   export default {
     components: {
@@ -35,6 +36,12 @@
     data() {
       return {
         isAJAX:false,
+        fromData:{
+          'inviteCode':'',
+          'email':'',
+          'code':'',
+          'pass':'',
+        }
       };
     },
     methods: {
@@ -43,12 +50,9 @@
       },
 
       toRegister() {
-        if (this.fromData.password === '') {
-          return tools.success('请输入密码');
-        }
-        login(this.loginForm).then((res) => {
+        register(this.fromData).then((res) => {
           if (res.code === 1) {
-            tools.success('注册成功,请重新登录');
+            tools.success(res.msg);
             this.$router.push('/login')
           } else {
             tools.error(res.msg)

+ 2 - 2
vue.config.js

@@ -12,14 +12,14 @@ module.exports = defineConfig({
     allowedHosts: 'all',
     proxy: {
       '/api': {
-        target: 'http://testofficial.jhcs888.com/api/',
+        target: 'http://api.xibohong.cn/api/',
         changeOrigin: true,
         pathRewrite: {
           '^/api': ''
         }
       },
       '/adminApi': {
-        target: 'http://testofficial.jhcs888.com/adminApi/',
+        target: 'http://adminapi.xibohong.cn/adminApi/',
         changeOrigin: true,
         pathRewrite: {
           '^/adminApi': ''

File diff suppressed because it is too large
+ 1029 - 1072
yarn.lock


Some files were not shown because too many files changed in this diff