Explorar o código

Merge branch 'master' into zhaoj

ZhaoJing hai 1 ano
pai
achega
bdda6cb6b4

+ 2 - 1
public/auto-login.html

@@ -82,6 +82,7 @@
       dd.ready(function () {
         var corpId = params.corpId ? params.corpId : '';
         var tag = params.tag ? params.tag : '';
+        var role = params.role ? params.role : '';
         // const t = tag.split('_');
         // if (t.length > 1) {
         //   tag = t.splice(0, 1)[0];
@@ -133,7 +134,7 @@
                           return
                         }
                         localStorage.setItem('userInfo', JSON.stringify(res.data));
-                        location.href = '/app/mobile/' + (tag ? ('#/?tag=' + tag) : '');
+                        location.href = '/app/mobile/' + (tag ? ('#/?tag=' + tag) : '') + (role ? ('&role=' + role) : '');
                       } else {
                         alert(res.msg);
                       }

+ 15 - 1
src/pages/index.vue

@@ -1,6 +1,7 @@
 <script setup>
 import * as dd from 'dingtalk-jsapi'
 import { menuList } from './menuData.js'
+import { userInfo } from "~/store/user";
 
 defineOptions({
   name: 'IndexPage',
@@ -9,6 +10,19 @@ const router = useRouter()
 const { currentRoute } = useRouter()
 const route = currentRoute.value
 const tag = route.query.tag
+const role = route.query.role
+
+const { uo_type } = userInfo;
+const isBureau = ref(false); // 当前用户是否局端
+isBureau.value = uo_type === "1";
+let authVerify = $ref(false)
+if ((isBureau.value && role == 'ju') || (!isBureau.value && role == 'xiao')) {
+  authVerify = true
+} else {
+  let msg = "您是" + (isBureau.value ? "教育局" : "学校") + "用户,无法访问此应用"
+  alert(msg)
+}
+
 let menuListData = {}
 for (const item of menuList) {
   if (item.tag === tag) {
@@ -36,7 +50,7 @@ function linkTo(child) {
 
 <template>
   <div class="IndexPage">
-    <div class="bodyContainer">
+    <div v-show="authVerify" class="bodyContainer">
       <div class="card">
         <div class="titleCard">
           <p>{{ menuListData.title }}</p>

+ 1 - 0
src/pages/officialDocumentManager/todoReadDoucument/bureauDocument/index.vue

@@ -17,6 +17,7 @@ function onLoad() {
       limit: 20,
       my_read: 1,
       gw_fb_depart: "2",
+      is_jd_user:1,//限定是局端用户
       ...param,
     },
   }).then((res) => {

+ 1 - 1
src/pages/officialDocumentManager/todoReadDoucument/schoolDoucment/index.vue

@@ -16,7 +16,7 @@ function onLoad() {
       page,
       limit: 20,
       my_read: 1,
-      gw_fb_depart: "1",
+      // gw_fb_depart: "1",
       ...param,
     },
   }).then((res) => {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 110 - 0
src/store/produ/wyj.js


+ 1 - 1
src/store/user.js

@@ -1,6 +1,6 @@
 import { defineStore } from 'pinia'
 
-// import produ from './produ/la'
+// import produ from './produ/wyj'
 
 // localStorage.setItem(
 //   'userInfo',