Browse Source

修改权限,只能查看不能增删改操作

wangzhiqiang 1 tuần trước cách đây
mục cha
commit
4751130c26

+ 2 - 2
.env.development

@@ -1,9 +1,9 @@
 ENV = 'development'
 
 # 线上测试
-# VITE_BASE_URL = 'http://advise.ytmdm.com/gateway'
+VITE_BASE_URL = 'http://advise.ytmdm.com/gateway'
 # VITE_BASE_URL = 'https://test.book.ytpm.net/yt-gateway'
-VITE_BASE_URL = 'http://119.45.71.139:25001'
+# VITE_BASE_URL = 'http://119.45.71.139:25001'
 
 # 本地 
 # VITE_BASE_URL = 'http://192.168.1.9:25001'

+ 4 - 0
src/config/index.js

@@ -5,6 +5,9 @@ const systemSubTitle = '渠道商营销管理系统' // 系统提示信息,用
 /** 使用后端路由 */
 const isBackMenu = false
 
+/** 是否可操作 */
+const isOperate = false
+
 /**
  * 体验用户ID
  * 只能查看筛选,不能操作数据
@@ -20,4 +23,5 @@ export {
   systemSubTitle,
   isBackMenu,
   lookPermissionUser,
+  isOperate
 }

+ 3 - 3
src/router/permission/front.js

@@ -16,14 +16,14 @@ import RiskModule from '../modules/riskModule'
 
 /** 登录后需要动态加入的本地路由 */
 const FrontRoutes = [
-  ...Dashboard,
-  ...outBagModule,
+  // ...Dashboard,
+  // ...outBagModule,
   // ...FormworkErection,
   ...UserModule,
   // ...WithdrawModule,
   // ...AgentModule,
   // ...OperatorModule,
-  ...RiskModule,
+  // ...RiskModule,
 ]
 
 export default FrontRoutes

+ 42 - 6
src/views/main/userModule/userList.vue

@@ -3,7 +3,7 @@
     <!-- 菜单栏 -->
     <From :form-items="dynamicFormItems" @formSubmitted="handleFormSubmitted" @formReset="handleFormReset" />
 
-    <div class="btn">
+    <div class="btn" v-if="isOperate">
       <el-button type="" v-if="formSearch.appIds && selectData.length > 0" @click="clearSelection">取消全选</el-button>
       <!-- <el-button type="primary" :disabled="!selectData.length > 0" @click="userCheck">批量审核</el-button> -->
       <el-button type="info" :disabled="!selectData.length > 0" @click="edit({}, 2)">批量封禁母包</el-button>
@@ -166,6 +166,7 @@
 </template>
 
 <script setup>
+import { isOperate } from '@/config'
 import { onBeforeMount, ref, reactive, nextTick } from "vue";
 import From from "@/components/from/index.vue";
 import Table from "@/components/table/index.vue";
@@ -242,12 +243,12 @@ const settingData = async () => {
         clearable: false,
         options: [],
       },
-      {
+      /* {
         label: '渠道来源',
         prop: 'ditchId',
         type: 'select',
         options: getOptions('channel_origin'),
-      },
+      }, */
       {
         label: '用户状态',
         prop: 'userStatus',
@@ -280,13 +281,48 @@ const getApiOptions = async () => {
       value: item.ditchId
     }))
 
-    const appsOptions = appData.map(item => ({
+    /* const appsOptions = appData.map(item => ({
       label: item.appName,
       value: item.appId
-    }))
+    })) */
+
+   const appsOptions = [
+      {
+        label: '小猪佩7',
+        value: 'ee22cfda452049a195728b320fe56cc0'
+      },
+      {
+        label: '元气算术能手赏',
+        value: 'df43ccb8097b468ea9feaccf363f731e'
+      },
+      {
+        label: '元气算术能手众',
+        value: '79bc491c3b9447adb7b14a8d48dc5a40'
+      },
+      {
+        label: '元气算术能手赚',
+        value: '9338a075034a4d5187c613b8ef509252'
+      },
+      {
+        label: '元气算术能手乐',
+        value: '43a7b4241a5746368fb0f82262d3b8cb	'
+      },
+      {
+        label: '元气算术能手赏2',
+        value: 'a2dc1d58356e489fae44059d588bdbf0'
+      },
+      {
+        label: '小猪佩7赏',
+        value: '585ef6742823455f8b735feed6777734'
+      },
+      {
+        label: '元气算术能手赏1',
+        value: '08ab0980077f47f2825dab7ffb2429b2'
+      },
+    ]
 
     // 赋值到表单项
-    dynamicFormItems.value[3].options = ditchOptions
+    // dynamicFormItems.value[3].options = ditchOptions
     dynamicFormItems.value[2].options = appsOptions
 
     // 如果有应用列表,默认选第一个