Browse Source

取消路演权限限制,报告权限文案修改,手机端跳转注册页

cxmo 1 year ago
parent
commit
db2d794c3e

+ 9 - 2
src/components/NoAuthBox.vue

@@ -1,18 +1,24 @@
 <script setup>
-import {copyText} from '@/utils/common'
+import {copyText,loginOut,signUp} from '@/utils/common'
 import {ElMessage} from 'element-plus'
 function handleCopy(){
     copyText('stephanie@hzinsights.com').then(()=>{
         ElMessage.success('Successfully copied email')
     })
 }
+const yb_token = localStorage.getItem('yben_token')
 </script>
 
 <template>
-    <div class="no-author-box">
+    <div class="no-author-box" v-if="yb_token">
         <p>It seems that you don’t have access to this product yet. Please contact us to proceed: stephanie@hzinsights.com</p>
         <el-button type="primary" @click="handleCopy">Get the contact email</el-button>
     </div>
+    <div class="no-author-box" v-else>
+        <p>No access to view, please register/log in to see.</p>
+        <el-button type="primary" @click="loginOut">Log In</el-button>
+        <el-button @click="signUp">Sign Up</el-button>
+    </div>
 </template>
 
 <style lang="scss" scoped>
@@ -20,6 +26,7 @@ function handleCopy(){
     margin-top: 40px;
     text-align: center;
     padding: 0 14px;
+    padding-bottom: 20px;
     p{
         color: var(--el-color-primary);
         line-height: 1.7;

+ 1 - 1
src/utils/common.js

@@ -73,5 +73,5 @@ export const passwordChange=()=>{
 export const signUp=()=>{
     localStorage.removeItem('yben_token')
     localStorage.removeItem('user_info')
-    isMobile()?router.push('/login'):router.push('/register')
+    isMobile()?router.push({path:'/login',query:{isRegister:1}}):router.push('/register')
 }

+ 3 - 1
src/views/roadShow/Detail.vue

@@ -46,7 +46,9 @@ async function getDetail(){
     })
     if(res.code===200){
         info.value=res.data.Video
-        hasAuth.value=res.data.auth_ok
+        //hasAuth.value=res.data.auth_ok
+        //取消路演的权限限制
+        hasAuth.value = true
     }
 }
 getDetail()

+ 8 - 2
src/views/verification/login.vue

@@ -1,8 +1,8 @@
 <script setup>
-import {ref,reactive} from 'vue'
+import {ref,reactive,onMounted} from 'vue'
 import {ElMessage} from 'element-plus'
 import md5 from 'md5';
-import { useRouter } from 'vue-router';
+import { useRouter,useRoute } from 'vue-router';
 import {CaretBottom} from '@element-plus/icons-vue'
 import {loginApi,registerApi} from '@/api/auth.js'
 // passwordDigitValidator-密码6位
@@ -12,6 +12,7 @@ import { TEL_CODE_ARR } from '../../utils/constant';
 import { sendVerificationCode } from './utils/common';
 
   const router = useRouter()
+  const route = useRoute()
   const loginFormRef=ref(null)
   const loginFormMobileRef=ref(null)
   
@@ -189,6 +190,11 @@ import { sendVerificationCode } from './utils/common';
     })
   }
 
+  onMounted(()=>{
+    if(route.query.isRegister){
+        operationType.value = 2
+    }
+  })
 </script>
 <template>
   <div class="login-container" id="login-container">