diff --git a/env/.env.development b/env/.env.development
index df941a6..5137213 100644
--- a/env/.env.development
+++ b/env/.env.development
@@ -5,5 +5,5 @@ VITE_DELETE_CONSOLE = false
# 是否开启sourcemap
VITE_SHOW_SOURCEMAP = true
-#VITE_SERVER_BASEURL = 'http://127.0.0.1:8080/jeecg-boot'
+#VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot'
VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
\ No newline at end of file
diff --git a/pages.config.ts b/pages.config.ts
index b6fd1f7..bf535c5 100644
--- a/pages.config.ts
+++ b/pages.config.ts
@@ -1,55 +1,55 @@
import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
export default defineUniPages({
- globalStyle: {
- navigationStyle: 'default',
- navigationBarTitleText: 'uniapp',
- navigationBarBackgroundColor: '#f8f8f8',
- navigationBarTextStyle: 'black',
- backgroundColor: '#FFFFFF',
- },
- easycom: {
- autoscan: true,
- custom: {
- '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
- '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
- 'z-paging/components/z-paging$1/z-paging$1.vue',
- },
- },
- tabBar: {
- color: '#aaa',
- selectedColor: '#39b54a',
- backgroundColor: '#F8F8F8',
- borderStyle: 'black',
- height: '50px',
- fontSize: '11px',
- iconWidth: '24px',
- spacing: '3px',
- list: [
- {
- iconPath: 'static/tabbar/tabbar-message-2.png',
- selectedIconPath: 'static/tabbar/tabbar-message.png',
- pagePath: 'pages/message/message',
- text: '消息',
- },
- {
- iconPath: 'static/tabbar/tabbar-home-2.png',
- selectedIconPath: 'static/tabbar/tabbar-home.png',
- pagePath: 'pages/index/index',
- text: '协作',
- },
- {
- iconPath: 'static/tabbar/tabbar-workHome-2.png',
- selectedIconPath: 'static/tabbar/tabbar-workHome.png',
- pagePath: 'pages/workHome/index',
- text: '工作台',
- },
- {
- iconPath: 'static/tabbar/tabbar-user-2.png',
- selectedIconPath: 'static/tabbar/tabbar-user.png',
- pagePath: 'pages/user/people',
- text: '个人',
- },
- ],
- },
-})
+ globalStyle: {
+ navigationStyle: 'default',
+ navigationBarTitleText: 'uniapp',
+ navigationBarBackgroundColor: '#f8f8f8',
+ navigationBarTextStyle: 'black',
+ backgroundColor: '#FFFFFF',
+ },
+ easycom: {
+ autoscan: true,
+ custom: {
+ '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
+ '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
+ 'z-paging/components/z-paging$1/z-paging$1.vue',
+ },
+ },
+ tabBar: {
+ color: '#aaa',
+ selectedColor: '#39b54a',
+ backgroundColor: '#F8F8F8',
+ borderStyle: 'black',
+ height: '50px',
+ fontSize: '11px',
+ iconWidth: '24px',
+ spacing: '3px',
+ list: [
+ {
+ iconPath: 'static/tabbar/tabbar-home-2.png',
+ selectedIconPath: 'static/tabbar/tabbar-home.png',
+ pagePath: 'pages/index/index',
+ text: '首页',
+ },
+ {
+ iconPath: 'static/tabbar/tabbar-message-2.png',
+ selectedIconPath: 'static/tabbar/tabbar-message.png',
+ pagePath: 'pages/message/message',
+ text: '消息',
+ },
+ {
+ iconPath: 'static/tabbar/tabbar-workHome-2.png',
+ selectedIconPath: 'static/tabbar/tabbar-workHome.png',
+ pagePath: 'pages/workHome/index',
+ text: '工作台',
+ },
+ {
+ iconPath: 'static/tabbar/tabbar-user-2.png',
+ selectedIconPath: 'static/tabbar/tabbar-user.png',
+ pagePath: 'pages/user/people',
+ text: '个人',
+ },
+ ],
+ },
+})
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 2759e92..90ed22f 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,20 +1,20 @@
+ .showArea {
+ position: relative;
+ width: fit-content;
+
+ .iconBox {
+ position: absolute;
+ right: 0;
+ top: 0;
+ border-bottom-left-radius: 3px;
+ padding: 3px 6px;
+ height: auto;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ color: #fff;
+ font-size: 12px;
+ line-height: 1;
+ border-radius: 2px;
+ }
+ }
+
+ .uploadArea {
+ width: 60px;
+ height: 60px;
+
+ .iconBox {
+ height: 100%;
+ width: 100%;
+ border: 2px solid #eee;
+ color: #8799a3;
+ margin: auto;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ font-size: 27px;
+ }
+ }
+
\ No newline at end of file
diff --git a/src/pages-user/userEdit/userEdit.vue b/src/pages-user/userEdit/userEdit.vue
index 33fc6e1..dc8319d 100644
--- a/src/pages-user/userEdit/userEdit.vue
+++ b/src/pages-user/userEdit/userEdit.vue
@@ -1,188 +1,162 @@
-{
- layout: 'default',
- style: {
- navigationBarTitleText: '',
- navigationStyle: 'custom',
- },
-}
+ {
+ layout: 'default',
+ style: {
+ navigationBarTitleText: '',
+ navigationStyle: 'custom',
+ },
+ }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ //
+ :deep(.wd-cell) {
+ .wd-cell__left {
+ width: 70px;
+ flex: none;
+ }
+
+ .wd-cell__value {
+ text-align: left;
+ }
+ }
+
\ No newline at end of file
diff --git a/src/pages.json b/src/pages.json
index 59b5baa..70a1002 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -23,18 +23,18 @@
"iconWidth": "24px",
"spacing": "3px",
"list": [
+ {
+ "iconPath": "static/tabbar/tabbar-home-2.png",
+ "selectedIconPath": "static/tabbar/tabbar-home.png",
+ "pagePath": "pages/index/index",
+ "text": "首页"
+ },
{
"iconPath": "static/tabbar/tabbar-message-2.png",
"selectedIconPath": "static/tabbar/tabbar-message.png",
"pagePath": "pages/message/message",
"text": "消息"
},
- {
- "iconPath": "static/tabbar/tabbar-home-2.png",
- "selectedIconPath": "static/tabbar/tabbar-home.png",
- "pagePath": "pages/index/index",
- "text": "协作"
- },
{
"iconPath": "static/tabbar/tabbar-workHome-2.png",
"selectedIconPath": "static/tabbar/tabbar-workHome.png",
@@ -51,12 +51,11 @@
},
"pages": [
{
- "path": "pages/index/index",
+ "path": "pages/login/login",
"type": "home",
- "layout": "default",
"style": {
"navigationStyle": "custom",
- "navigationBarTitleText": "首页"
+ "navigationBarTitleText": "登录页"
}
},
{
@@ -130,11 +129,12 @@
}
},
{
- "path": "pages/login/login",
+ "path": "pages/index/index",
"type": "page",
+ "layout": "default",
"style": {
"navigationStyle": "custom",
- "navigationBarTitleText": ""
+ "navigationBarTitleText": "主页"
}
},
{
diff --git a/src/pages/demo/demo.vue b/src/pages/demo/demo.vue
index 12a8f4e..f77694c 100644
--- a/src/pages/demo/demo.vue
+++ b/src/pages/demo/demo.vue
@@ -104,7 +104,7 @@
import { ref } from 'vue'
import { useRouter } from '@/plugin/uni-mini-router'
import { useToast, useMessage, useNotify } from 'wot-design-uni'
-import { us, os } from '@/common/work'
+// import { us, os } from '@/common/work'
import Grid from '@/components/Grid/Grid.vue'
const toast = useToast()
@@ -116,11 +116,11 @@ const { showNotify, closeNotify } = useNotify()
const router = useRouter()
const selected = ref([])
const gridData = ref([])
-us.data.forEach((item: any, index) => {
- if (index < 9) {
- gridData.value.push({ text: item.title, img: item.icon, itemKey: index })
- }
-})
+// us.data.forEach((item: any, index) => {
+// if (index < 9) {
+// gridData.value.push({ text: item.title, img: item.icon, itemKey: index })
+// }
+// })
// 图片预览
const imgPreview = ref({
show: false,
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index b1d361d..fd29d2a 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,334 +1,347 @@
-
-
-{
- layout: 'default',
- style: {
- navigationStyle: 'custom',
- navigationBarTitleText: '首页',
- },
-}
+
+ {
+ layout: 'default',
+ style: {
+ navigationStyle: 'custom',
+ navigationBarTitleText: '主页',
+ },
+ }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{!appStore.position?'暂未定位':appStore.position}}
+
+
+
+ {{appStore.temperature}}℃
+
+
+
+
+ {{getTime()}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .nav {
+ width: calc(100%);
+ height: v-bind(cusnavbarheight);
+ font-size: 24rpx;
+ color: #333333;
+ position: fixed;
+ z-index: 99;
+ background-image: url('@/static/navbg.png');
+ background-repeat: no-repeat;
+ background-size: 750rpx 458rpx;
+ }
+
+ .nav_box {
+ position: absolute;
+ bottom: 6rpx;
+ width: calc(100% - 60rpx);
+ left: 30rpx;
+ right: 30rpx;
+ }
+
+ .weather_calender {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-wrap: nowrap;
+
+ .position {
+ display: flex;
+ align-items: center;
+ white-space: nowrap;
+
+ image {
+ width: 36rpx;
+ height: 36rpx;
+ margin-right: 8rpx;
+ }
+ }
+
+ /* 左对齐 */
+ .position-left {
+ justify-content: flex-start;
+ }
+
+ /* 居中 */
+ .position-center {
+ justify-content: center;
+ }
+
+ /* 右对齐 */
+ .position-right {
+ justify-content: flex-end;
+ }
+ }
+
+ .scrollView {
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ background-color: #f1f1f1;
+
+ :deep(.wd-row) {
+ background-color: #fff;
+ margin-bottom: 32upx;
+
+ .wd-col {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ .wd-img {
+ margin: 20upx;
+ margin-left: 0;
+ }
+
+ .textBox {
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+
+ .wd-text {
+ color: #666;
+ }
+ }
+ }
+ }
+
+ .serveBox {
+ margin-bottom: 32upx;
+ background-color: #fff;
+
+ .title {
+ display: flex;
+ align-items: center;
+ padding-left: 30upx;
+ height: 52px;
+
+ .dot {
+ width: 14upx;
+ height: 14upx;
+ background-color: #0081ff;
+ border-radius: 100%;
+ margin-right: 20upx;
+ }
+
+ .wd-text {
+ color: #666;
+ font-size: 15px;
+ }
+ }
+ }
+ }
+
+ .swiper {
+ height: 575upx;
+ flex: none;
+
+ image {
+ width: 100%;
+ display: block;
+ height: 100%;
+ margin: 0;
+ }
+
+ }
+
+
\ No newline at end of file
diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue
index ca080f2..3048157 100644
--- a/src/pages/login/login.vue
+++ b/src/pages/login/login.vue
@@ -1,8 +1,9 @@
-
+
+
{
style: {
navigationStyle: 'custom',
- navigationBarTitleText: '',
+ navigationBarTitleText: '登录页',
},
}
@@ -12,7 +13,6 @@
-
@@ -56,41 +56,23 @@
import { useAppStore } from '@/store'
import { useUserStore } from '@/store/user'
import { http } from '@/utils/http'
- import {
- ACCESS_TOKEN,
- USER_NAME,
- USER_INFO,
- APP_ROUTE,
- APP_CONFIG,
- HOME_CONFIG_EXPIRED_TIME,
- HOME_PAGE,
- } from '@/common/constants'
- // import { cache, getFileAccessHttpUrl } from '@/common/uitls'
+ import { HOME_PAGE } from '@/common/constants'
import { useRouter } from '@/plugin/uni-mini-router'
- // import { useParamsStore } from '@/store/page-params'
import Base64 from 'base-64';
import { loginApi } from '@/api/system';
defineOptions({
name: 'login',
options: {
- // apply-shared:当前页面样式会影响到子组件样式.(小程序)
- // shared:当前页面样式影响到子组件,子组件样式也会影响到当前页面.(小程序)
styleIsolation: 'shared',
},
})
const router = useRouter()
- // const defLogo = 'https://static.jeecg.com/files/app_logo.png'
const loading = ref(false)
const userName = ref()
const password = ref()
const showPassword = ref(false) //是否显示明文
const remPW = ref(false) //是否记住密码
- // const compLogo = ref(defLogo)
- // const compTitle = ref('Jeecg Uniapp')
- // const paramsStore = useParamsStore()
- // paramsStore.reset()
- // let isLocalConfig = true
/**h5系统信息中没有appWgtVersion值*/
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync().appVersion
const toast = useToast()
@@ -123,9 +105,9 @@
let pw = Base64.encode(encodeURIComponent(password.value))
loading.value = true
/*生产环境 begin */
- // loginApi({ username: un, password: pw })
- /*开发环境 begin */
- loginApi({ username: userName.value, password: password.value, captcha: 'app' })
+ loginApi({ username: un, password: pw })
+ /*开发环境 begin */
+ // loginApi({ username: userName.value, password: password.value, captcha: 'app' })
.then((res : any) => {
if (res.success) {
const { result } = res
@@ -137,6 +119,7 @@
username: userInfo.username,
realname: userInfo.realname,
avatar: userInfo.avatar,
+ post: userInfo.post,
tenantId: userInfo.loginTenantId,
localStorageTime: +new Date(),
})
@@ -161,63 +144,6 @@
remPW.value = uni.getStorageSync('savePwd')
}
})
- // const appConfig = () => {
- // if (isLocalConfig) {
- // toast.success('登录成功!')
- // router.pushTab({ path: HOME_PAGE })
- // } else {
- // http
- // .get('/eoa/sysAppConfig/queryAppConfigRoute')
- // .then((res : any) => {
- // if (res.success) {
- // cache(APP_ROUTE, res.result.route, HOME_CONFIG_EXPIRED_TIME)
- // cache(APP_CONFIG, res.result.config, HOME_CONFIG_EXPIRED_TIME)
- // }
- // toast.success('登录成功!')
- // router.pushTab({ path: HOME_PAGE })
- // })
- // .catch((err) => {
- // toast.success('登录成功!')
- // router.pushTab({ path: HOME_PAGE })
- // })
- // }
- // }
-
- // const loadConfig = () => {
- // http.get('/eoa/sysAppConfig/queryAppConfig').then((res : any) => {
- // if (res.success) {
- // let info = res.result
- // if (info) {
- // compLogo.value = getFileAccessHttpUrl(info.appLogo) || defLogo
- // compTitle.value = info.appTitle || 'JEECG-BOOT'
- // } else {
- // compLogo.value = defLogo
- // }
- // }
- // })
- // }
- // const checkToken = () => {
- // const { userInfo, clearUserInfo } = userStore
- // if (userInfo.token) {
- // if (+new Date() - userInfo.localStorageTime > 2 * 3600000) {
- // // 超过2小时过期
- // clearUserInfo()
- // } else {
- // router.pushTab({ path: HOME_PAGE })
- // }
- // } else {
- // clearUserInfo()
- // }
- // }
- // const checkAccount = () => { }
- // // #ifdef APP-PLUS || H5
- // checkToken()
- // checkAccount()
- // // #endif
- // // @ts-ignore
- // if (isLocalConfig === false) {
- // loadConfig()
- // }
+ //
+ .avatar-area {
+ /* #ifdef MP-WEIXIN */
+ background-image: url('https://static.jeecg.com/upload/test/blue_1595818030310.png');
+ /* #endif */
+ /* #ifndef MP-WEIXIN */
+ background-image: url('@/static/blue.png');
+ /* #endif */
+ background-size: cover;
+ height: 400upx;
+ display: flex;
+ justify-content: center;
+ padding-top: 40upx;
+ overflow: hidden;
+ position: relative;
+ flex-direction: column;
+ align-items: center;
+ color: #fff;
+ font-weight: 300;
+ text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
+ }
+
+ .info-area {
+ display: flex;
+ padding: 30upx;
+ background-color: #fff;
+ color: #8799a3;
+ justify-content: space-around;
+ /* 新增:均匀分配空间 */
+
+ :deep(.wd-text) {
+ color: var(--color-gray);
+ }
+
+ .user,
+ .job,
+ .department {
+ flex: 1 1 auto;
+ /* 修改:允许项目增长 */
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 0 15upx;
+ /* 新增:增加内边距扩大间距 */
+ min-width: 0;
+ /* 新增:防止文本溢出 */
+
+ .tag {
+ display: flex;
+ align-items: center;
+ }
+
+ .wd-text.title {
+ font-size: 18px;
+ min-height: 18px;
+ margin-bottom: 16upx;
+ white-space: nowrap;
+ /* 新增:防止文本换行 */
+ overflow: hidden;
+ /* 新增:隐藏溢出 */
+ text-overflow: ellipsis;
+ /* 新增:显示省略号 */
+ max-width: 100%;
+ /* 新增:限制最大宽度 */
+ }
+ }
+
+ .user {
+ border-right: 0.5px solid rgba(0, 0, 0, 0.1);
+
+ .wd-text.title {
+ color: #f37b1d;
+ }
+ }
+
+ .job {
+ .wd-text.title {
+ color: #39b54a;
+ }
+ }
+
+ .department {
+ border-right: 0.5px solid rgba(0, 0, 0, 0.1);
+
+ .wd-text.title {
+ color: #aa00ff;
+ }
+ }
+ }
+
+ :deep(.wd-cell-group) {
+ margin: 0 26upx;
+ border-radius: 18upx;
+ overflow: hidden;
+ --wot-cell-line-height: 32px;
+
+ .wd-cell {
+ --wot-cell-title-fs: 15px;
+ --wot-cell-title-color: var(--color-gray);
+
+ .wd-cell__left {
+ font-size: 15px;
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/src/static/app/icons/1024x1024.png b/src/static/app/icons/1024x1024.png
deleted file mode 100644
index 9eaa596..0000000
Binary files a/src/static/app/icons/1024x1024.png and /dev/null differ
diff --git a/src/static/app/icons/120x120.png b/src/static/app/icons/120x120.png
deleted file mode 100644
index 22690e3..0000000
Binary files a/src/static/app/icons/120x120.png and /dev/null differ
diff --git a/src/static/app/icons/144x144.png b/src/static/app/icons/144x144.png
deleted file mode 100644
index 6060e5e..0000000
Binary files a/src/static/app/icons/144x144.png and /dev/null differ
diff --git a/src/static/app/icons/152x152.png b/src/static/app/icons/152x152.png
deleted file mode 100644
index 1d8ad19..0000000
Binary files a/src/static/app/icons/152x152.png and /dev/null differ
diff --git a/src/static/app/icons/167x167.png b/src/static/app/icons/167x167.png
deleted file mode 100644
index 76a30cb..0000000
Binary files a/src/static/app/icons/167x167.png and /dev/null differ
diff --git a/src/static/app/icons/180x180.png b/src/static/app/icons/180x180.png
deleted file mode 100644
index 93e9508..0000000
Binary files a/src/static/app/icons/180x180.png and /dev/null differ
diff --git a/src/static/app/icons/192x192.png b/src/static/app/icons/192x192.png
deleted file mode 100644
index 5e6a2f3..0000000
Binary files a/src/static/app/icons/192x192.png and /dev/null differ
diff --git a/src/static/app/icons/20x20.png b/src/static/app/icons/20x20.png
deleted file mode 100644
index 8e224bf..0000000
Binary files a/src/static/app/icons/20x20.png and /dev/null differ
diff --git a/src/static/app/icons/29x29.png b/src/static/app/icons/29x29.png
deleted file mode 100644
index 4b09ac2..0000000
Binary files a/src/static/app/icons/29x29.png and /dev/null differ
diff --git a/src/static/app/icons/40x40.png b/src/static/app/icons/40x40.png
deleted file mode 100644
index aa196b8..0000000
Binary files a/src/static/app/icons/40x40.png and /dev/null differ
diff --git a/src/static/app/icons/58x58.png b/src/static/app/icons/58x58.png
deleted file mode 100644
index 68eda33..0000000
Binary files a/src/static/app/icons/58x58.png and /dev/null differ
diff --git a/src/static/app/icons/60x60.png b/src/static/app/icons/60x60.png
deleted file mode 100644
index 03ed9be..0000000
Binary files a/src/static/app/icons/60x60.png and /dev/null differ
diff --git a/src/static/app/icons/72x72.png b/src/static/app/icons/72x72.png
deleted file mode 100644
index b502d3e..0000000
Binary files a/src/static/app/icons/72x72.png and /dev/null differ
diff --git a/src/static/app/icons/76x76.png b/src/static/app/icons/76x76.png
deleted file mode 100644
index 05975bd..0000000
Binary files a/src/static/app/icons/76x76.png and /dev/null differ
diff --git a/src/static/app/icons/80x80.png b/src/static/app/icons/80x80.png
deleted file mode 100644
index e80c306..0000000
Binary files a/src/static/app/icons/80x80.png and /dev/null differ
diff --git a/src/static/app/icons/87x87.png b/src/static/app/icons/87x87.png
deleted file mode 100644
index afe3bce..0000000
Binary files a/src/static/app/icons/87x87.png and /dev/null differ
diff --git a/src/static/app/icons/96x96.png b/src/static/app/icons/96x96.png
deleted file mode 100644
index 7d0d1f9..0000000
Binary files a/src/static/app/icons/96x96.png and /dev/null differ
diff --git a/src/static/index/128/qingjia.png b/src/static/index/128/qingjia.png
deleted file mode 100644
index 3738861..0000000
Binary files a/src/static/index/128/qingjia.png and /dev/null differ
diff --git a/src/static/index/128/chuchai.png b/src/static/index/index/absence.png
similarity index 100%
rename from src/static/index/128/chuchai.png
rename to src/static/index/index/absence.png
diff --git a/src/static/index/128/qingjia1.png b/src/static/index/index/absenceData.png
similarity index 100%
rename from src/static/index/128/qingjia1.png
rename to src/static/index/index/absenceData.png
diff --git a/src/static/index/index/calendar.png b/src/static/index/index/calendar.png
new file mode 100644
index 0000000..990d0de
Binary files /dev/null and b/src/static/index/index/calendar.png differ
diff --git a/src/static/index/128/gongwen.png b/src/static/index/index/document.png
similarity index 100%
rename from src/static/index/128/gongwen.png
rename to src/static/index/index/document.png
diff --git a/src/static/index/128/duanxin.png b/src/static/index/index/duanxin.png
similarity index 100%
rename from src/static/index/128/duanxin.png
rename to src/static/index/index/duanxin.png
diff --git a/src/static/index/128/richang.png b/src/static/index/index/duty.png
similarity index 100%
rename from src/static/index/128/richang.png
rename to src/static/index/index/duty.png
diff --git a/src/static/index/128/hetong.png b/src/static/index/index/health.png
similarity index 100%
rename from src/static/index/128/hetong.png
rename to src/static/index/index/health.png
diff --git a/src/static/index/128/kehu.png b/src/static/index/index/healthData.png
similarity index 100%
rename from src/static/index/128/kehu.png
rename to src/static/index/index/healthData.png
diff --git a/src/static/index/128/kaoqin.png b/src/static/index/index/kaoqin.png
similarity index 100%
rename from src/static/index/128/kaoqin.png
rename to src/static/index/index/kaoqin.png
diff --git a/src/static/index/128/tongxun.png b/src/static/index/index/manual.png
similarity index 100%
rename from src/static/index/128/tongxun.png
rename to src/static/index/index/manual.png
diff --git a/src/static/index/128/more.png b/src/static/index/index/more.png
similarity index 100%
rename from src/static/index/128/more.png
rename to src/static/index/index/more.png
diff --git a/src/static/index/128/xinwen.png b/src/static/index/index/notice.png
similarity index 100%
rename from src/static/index/128/xinwen.png
rename to src/static/index/index/notice.png
diff --git a/src/static/index/128/huiyi.png b/src/static/index/index/peopleData.png
similarity index 100%
rename from src/static/index/128/huiyi.png
rename to src/static/index/index/peopleData.png
diff --git a/src/static/index/index/position.png b/src/static/index/index/position.png
new file mode 100644
index 0000000..14ee508
Binary files /dev/null and b/src/static/index/index/position.png differ
diff --git a/src/static/index/128/liucheng.png b/src/static/index/index/regulation.png
similarity index 100%
rename from src/static/index/128/liucheng.png
rename to src/static/index/index/regulation.png
diff --git a/src/static/index/128/renwu.png b/src/static/index/index/renwu.png
similarity index 100%
rename from src/static/index/128/renwu.png
rename to src/static/index/index/renwu.png
diff --git a/src/static/index/128/richeng.png b/src/static/index/index/richeng.png
similarity index 100%
rename from src/static/index/128/richeng.png
rename to src/static/index/index/richeng.png
diff --git a/src/static/index/128/wendang.png b/src/static/index/index/system.png
similarity index 100%
rename from src/static/index/128/wendang.png
rename to src/static/index/index/system.png
diff --git a/src/static/index/128/tongzhi.png b/src/static/index/index/tongzhi.png
similarity index 100%
rename from src/static/index/128/tongzhi.png
rename to src/static/index/index/tongzhi.png
diff --git a/src/static/index/128/toupiao.png b/src/static/index/index/toupiao.png
similarity index 100%
rename from src/static/index/128/toupiao.png
rename to src/static/index/index/toupiao.png
diff --git a/src/static/index/128/youjian.png b/src/static/index/index/youjian.png
similarity index 100%
rename from src/static/index/128/youjian.png
rename to src/static/index/index/youjian.png
diff --git a/src/static/index/128/zhoubao.png b/src/static/index/index/zhoubao.png
similarity index 100%
rename from src/static/index/128/zhoubao.png
rename to src/static/index/index/zhoubao.png
diff --git a/src/static/navbg.png b/src/static/navbg.png
new file mode 100644
index 0000000..794136b
Binary files /dev/null and b/src/static/navbg.png differ
diff --git a/src/store/index.ts b/src/store/index.ts
index bb81b1e..5958050 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -1,7 +1,9 @@
import { createPinia, defineStore } from 'pinia'
import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化
-import { upDateAppApi } from '@/api/system';
-import { hasNewVersion, onClickUpdate } from '@/utils/index';
+import { upDateAppApi } from '@/api/system'
+import { hasNewVersion, onClickUpdate } from '@/utils/index'
+import { getEnvBaseUrl } from '@/utils/index'
+
const store = createPinia()
store.use(
createPersistedState({
@@ -14,11 +16,27 @@ store.use(
export const useAppStore = defineStore('app', {
state: () => ({
isGray: 0 as 0 | 1, // 0=正常,1=灰化
+ position: null, //市
+ location: null, //省市区
+ temperature: null, //温度
+ weather: null //天气
}),
actions: {
setIsGray(value : 0 | 1) {
this.isGray = value
},
+ setPosition(value : string) {
+ this.position = value
+ },
+ setLocation(value : string) {
+ this.location = value
+ },
+ setTemperature(value : number) {
+ this.temperature = value
+ },
+ setWeather(value : string) {
+ this.weather = value
+ },
},
persist: true, // 启用持久化
})
@@ -45,8 +63,8 @@ export const useUpdateApp = defineStore('updateApp', () => {
let {
result
} = res
- result.apkUrl = import.meta.env.VITE_SERVER_BASEURL + '/sys/common/static/' + result.apkUrl;
- result.wgtUrl = import.meta.env.VITE_SERVER_BASEURL + '/sys/common/static/' + result.wgtUrl
+ result.apkUrl = getEnvBaseUrl() + '/sys/common/static/' + result.apkUrl
+ result.wgtUrl = getEnvBaseUrl() + '/sys/common/static/' + result.wgtUrl
updateOptions.wgtUrl = result.wgtUrl
if (systemInfo.osName === 'android') {
// Android
diff --git a/src/store/user.ts b/src/store/user.ts
index 9584b9a..e969b17 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -1,50 +1,58 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
+import { queryDepByOrgCodeApi } from '@/api/system/department'
const initState = {
- token: '',
- userid: '',
- username: '',
- realname: '',
- welcome: '',
- avatar: '',
- tenantId: 0,
- phone: '',
- email: '',
- sex: 1,
- // 本地存储时间
- localStorageTime: 0,
+ token: '',
+ userid: '',
+ username: '',
+ realname: '',
+ avatar: '',
+ tenantId: 0,
+ phone: '',
+ email: '',
+ // sex: 1,
+ post: '',
+ orgCode: '',
+ workNo: '',
+ // 本地存储时间
+ localStorageTime: 0,
}
export const useUserStore = defineStore(
- 'user',
- () => {
- const userInfo = ref({ ...initState })
- const setUserInfo = (val: IUserInfo) => {
- userInfo.value = val
- }
- const clearUserInfo = () => {
- userInfo.value = { ...initState }
- }
- const editUserInfo = (options) => {
- userInfo.value = { ...userInfo.value, ...options }
- }
- // 一般没有reset需求,不需要的可以删除
- const reset = () => {
- userInfo.value = { ...initState }
- }
- const isLogined = computed(() => !!userInfo.value.token)
- return {
- userInfo,
- setUserInfo,
- clearUserInfo,
- isLogined,
- editUserInfo,
- reset,
- }
- },
- {
- // 如果需要持久化就写 true, 不需要持久化就写 false(或者去掉这个配置项)
- persist: true,
- },
-)
+ 'user',
+ () => {
+ const userInfo = ref({ ...initState })
+ const setUserInfo = (val : IUserInfo) => {
+ userInfo.value = val
+ if (val.orgCode) {
+ queryDepByOrgCodeApi(val.orgCode).then((res : any) => {
+ userInfo.value.department = res.result; // 假设 API 返回 { result: "部门名称" }
+ })
+ }
+ }
+ const clearUserInfo = () => {
+ userInfo.value = { ...initState }
+ }
+ const editUserInfo = (options) => {
+ userInfo.value = { ...userInfo.value, ...options }
+ }
+ // 一般没有reset需求,不需要的可以删除
+ const reset = () => {
+ userInfo.value = { ...initState }
+ }
+ const isLogined = computed(() => !!userInfo.value.token)
+ return {
+ userInfo,
+ setUserInfo,
+ clearUserInfo,
+ isLogined,
+ editUserInfo,
+ reset,
+ }
+ },
+ {
+ // 如果需要持久化就写 true, 不需要持久化就写 false(或者去掉这个配置项)
+ persist: true,
+ },
+)
\ No newline at end of file
diff --git a/src/style/custom/icon.css b/src/style/custom/icon.css
index 16ed121..c0c6f1e 100644
--- a/src/style/custom/icon.css
+++ b/src/style/custom/icon.css
@@ -741,6 +741,16 @@
content: "\e736";
}
+.cuIcon-homefill:before {
+ content: "\e6bb";
+}
+.cuIcon-home:before {
+ content: "\e6bc";
+}
+.cuIcon-group:before {
+ content: "\e753";
+}
+
.cuIcon-servicefill:before {
content: "\e737";
}
diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts
index 7f3fca8..a14a780 100644
--- a/src/types/uni-pages.d.ts
+++ b/src/types/uni-pages.d.ts
@@ -4,7 +4,7 @@
// Generated by vite-plugin-uni-pages
interface NavigateToOptions {
- url: "/pages/index/index" |
+ url: "/pages/login/login" |
"/pages/about/about" |
"/pages/annotation/annotationDetail" |
"/pages/annotation/annotationList" |
@@ -13,7 +13,7 @@ interface NavigateToOptions {
"/pages/demo/indexBar" |
"/pages/demo/selectPicker" |
"/pages/demo/tree" |
- "/pages/login/login" |
+ "/pages/index/index" |
"/pages/message/message" |
"/pages/more/more" |
"/pages/user/people" |
@@ -36,7 +36,7 @@ interface NavigateToOptions {
interface RedirectToOptions extends NavigateToOptions {}
interface SwitchTabOptions {
- url: "/pages/message/message" | "/pages/index/index" | "/pages/workHome/index" | "/pages/user/people"
+ url: "/pages/index/index" | "/pages/message/message" | "/pages/workHome/index" | "/pages/user/people"
}
type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;
diff --git a/src/typings.d.ts b/src/typings.d.ts
index 0711543..29838cf 100644
--- a/src/typings.d.ts
+++ b/src/typings.d.ts
@@ -1,37 +1,40 @@
// 全局要用的类型放到这里
declare global {
- type IResData = {
- code: number
- msg: string
- data: T
- }
+ type IResData = {
+ code : number
+ msg : string
+ data : T
+ }
- // uni.uploadFile文件上传参数
- type IUniUploadFileOptions = {
- file?: File
- files?: UniApp.UploadFileOptionFiles[]
- filePath?: string
- name?: string
- formData?: any
- }
+ // uni.uploadFile文件上传参数
+ type IUniUploadFileOptions = {
+ file ?: File
+ files ?: UniApp.UploadFileOptionFiles[]
+ filePath ?: string
+ name ?: string
+ formData ?: any
+ }
- type IUserInfo = {
- token?: string
- userid?: string
- username?: string
- realname?: string
- welcome?: string
- avatar?: string
- tenantId?: string | number
- sex?: number
- phone?: string
- email?: string
- /** 微信的 openid,非微信没有这个字段 */
- openid?: string
- // 存到本地的时间戳
- localStorageTime: number
- }
+ type IUserInfo = {
+ token ?: string
+ userid ?: string
+ username ?: string
+ realname ?: string
+ orgCode ?: string
+ department ?: string
+ workNo ?: string
+ avatar ?: string
+ tenantId ?: string | number
+ // sex ?: number
+ phone ?: string
+ post ?: string
+ email ?: string
+ /** 微信的 openid,非微信没有这个字段 */
+ openid ?: string
+ // 存到本地的时间戳
+ localStorageTime : number
+ }
}
-export {} // 防止模块污染
+export { } // 防止模块污染
\ No newline at end of file
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 7b561a3..1d328b2 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -1,5 +1,6 @@
import { pages, subPackages, tabBar } from '@/pages.json'
import { isMpWeixin } from './platform'
+import { useAppStore } from '@/store'
const getLastPage = () => {
// getCurrentPages() 至少有1个元素,所以不再额外判断
@@ -103,7 +104,7 @@ export const getAllPages = (key = 'needLogin') => {
})
})
const result = [...mainPages, ...subPages]
- // console.log(`getAllPages by ${key} result: `, result)
+ console.log(`getAllPages by ${key} result: `, result)
return result
}
@@ -317,4 +318,117 @@ function installApp(tempFilePath : string) {
})
)
// #endif
+}
+
+/**
+ * 定位
+ */
+export const getLocation = () => {
+ const store = useAppStore()
+ // 先尝试获取位置,失败时再回退
+ uni.getLocation({
+ type: 'wgs84',
+ success: function (position) {
+ // 成功获取位置后请求地理编码
+ uni.request({
+ url: 'http://api.tianditu.gov.cn/geocoder',
+ method: 'GET',
+ data: {
+ postStr: JSON.stringify({
+ lon: position.longitude,
+ lat: position.latitude,
+ ver: 1
+ }),
+ type: 'geocode',
+ tk: '30fe0f0c1b2320e112bde797f3ddaff4'
+ },
+ success: function (res : any) {
+ let data = res.data;
+ if (data.status == 0) {
+ const obj = data.result.addressComponent
+ store.setPosition(obj.city ? obj.city : obj.province) //市
+ store.setLocation(obj.city ? obj.province + obj.city + obj.county : obj.province + obj.county) //省市区
+ getWeather(position.latitude, position.longitude)
+ } else {
+ handleDefaultLocation()
+ }
+ },
+ fail: function (err) {
+ uni.showToast({
+ title: '位置解析失败',
+ icon: 'error'
+ })
+ handleDefaultLocation()
+ }
+ });
+ },
+ fail: function (err) {
+ // 根据不同错误码处理
+ if (err.errCode === 2 || err.errCode === 12) {
+ // 2: 位置服务不可用, 12: 定位权限未开启
+ uni.showToast({
+ title: '请开启定位服务',
+ icon: 'error'
+ })
+
+ } else {
+ uni.showToast({
+ title: '定位获取失败',
+ icon: 'error'
+ })
+ }
+ handleDefaultLocation()
+ }
+ });
+}
+
+const getWeather = (lat : string, lon : string) => {
+ let params = {
+ lat: lat,
+ lon: lon
+ }
+ weatherRequest(params)
+}
+
+// 处理默认位置和天气
+function handleDefaultLocation() {
+ useAppStore().setPosition('濮阳市')
+ weatherRequest({
+ q: '濮阳市'
+ })
+}
+
+
+function weatherRequest(params: { lat?: string; lon?: string; q?: string }) {
+ const store = useAppStore()
+ uni.request({
+ url: 'https://api.openweathermap.org/data/2.5/weather',
+ method: 'GET',
+ data: {
+ ...params,
+ appid: '600a60694b0e453dfbaafa862f1d1482',
+ lang: 'zh_cn'
+ },
+ success: function (res : any) {
+ if (res.data && res.data.main && res.data.weather) {
+ store.setTemperature(
+ Math.round(res.data.main.temp - 273.15)
+ )
+ store.setWeather(
+ res.data.weather[0].icon
+ )
+ } else {
+ uni.showToast({
+ title: '天气数据格式错误',
+ icon: 'error'
+ })
+ }
+ },
+ fail: function () {
+ uni.showToast({
+ title: '天气获取失败',
+ icon: 'error'
+ })
+ }
+ });
}
\ No newline at end of file
diff --git a/src/utils/signMd5Utils.ts b/src/utils/signMd5Utils.ts
index 392c546..7be92fc 100644
--- a/src/utils/signMd5Utils.ts
+++ b/src/utils/signMd5Utils.ts
@@ -39,7 +39,7 @@ export default class signMd5Utils {
//update-end---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签---
let requestBody:any = this.sortAsc(jsonObj);
delete requestBody._t;
- console.log('sign requestBody:', requestBody);
+ // console.log('sign requestBody:', requestBody);
return md5(JSON.stringify(requestBody) + signatureSecret).toUpperCase();
}
/**
diff --git a/tsconfig.json b/tsconfig.json
index 5a1a0f1..f49bcdd 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -29,8 +29,7 @@
},
"exclude": ["node_modules"],
"include": [
- "src/**/*.ts",
- "src/**/*.js",
+ "src/**/*",
"src/**/*.d.ts",
"src/**/*.min.js",
"src/**/*.tsx",