Compare commits
3 Commits
60a3d6d673
...
9b05c19b76
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b05c19b76 | |||
| fe5f4db0ad | |||
| cc689720b9 |
10
.editorconfig
Normal file
10
.editorconfig
Normal file
@ -0,0 +1,10 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
max_line_length = 120
|
||||
tab_width = 4
|
||||
34
App.vue
34
App.vue
@ -1,37 +1,37 @@
|
||||
<script setup>
|
||||
import config from './config'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { useConfigStore } from '@/store'
|
||||
import { getCurrentInstance } from "vue"
|
||||
import { onLaunch } from '@dcloudio/uni-app'
|
||||
import config from './config'
|
||||
import {getToken} from '@/utils/auth'
|
||||
import {useConfigStore} from '@/store'
|
||||
import {getCurrentInstance} from "vue"
|
||||
import {onLaunch} from '@dcloudio/uni-app'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const {proxy} = getCurrentInstance()
|
||||
|
||||
onLaunch(() => {
|
||||
onLaunch(() => {
|
||||
initApp()
|
||||
})
|
||||
})
|
||||
|
||||
// 初始化应用
|
||||
function initApp() {
|
||||
// 初始化应用
|
||||
function initApp() {
|
||||
// 初始化应用配置
|
||||
initConfig()
|
||||
// 检查用户登录状态
|
||||
//#ifdef H5
|
||||
checkLogin()
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
function initConfig() {
|
||||
function initConfig() {
|
||||
useConfigStore().setConfig(config)
|
||||
}
|
||||
}
|
||||
|
||||
function checkLogin() {
|
||||
function checkLogin() {
|
||||
if (!getToken()) {
|
||||
proxy.$tab.reLaunch('/pages/login')
|
||||
proxy.$tab.reLaunch('/pages/login')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '@/static/scss/index.scss'
|
||||
@import '@/static/scss/index.scss'
|
||||
</style>
|
||||
|
||||
50
config.js
50
config.js
@ -1,29 +1,29 @@
|
||||
// 应用全局配置
|
||||
export default {
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api', //
|
||||
// baseUrl: '/prod-api', //前后端分离版的接口地址,转发代理 设置在了manifest.json文件中
|
||||
// baseUrl: 'http://192.168.3.27:18090', //前后端分离版的接口地址
|
||||
baseUrl: 'http://106.15.139.36:18090', //前后端分离版的接口地址
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api', //
|
||||
// baseUrl: '/prod-api', //前后端分离版的接口地址,转发代理 设置在了manifest.json文件中
|
||||
// baseUrl: 'http://192.168.3.27:18090', //前后端分离版的接口地址
|
||||
baseUrl: 'http://106.15.139.36:18090', //前后端分离版的接口地址
|
||||
//测试提交
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
name: "ruoyi-app",
|
||||
// 应用版本
|
||||
version: "1.2.0",
|
||||
// 应用logo
|
||||
logo: "/static/logo.png",
|
||||
// 官方网站
|
||||
site_url: "http://ruoyi.vip",
|
||||
// 政策协议
|
||||
agreements: [{
|
||||
title: "隐私政策",
|
||||
url: "https://ruoyi.vip/protocol.html"
|
||||
},
|
||||
{
|
||||
title: "用户服务协议",
|
||||
url: "https://ruoyi.vip/protocol.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
name: "ruoyi-app",
|
||||
// 应用版本
|
||||
version: "1.2.0",
|
||||
// 应用logo
|
||||
logo: "/static/logo.png",
|
||||
// 官方网站
|
||||
site_url: "http://ruoyi.vip",
|
||||
// 政策协议
|
||||
agreements: [{
|
||||
title: "隐私政策",
|
||||
url: "https://ruoyi.vip/protocol.html"
|
||||
},
|
||||
{
|
||||
title: "用户服务协议",
|
||||
url: "https://ruoyi.vip/protocol.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
47
main.js
47
main.js
@ -1,36 +1,35 @@
|
||||
// main.js
|
||||
import { createSSRApp } from 'vue'
|
||||
import {createSSRApp} from 'vue'
|
||||
import App from './App'
|
||||
import store from './store' // Vuex store(如果还在用)
|
||||
import { install } from './plugins' // 自定义插件
|
||||
import './permission' // 路由权限
|
||||
import { useDict } from '@/utils/dict'
|
||||
import {install} from './plugins' // 自定义插件
|
||||
import './permission' // 路由权限
|
||||
import {useDict} from '@/utils/dict'
|
||||
// import { createPinia } from 'pinia'
|
||||
import * as Pinia from 'pinia';
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
// const pinia = createPinia()
|
||||
const pinia = Pinia.createPinia()
|
||||
// ✅ 安全注册持久化插件
|
||||
if (piniaPluginPersistedstate) {
|
||||
pinia.use(piniaPluginPersistedstate)
|
||||
} else {
|
||||
console.warn('pinia-plugin-persistedstate not found, persistence may not work')
|
||||
}
|
||||
const app = createSSRApp(App)
|
||||
// const pinia = createPinia()
|
||||
const pinia = Pinia.createPinia()
|
||||
// ✅ 安全注册持久化插件
|
||||
if (piniaPluginPersistedstate) {
|
||||
pinia.use(piniaPluginPersistedstate)
|
||||
} else {
|
||||
console.warn('pinia-plugin-persistedstate not found, persistence may not work')
|
||||
}
|
||||
|
||||
app.use(pinia)
|
||||
// app.use(store) // 如果你还在用 Vuex,否则可删除
|
||||
app.use(pinia)
|
||||
// app.use(store) // 如果你还在用 Vuex,否则可删除
|
||||
|
||||
// 挂载全局方法
|
||||
app.config.globalProperties.useDict = useDict
|
||||
// 挂载全局方法
|
||||
app.config.globalProperties.useDict = useDict
|
||||
|
||||
// 安装其他插件
|
||||
install(app)
|
||||
// 安装其他插件
|
||||
install(app)
|
||||
|
||||
return {
|
||||
app,
|
||||
Pinia
|
||||
}
|
||||
return {
|
||||
app,
|
||||
Pinia
|
||||
}
|
||||
}
|
||||
@ -1,23 +1,23 @@
|
||||
{
|
||||
"name" : "若依移动端",
|
||||
"appid" : "__UNI__1863D69",
|
||||
"description" : "",
|
||||
"versionName" : "1.2.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
"name": "若依移动端",
|
||||
"appid": "__UNI__1863D69",
|
||||
"description": "",
|
||||
"versionName": "1.2.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
"modules" : {},
|
||||
"distribute" : {
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"modules": {},
|
||||
"distribute": {
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
@ -35,29 +35,29 @@
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
"ios": {
|
||||
"dSYMs": false
|
||||
},
|
||||
"sdkConfigs" : {}
|
||||
"sdkConfigs": {}
|
||||
}
|
||||
},
|
||||
"quickapp" : {},
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxccd7e2a0911b3397",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"es6" : false,
|
||||
"minified" : true,
|
||||
"postcss" : true
|
||||
"quickapp": {},
|
||||
"mp-weixin": {
|
||||
"appid": "wxccd7e2a0911b3397",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": false,
|
||||
"minified": true,
|
||||
"postcss": true
|
||||
},
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
"optimization": {
|
||||
"subPackages": true
|
||||
},
|
||||
"usingComponents" : true
|
||||
"usingComponents": true
|
||||
},
|
||||
"vueVersion" : "3",
|
||||
"h5" : {
|
||||
"template" : "static/index.html"
|
||||
"vueVersion": "3",
|
||||
"h5": {
|
||||
"template": "static/index.html"
|
||||
// "devServer" : {
|
||||
// "port" : 30088,
|
||||
// "https" : false,
|
||||
@ -75,11 +75,11 @@
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
},
|
||||
"title" : "RuoYi-App",
|
||||
"router" : {
|
||||
"mode" : "hash",
|
||||
"base" : "./"
|
||||
}
|
||||
},
|
||||
"title": "RuoYi-App",
|
||||
"router": {
|
||||
"mode": "hash",
|
||||
"base": "./"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"pinia-plugin-persistedstate": "^4.5.0"
|
||||
}
|
||||
"dependencies": {
|
||||
"pinia-plugin-persistedstate": "^4.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
333
pages.json
333
pages.json
@ -1,155 +1,184 @@
|
||||
{
|
||||
"pages": [{
|
||||
"path": "pages/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/register",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "若依移动端框架",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工作台"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/OrderManager/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/BusinessApproval/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商务审批"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/FinancialApproval/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "财务审批"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/OrderApproval/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/avatar/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改头像"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/info/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/info/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/pwd/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/setting/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "应用设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/help/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "常见问题"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/about/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/common/webview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览网页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/common/textview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览文本"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/BusinessApproval/OrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商务订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/FinancialApproval/OrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "财务订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/OrderApproval/OrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单审批详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/OrderManager/components/LookData",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"props": true
|
||||
// 开启 props 传参
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/OrderManager/components/NewAdd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/OrderManager/components/EditData",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改订单",
|
||||
"props": true
|
||||
// 开启 props 传参
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#000000",
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index",
|
||||
"iconPath": "static/images/tabbar/home.png",
|
||||
"selectedIconPath": "static/images/tabbar/home_.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/work/index",
|
||||
"iconPath": "static/images/tabbar/work.png",
|
||||
"selectedIconPath": "static/images/tabbar/work_.png",
|
||||
"text": "工作台"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine/index",
|
||||
"iconPath": "static/images/tabbar/mine.png",
|
||||
"selectedIconPath": "static/images/tabbar/mine_.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "RuoYi",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/register",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "若依移动端框架",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/work/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工作台"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/work/OrderManager/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单管理"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/work/BusinessApproval/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商务审批"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/work/FinancialApproval/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "财务审批"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/work/OrderApproval/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单审核"
|
||||
}
|
||||
},{
|
||||
"path": "pages/mine/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mine/avatar/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改头像"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mine/info/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人信息"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mine/info/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑资料"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mine/pwd/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mine/setting/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "应用设置"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mine/help/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "常见问题"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mine/about/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/common/webview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览网页"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/common/textview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览文本"
|
||||
}
|
||||
},{
|
||||
"path": "pages/work/BusinessApproval/OrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商务订单详情"
|
||||
}
|
||||
},{
|
||||
"path": "pages/work/FinancialApproval/OrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "财务订单详情"
|
||||
}
|
||||
},{
|
||||
"path": "pages/work/OrderApproval/OrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单审批详情"
|
||||
}
|
||||
},{
|
||||
"path": "pages/work/OrderManager/components/LookData",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"props": true // 开启 props 传参
|
||||
}
|
||||
},{
|
||||
"path": "pages/work/OrderManager/components/NewAdd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增订单"
|
||||
}
|
||||
},{
|
||||
"path": "pages/work/OrderManager/components/EditData",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改订单",
|
||||
"props": true // 开启 props 传参
|
||||
}
|
||||
}],
|
||||
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#000000",
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [{
|
||||
"pagePath": "pages/index",
|
||||
"iconPath": "static/images/tabbar/home.png",
|
||||
"selectedIconPath": "static/images/tabbar/home_.png",
|
||||
"text": "首页"
|
||||
}, {
|
||||
"pagePath": "pages/work/index",
|
||||
"iconPath": "static/images/tabbar/work.png",
|
||||
"selectedIconPath": "static/images/tabbar/work_.png",
|
||||
"text": "工作台"
|
||||
}, {
|
||||
"pagePath": "pages/mine/index",
|
||||
"iconPath": "static/images/tabbar/mine.png",
|
||||
"selectedIconPath": "static/images/tabbar/mine_.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "RuoYi",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,167 +1,169 @@
|
||||
<template>
|
||||
<view class="work-container">
|
||||
<!-- 轮播图 -->
|
||||
<uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
|
||||
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
|
||||
<swiper-item v-for="(item, index) in data" :key="index">
|
||||
<view class="swiper-item" @click="clickBannerItem(item)">
|
||||
<image :src="item.image" mode="aspectFill" :draggable="false" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</uni-swiper-dot>
|
||||
<view class="work-container">
|
||||
<!-- 轮播图 -->
|
||||
<uni-swiper-dot :current="current" :info="data" class="uni-swiper-dot-box" field="content">
|
||||
<swiper :current="swiperDotIndex" class="swiper-box" @change="changeSwiper">
|
||||
<swiper-item v-for="(item, index) in data" :key="index">
|
||||
<view class="swiper-item" @click="clickBannerItem(item)">
|
||||
<image :draggable="false" :src="item.image" mode="aspectFill"/>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</uni-swiper-dot>
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="系统管理" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
|
||||
<uni-grid-item @click="gotoOrderManager">
|
||||
<view class="grid-item-box" >
|
||||
<uni-icons type="person-filled" size="30"></uni-icons>
|
||||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="gotoBusiness">
|
||||
<view class="grid-item-box" >
|
||||
<uni-icons type="person-filled" size="30"></uni-icons>
|
||||
<text class="text">商务审批</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="gotoFinalcial">
|
||||
<view class="grid-item-box" >
|
||||
<uni-icons type="person-filled" size="30"></uni-icons>
|
||||
<text class="text">财务审批</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="gotoOrder">
|
||||
<view class="grid-item-box" >
|
||||
<uni-icons type="person-filled" size="30"></uni-icons>
|
||||
<text class="text">订单审核</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons type="staff-filled" size="30"></uni-icons>
|
||||
<text class="text">角色管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons type="color" size="30"></uni-icons>
|
||||
<text class="text">菜单管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons type="settings-filled" size="30"></uni-icons>
|
||||
<text class="text">部门管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons type="heart-filled" size="30"></uni-icons>
|
||||
<text class="text">岗位管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons type="bars" size="30"></uni-icons>
|
||||
<text class="text">字典管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons type="gear-filled" size="30"></uni-icons>
|
||||
<text class="text">参数设置</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box">
|
||||
<uni-icons type="chat-filled" size="30"></uni-icons>
|
||||
<text class="text">通知公告</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box">
|
||||
<uni-icons type="wallet-filled" size="30"></uni-icons>
|
||||
<text class="text">日志管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="系统管理" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
|
||||
<uni-grid-item @click="gotoOrderManager">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons size="30" type="person-filled"></uni-icons>
|
||||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="gotoOrder">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons size="30" type="person-filled"></uni-icons>
|
||||
<text class="text">订单审核</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="gotoFinalcial">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons size="30" type="person-filled"></uni-icons>
|
||||
<text class="text">财务审批</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="gotoBusiness">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons size="30" type="person-filled"></uni-icons>
|
||||
<text class="text">商务审批</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons size="30" type="staff-filled"></uni-icons>
|
||||
<text class="text">角色管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons size="30" type="color"></uni-icons>
|
||||
<text class="text">菜单管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons size="30" type="settings-filled"></uni-icons>
|
||||
<text class="text">部门管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons size="30" type="heart-filled"></uni-icons>
|
||||
<text class="text">岗位管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons size="30" type="bars"></uni-icons>
|
||||
<text class="text">字典管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box" @click="jiansheing">
|
||||
<uni-icons size="30" type="gear-filled"></uni-icons>
|
||||
<text class="text">参数设置</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box">
|
||||
<uni-icons size="30" type="chat-filled"></uni-icons>
|
||||
<text class="text">通知公告</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="grid-item-box">
|
||||
<uni-icons size="30" type="wallet-filled"></uni-icons>
|
||||
<text class="text">日志管理</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance } from "vue"
|
||||
import {getCurrentInstance, ref} from "vue"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const current = ref(0)
|
||||
const swiperDotIndex = ref(0)
|
||||
const data = ref([{ image: '/static/images/banner/banner02.jpg' }, { image: '/static/images/banner/banner03.jpg' }])
|
||||
const {proxy} = getCurrentInstance()
|
||||
const current = ref(0)
|
||||
const swiperDotIndex = ref(0)
|
||||
const data = ref([{image: '/static/images/banner/banner02.jpg'}, {image: '/static/images/banner/banner03.jpg'}])
|
||||
|
||||
function clickBannerItem(item) {
|
||||
function clickBannerItem(item) {
|
||||
console.info(item)
|
||||
}
|
||||
}
|
||||
|
||||
function changeSwiper(e) {
|
||||
function changeSwiper(e) {
|
||||
current.value = e.detail.current
|
||||
}
|
||||
}
|
||||
|
||||
function changeGrid(e) {
|
||||
function changeGrid(e) {
|
||||
// proxy.$modal.showToast('模块建设中~')
|
||||
}
|
||||
function jiansheing(e) {
|
||||
}
|
||||
|
||||
function jiansheing(e) {
|
||||
proxy.$modal.showToast('模块建设中~')
|
||||
}
|
||||
|
||||
const gotoBusiness = () =>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/work/BusinessApproval/index'
|
||||
})
|
||||
}
|
||||
const gotoFinalcial = () =>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/work/FinancialApproval/index'
|
||||
})
|
||||
}
|
||||
const gotoOrder = () =>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/work/OrderApproval/index'
|
||||
})
|
||||
}
|
||||
const gotoOrderManager = () =>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/work/OrderManager/index'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const gotoBusiness = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/work/BusinessApproval/index'
|
||||
})
|
||||
}
|
||||
const gotoFinalcial = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/work/FinancialApproval/index'
|
||||
})
|
||||
}
|
||||
const gotoOrder = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/work/OrderApproval/index'
|
||||
})
|
||||
}
|
||||
const gotoOrderManager = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/work/OrderManager/index'
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
view {
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.text {
|
||||
/* #endif */
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.grid-item-box {
|
||||
.grid-item-box {
|
||||
flex: 1;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
@ -170,23 +172,22 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-margin-wrap {
|
||||
.uni-margin-wrap {
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
;
|
||||
}
|
||||
width: 100%;;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
.swiper-box {
|
||||
height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
.swiper-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
@ -196,19 +197,19 @@
|
||||
color: #fff;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 500px) {
|
||||
@media screen and (min-width: 500px) {
|
||||
.uni-swiper-dot-box {
|
||||
width: 400px;
|
||||
/* #ifndef APP-NVUE */
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
margin-top: 8px;
|
||||
width: 400px;
|
||||
/* #ifndef APP-NVUE */
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
import { getToken } from '@/utils/auth'
|
||||
import {getToken} from '@/utils/auth'
|
||||
|
||||
// 登录页面
|
||||
const loginPage = "/pages/login"
|
||||
|
||||
|
||||
// 页面白名单
|
||||
const whiteList = [
|
||||
'/pages/login', '/pages/register', '/pages/common/webview/index'
|
||||
'/pages/login', '/pages/register', '/pages/common/webview/index'
|
||||
]
|
||||
|
||||
// 检查地址白名单
|
||||
function checkWhite(url) {
|
||||
const path = url.split('?')[0]
|
||||
return whiteList.indexOf(path) !== -1
|
||||
const path = url.split('?')[0]
|
||||
return whiteList.indexOf(path) !== -1
|
||||
}
|
||||
|
||||
// 页面跳转验证拦截器
|
||||
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
|
||||
list.forEach(item => {
|
||||
uni.addInterceptor(item, {
|
||||
invoke(to) {
|
||||
if (getToken()) {
|
||||
if (to.url === loginPage) {
|
||||
uni.reLaunch({ url: "/" })
|
||||
uni.addInterceptor(item, {
|
||||
invoke(to) {
|
||||
if (getToken()) {
|
||||
if (to.url === loginPage) {
|
||||
uni.reLaunch({url: "/"})
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
if (checkWhite(to.url)) {
|
||||
return true
|
||||
}
|
||||
uni.reLaunch({url: loginPage})
|
||||
return false
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
if (checkWhite(to.url)) {
|
||||
return true
|
||||
}
|
||||
uni.reLaunch({ url: loginPage })
|
||||
return false
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user