diff --git a/src/App.vue b/src/App.vue
index 293e203..e42042e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,259 +1,223 @@
-
-
-
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 1bd9629..df12b47 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -9,47 +9,67 @@
}
},
"pages": [
- {
- "path": "pages/integrated/visitor/index",
- "style": {
- "navigationBarTitleText": "访客申请",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/integrated/visitor/myvisitor",
- "style": {
- "navigationBarTitleText": "申请记录",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/integrated/visitor/myyyvisitor",
- "style": {
- "navigationBarTitleText": "访客邀约",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/integrated/visitor/myyyvisitorlist",
- "style": {
- "navigationBarTitleText": "邀约记录",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/integrated/visitor/verify",
- "style": {
- "navigationBarTitleText": "访客核销",
- "navigationStyle": "custom"
- }
- },
+// {
+// "path": "pages/tabbar/canteen",
+// "style": {
+// "navigationBarTitleText": "食堂",
+// "disableScroll": true
+// }
+// },
+// {
+// "path": "pages/tabbar/selfMerchant",
+// "style": {
+// "navigationBarTitleText": "自营商家",
+// "disableScroll": true
+// }
+// },
+// {
+// "path": "pages/tabbar/coopMerchant",
+// "style": {
+// "navigationBarTitleText": "合作商家",
+// "disableScroll": true
+// }
+// },
+// {
+// "path": "pages/tabbar/order",
+// "style": {
+// "navigationBarTitleText": "订单",
+// "disableScroll": true
+// }
+// },
+// {
+// "path": "pages/tabbar/flowStatistics",
+// "style": {
+// "navigationBarTitleText": "流水统计",
+// "disableScroll": true
+// }
+// },
+// {
+// "path": "pages/tabbar/individualOrder",
+// "style": {
+// "navigationBarTitleText": "订单",
+// "disableScroll": true
+// }
+// },
+// {
+// "path": "pages/integrated/visitor/myvisitor",
+// "style": {
+// "navigationBarTitleText": "访客",
+// "disableScroll": true
+// }
+// },
{
"path": "pages/tabbar/my",
"style": {
"navigationBarTitleText": "我的",
"disableScroll": true
}
+ },
+ {
+ "path": "pages/integrated/visitor/verify",
+ "style": {
+ "navigationStyle": "custom"
+ }
}
],
"subPackages": [
@@ -351,7 +371,7 @@
{
"path": "visitor/myyyvisitor",
"style": {
- "navigationBarTitleText": "访客邀约"
+ "navigationBarTitleText": "邀约访客"
}
}
]
@@ -392,39 +412,118 @@
{
"pagePath": "pages/integrated/visitor/index",
"text": "访客申请",
- "iconPath": "static/tabbar/visitor-apply.png",
- "selectedIconPath": "static/tabbar/visitor-apply-select.png"
+ "iconPath": "",
+ "selectedIconPath": ""
},
{
"pagePath": "pages/integrated/visitor/myvisitor",
"text": "申请记录",
- "iconPath": "static/tabbar/visitor-record.png",
- "selectedIconPath": "static/tabbar/visitor-record-select.png"
+ "iconPath": "",
+ "selectedIconPath": ""
},
{
"pagePath": "pages/integrated/visitor/myyyvisitor",
"text": "访客邀约",
- "iconPath": "static/tabbar/visitor-invite.png",
- "selectedIconPath": "static/tabbar/visitor-invite-select.png"
+ "iconPath": "",
+ "selectedIconPath": ""
},
{
"pagePath": "pages/integrated/visitor/myyyvisitorlist",
"text": "邀约记录",
- "iconPath": "static/tabbar/visitor-invited.png",
- "selectedIconPath": "static/tabbar/visitor-invited-select.png"
+ "iconPath": "",
+ "selectedIconPath": ""
},
{
"pagePath": "pages/integrated/visitor/verify",
- "text": "访客核销",
- "iconPath": "static/tabbar/visitor-verify.png",
- "selectedIconPath": "static/tabbar/visitor-verify-select.png"
+ "text": "核销",
+ "iconPath": "",
+ "selectedIconPath": ""
},
- {
- "pagePath": "pages/tabbar/my",
- "text": "我的",
- "iconPath": "static/tabbar/my.png",
- "selectedIconPath": "static/tabbar/my-select.png"
- }
+// {
+// "pagePath": "pages/tabbar/canteen",
+// "text": "",
+// "iconPath": "",
+// "selectedIconPath": ""
+// },
+// {
+// "pagePath": "pages/tabbar/selfMerchant",
+// "text": "",
+// "iconPath": "",
+// "selectedIconPath": ""
+// },
+// {
+// "pagePath": "pages/tabbar/coopMerchant",
+// "text": "",
+// "iconPath": "",
+// "selectedIconPath": ""
+// },
+// {
+// "pagePath": "pages/tabbar/order",
+// "text": "",
+// "iconPath": "",
+// "selectedIconPath": ""
+// },
+// {
+// "pagePath": "pages/tabbar/flowStatistics",
+// "text": "",
+// "iconPath": "",
+// "selectedIconPath": ""
+// },
+// {
+// "pagePath": "pages/tabbar/individualOrder",
+// "text": "",
+// "iconPath": "",
+// "selectedIconPath": ""
+// },
+// {
+// "pagePath": "pages/tabbar/my",
+// "text": "",
+// "iconPath": "",
+// "selectedIconPath": ""
+// }
+ // {
+ // "pagePath": "pages/tabbar/canteen",
+ // "text": "食堂",
+ // "iconPath": "static/tabbar/canteen.png",
+ // "selectedIconPath": "static/tabbar/canteen-select.png"
+ // },
+ // {
+ // "pagePath": "pages/tabbar/selfMerchant",
+ // "text": "自营商家",
+ // "iconPath": "static/tabbar/selfMerchant.png",
+ // "selectedIconPath": "static/tabbar/selfMerchant-select.png"
+ // },
+ // {
+ // pagePath: "pages/tabbar/coopMerchant",
+ // text: "合作商家",
+ // iconPath: "static/tabbar/coopMerchant.png",
+ // selectedIconPath: "static/tabbar/coopMerchant-select.png",
+ // },
+ // {
+ // "pagePath": "pages/tabbar/order",
+ // "text": "订单",
+ // "iconPath": "static/tabbar/order.png",
+ // "selectedIconPath": "static/tabbar/order-select.png"
+ // },
+ // {
+ // "pagePath": "pages/tabbar/flowStatistics",
+ // "text": "流水统计",
+ // "iconPath": "static/tabbar/order.png",
+ // "selectedIconPath": "static/tabbar/order-select.png"
+ // },
+ // {
+ // "pagePath": "pages/tabbar/individualOrder",
+ // "text": "订单",
+ // "iconPath": "static/tabbar/order.png",
+ // "selectedIconPath": "static/tabbar/order-select.png"
+ // },
+ {
+ "pagePath": "pages/tabbar/my",
+ "text": "我的",
+ "iconPath": "static/tabbar/my.png",
+ "selectedIconPath": "static/tabbar/my-select.png"
+ }
+
]
}
}
diff --git a/src/pages/integrated/visitor/myyyvisitorlist.vue b/src/pages/integrated/visitor/myyyvisitorlist.vue
index 0332231..5c100bf 100644
--- a/src/pages/integrated/visitor/myyyvisitorlist.vue
+++ b/src/pages/integrated/visitor/myyyvisitorlist.vue
@@ -69,6 +69,30 @@
暂无数据
+
+
+
+
+
+ 访客申请
+
+
+
+ 申请记录
+
+
+
+ 主动邀约
+
+
+
+ 邀约记录
+
+
+
+ 我的
+
+
@@ -338,7 +362,7 @@ defineExpose({
.page-container {
min-height: 100vh;
background-color: #f5f5f5;
- padding-bottom: 20rpx; // 修改底部间距
+ padding-bottom: 120rpx; // 为底部导航留出空间
}
.status-tabs {
@@ -482,4 +506,40 @@ defineExpose({
color: #999;
font-size: 26rpx;
}
+
+.bottom-nav {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 100rpx;
+ background-color: #fff;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ border-top: 1rpx solid #eee;
+ padding-bottom: env(safe-area-inset-bottom); // 适配iPhone底部安全区
+
+ .nav-item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 10rpx 0;
+
+ .nav-icon {
+ width: 44rpx;
+ height: 44rpx;
+ margin-bottom: 4rpx;
+ }
+
+ .nav-text {
+ font-size: 20rpx;
+ color: #999;
+
+ &.active {
+ color: #1777FF;
+ }
+ }
+ }
+}
diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue
index 8313fa5..69407a4 100644
--- a/src/pages/tabbar/my.vue
+++ b/src/pages/tabbar/my.vue
@@ -16,7 +16,7 @@
ID {{ state.userInfo?.sysUser?.userId }}
-
+
请先登录
@@ -42,40 +42,6 @@
切换角色
-
-
-
@@ -114,7 +80,7 @@ const state = reactive<{
// { text: "访客记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myvisitor" },
// { text: "访客邀约", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitor" },
// { text: "邀约记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitorlist" },
- { text: "访客核销", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/verify" },
+ // { text: "访客核销", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/verify" },
// { text: "意见反馈", icon: "/static/icon/service_5.png", router: "/pages/integrated/feedback/index" }
],
@@ -159,59 +125,6 @@ const storage = {
},
}
-// 添加登录相关的状态
-const showLogin = ref(false)
-const loginForm = reactive({
- username: '',
- password: ''
-})
-
-// 显示登录弹窗
-const showLoginPopup = () => {
- showLogin.value = true
-}
-
-// 关闭登录弹窗
-const closeLoginPopup = () => {
- showLogin.value = false
- loginForm.username = ''
- loginForm.password = ''
-}
-
-// 处理账号密码登录
-const handleLogin = async () => {
- if (!loginForm.username || !loginForm.password) {
- uni.showToast({
- title: '请输入账号和密码',
- icon: 'none'
- })
- return
- }
-
- try {
- uni.showLoading({ title: '登录中...', mask: true })
- const response = await userApi.login({
- username: loginForm.username,
- password: loginForm.password
- })
-
- if (response.code === 0) {
- storage.saveToken({ accessToken: response.data.accessToken })
- const { data: userData } = await userApi.userInfo()
- storage.saveUserInfo(userData)
- closeLoginPopup()
- uni.showToast({ title: '登录成功', icon: 'none' })
- } else {
- uni.showToast({ title: response.msg || '登录失败', icon: 'none' })
- }
- } catch (error) {
- console.error('登录失败:', error)
- uni.showToast({ title: '登录失败', icon: 'none' })
- } finally {
- uni.hideLoading()
- }
-}
-
const login = {
// 检查应用环境并登录
checkAppInfo: async () => {
@@ -224,8 +137,10 @@ const login = {
const zhengdingResult = login.zhengdingLogin()
if (zhengdingResult) return
- // 如果都不是,显示账号密码登录弹窗
- showLoginPopup()
+ // 显示账号密码登录界面
+ uni.navigateTo({
+ url: '/pages/user/login'
+ })
} catch (error) {
console.error("登录失败:", error)
uni.showToast({ title: "登录失败", icon: "none" })
@@ -335,6 +250,33 @@ const login = {
changeRole: () => {
router.jump("/pages/user/userRole")
},
+
+ // 账号密码登录
+ accountLogin: async (username: string, password: string) => {
+ try {
+ uni.showLoading({ title: "登录中...", mask: true })
+ const response = await userApi.login({ username, password })
+
+ if (response.code == 0) {
+ storage.saveToken({ accessToken: response.data.accessToken })
+ uni.hideLoading()
+ uni.showToast({ title: "登录成功", icon: "none" })
+
+ const { data: userData } = await userApi.userInfo()
+ storage.saveUserInfo(userData)
+ return true
+ } else {
+ uni.hideLoading()
+ storage.clearUserStorage()
+ uni.showToast({ title: response.msg || "登录失败", icon: "none" })
+ return false
+ }
+ } catch (error) {
+ uni.hideLoading()
+ uni.showToast({ title: "登录失败", icon: "none" })
+ return false
+ }
+ },
}
const scanCode = {
@@ -481,93 +423,4 @@ onShow(() => {
border-bottom: 1px solid #fafafa;
margin-bottom: 40rpx;
}
-
-// 添加登录弹窗样式
-.login-popup {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 100;
-
- .popup-mask {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.4);
- }
-
- .popup-content {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- background: #fff;
- border-radius: 24rpx 24rpx 0 0;
- }
-
- .popup-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 32rpx;
- border-bottom: 1rpx solid #f5f5f5;
-
- .popup-title {
- font-size: 32rpx;
- color: #323233;
- font-weight: 500;
- }
-
- .popup-close {
- font-size: 40rpx;
- color: #969799;
- padding: 10rpx;
- }
- }
-
- .popup-body {
- padding: 32rpx;
- }
-
- .input-item {
- margin-bottom: 24rpx;
-
- .input {
- width: 100%;
- height: 88rpx;
- background: #F7F8FA;
- border-radius: 8rpx;
- padding: 0 24rpx;
- font-size: 30rpx;
- color: #323233;
- }
-
- .placeholder {
- color: #969799;
- }
- }
-
- .popup-footer {
- padding: 24rpx 32rpx;
- background: #fff;
- border-top: 1rpx solid #f5f5f5;
-
- .login-btn {
- width: 100%;
- height: 88rpx;
- background: #1989FA;
- border-radius: 44rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- font-size: 32rpx;
- font-weight: 500;
- }
- }
-}