Merge branch 'jxfk' of http://gitea.zianxin.com/zianxin-tec/biz-mobile-react-cloud
This commit is contained in:
commit
8b8032688b
15 files changed
+25878
-523
No files matched your search
@@ -34,5 +34,7 @@ VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
|
||||
#VITE_APP_PROD_SERVICE = http://59.202.170.152:81/api # 信创线上
|
||||
#VITE_APP_PROD_SERVICE = http://123.156.228.134:48080/app-api
|
||||
|
||||
# VITE_APP_PROD_SERVICE = http://60.12.184.86:8089/api
|
||||
|
||||
# --------------------------- 生产环境 图片访问基础地址 ---------------------------
|
||||
VITE_APP_PROD_IMAGE = https://stgl.pj.gov.cn/api # 域名线上
|
||||
Generated
+21474
File diff suppressed because it is too large.
Load diff
@@ -58,6 +58,7 @@
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001",
|
||||
"@vant/weapp": "^1.11.7",
|
||||
"@vue/compiler-core": "^3.5.11",
|
||||
"@zebra-ui/swiper": "^2.2.8",
|
||||
"crypto-js": "^4.2.0",
|
||||
@@ -65,6 +66,7 @@
|
||||
"gdt-jsapi": "^1.9.51",
|
||||
"luch-request": "^3.1.1",
|
||||
"pinia": "^2.2.6",
|
||||
"qrcode": "^1.5.4",
|
||||
"qs": "^6.13.1",
|
||||
"radash": "^12.1.0",
|
||||
"vue": "^3.3.11",
|
||||
|
||||
+80
-48
@@ -17,54 +17,86 @@ interface TabbarItem {
|
||||
}
|
||||
|
||||
const tabbar: TabbarItem[] = [
|
||||
{
|
||||
pagePath: "pages/tabbar/canteen",
|
||||
text: "食堂",
|
||||
iconPath: "/static/tabbar/canteen.png",
|
||||
selectedIconPath: "/static/tabbar/canteen-select.png",
|
||||
launchParam: ["canteen"],
|
||||
auth: [],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/tabbar/selfMerchant",
|
||||
text: "自营商家",
|
||||
iconPath: "/static/tabbar/selfMerchant.png",
|
||||
selectedIconPath: "/static/tabbar/selfMerchant-select.png",
|
||||
launchParam: ["selfMerchant"],
|
||||
auth: [],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/tabbar/coopMerchant",
|
||||
text: "合作商家",
|
||||
iconPath: "/static/tabbar/coopMerchant.png",
|
||||
selectedIconPath: "/static/tabbar/coopMerchant-select.png",
|
||||
launchParam: ["selfMerchant"],
|
||||
auth: ["user"],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/tabbar/order",
|
||||
text: "订单",
|
||||
iconPath: "/static/tabbar/order.png",
|
||||
selectedIconPath: "/static/tabbar/order-select.png",
|
||||
launchParam: ["canteen", "selfMerchant"],
|
||||
auth: ["user"],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/tabbar/flowStatistics",
|
||||
text: "流水统计",
|
||||
iconPath: "/static/tabbar/order.png",
|
||||
selectedIconPath: "/static/tabbar/order-select.png",
|
||||
launchParam: [],
|
||||
auth: ["merchant"],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/tabbar/individualOrder",
|
||||
text: "订单",
|
||||
iconPath: "/static/tabbar/order.png",
|
||||
selectedIconPath: "/static/tabbar/order-select.png",
|
||||
launchParam: [],
|
||||
auth: ["merchant"],
|
||||
},
|
||||
// {
|
||||
// pagePath: "pages/tabbar/canteen",
|
||||
// text: "食堂",
|
||||
// iconPath: "/static/tabbar/canteen.png",
|
||||
// selectedIconPath: "/static/tabbar/canteen-select.png",
|
||||
// launchParam: ["canteen"],
|
||||
// auth: [],
|
||||
// },
|
||||
// {
|
||||
// pagePath: "pages/tabbar/selfMerchant",
|
||||
// text: "自营商家",
|
||||
// iconPath: "/static/tabbar/selfMerchant.png",
|
||||
// selectedIconPath: "/static/tabbar/selfMerchant-select.png",
|
||||
// launchParam: ["selfMerchant"],
|
||||
// auth: [],
|
||||
// },
|
||||
// {
|
||||
// pagePath: "pages/tabbar/coopMerchant",
|
||||
// text: "合作商家",
|
||||
// iconPath: "/static/tabbar/coopMerchant.png",
|
||||
// selectedIconPath: "/static/tabbar/coopMerchant-select.png",
|
||||
// launchParam: ["selfMerchant"],
|
||||
// auth: ["user"],
|
||||
// },
|
||||
// {
|
||||
// pagePath: "pages/tabbar/order",
|
||||
// text: "订单",
|
||||
// iconPath: "/static/tabbar/order.png",
|
||||
// selectedIconPath: "/static/tabbar/order-select.png",
|
||||
// launchParam: ["canteen", "selfMerchant"],
|
||||
// auth: ["user"],
|
||||
// },
|
||||
// {
|
||||
// pagePath: "pages/tabbar/flowStatistics",
|
||||
// text: "流水统计",
|
||||
// iconPath: "/static/tabbar/order.png",
|
||||
// selectedIconPath: "/static/tabbar/order-select.png",
|
||||
// launchParam: [],
|
||||
// auth: ["merchant"],
|
||||
// },
|
||||
// {
|
||||
// pagePath: "pages/tabbar/individualOrder",
|
||||
// text: "订单",
|
||||
// iconPath: "/static/tabbar/order.png",
|
||||
// selectedIconPath: "/static/tabbar/order-select.png",
|
||||
// launchParam: [],
|
||||
// auth: ["merchant"],
|
||||
// },
|
||||
{
|
||||
pagePath: "pages/integrated/visitor/index",
|
||||
text: "访客申请",
|
||||
iconPath: "/static/tabbar/my.png",
|
||||
selectedIconPath: "/static/tabbar/my-select.png",
|
||||
launchParam: ["canteen", "selfMerchant"],
|
||||
auth: ["user",],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/integrated/visitor/myvisitor",
|
||||
text: "申请记录",
|
||||
iconPath: "/static/tabbar/my.png",
|
||||
selectedIconPath: "/static/tabbar/my-select.png",
|
||||
launchParam: ["canteen", "selfMerchant"],
|
||||
auth: ["user",],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/integrated/visitor/myyyvisitor",
|
||||
text: "主动邀约",
|
||||
iconPath: "/static/tabbar/my.png",
|
||||
selectedIconPath: "/static/tabbar/my-select.png",
|
||||
launchParam: ["canteen", "selfMerchant"],
|
||||
auth: ["user",],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/integrated/visitor/myyyvisitorlist",
|
||||
text: "邀约记录",
|
||||
iconPath: "/static/tabbar/my.png",
|
||||
selectedIconPath: "/static/tabbar/my-select.png",
|
||||
launchParam: ["canteen", "selfMerchant"],
|
||||
auth: ["user",],
|
||||
},
|
||||
{
|
||||
pagePath: "pages/tabbar/my",
|
||||
text: "我的",
|
||||
|
||||
+13
-2
@@ -8,6 +8,8 @@
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"renderer": "native",
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
@@ -53,9 +55,18 @@
|
||||
"mp-weixin": {
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
"urlCheck": false,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true
|
||||
},
|
||||
"usingComponents": true
|
||||
"usingComponents": true,
|
||||
"requiredPrivateInfos": ["getLocation"],
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
|
||||
+528
-469
@@ -1,469 +1,528 @@
|
||||
{
|
||||
"easycom": {
|
||||
"autoscan": true,
|
||||
"custom": {
|
||||
"^base-(.*)": "@/sheep/components/base/base-$1/base-$1.vue",
|
||||
"^crud-(.*)": "@/sheep/components/crud/crud-$1/crud-$1.vue",
|
||||
"^tm-(.*)": "@/uni_modules/tm-ui/components/tm-$1/tm-$1.vue",
|
||||
"^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue"
|
||||
}
|
||||
},
|
||||
"pages": [
|
||||
{
|
||||
"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/tabbar/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pages/shop",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "brandDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "product-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/apply",
|
||||
"pages": [
|
||||
{
|
||||
"path": "foreign-apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "foreign-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "foreign-items",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stride-apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stride-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stride-items",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/boxes",
|
||||
"pages": [
|
||||
{
|
||||
"path": "apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "apply-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/merchant",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "food",
|
||||
"style": {
|
||||
"navigationBarTitleText": "菜谱",
|
||||
"navigationBarBackgroundColor": "#1777FF",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "product-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/order",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/refund",
|
||||
"pages": [
|
||||
{
|
||||
"path": "apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "history",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/test",
|
||||
"pages": [
|
||||
{
|
||||
"path": "login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/wallet",
|
||||
"pages": [
|
||||
{
|
||||
"path": "list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "recharge",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/human-face",
|
||||
"pages": [
|
||||
{
|
||||
"path": "list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/user",
|
||||
"pages": [
|
||||
{
|
||||
"path": "userRole",
|
||||
"style": {
|
||||
"navigationBarTitleText": "用户身份",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/pay",
|
||||
"pages": [
|
||||
{
|
||||
"path": "scanPay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "payComplete",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付完成",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "transferMoney",
|
||||
"style": {
|
||||
"navigationBarTitleText": "转账",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/cabinet",
|
||||
"pages": [
|
||||
{
|
||||
"path": "buy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择支付方式",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "cabinetList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智能柜列表",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "cabinetDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智能柜详情",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "replenishment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品补货",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "putaway",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品上架",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "feedback/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "意见反馈"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "浦江小程序",
|
||||
"navigationBarBackgroundColor": "#1777FF",
|
||||
"backgroundColor": "#ecf4f9",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"tabBar": {
|
||||
"list": [
|
||||
{
|
||||
"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"
|
||||
// },
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
"easycom": {
|
||||
"autoscan": true,
|
||||
"custom": {
|
||||
"^base-(.*)": "@/sheep/components/base/base-$1/base-$1.vue",
|
||||
"^crud-(.*)": "@/sheep/components/crud/crud-$1/crud-$1.vue",
|
||||
"^tm-(.*)": "@/uni_modules/tm-ui/components/tm-$1/tm-$1.vue",
|
||||
"^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue"
|
||||
}
|
||||
},
|
||||
"pages": [
|
||||
// {
|
||||
// "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": [
|
||||
{
|
||||
"root": "pages/shop",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "brandDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "product-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/apply",
|
||||
"pages": [
|
||||
{
|
||||
"path": "foreign-apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "foreign-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "foreign-items",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stride-apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stride-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stride-items",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/boxes",
|
||||
"pages": [
|
||||
{
|
||||
"path": "apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "apply-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/merchant",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "food",
|
||||
"style": {
|
||||
"navigationBarTitleText": "菜谱",
|
||||
"navigationBarBackgroundColor": "#1777FF",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "product-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/order",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/refund",
|
||||
"pages": [
|
||||
{
|
||||
"path": "apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "history",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/test",
|
||||
"pages": [
|
||||
{
|
||||
"path": "login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/wallet",
|
||||
"pages": [
|
||||
{
|
||||
"path": "list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "recharge",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/human-face",
|
||||
"pages": [
|
||||
{
|
||||
"path": "list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/user",
|
||||
"pages": [
|
||||
{
|
||||
"path": "userRole",
|
||||
"style": {
|
||||
"navigationBarTitleText": "用户身份",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/pay",
|
||||
"pages": [
|
||||
{
|
||||
"path": "scanPay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "payComplete",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付完成",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "transferMoney",
|
||||
"style": {
|
||||
"navigationBarTitleText": "转账",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "feedback/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "意见反馈"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "visitor/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "visitor/myvisitor",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "visitor/myyyvisitor",
|
||||
"style": {
|
||||
"navigationBarTitleText": "邀约访客"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "visitor/myyyvisitorlist",
|
||||
"style": {
|
||||
"navigationBarTitleText": "邀约记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "visitor/visitorDetail",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "记录详情"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "浦江小程序",
|
||||
"navigationBarBackgroundColor": "#1777FF",
|
||||
"backgroundColor": "#ecf4f9",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"tabBar": {
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/integrated/visitor/index",
|
||||
"text": "访客申请",
|
||||
"iconPath": "",
|
||||
"selectedIconPath": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/integrated/visitor/myvisitor",
|
||||
"text": "申请记录",
|
||||
"iconPath": "",
|
||||
"selectedIconPath": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/integrated/visitor/myyyvisitor",
|
||||
"text": "访客邀约",
|
||||
"iconPath": "",
|
||||
"selectedIconPath": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/integrated/visitor/myyyvisitorlist",
|
||||
"text": "邀约记录",
|
||||
"iconPath": "",
|
||||
"selectedIconPath": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/integrated/visitor/verify",
|
||||
"text": "核销",
|
||||
"iconPath": "",
|
||||
"selectedIconPath": ""
|
||||
},
|
||||
// {
|
||||
// "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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,490 @@
|
||||
<template>
|
||||
<view class="visitor-list">
|
||||
<!-- 顶部标签页 -->
|
||||
<view class="tabs">
|
||||
<view
|
||||
v-for="(tab, index) in tabs"
|
||||
:key="index"
|
||||
class="tab-item"
|
||||
:class="{ active: currentTab === index }"
|
||||
@tap="switchTab(index)"
|
||||
>
|
||||
<text>{{ tab }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 访客记录列表 -->
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="list-content"
|
||||
:refresher-enabled="true"
|
||||
:refresher-triggered="refreshing"
|
||||
@refresherrefresh="onRefresh"
|
||||
@scrolltolower="loadMore"
|
||||
>
|
||||
<view
|
||||
v-for="item in visitorList"
|
||||
:key="item.id"
|
||||
class="visitor-item"
|
||||
@tap="goToDetail(item)"
|
||||
>
|
||||
<view class="item-header">
|
||||
<text class="visit-time">{{ formatTime(item.vstartDate, item.vendDate) }}</text>
|
||||
<text :class="['status-tag', getStatusClass(item.checkStatus)]">
|
||||
{{ getStatusText(item.checkStatus) }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="info-row">
|
||||
<text class="label">接待人:</text>
|
||||
<text class="value">{{ item.userName }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">联系方式:</text>
|
||||
<text class="value">{{ item.mobile }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">预约时间:</text>
|
||||
<text class="value">{{ formatCreateTime(item.createTime) }}</text>
|
||||
</view>
|
||||
<view v-if="item.description" class="info-row">
|
||||
<text class="label">备注:</text>
|
||||
<text class="value">{{ item.description }}</text>
|
||||
</view>
|
||||
<view v-if="item.checkReason" class="info-row check-reason">
|
||||
<text class="label">审核意见:</text>
|
||||
<text class="value">{{ item.checkReason }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-footer" v-if="canCancel(item.checkStatus) || canVisit(item.checkStatus)">
|
||||
<view class="btn-group">
|
||||
<view
|
||||
v-if="canVisit(item.checkStatus)"
|
||||
class="visit-btn"
|
||||
@tap="handleVisit(item)"
|
||||
>已到访</view>
|
||||
<view
|
||||
v-if="canCancel(item.checkStatus)"
|
||||
class="cancel-btn"
|
||||
@tap="handleCancel(item)"
|
||||
>取消</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载状态 -->
|
||||
<view v-if="loading && !refreshing" class="loading">加载中...</view>
|
||||
<view v-if="!loading && !hasMore" class="no-more">没有更多数据了</view>
|
||||
<view v-if="!loading && visitorList.length === 0" class="empty">
|
||||
暂无访客记录
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import visitorApi from '@/sheep/api/integrated/visitors'
|
||||
|
||||
// 标签页配置
|
||||
const tabs = ['全部', '待审核', '待到访', '已到访', '已取消']
|
||||
const currentTab = ref(0)
|
||||
|
||||
// 列表数据
|
||||
const visitorList = ref<any[]>([])
|
||||
const loading = ref(false)
|
||||
const refreshing = ref(false)
|
||||
const hasMore = ref(true)
|
||||
const current = ref(1)
|
||||
const size = 10
|
||||
|
||||
// 格式化访问时间
|
||||
const formatTime = (start: string, end: string) => {
|
||||
if (!start || !end) return ''
|
||||
const startDate = new Date(start)
|
||||
const endDate = new Date(end)
|
||||
return `${startDate.getMonth() + 1}/${startDate.getDate()} ${startDate.getHours()}:00-${endDate.getHours()}:00`
|
||||
}
|
||||
|
||||
// 格式化创建时间
|
||||
const formatCreateTime = (time: string) => {
|
||||
if (!time) return ''
|
||||
const date = new Date(time)
|
||||
return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()} ${date.getHours()}:${date.getMinutes()}`
|
||||
}
|
||||
|
||||
// 获取状态文本
|
||||
const getStatusText = (status: string) => {
|
||||
const statusMap: Record<string, string> = {
|
||||
'1': '待审核',
|
||||
'2': '待到访',
|
||||
'0': '已到访',
|
||||
'5': '已取消'
|
||||
}
|
||||
return statusMap[status] || status
|
||||
}
|
||||
|
||||
// 获取状态样式
|
||||
const getStatusClass = (status: string) => {
|
||||
const statusMap: Record<string, string> = {
|
||||
'1': 'status-pending',
|
||||
'2': 'status-waiting',
|
||||
'0': 'status-visited',
|
||||
'5': 'status-cancelled'
|
||||
}
|
||||
return statusMap[status] || ''
|
||||
}
|
||||
|
||||
// 切换标签页
|
||||
const switchTab = (index: number) => {
|
||||
if (currentTab.value === index) return
|
||||
currentTab.value = index
|
||||
resetList()
|
||||
getVisitorList()
|
||||
}
|
||||
|
||||
// 重置列表状态
|
||||
const resetList = () => {
|
||||
current.value = 1
|
||||
visitorList.value = []
|
||||
hasMore.value = true
|
||||
}
|
||||
|
||||
// 获取访客记录列表
|
||||
const getVisitorList = async () => {
|
||||
if (loading.value || (!hasMore.value && !refreshing.value)) return
|
||||
loading.value = true
|
||||
|
||||
try {
|
||||
const params: any = {
|
||||
current: current.value,
|
||||
size
|
||||
}
|
||||
|
||||
// 添加状态筛选
|
||||
if (currentTab.value > 0) {
|
||||
const statusMap = ['', '1', '2', '0', '5']
|
||||
params.checkStatus = statusMap[currentTab.value]
|
||||
}
|
||||
|
||||
const { code, data } = await visitorApi.getVisitorList(params)
|
||||
|
||||
if (code === 0 && data) {
|
||||
if (refreshing.value || current.value === 1) {
|
||||
visitorList.value = data.records || []
|
||||
} else {
|
||||
visitorList.value.push(...(data.records || []))
|
||||
}
|
||||
|
||||
hasMore.value = (data.records || []).length === size
|
||||
if (hasMore.value) {
|
||||
current.value++
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取访客记录失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'none'
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
refreshing.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 下拉刷新
|
||||
const onRefresh = async () => {
|
||||
refreshing.value = true
|
||||
resetList()
|
||||
await getVisitorList()
|
||||
}
|
||||
|
||||
// 上拉加载更多
|
||||
const loadMore = () => {
|
||||
if (!loading.value && hasMore.value) {
|
||||
getVisitorList()
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是否可以取消
|
||||
const canCancel = (status: string) => {
|
||||
return status === '1' || status === '2' || status === '5'
|
||||
}
|
||||
|
||||
// 判断是否可以标记到访
|
||||
const canVisit = (status: string) => {
|
||||
return status === '2'
|
||||
}
|
||||
|
||||
// 修改取消预约方法
|
||||
const handleCancel = (item: any) => {
|
||||
if (!item.id) return
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要取消此次预约吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '取消中...',
|
||||
mask: true
|
||||
})
|
||||
|
||||
const { code, msg } = await visitorApi.cancelVisitor(item.id)
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
title: '取消成功',
|
||||
icon: 'success'
|
||||
})
|
||||
// 刷新列表
|
||||
resetList()
|
||||
getVisitorList()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg || '取消失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '取消失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 处理到访
|
||||
const handleVisit = (item: any) => {
|
||||
if (!item.id) return
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认访客已到访?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
})
|
||||
|
||||
const { code, msg } = await visitorApi.haveVisitor(item.id)
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success'
|
||||
})
|
||||
// 刷新列表
|
||||
resetList()
|
||||
getVisitorList()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg || '操作失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 跳转到详情页
|
||||
const goToDetail = (item: any) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/integrated/visitor/visitorDetail?id=${item.id}&token=${item.token}`
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getVisitorList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.visitor-list {
|
||||
min-height: 100vh;
|
||||
background: #F7F8FA;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
padding: 0 32rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
position: relative;
|
||||
|
||||
&.active {
|
||||
color: #1989FA;
|
||||
font-weight: 500;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 40rpx;
|
||||
height: 4rpx;
|
||||
background: #1989FA;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-content {
|
||||
padding: 108rpx 32rpx 32rpx;
|
||||
}
|
||||
|
||||
.visitor-item {
|
||||
background: #fff;
|
||||
border-radius: 12rpx;
|
||||
padding: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.visit-time {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
font-size: 24rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 4rpx;
|
||||
|
||||
&.status-pending {
|
||||
background: #FFF3E0;
|
||||
color: #FF9800;
|
||||
}
|
||||
|
||||
&.status-waiting {
|
||||
background: #E3F2FD;
|
||||
color: #2196F3;
|
||||
}
|
||||
|
||||
&.status-visited {
|
||||
background: #E8F5E9;
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
&.status-cancelled {
|
||||
background: #EEEEEE;
|
||||
color: #9E9E9E;
|
||||
}
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
width: 140rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&.check-reason {
|
||||
margin-top: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
border-top: 1rpx solid #F5F5F5;
|
||||
|
||||
.value {
|
||||
color: #FF4D4F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-footer {
|
||||
margin-top: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
border-top: 1rpx solid #F5F5F5;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.cancel-btn, .visit-btn {
|
||||
padding: 12rpx 32rpx;
|
||||
border-radius: 32rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
border: 1rpx solid #DCDEE0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.visit-btn {
|
||||
background: #1989FA;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.loading, .no-more, .empty {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,672 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<view class="form-header">
|
||||
<text>我要邀约</text>
|
||||
</view>
|
||||
|
||||
<view class="form-content">
|
||||
<view class="form-item">
|
||||
<text class="label">访客姓名<text class="required">*</text></text>
|
||||
<input
|
||||
class="uni-input"
|
||||
type="text"
|
||||
v-model="form.name"
|
||||
placeholder="请输入真实姓名"
|
||||
placeholder-style="color: #999999;"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">访客手机号<text class="required">*</text></text>
|
||||
<input
|
||||
class="uni-input"
|
||||
type="number"
|
||||
v-model="form.mobile"
|
||||
placeholder="请输入手机号"
|
||||
placeholder-style="color: #999999;"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">来访公司名称</text>
|
||||
<input
|
||||
class="uni-input"
|
||||
type="text"
|
||||
v-model="form.companyName"
|
||||
placeholder="请输入公司名称"
|
||||
placeholder-style="color: #999999;"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-item select-item" @tap="showTimePicker">
|
||||
<text class="label">拜访时间<text class="required">*</text></text>
|
||||
<view class="select-right">
|
||||
<text class="select-value">{{ selectedTime || '请选择' }}</text>
|
||||
<text class="select-arrow">></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item select-item" @tap="showDeptPicker">
|
||||
<text class="label">拜访部门<text class="required">*</text></text>
|
||||
<view class="select-right">
|
||||
<text class="select-value">{{ selectedDeptName || '请选择' }}</text>
|
||||
<text class="select-arrow">></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">拜访原因<text class="required">*</text></text>
|
||||
<picker
|
||||
:range="reasonList"
|
||||
range-key="label"
|
||||
@change="onReasonChange"
|
||||
>
|
||||
<view class="input-wrapper">
|
||||
<text class="input-text">{{ form.reasonLabel || '请选择拜访原因' }}</text>
|
||||
<text class="arrow">></text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view class="form-item switch-item">
|
||||
<text class="label">是否可随行人员</text>
|
||||
<switch
|
||||
:checked="form.hasFollower"
|
||||
@change="onSwitchChange"
|
||||
color="#1989fa"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="submit-button">
|
||||
<button class="btn" @tap="handleSubmit">提交</button>
|
||||
</view>
|
||||
|
||||
<view class="popup" v-if="showTimePopup">
|
||||
<view class="popup-mask" @tap="closeTimePicker"></view>
|
||||
<view class="popup-content">
|
||||
<view class="popup-header">
|
||||
<text class="popup-title">拜访时间</text>
|
||||
<text class="popup-close" @tap="closeTimePicker">×</text>
|
||||
</view>
|
||||
<view class="time-picker">
|
||||
<view class="date-list">
|
||||
<view
|
||||
v-for="(date, dateIndex) in dateList"
|
||||
:key="dateIndex"
|
||||
class="date-item"
|
||||
:class="{ active: selectedDateIndex === dateIndex }"
|
||||
@tap="selectDate(dateIndex)"
|
||||
>
|
||||
<text class="date-week">{{ date.weekDay }}</text>
|
||||
<text class="date-day">{{ date.date }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-list">
|
||||
<view
|
||||
v-for="(time, timeIndex) in timeList"
|
||||
:key="timeIndex"
|
||||
class="time-item"
|
||||
:class="{ active: selectedTimeIndex === timeIndex }"
|
||||
@tap="selectTime(timeIndex)"
|
||||
>
|
||||
{{ time }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-footer">
|
||||
<view class="confirm-btn" @tap="confirmTimeSelect">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="popup" v-if="showDeptPopup">
|
||||
<view class="popup-mask" @tap="closeDeptPicker"></view>
|
||||
<view class="popup-content">
|
||||
<view class="popup-header">
|
||||
<text class="popup-title">选择拜访部门</text>
|
||||
<text class="popup-close" @tap="closeDeptPicker">×</text>
|
||||
</view>
|
||||
<scroll-view scroll-y class="dept-list">
|
||||
<view
|
||||
v-for="(dept, index) in flatDeptList"
|
||||
:key="dept.id"
|
||||
class="dept-item"
|
||||
:class="{
|
||||
'active': selectedDeptId === dept.id,
|
||||
'level-1': dept.level === 1,
|
||||
'level-2': dept.level === 2,
|
||||
'level-3': dept.level === 3
|
||||
}"
|
||||
@tap="selectDept(dept)"
|
||||
>
|
||||
<text class="dept-name">{{ dept.name }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="popup-footer">
|
||||
<view class="confirm-btn" @tap="confirmDeptSelect">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import visitorApi from '@/sheep/api/integrated/visitors'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const showTimePopup = ref(false)
|
||||
const showDeptPopup = ref(false)
|
||||
|
||||
const selectedDateIndex = ref(0)
|
||||
const selectedTimeIndex = ref(-1)
|
||||
const selectedTime = ref('')
|
||||
|
||||
const deptList = ref<any[]>([])
|
||||
const flatDeptList = ref<any[]>([])
|
||||
const selectedDeptId = ref('')
|
||||
const selectedDeptName = ref('')
|
||||
|
||||
const form = reactive({
|
||||
name: '',
|
||||
mobile: '',
|
||||
companyName: '',
|
||||
vstartDate: '',
|
||||
vEndDate: '',
|
||||
deptId: '',
|
||||
deptName: '',
|
||||
reasonValue: '',
|
||||
reasonLabel: '',
|
||||
hasFollower: false
|
||||
})
|
||||
|
||||
const reasonList = ref<any[]>([])
|
||||
|
||||
const getReasonList = async () => {
|
||||
try {
|
||||
const { code, data } = await visitorApi.getDictListByType(1)
|
||||
if (code === 0 && data) {
|
||||
reasonList.value = data.map((item: any) => ({
|
||||
value: item.value,
|
||||
label: item.label
|
||||
}))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取拜访原因列表失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
const dateList = computed(() => {
|
||||
const dates = []
|
||||
const weekDays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const date = dayjs().add(i, 'day')
|
||||
dates.push({
|
||||
date: date.format('MM.DD'),
|
||||
weekDay: weekDays[date.day()],
|
||||
fullDate: date.format('YYYY-MM-DD')
|
||||
})
|
||||
}
|
||||
|
||||
return dates
|
||||
})
|
||||
|
||||
const timeList = computed(() => {
|
||||
const times = []
|
||||
for (let i = 8; i < 18; i++) {
|
||||
times.push(`${i.toString().padStart(2, '0')}:00-${(i + 1).toString().padStart(2, '0')}:00`)
|
||||
}
|
||||
return times
|
||||
})
|
||||
|
||||
const getDeptList = async () => {
|
||||
try {
|
||||
const { code, data } = await visitorApi.getSimpleTree()
|
||||
if (code === 0 && data) {
|
||||
deptList.value = data
|
||||
flattenDeptList(data)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取部门列表失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
const flattenDeptList = (depts: any[], level = 1, result: any[] = []) => {
|
||||
depts.forEach(dept => {
|
||||
result.push({
|
||||
id: dept.id,
|
||||
name: dept.name,
|
||||
level
|
||||
})
|
||||
if (dept.children && dept.children.length > 0) {
|
||||
flattenDeptList(dept.children, level + 1, result)
|
||||
}
|
||||
})
|
||||
flatDeptList.value = result
|
||||
}
|
||||
|
||||
const showTimePicker = () => {
|
||||
showTimePopup.value = true
|
||||
}
|
||||
|
||||
const closeTimePicker = () => {
|
||||
showTimePopup.value = false
|
||||
}
|
||||
|
||||
const selectDate = (index: number) => {
|
||||
selectedDateIndex.value = index
|
||||
}
|
||||
|
||||
const selectTime = (index: number) => {
|
||||
selectedTimeIndex.value = index
|
||||
}
|
||||
|
||||
const confirmTimeSelect = () => {
|
||||
if (selectedTimeIndex.value === -1) {
|
||||
uni.showToast({
|
||||
title: '请选择具体时间',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const selectedDate = dateList.value[selectedDateIndex.value]
|
||||
const selectedTimeRange = timeList.value[selectedTimeIndex.value]
|
||||
|
||||
const [startTime, endTime] = selectedTimeRange.split('-')
|
||||
form.vstartDate = `${selectedDate.fullDate} ${startTime}:00`
|
||||
form.vEndDate = `${selectedDate.fullDate} ${endTime}:00`
|
||||
|
||||
selectedTime.value = `${selectedDate.weekDay} ${selectedDate.date} ${selectedTimeRange}`
|
||||
|
||||
closeTimePicker()
|
||||
}
|
||||
|
||||
const showDeptPicker = () => {
|
||||
if (flatDeptList.value.length === 0) {
|
||||
getDeptList()
|
||||
}
|
||||
showDeptPopup.value = true
|
||||
}
|
||||
|
||||
const closeDeptPicker = () => {
|
||||
showDeptPopup.value = false
|
||||
}
|
||||
|
||||
const selectDept = (dept: any) => {
|
||||
selectedDeptId.value = dept.id
|
||||
selectedDeptName.value = dept.name
|
||||
}
|
||||
|
||||
const confirmDeptSelect = () => {
|
||||
if (!selectedDeptId.value) {
|
||||
uni.showToast({
|
||||
title: '请选择拜访部门',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
form.deptId = selectedDeptId.value
|
||||
form.deptName = selectedDeptName.value
|
||||
|
||||
closeDeptPicker()
|
||||
}
|
||||
|
||||
const onReasonChange = (e: any) => {
|
||||
const selected = reasonList.value[e.detail.value]
|
||||
form.reasonValue = selected.value
|
||||
form.reasonLabel = selected.label
|
||||
}
|
||||
|
||||
const onSwitchChange = (e: any) => {
|
||||
form.hasFollower = e.detail.value
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
// 表单验证
|
||||
if (!form.name) {
|
||||
uni.showToast({
|
||||
title: '请输入访客姓名',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (!form.mobile) {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (!form.vstartDate) {
|
||||
uni.showToast({
|
||||
title: '请选择拜访时间',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (!form.deptId) {
|
||||
uni.showToast({
|
||||
title: '请选择拜访部门',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (!form.reasonValue) {
|
||||
uni.showToast({
|
||||
title: '请选择拜访原因',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
const { code, msg } = await visitorApi.saveYY(form)
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
// 重置表单
|
||||
Object.assign(form, {
|
||||
name: '',
|
||||
mobile: '',
|
||||
companyName: '',
|
||||
vstartDate: '',
|
||||
vEndDate: '',
|
||||
deptId: '',
|
||||
deptName: '',
|
||||
reasonValue: '',
|
||||
reasonLabel: '',
|
||||
hasFollower: false
|
||||
})
|
||||
selectedTime.value = ''
|
||||
selectedDeptName.value = ''
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg || '提交失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('提交失败:', error)
|
||||
uni.showToast({
|
||||
title: '提交失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDeptList()
|
||||
getReasonList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.form-header {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.form-content {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
|
||||
.label {
|
||||
display: block;
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
|
||||
.required {
|
||||
color: #ff4d4f;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
width: 100%;
|
||||
height: 44rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.input-text {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.switch-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
padding: 40rpx 30rpx;
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.time-picker {
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
|
||||
.date-list {
|
||||
display: flex;
|
||||
padding: 0 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.date-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
|
||||
&.active {
|
||||
background: #E8F3FF;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.date-week, .date-day {
|
||||
color: #1989FA;
|
||||
}
|
||||
}
|
||||
|
||||
.date-week {
|
||||
font-size: 28rpx;
|
||||
color: #323233;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.date-day {
|
||||
font-size: 26rpx;
|
||||
color: #969799;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.time-list {
|
||||
padding: 0 24rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
|
||||
.time-item {
|
||||
width: calc((100% - 40rpx) / 3);
|
||||
height: 72rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #F7F8FA;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
color: #323233;
|
||||
|
||||
&.active {
|
||||
background: #E8F3FF;
|
||||
color: #1989FA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
padding: 24rpx 32rpx;
|
||||
border-top: 1rpx solid #f5f5f5;
|
||||
|
||||
.confirm-btn {
|
||||
height: 88rpx;
|
||||
background: #1989FA;
|
||||
border-radius: 44rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.dept-list {
|
||||
max-height: 60vh;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.dept-item {
|
||||
padding: 24rpx 32rpx;
|
||||
font-size: 28rpx;
|
||||
color: #323233;
|
||||
|
||||
&.active {
|
||||
color: #1989FA;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
&.level-1 {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&.level-2 {
|
||||
padding-left: 64rpx;
|
||||
}
|
||||
|
||||
&.level-3 {
|
||||
padding-left: 96rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.select-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.select-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.select-value {
|
||||
font-size: 30rpx;
|
||||
color: #969799;
|
||||
}
|
||||
|
||||
.select-arrow {
|
||||
margin-left: 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #969799;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,545 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- 顶部状态切换 -->
|
||||
<view class="status-tabs">
|
||||
<view
|
||||
v-for="(tab, index) in tabs"
|
||||
:key="index"
|
||||
:class="['tab-item', { active: currentTab === tab.value }]"
|
||||
@tap="handleTabChange(tab.value)"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="visitor-list">
|
||||
<view
|
||||
v-for="(item, index) in visitorList"
|
||||
:key="item.id"
|
||||
class="visitor-item"
|
||||
@tap="goToDetail(item)"
|
||||
>
|
||||
<view class="visitor-header">
|
||||
<text class="visit-time">{{ formatDateTime(item.vStartDate) }}</text>
|
||||
<text :class="['status-tag', getStatusClass(item.checkStatus)]">{{ getStatusText(item.checkStatus) }}</text>
|
||||
</view>
|
||||
<view class="visitor-content">
|
||||
<view class="info-row">
|
||||
<text class="label">访客姓名:</text>
|
||||
<text class="value">{{ item.name }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">手机号码:</text>
|
||||
<text class="value">{{ item.mobile }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">拜访部门:</text>
|
||||
<text class="value">{{ item.deptName }}</text>
|
||||
</view>
|
||||
<view class="info-row" v-if="item.companyName">
|
||||
<text class="label">来访公司:</text>
|
||||
<text class="value">{{ item.companyName }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">拜访时间:</text>
|
||||
<text class="value">{{ formatDateTime(item.vstartDate) }} - {{ formatDateTime(item.vendDate) }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">拜访原因:</text>
|
||||
<text class="value">{{ getReasonText(item.description) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="visitor-footer">
|
||||
<template v-if="item.checkStatus === '1'">
|
||||
<view class="action-btn reject-btn" @tap="handleReject(item)">拒绝</view>
|
||||
<view class="action-btn accept-btn" @tap="handleAccept(item)">接受</view>
|
||||
</template>
|
||||
<view v-else-if="canCancel(item.checkStatus)" class="action-btn cancel-btn" @tap="handleCancel(item)">取消邀约</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 下拉刷新和上拉加载的提示 -->
|
||||
<view class="loading-more" v-if="loading">
|
||||
<text>加载中...</text>
|
||||
</view>
|
||||
<view class="no-more" v-if="!hasMore && visitorList.length > 0">
|
||||
<text>没有更多了</text>
|
||||
</view>
|
||||
<view class="empty" v-if="!loading && visitorList.length === 0">
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
|
||||
<!-- 底部固定导航 -->
|
||||
<view class="bottom-nav">
|
||||
<view class="nav-item">
|
||||
<image src="/static/images/visitor/visitor-apply.png" mode="aspectFit" class="nav-icon"></image>
|
||||
<text class="nav-text active">访客申请</text>
|
||||
</view>
|
||||
<view class="nav-item">
|
||||
<image src="/static/images/visitor/visitor-record.png" mode="aspectFit" class="nav-icon"></image>
|
||||
<text class="nav-text">申请记录</text>
|
||||
</view>
|
||||
<view class="nav-item">
|
||||
<image src="/static/images/visitor/visitor-invite.png" mode="aspectFit" class="nav-icon"></image>
|
||||
<text class="nav-text">主动邀约</text>
|
||||
</view>
|
||||
<view class="nav-item">
|
||||
<image src="/static/images/visitor/visitor-invited.png" mode="aspectFit" class="nav-icon"></image>
|
||||
<text class="nav-text">邀约记录</text>
|
||||
</view>
|
||||
<view class="nav-item">
|
||||
<image src="/static/images/visitor/visitor-my.png" mode="aspectFit" class="nav-icon"></image>
|
||||
<text class="nav-text">我的</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import visitorApi from '@/sheep/api/integrated/visitors'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
// 定义响应式变量
|
||||
const visitorList = ref<any[]>([])
|
||||
const loading = ref(false)
|
||||
const hasMore = ref(true)
|
||||
const current = ref(1)
|
||||
const size = ref(10)
|
||||
const currentTab = ref('')
|
||||
const reasonDict = ref<any[]>([])
|
||||
|
||||
const tabs = [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '待审核', value: '1' },
|
||||
{ label: '待到访', value: '2' },
|
||||
{ label: '已取消', value: '5' }
|
||||
]
|
||||
|
||||
// 获取拜访原因字典
|
||||
const getReasonDict = async () => {
|
||||
try {
|
||||
const { code, data } = await visitorApi.getDictListByType(1)
|
||||
if (code === 0 && data) {
|
||||
reasonDict.value = data
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取拜访原因字典失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取拜访原因文本
|
||||
const getReasonText = (value: string) => {
|
||||
const reason = reasonDict.value.find(item => item.value === value)
|
||||
return reason ? reason.label : value
|
||||
}
|
||||
|
||||
// 格式化日期时间
|
||||
const formatDateTime = (dateStr: string) => {
|
||||
if (!dateStr) return ''
|
||||
return dayjs(dateStr).format('YYYY/MM/DD HH:mm')
|
||||
}
|
||||
|
||||
// 获取状态文本
|
||||
const getStatusText = (status: string) => {
|
||||
const statusMap: { [key: string]: string } = {
|
||||
'1': '待审核',
|
||||
'2': '待到访',
|
||||
'5': '已取消',
|
||||
'0': '已到访'
|
||||
}
|
||||
return statusMap[status] || ''
|
||||
}
|
||||
|
||||
// 获取状态样式类
|
||||
const getStatusClass = (status: string) => {
|
||||
const statusClassMap: { [key: string]: string } = {
|
||||
'1': 'status-pending',
|
||||
'2': 'status-waiting',
|
||||
'5': 'status-cancelled',
|
||||
'0': 'status-visited'
|
||||
}
|
||||
return statusClassMap[status] || ''
|
||||
}
|
||||
|
||||
// 判断是否可以取消
|
||||
const canCancel = (status: string) => {
|
||||
return ['1', '2'].includes(status)
|
||||
}
|
||||
|
||||
// 处理标签切换
|
||||
const handleTabChange = (value: string) => {
|
||||
if (currentTab.value === value) return
|
||||
currentTab.value = value
|
||||
getVisitorList(true)
|
||||
}
|
||||
|
||||
// 获取访客列表
|
||||
const getVisitorList = async (isRefresh = false) => {
|
||||
if (isRefresh) {
|
||||
current.value = 1
|
||||
hasMore.value = true
|
||||
visitorList.value = []
|
||||
}
|
||||
|
||||
if (!hasMore.value || loading.value) return
|
||||
|
||||
loading.value = true
|
||||
try {
|
||||
// 确保先获取拜访原因字典
|
||||
if (reasonDict.value.length === 0) {
|
||||
await getReasonDict()
|
||||
}
|
||||
|
||||
const { code, data } = await visitorApi.getVisitorYYList({
|
||||
current: current.value,
|
||||
size: size.value,
|
||||
checkStatus: currentTab.value || undefined
|
||||
})
|
||||
|
||||
if (code === 0 && data) {
|
||||
if (isRefresh) {
|
||||
visitorList.value = data.records || []
|
||||
} else {
|
||||
visitorList.value = [...visitorList.value, ...(data.records || [])]
|
||||
}
|
||||
|
||||
hasMore.value = data.records.length === size.value
|
||||
if (hasMore.value) {
|
||||
current.value++
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取访客列表失败:', error)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 处理取消邀约
|
||||
const handleCancel = async (item: any) => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要取消该邀约吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
const { code, msg } = await visitorApi.cancelVisitor(item.id)
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
title: '取消成功',
|
||||
icon: 'success'
|
||||
})
|
||||
// 刷新列表
|
||||
getVisitorList(true)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg || '取消失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('取消邀约失败:', error)
|
||||
uni.showToast({
|
||||
title: '取消失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 处理接受邀约
|
||||
const handleAccept = async (item: any) => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定接受该邀约吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
const { code, msg } = await visitorApi.updateCheckStatus({
|
||||
id: item.id,
|
||||
checkStatus: '2'
|
||||
})
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
title: '已接受',
|
||||
icon: 'success'
|
||||
})
|
||||
// 刷新列表
|
||||
getVisitorList(true)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg || '操作失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('接受邀约失败:', error)
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 处理拒绝邀约
|
||||
const handleReject = async (item: any) => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定拒绝该邀约吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
const { code, msg } = await visitorApi.updateCheckStatus({
|
||||
id: item.id,
|
||||
checkStatus: '3'
|
||||
})
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
title: '已拒绝',
|
||||
icon: 'success'
|
||||
})
|
||||
// 刷新列表
|
||||
getVisitorList(true)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg || '操作失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('拒绝邀约失败:', error)
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 跳转到详情页
|
||||
const goToDetail = (item: any) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/integrated/visitor/visitorDetail?token=${item.token}`
|
||||
})
|
||||
}
|
||||
|
||||
// 页面生命周期钩子
|
||||
onMounted(() => {
|
||||
getReasonDict()
|
||||
getVisitorList(true)
|
||||
})
|
||||
|
||||
// 页面配置
|
||||
defineOptions({
|
||||
navigationBarTitleText: '我的邀约',
|
||||
enablePullDownRefresh: true,
|
||||
backgroundColor: '#f5f5f5'
|
||||
})
|
||||
|
||||
// 下拉刷新
|
||||
defineExpose({
|
||||
onPullDownRefresh() {
|
||||
getVisitorList(true).then(() => {
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
onReachBottom() {
|
||||
getVisitorList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
padding-bottom: 120rpx; // 为底部导航留出空间
|
||||
}
|
||||
|
||||
.status-tabs {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
position: relative;
|
||||
padding: 20rpx 0;
|
||||
|
||||
&.active {
|
||||
color: #1777FF;
|
||||
font-weight: 500;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 40rpx;
|
||||
height: 4rpx;
|
||||
background-color: #1777FF;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.visitor-list {
|
||||
padding: 0 20rpx;
|
||||
padding-bottom: 20rpx; // 为底部添加一些间距
|
||||
|
||||
.visitor-item {
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 24rpx;
|
||||
|
||||
.visitor-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.visit-time {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
&.status-pending {
|
||||
background-color: #fff7e6;
|
||||
color: #ffa940;
|
||||
}
|
||||
|
||||
&.status-waiting {
|
||||
background-color: #e6f7ff;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
&.status-visited {
|
||||
background-color: #f6ffed;
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
&.status-cancelled {
|
||||
background-color: #f5f5f5;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.visitor-content {
|
||||
.info-row {
|
||||
display: flex;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.label {
|
||||
width: 160rpx;
|
||||
color: #666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
flex: 1;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.visitor-footer {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 20rpx;
|
||||
|
||||
.action-btn {
|
||||
padding: 12rpx 24rpx;
|
||||
border: 1rpx solid #ddd;
|
||||
border-radius: 4rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.reject-btn {
|
||||
color: #ff4d4f;
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
|
||||
.accept-btn {
|
||||
color: #fff;
|
||||
background-color: #1777FF;
|
||||
border-color: #1777FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading-more, .no-more, .empty {
|
||||
text-align: center;
|
||||
padding: 30rpx;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<view class="verify-page">
|
||||
<!-- 顶部导航 -->
|
||||
<view class="header">
|
||||
<view class="back-btn" @tap="goBack">
|
||||
<text class="back-icon">〈</text>
|
||||
</view>
|
||||
<view class="title">访客核销</view>
|
||||
<view class="right-placeholder"></view>
|
||||
</view>
|
||||
|
||||
<!-- 扫码按钮 -->
|
||||
<view class="scan-section">
|
||||
<view class="scan-btn" @tap="handleScan">
|
||||
<text class="scan-icon">📷</text>
|
||||
<text class="scan-text">扫描访客二维码</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 最近核销记录 -->
|
||||
<view class="verify-history" v-if="recentVerifyList.length > 0">
|
||||
<view class="section-title">最近核销记录</view>
|
||||
<view class="history-list">
|
||||
<view v-for="(item, index) in recentVerifyList" :key="index" class="history-item">
|
||||
<view class="visitor-info">
|
||||
<text class="name">{{ item.name }}</text>
|
||||
<text class="time">{{ formatDateTime(item.verifyTime) }}</text>
|
||||
</view>
|
||||
<view class="visit-info">
|
||||
<text class="dept">{{ item.deptName }}</text>
|
||||
<text class="status success">已核销</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import visitorApi from '@/sheep/api/integrated/visitors'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const recentVerifyList = ref<any[]>([])
|
||||
|
||||
// 格式化时间
|
||||
const formatDateTime = (time: string) => {
|
||||
if (!time) return ''
|
||||
return dayjs(time).format('YYYY-MM-DD HH:mm')
|
||||
}
|
||||
|
||||
// 处理扫码
|
||||
const handleScan = () => {
|
||||
uni.scanCode({
|
||||
scanType: ['qrCode'],
|
||||
success: async (res) => {
|
||||
try {
|
||||
// 假设扫描结果就是token
|
||||
const token = res.result
|
||||
const { code, msg } = await visitorApi.verifyVisitor({ token })
|
||||
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
title: '核销成功',
|
||||
icon: 'success'
|
||||
})
|
||||
// 刷新最近核销记录
|
||||
// getRecentVerifyList()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg || '核销失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: '核销失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '扫码失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.verify-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
.back-btn {
|
||||
width: 60rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
font-size: 38rpx;
|
||||
color: #323233;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.right-placeholder {
|
||||
width: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.scan-section {
|
||||
padding: 60rpx 30rpx;
|
||||
|
||||
.scan-btn {
|
||||
background: #fff;
|
||||
height: 200rpx;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.scan-icon {
|
||||
font-size: 60rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.scan-text {
|
||||
font-size: 32rpx;
|
||||
color: #323233;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.verify-history {
|
||||
padding: 0 30rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.history-list {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.history-item {
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.visitor-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12rpx;
|
||||
|
||||
.name {
|
||||
font-size: 30rpx;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 26rpx;
|
||||
color: #969799;
|
||||
}
|
||||
}
|
||||
|
||||
.visit-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.dept {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.status {
|
||||
font-size: 26rpx;
|
||||
|
||||
&.success {
|
||||
color: #07C160;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,486 @@
|
||||
<template>
|
||||
<view class="detail-page">
|
||||
<!-- 顶部导航 -->
|
||||
<view class="header">
|
||||
<view class="back-btn" @tap="goBack">
|
||||
<text class="back-icon">〈</text>
|
||||
</view>
|
||||
<view class="title">详情</view>
|
||||
<view class="right-placeholder"></view>
|
||||
</view>
|
||||
|
||||
<!-- 访客卡片 -->
|
||||
<view class="visit-card">
|
||||
<!-- 公司Logo -->
|
||||
<view class="company-logo">
|
||||
<image src="/static/images/company-logo.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
||||
<!-- 访问信息 -->
|
||||
<view class="visit-info">
|
||||
<view class="visit-time">{{ formatDate(detail.vstartDate) }} {{ formatTime(detail.vstartDate) }}</view>
|
||||
<view class="visit-location">{{ detail.deptName }}</view>
|
||||
<view class="visit-address"></view>
|
||||
</view>
|
||||
|
||||
<!-- 访客信息 -->
|
||||
<view class="visitor-info">
|
||||
<view class="info-row">
|
||||
<text class="label">邀请人</text>
|
||||
<text class="value">{{ detail.name }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">访客</text>
|
||||
<text class="value">{{ detail.userName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 二维码 -->
|
||||
<view class="qr-code">
|
||||
<canvas type="2d" id="qrcode" canvas-id="qrcode" class="qr-canvas"></canvas>
|
||||
<text class="qr-tip">请于门卫或前台进行预访登记</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 展开更多按钮 -->
|
||||
<view class="expand-btn" @tap="toggleExpand">
|
||||
<text>{{ isExpanded ? '收起' : '查看详细信息' }}</text>
|
||||
<text :class="['expand-icon', { 'expanded': isExpanded }]">{{ isExpanded ? '∧' : '∨' }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 详细信息 -->
|
||||
<view class="detail-content" v-show="isExpanded">
|
||||
<!-- 原有的详细信息内容 -->
|
||||
<view class="detail-section">
|
||||
<view class="section-title">基本信息</view>
|
||||
<view class="section-item">
|
||||
<text class="label">拜访时间</text>
|
||||
<text class="value">{{ formatDateTime(detail.vstartDate) }} - {{ formatDateTime(detail.vendDate, true) }}</text>
|
||||
</view>
|
||||
<view class="section-item">
|
||||
<text class="label">访客姓名</text>
|
||||
<text class="value">{{ detail.name }}</text>
|
||||
</view>
|
||||
<view class="section-item">
|
||||
<text class="label">联系方式</text>
|
||||
<text class="value">{{ detail.mobile }}</text>
|
||||
</view>
|
||||
<view class="section-item">
|
||||
<text class="label">所属公司</text>
|
||||
<text class="value">{{ detail.companyName }}</text>
|
||||
</view>
|
||||
<view class="section-item">
|
||||
<text class="label">拜访对象</text>
|
||||
<text class="value">{{ detail.userName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 随行人员信息 -->
|
||||
<view class="detail-section" v-if="detail.isOtherPeople === '1' && detail.visitorsPeopleAppVos?.length">
|
||||
<view class="section-title">随行人员信息</view>
|
||||
<view v-for="(person, index) in detail.visitorsPeopleAppVos" :key="index" class="companion-item">
|
||||
<view class="section-item">
|
||||
<text class="label">访客姓名</text>
|
||||
<text class="value">{{ person.name }}</text>
|
||||
</view>
|
||||
<view class="section-item">
|
||||
<text class="label">手机号码</text>
|
||||
<text class="value">{{ person.mobile }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 车辆信息 -->
|
||||
<view class="detail-section" v-if="detail.isDrive === '1' && detail.visitorsCarAppVos?.length">
|
||||
<view class="section-title">车辆信息</view>
|
||||
<view v-for="(car, index) in detail.visitorsCarAppVos" :key="index" class="section-item">
|
||||
<text class="label">车牌号</text>
|
||||
<text class="value">{{ car.carNumber }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 审核信息 -->
|
||||
<view class="detail-section" v-if="detail.checkStatus === '1' && detail.checkReason">
|
||||
<view class="section-title">审核信息</view>
|
||||
<view class="section-item">
|
||||
<text class="label">审核意见</text>
|
||||
<text class="value">{{ detail.checkReason }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提交信息 -->
|
||||
<view class="detail-section">
|
||||
<view class="section-item">
|
||||
<text class="label">提交时间</text>
|
||||
<text class="value">{{ formatDateTime(detail.createTime) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick } from 'vue'
|
||||
import visitorApi from '@/sheep/api/integrated/visitors'
|
||||
import dayjs from 'dayjs'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
const detail = ref<any>({})
|
||||
const isExpanded = ref(false)
|
||||
|
||||
// 格式化日期(年月日)
|
||||
const formatDate = (time: string) => {
|
||||
if (!time) return ''
|
||||
const weekMap: { [key: string]: string } = {
|
||||
'Mon': '一',
|
||||
'Tue': '二',
|
||||
'Wed': '三',
|
||||
'Thu': '四',
|
||||
'Fri': '五',
|
||||
'Sat': '六',
|
||||
'Sun': '日'
|
||||
}
|
||||
const date = dayjs(time)
|
||||
const weekEn = date.format('ddd')
|
||||
const weekCn = weekMap[weekEn] || weekEn
|
||||
return `${date.format('M月D日')} 周${weekCn}`
|
||||
}
|
||||
|
||||
// 格式化时间(时分)
|
||||
const formatTime = (time: string) => {
|
||||
if (!time) return ''
|
||||
return dayjs(time).format('HH:mm')
|
||||
}
|
||||
|
||||
// 格式化完整时间
|
||||
const formatDateTime = (time: string, onlyTime = false) => {
|
||||
if (!time) return ''
|
||||
return onlyTime ? dayjs(time).format('HH:mm') : dayjs(time).format('YYYY-MM-DD HH:mm')
|
||||
}
|
||||
|
||||
// 生成二维码
|
||||
const generateQRCode = async (token: string) => {
|
||||
try {
|
||||
// #ifdef H5
|
||||
const base64 = await QRCode.toDataURL(token, {
|
||||
width: 200,
|
||||
margin: 2,
|
||||
color: {
|
||||
dark: '#000000',
|
||||
light: '#ffffff'
|
||||
}
|
||||
})
|
||||
if (base64) {
|
||||
const img = new Image()
|
||||
img.src = base64
|
||||
img.style.width = '400rpx'
|
||||
img.style.height = '400rpx'
|
||||
const container = document.querySelector('.qr-code')
|
||||
const canvas = document.querySelector('#qrcode')
|
||||
if (container && canvas) {
|
||||
const div = document.createElement('div')
|
||||
div.style.width = '400rpx'
|
||||
div.style.height = '400rpx'
|
||||
div.style.marginBottom = '20rpx'
|
||||
div.appendChild(img)
|
||||
container.replaceChild(div, canvas)
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const query = uni.createSelectorQuery()
|
||||
query
|
||||
.select('#qrcode')
|
||||
.fields({ node: true, size: true })
|
||||
.exec((res) => {
|
||||
if (res[0] && res[0].node) {
|
||||
const canvas = res[0].node
|
||||
const ctx = canvas.getContext('2d')
|
||||
|
||||
// 设置canvas大小
|
||||
const dpr = uni.getSystemInfoSync().pixelRatio
|
||||
canvas.width = 200 * dpr
|
||||
canvas.height = 200 * dpr
|
||||
ctx.scale(dpr, dpr)
|
||||
|
||||
// 生成二维码
|
||||
QRCode.toCanvas(canvas, token, {
|
||||
width: 200,
|
||||
margin: 2,
|
||||
color: {
|
||||
dark: '#000000',
|
||||
light: '#ffffff'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
} catch (error) {
|
||||
console.error('生成二维码失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 展开/收起详情
|
||||
const toggleExpand = () => {
|
||||
isExpanded.value = !isExpanded.value
|
||||
}
|
||||
|
||||
// 获取详情数据
|
||||
const getDetail = async () => {
|
||||
try {
|
||||
const pages = getCurrentPages()
|
||||
const currentPage = pages[pages.length - 1]
|
||||
const { token } = currentPage.$page?.options || {}
|
||||
|
||||
if (!token) {
|
||||
uni.showToast({
|
||||
title: '参数错误',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const { code, data } = await visitorApi.getVisitorDetail({ token })
|
||||
if (code === 0 && data) {
|
||||
detail.value = data
|
||||
// 延迟生成二维码,确保canvas已经渲染
|
||||
// #ifdef H5
|
||||
nextTick(() => {
|
||||
generateQRCode(token)
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
setTimeout(() => {
|
||||
generateQRCode(token)
|
||||
}, 300)
|
||||
// #endif
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取详情失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取详情失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDetail()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
.back-btn {
|
||||
width: 60rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
font-size: 38rpx;
|
||||
color: #323233;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.right-placeholder {
|
||||
width: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.visit-card {
|
||||
margin: 30rpx;
|
||||
padding: 40rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.company-logo {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin: 0 auto 30rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.visit-info {
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.visit-time {
|
||||
font-size: 36rpx;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.visit-location {
|
||||
font-size: 32rpx;
|
||||
color: #323233;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.visit-address {
|
||||
font-size: 28rpx;
|
||||
color: #969799;
|
||||
}
|
||||
}
|
||||
|
||||
.visitor-info {
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #969799;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 28rpx;
|
||||
color: #323233;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.qr-code {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 40rpx 0;
|
||||
|
||||
.qr-canvas {
|
||||
width: 400rpx !important;
|
||||
height: 400rpx !important;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.qr-tip {
|
||||
font-size: 24rpx;
|
||||
color: #969799;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.expand-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
margin: 0 30rpx;
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1989FA;
|
||||
|
||||
.expand-icon {
|
||||
margin-left: 8rpx;
|
||||
transition: transform 0.3s;
|
||||
|
||||
&.expanded {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.detail-section {
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
padding-left: 20rpx;
|
||||
border-left: 4rpx solid #1989FA;
|
||||
}
|
||||
}
|
||||
|
||||
.section-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #969799;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 28rpx;
|
||||
color: #323233;
|
||||
text-align: right;
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.companion-item {
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx;
|
||||
background: #f7f8fa;
|
||||
border-radius: 8rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.section-item {
|
||||
padding: 12rpx 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -70,14 +70,19 @@ const state = reactive<{
|
||||
wallet: [],
|
||||
userInfo: {},
|
||||
menuList: [
|
||||
{ text: "扫一扫", icon: "/static/icon/scan.png", router: "" },
|
||||
{ text: "钱包管理", icon: "/static/icon/service_3.png", router: "/pages/wallet/list" },
|
||||
// { text: "扫一扫", icon: "/static/icon/scan.png", router: "" },
|
||||
// { text: "钱包管理", icon: "/static/icon/service_3.png", router: "/pages/wallet/list" },
|
||||
// { text: "包厢预定", icon: "/static/icon/service_4.png", router: "/pages/boxes/apply-list" },
|
||||
// { text: "外来人员就餐", icon: "/static/icon/service_1.png", router: "/pages/apply/foreign-list" },
|
||||
// { text: "跨单位就餐", icon: "/static/icon/service_1.png", router: "/pages/apply/stride-list" },
|
||||
{ text: "人脸管理", icon: "/static/icon/service_5.png", router: "/pages/human-face/list" },
|
||||
{ text: "智能柜列表", icon: "/static/icon/service_5.png", router: "/pages/cabinet/cabinetList" },
|
||||
// { text: "意见反馈", icon: "/static/icon/service_5.png", router: "/pages/integrated/feedback/index" },
|
||||
// { text: "访客", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/index" },
|
||||
// { 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/feedback/index" }
|
||||
],
|
||||
appInfo: "",
|
||||
})
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import request from '@/sheep/utils/request'
|
||||
|
||||
const deptApi = {
|
||||
// 获取部门树形数据
|
||||
getSimpleTree: () =>
|
||||
request({
|
||||
url: "/admin/dept/simpleTree",
|
||||
method: "GET",
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 获取部门下的用户列表
|
||||
getUserList: (deptId: string) =>
|
||||
request({
|
||||
url: "/admin/user/getUserIdListByDeptId",
|
||||
method: "GET",
|
||||
params: { deptId },
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
export default deptApi
|
||||
@@ -0,0 +1,140 @@
|
||||
import request from '@/sheep/utils/request'
|
||||
|
||||
const visitorApi = {
|
||||
// 保存访客信息
|
||||
save: (data: any) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/save",
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 获取部门树形数据
|
||||
getSimpleTree: () =>
|
||||
request({
|
||||
url: "/admin/dept/simpleTree",
|
||||
method: "GET",
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 获取访客记录列表
|
||||
getVisitorList: (params: {
|
||||
current: number;
|
||||
size: number;
|
||||
checkStatus?: string;
|
||||
}) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/sq/page",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 取消访客预约
|
||||
cancelVisitor: (id: string) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/cancelVisitor",
|
||||
method: "GET",
|
||||
params: { id },
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 获取拜访原因字典
|
||||
getDictListByType: (type: number) =>
|
||||
request({
|
||||
url: '/integrated/visitors/app/getDictListByType',
|
||||
method: 'GET',
|
||||
params: { type },
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 保存访客邀约
|
||||
saveYY: (data: any) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/saveYY",
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 获取邀约记录列表
|
||||
getVisitorYYList: (params: {
|
||||
current: number;
|
||||
size: number;
|
||||
checkStatus?: string;
|
||||
}) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/yy/page",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 接受访客邀约
|
||||
acceptVisitor: (id: string) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/acceptYY",
|
||||
method: "GET",
|
||||
params: { id },
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 拒绝访客邀约
|
||||
rejectVisitor: (id: string) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/rejectYY",
|
||||
method: "GET",
|
||||
params: { id },
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 更新访客邀约状态
|
||||
updateCheckStatus: (params: { id: string; checkStatus: string }) =>
|
||||
request({
|
||||
url: "/integrated/visitors/app/updateCheckStatus",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 获取访客详情
|
||||
getVisitorDetail: (params: { token: string }) => {
|
||||
return request({
|
||||
url: '/integrated/visitors/app/get/visitorDetail',
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
// 访客核销
|
||||
verifyVisitor: (params: { token: string }) => {
|
||||
return request({
|
||||
url: '/integrated/visitors/app/verify',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default visitorApi
|
||||
Reference in new issue
Block a user