feat: 新增确认送达弹框组件、添加安卓打包测试证书、骑手配送流程接口对接
This commit is contained in:
2
.env
2
.env
@@ -2,7 +2,7 @@
|
|||||||
SHOPRO_VERSION=v2.3.0
|
SHOPRO_VERSION=v2.3.0
|
||||||
|
|
||||||
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development)
|
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development)
|
||||||
SHOPRO_BASE_URL = http://api.jnmall.zq-hightech.com
|
SHOPRO_BASE_URL = http://delivery-test.huichibao.com
|
||||||
|
|
||||||
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development)
|
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development)
|
||||||
# SHOPRO_DEV_BASE_URL = https://icepacker.52cfzy.com
|
# SHOPRO_DEV_BASE_URL = https://icepacker.52cfzy.com
|
||||||
|
|||||||
488
manifest.json
488
manifest.json
@@ -1,261 +1,243 @@
|
|||||||
{
|
{
|
||||||
"name": "云南江楠商城",
|
"name" : "惠吃宝骑手端",
|
||||||
"appid": "__UNI__4E984D1",
|
"appid" : "__UNI__4E984D1",
|
||||||
"description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
|
"description" : "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
|
||||||
"versionName": "2.1.0",
|
"versionName" : "2.1.0",
|
||||||
"versionCode": "183",
|
"versionCode" : "183",
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"nvueCompiler": "uni-app",
|
"nvueCompiler" : "uni-app",
|
||||||
"nvueStyleCompiler": "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion": 3,
|
"compilerVersion" : 3,
|
||||||
"nvueLaunchMode": "fast",
|
"nvueLaunchMode" : "fast",
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting": true,
|
"waiting" : true,
|
||||||
"autoclose": true,
|
"autoclose" : true,
|
||||||
"delay": 0
|
"delay" : 0
|
||||||
},
|
|
||||||
"safearea": {
|
|
||||||
"bottom": {
|
|
||||||
"offset": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"modules": {
|
|
||||||
"Payment": {},
|
|
||||||
"Share": {},
|
|
||||||
"VideoPlayer": {},
|
|
||||||
"OAuth": {},
|
|
||||||
"Maps": {},
|
|
||||||
"Barcode": {},
|
|
||||||
"Camera": {},
|
|
||||||
"Geolocation": {}
|
|
||||||
},
|
|
||||||
"distribute": {
|
|
||||||
"android": {
|
|
||||||
"permissions": [
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
|
|
||||||
],
|
|
||||||
"minSdkVersion": 21,
|
|
||||||
"schemes": "shopro"
|
|
||||||
},
|
|
||||||
"ios": {
|
|
||||||
"urlschemewhitelist": [
|
|
||||||
"baidumap",
|
|
||||||
"iosamap"
|
|
||||||
],
|
|
||||||
"dSYMs": false,
|
|
||||||
"privacyDescription": {
|
|
||||||
"NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目",
|
|
||||||
"NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片",
|
|
||||||
"NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目",
|
|
||||||
"NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
|
|
||||||
},
|
},
|
||||||
"urltypes": "shopro",
|
"safearea" : {
|
||||||
"capabilities": {
|
"bottom" : {
|
||||||
"entitlements": {
|
"offset" : "none"
|
||||||
"com.apple.developer.associated-domains": [
|
}
|
||||||
"applinks:shopro.sheepjs.com"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"idfa": true
|
"modules" : {
|
||||||
},
|
"Payment" : {},
|
||||||
"sdkConfigs": {
|
"Share" : {},
|
||||||
"speech": {
|
"VideoPlayer" : {},
|
||||||
"ifly": {}
|
"OAuth" : {},
|
||||||
|
"Maps" : {},
|
||||||
|
"Barcode" : {},
|
||||||
|
"Camera" : {},
|
||||||
|
"Geolocation" : {}
|
||||||
},
|
},
|
||||||
"ad": {},
|
"distribute" : {
|
||||||
"oauth": {
|
"android" : {
|
||||||
"apple": {},
|
"permissions" : [
|
||||||
"weixin": {
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"appid": "wxae7a0c156da9383b",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||||
}
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
},
|
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||||
"payment": {
|
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
|
||||||
"weixin": {
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
"__platform__": [
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"ios",
|
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||||
"android"
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
],
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"appid": "wxae7a0c156da9383b",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
},
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
"alipay": {
|
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
|
||||||
"__platform__": [
|
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||||
"ios",
|
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||||
"android"
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
]
|
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||||
}
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
},
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"share": {
|
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
|
||||||
"weixin": {
|
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
|
||||||
"appid": "wxae7a0c156da9383b",
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||||
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
|
||||||
}
|
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
|
||||||
},
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"maps": {
|
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||||
"amap": {
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||||
"name": "amapAvsftDYzi",
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||||
"appkey_ios": "2ead091d2fc2cdfec417d49aecf00c8b",
|
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
|
||||||
"appkey_android": "5a660b94974d7f3c62b257e8368893fa"
|
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
|
||||||
}
|
],
|
||||||
},
|
"minSdkVersion" : 21,
|
||||||
"geolocation": {
|
"schemes" : "shopro"
|
||||||
"system": {
|
},
|
||||||
"__platform__": [
|
"ios" : {
|
||||||
"ios",
|
"urlschemewhitelist" : [ "baidumap", "iosamap" ],
|
||||||
"android"
|
"dSYMs" : false,
|
||||||
]
|
"privacyDescription" : {
|
||||||
}
|
"NSPhotoLibraryUsageDescription" : "需要同意访问您的相册选取图片才能完善该条目",
|
||||||
|
"NSPhotoLibraryAddUsageDescription" : "需要同意访问您的相册才能保存该图片",
|
||||||
|
"NSCameraUsageDescription" : "需要同意访问您的摄像头拍摄照片才能完善该条目",
|
||||||
|
"NSUserTrackingUsageDescription" : "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
|
||||||
|
},
|
||||||
|
"urltypes" : "shopro",
|
||||||
|
"capabilities" : {
|
||||||
|
"entitlements" : {
|
||||||
|
"com.apple.developer.associated-domains" : [ "applinks:shopro.sheepjs.com" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idfa" : true
|
||||||
|
},
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"speech" : {
|
||||||
|
"ifly" : {}
|
||||||
|
},
|
||||||
|
"ad" : {},
|
||||||
|
"oauth" : {
|
||||||
|
"apple" : {},
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "wxae7a0c156da9383b",
|
||||||
|
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"payment" : {
|
||||||
|
"weixin" : {
|
||||||
|
"__platform__" : [ "ios", "android" ],
|
||||||
|
"appid" : "wxae7a0c156da9383b",
|
||||||
|
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
||||||
|
},
|
||||||
|
"alipay" : {
|
||||||
|
"__platform__" : [ "ios", "android" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"share" : {
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "wxae7a0c156da9383b",
|
||||||
|
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"maps" : {
|
||||||
|
"amap" : {
|
||||||
|
"name" : "amapAvsftDYzi",
|
||||||
|
"appkey_ios" : "2ead091d2fc2cdfec417d49aecf00c8b",
|
||||||
|
"appkey_android" : "5a660b94974d7f3c62b257e8368893fa"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"geolocation" : {
|
||||||
|
"system" : {
|
||||||
|
"__platform__" : [ "ios", "android" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"orientation" : [ "portrait-primary" ],
|
||||||
|
"splashscreen" : {
|
||||||
|
"androidStyle" : "common",
|
||||||
|
"iosStyle" : "common",
|
||||||
|
"useOriginalMsgbox" : true
|
||||||
|
},
|
||||||
|
"icons" : {
|
||||||
|
"android" : {
|
||||||
|
"hdpi" : "",
|
||||||
|
"xhdpi" : "",
|
||||||
|
"xxhdpi" : "",
|
||||||
|
"xxxhdpi" : ""
|
||||||
|
},
|
||||||
|
"ios" : {
|
||||||
|
"appstore" : "",
|
||||||
|
"ipad" : {
|
||||||
|
"app" : "",
|
||||||
|
"app@2x" : "",
|
||||||
|
"notification" : "",
|
||||||
|
"notification@2x" : "",
|
||||||
|
"proapp@2x" : "",
|
||||||
|
"settings" : "",
|
||||||
|
"settings@2x" : "",
|
||||||
|
"spotlight" : "",
|
||||||
|
"spotlight@2x" : ""
|
||||||
|
},
|
||||||
|
"iphone" : {
|
||||||
|
"app@2x" : "",
|
||||||
|
"app@3x" : "",
|
||||||
|
"notification@2x" : "",
|
||||||
|
"notification@3x" : "",
|
||||||
|
"settings@2x" : "",
|
||||||
|
"settings@3x" : "",
|
||||||
|
"spotlight@2x" : "",
|
||||||
|
"spotlight@3x" : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"orientation": [
|
"quickapp" : {},
|
||||||
"portrait-primary"
|
"quickapp-native" : {
|
||||||
],
|
"icon" : "/static/logo.png",
|
||||||
"splashscreen": {
|
"package" : "com.example.demo",
|
||||||
"androidStyle": "common",
|
"features" : [
|
||||||
"iosStyle": "common",
|
{
|
||||||
"useOriginalMsgbox": true
|
"name" : "system.clipboard"
|
||||||
},
|
}
|
||||||
"icons": {
|
]
|
||||||
"android": {
|
},
|
||||||
"hdpi": "unpackage/res/icons/72x72.png",
|
"quickapp-webview" : {
|
||||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
"icon" : "/static/logo.png",
|
||||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
"package" : "com.example.demo",
|
||||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
"minPlatformVersion" : 1070,
|
||||||
|
"versionName" : "1.0.0",
|
||||||
|
"versionCode" : 100
|
||||||
|
},
|
||||||
|
"mp-weixin" : {
|
||||||
|
"appid" : "wxfcfcbdebfb0d99ad",
|
||||||
|
"setting" : {
|
||||||
|
"urlCheck" : false,
|
||||||
|
"minified" : true,
|
||||||
|
"postcss" : false,
|
||||||
|
"es6" : false,
|
||||||
|
"mergeVirtualHostAttributes" : true
|
||||||
},
|
},
|
||||||
"ios": {
|
"optimization" : {
|
||||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
"subPackages" : true
|
||||||
"ipad": {
|
},
|
||||||
"app": "unpackage/res/icons/76x76.png",
|
"plugins" : {},
|
||||||
"app@2x": "unpackage/res/icons/152x152.png",
|
"lazyCodeLoading" : "requiredComponents",
|
||||||
"notification": "unpackage/res/icons/20x20.png",
|
"usingComponents" : {},
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"permission" : {},
|
||||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
"requiredPrivateInfos" : [ "chooseAddress" ]
|
||||||
"settings": "unpackage/res/icons/29x29.png",
|
},
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"mp-alipay" : {
|
||||||
"spotlight": "unpackage/res/icons/40x40.png",
|
"usingComponents" : true
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
},
|
||||||
},
|
"mp-baidu" : {
|
||||||
"iphone": {
|
"usingComponents" : true
|
||||||
"app@2x": "unpackage/res/icons/120x120.png",
|
},
|
||||||
"app@3x": "unpackage/res/icons/180x180.png",
|
"mp-toutiao" : {
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"usingComponents" : true,
|
||||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
"mergeVirtualHostAttributes" : true
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
},
|
||||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
"mp-jd" : {
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
"usingComponents" : true
|
||||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
},
|
||||||
}
|
"h5" : {
|
||||||
|
"template" : "index.html",
|
||||||
|
"router" : {
|
||||||
|
"mode" : "history",
|
||||||
|
"base" : "/"
|
||||||
|
},
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"maps" : {}
|
||||||
|
},
|
||||||
|
"async" : {
|
||||||
|
"timeout" : 20000
|
||||||
|
},
|
||||||
|
"title" : "惠吃宝骑手端",
|
||||||
|
"optimization" : {
|
||||||
|
"treeShaking" : {
|
||||||
|
"enable" : true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"quickapp": {},
|
|
||||||
"quickapp-native": {
|
|
||||||
"icon": "/static/logo.png",
|
|
||||||
"package": "com.example.demo",
|
|
||||||
"features": [
|
|
||||||
{
|
|
||||||
"name": "system.clipboard"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"quickapp-webview": {
|
|
||||||
"icon": "/static/logo.png",
|
|
||||||
"package": "com.example.demo",
|
|
||||||
"minPlatformVersion": 1070,
|
|
||||||
"versionName": "1.0.0",
|
|
||||||
"versionCode": 100
|
|
||||||
},
|
|
||||||
"mp-weixin": {
|
|
||||||
"appid": "wxfcfcbdebfb0d99ad",
|
|
||||||
"setting": {
|
|
||||||
"urlCheck": false,
|
|
||||||
"minified": true,
|
|
||||||
"postcss": false,
|
|
||||||
"es6": false,
|
|
||||||
"mergeVirtualHostAttributes": true
|
|
||||||
},
|
},
|
||||||
"optimization": {
|
"vueVersion" : "3",
|
||||||
"subPackages": true
|
"_spaceID" : "192b4892-5452-4e1d-9f09-eee1ece40639",
|
||||||
},
|
"locale" : "zh-Hans",
|
||||||
"plugins": {},
|
"fallbackLocale" : "zh-Hans"
|
||||||
"lazyCodeLoading": "requiredComponents",
|
}
|
||||||
"usingComponents": {},
|
|
||||||
"permission": {},
|
|
||||||
"requiredPrivateInfos": [
|
|
||||||
"chooseAddress"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"mp-alipay": {
|
|
||||||
"usingComponents": true
|
|
||||||
},
|
|
||||||
"mp-baidu": {
|
|
||||||
"usingComponents": true
|
|
||||||
},
|
|
||||||
"mp-toutiao": {
|
|
||||||
"usingComponents": true,
|
|
||||||
"mergeVirtualHostAttributes": true
|
|
||||||
},
|
|
||||||
"mp-jd": {
|
|
||||||
"usingComponents": true
|
|
||||||
},
|
|
||||||
"h5": {
|
|
||||||
"template": "index.html",
|
|
||||||
"router": {
|
|
||||||
"mode": "history",
|
|
||||||
"base": "/"
|
|
||||||
},
|
|
||||||
"sdkConfigs": {
|
|
||||||
"maps": {}
|
|
||||||
},
|
|
||||||
"async": {
|
|
||||||
"timeout": 20000
|
|
||||||
},
|
|
||||||
"title": "惠吃宝骑手端",
|
|
||||||
"optimization": {
|
|
||||||
"treeShaking": {
|
|
||||||
"enable": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vueVersion": "3",
|
|
||||||
"_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639",
|
|
||||||
"locale": "zh-Hans",
|
|
||||||
"fallbackLocale": "zh-Hans"
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -233,8 +233,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/index/user",
|
"pagePath": "pages/index/user",
|
||||||
"iconPath": "static/img/edit.png",
|
"iconPath": "static/img/account.png",
|
||||||
"selectedIconPath": "static/img/edit.png",
|
"selectedIconPath": "static/img/account-fill.png",
|
||||||
"text": "个人中心"
|
"text": "个人中心"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
298
pages/index/components/delivery-popup.vue
Normal file
298
pages/index/components/delivery-popup.vue
Normal file
@@ -0,0 +1,298 @@
|
|||||||
|
<template>
|
||||||
|
<u-popup :show="show" mode="bottom" :closeable="true" @close="onClose" :safeAreaInsetBottom="false" border-radius="16">
|
||||||
|
<view class="delivery-popup">
|
||||||
|
<!-- 标题 -->
|
||||||
|
<view class="popup-header">
|
||||||
|
<text class="popup-title">确认送达</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 内容区域 -->
|
||||||
|
<view class="popup-content">
|
||||||
|
<view class="upload-label">
|
||||||
|
<text class="required">*</text>
|
||||||
|
<text>上传送达照片:</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 照片列表 -->
|
||||||
|
<up-upload
|
||||||
|
:fileList="photoList"
|
||||||
|
@afterRead="afterRead"
|
||||||
|
@delete="deleteUpload"
|
||||||
|
:maxCount="1"
|
||||||
|
:maxSize="5 * 1024 * 1024"
|
||||||
|
uploadText="上传照片"
|
||||||
|
:previewFullImage="true"
|
||||||
|
></up-upload>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<view class="popup-footer">
|
||||||
|
<view class="btn submit" @click="onSubmit">提交</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, watch } from 'vue';
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
import { baseUrl, apiPath } from '@/sheep/config';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 控制显示隐藏
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:show', 'submit', 'close']);
|
||||||
|
|
||||||
|
// 照片列表 (用于 up-upload 组件)
|
||||||
|
const photoList = ref([])
|
||||||
|
|
||||||
|
// 监听弹框显示,重置数据
|
||||||
|
watch(() => props.show, (newVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
photoList.value = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 关闭弹框
|
||||||
|
function onClose() {
|
||||||
|
emit('update:show', false);
|
||||||
|
emit('close');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除上传的图片
|
||||||
|
function deleteUpload(event) {
|
||||||
|
photoList.value.splice(event.index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上传单个文件到 OSS
|
||||||
|
async function uploadFile(filePath) {
|
||||||
|
const token = uni.getStorageSync('token');
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: baseUrl + apiPath + '/app/file/uploadOss', // 上传接口地址
|
||||||
|
header: {
|
||||||
|
'Authorization': token
|
||||||
|
},
|
||||||
|
filePath: filePath,
|
||||||
|
name: 'file',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
try {
|
||||||
|
const data = JSON.parse(res.data);
|
||||||
|
if (data.code === 0 && data.data) {
|
||||||
|
resolve(data.data);
|
||||||
|
} else {
|
||||||
|
console.error('上传失败:', data.msg);
|
||||||
|
resolve(null);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('解析上传响应失败:', e);
|
||||||
|
resolve(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error('上传失败:', res.statusCode);
|
||||||
|
resolve(null);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('上传请求失败:', err);
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上传图片后的回调
|
||||||
|
async function afterRead(event) {
|
||||||
|
// 当设置 mutiple 为 true 时, event.file.list 为数组
|
||||||
|
const { file } = event;
|
||||||
|
|
||||||
|
// 如果是单选,转换为数组处理
|
||||||
|
const fileList = Array.isArray(file) ? file : [file];
|
||||||
|
|
||||||
|
for (const item of fileList) {
|
||||||
|
// 标记为上传中
|
||||||
|
photoList.value.push({
|
||||||
|
...item,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 依次上传文件
|
||||||
|
for (let i = 0; i < fileList.length; i++) {
|
||||||
|
const item = fileList[i];
|
||||||
|
const index = photoList.value.findIndex(f => f.url === item.url);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const url = await uploadFile(item.url);
|
||||||
|
|
||||||
|
if (url) {
|
||||||
|
// 上传成功,更新状态
|
||||||
|
photoList.value[index] = {
|
||||||
|
...photoList.value[index],
|
||||||
|
status: 'success',
|
||||||
|
message: ''
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// 上传失败
|
||||||
|
photoList.value[index] = {
|
||||||
|
...photoList.value[index],
|
||||||
|
status: 'failed',
|
||||||
|
message: '上传失败'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('上传图片异常:', error);
|
||||||
|
photoList.value[index] = {
|
||||||
|
...photoList.value[index],
|
||||||
|
status: 'failed',
|
||||||
|
message: '上传失败'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
async function onSubmit() {
|
||||||
|
if (photoList.value.length === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请上传送达照片',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查找上传成功的照片
|
||||||
|
const uploadedPhoto = photoList.value.find(p => p.status === 'success');
|
||||||
|
|
||||||
|
if (!uploadedPhoto) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '照片上传中,请稍候',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交成功,返回上传后的 URL
|
||||||
|
emit('submit', uploadedPhoto.url);
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.delivery-popup {
|
||||||
|
padding: 30rpx;
|
||||||
|
padding-bottom: calc(30rpx + constant(safe-area-inset-bottom));
|
||||||
|
padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-header {
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-content {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.required {
|
||||||
|
color: #f5222d;
|
||||||
|
margin-right: 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-item {
|
||||||
|
position: relative;
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-preview {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-delete {
|
||||||
|
position: absolute;
|
||||||
|
top: 10rpx;
|
||||||
|
right: 10rpx;
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-icon {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-add {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 2rpx dashed #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-icon {
|
||||||
|
font-size: 72rpx;
|
||||||
|
color: #999;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-footer {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.submit {
|
||||||
|
background: #1e9fff;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<!-- 查询输入 -->
|
<!-- 查询输入 -->
|
||||||
<view class="search-row">
|
<view class="search-row">
|
||||||
<view style="width:620rpx;">
|
<view style="width:620rpx;">
|
||||||
<input class="search-input" v-model="orderCode" placeholder="输入收件人手机尾号4位+取单号,如8927#11" />
|
<input class="search-input" v-model="orderCode" placeholder="输入收货人手机尾号4位+取单号,如8927#11" />
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left:15rpx;">
|
<view style="margin-left:15rpx;">
|
||||||
<up-button type="primary" size="small" text="查询" @click="queryOrder"></up-button>
|
<up-button type="primary" size="small" text="查询" @click="queryOrder"></up-button>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<text class="icon">🏬</text>
|
<text class="icon">🏬</text>
|
||||||
<text class="text">取货点店铺名称</text>
|
<text class="text">取货点店铺名称</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="muted">{{ pickupName }}</text>
|
<text class="muted">取货店铺详细地址:{{ pickupName }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 送餐地址 -->
|
<!-- 送餐地址 -->
|
||||||
@@ -45,20 +45,22 @@
|
|||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<text class="label">交接备注:</text>
|
<text class="label">交接备注:</text>
|
||||||
<picker :range="remarks" @change="onRemarkChange">
|
<picker :range="remarks" @change="onRemarkChange">
|
||||||
<view class="picker-display">{{ selectedRemarkText }}</view>
|
<view class="picker-display">{{ selectedRemarkText || '请选择交接备注' }}</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 凭证 上传 -->
|
<!-- 凭证 上传 -->
|
||||||
<view class="form-row proof-row">
|
<view class="form-row proof-row">
|
||||||
<text class="label required">凭证:</text>
|
<text class="label required">凭证:</text>
|
||||||
<view class="proof-list">
|
<up-upload
|
||||||
<view v-for="(img, idx) in proofImages" :key="idx" class="proof-item">
|
:fileList="uploadFileList"
|
||||||
<image :src="img" mode="aspectFill" class="proof-img" />
|
@afterRead="afterRead"
|
||||||
<view class="remove" @click="removeProofImage(idx)">✕</view>
|
@delete="deleteUpload"
|
||||||
</view>
|
:maxCount="1"
|
||||||
<view class="proof-add" @click="addProofImage">+</view>
|
:maxSize="5 * 1024 * 1024"
|
||||||
</view>
|
uploadText="上传凭证"
|
||||||
|
:previewFullImage="true"
|
||||||
|
></up-upload>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 底部操作 -->
|
<!-- 底部操作 -->
|
||||||
@@ -74,6 +76,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import DeliveryOrderApi from '@/sheep/api/member/deliveryOrder';
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
import { baseUrl, apiPath } from '@/sheep/config';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
@@ -90,26 +96,29 @@
|
|||||||
const emit = defineEmits(['close', 'confirm'])
|
const emit = defineEmits(['close', 'confirm'])
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const orderIndex = ref(1)
|
const orderIndex = ref('')
|
||||||
const orderCode = ref('')
|
const orderCode = ref('')
|
||||||
const pickupName = ref('取货店铺详细地址广东省广州市天河区学院站荷光路')
|
const pickupName = ref('')
|
||||||
const address = ref('送餐详细地址广东省广州市天河区华景新城软件园区A栋303室')
|
const address = ref('')
|
||||||
const recipientTail = ref('1254')
|
const recipientTail = ref('')
|
||||||
const customerNote = ref('依据餐量提供餐具')
|
const customerNote = ref('依据餐量提供餐具')
|
||||||
|
|
||||||
const remarks = ['请选择 备注内容', '已核对身份证', '缺少配件', '地址异常']
|
const remarks = ['餐品破损', '餐品撒翻', '其他']
|
||||||
const selectedRemark = ref(0)
|
const selectedRemark = ref('')
|
||||||
const selectedRemarkText = computed(() => remarks[selectedRemark.value] || '')
|
const selectedRemarkText = computed(() => remarks[selectedRemark.value] || '')
|
||||||
|
|
||||||
const proofImages = ref([])
|
// 上传文件列表 (用于 up-upload 组件)
|
||||||
|
const uploadFileList = ref([])
|
||||||
|
|
||||||
|
// 已上传的凭证URL列表
|
||||||
|
const proofUrls = ref([])
|
||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const onClose = () => {
|
const onClose = () => {
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryOrder = () => {
|
const queryOrder = async () => {
|
||||||
// 简单模拟查询:如果输入有内容则把 orderIndex 加 1 并回填部分数据
|
|
||||||
if (!orderCode.value) {
|
if (!orderCode.value) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入查询条件',
|
title: '请输入查询条件',
|
||||||
@@ -117,12 +126,56 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
orderIndex.value += 1
|
|
||||||
// 这里可以调用接口查询并填充 pickupName/address 等
|
try {
|
||||||
uni.showToast({
|
// 解析输入:支持输入订单ID或手机尾号#取单号格式
|
||||||
title: '查询成功',
|
let orderId = orderCode.value;
|
||||||
icon: 'success'
|
|
||||||
})
|
// 如果包含 # 符号,尝试提取订单ID(这里假设后缀是订单ID)
|
||||||
|
if (orderCode.value.includes('#')) {
|
||||||
|
const parts = orderCode.value.split('#');
|
||||||
|
orderId = parts[parts.length - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.showLoading({ title: '查询中...' });
|
||||||
|
|
||||||
|
const res = await DeliveryOrderApi.getDetail(orderId);
|
||||||
|
const data = res.data || res;
|
||||||
|
|
||||||
|
uni.hideLoading();
|
||||||
|
|
||||||
|
if (data && data.id) {
|
||||||
|
// 更新订单信息
|
||||||
|
orderIndex.value = data.id;
|
||||||
|
pickupName.value = data.shopName || '';
|
||||||
|
address.value = data.receiverAddress || '';
|
||||||
|
customerNote.value = data.orderRemark || '';
|
||||||
|
|
||||||
|
// 处理收货人信息
|
||||||
|
if (data.receiverPhone) {
|
||||||
|
recipientTail.value = (data.receiverPhone + '').slice(-4);
|
||||||
|
} else {
|
||||||
|
recipientTail.value = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.showToast({
|
||||||
|
title: '查询成功',
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未找到订单',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
uni.hideLoading();
|
||||||
|
console.error('queryOrder error', e);
|
||||||
|
uni.showToast({
|
||||||
|
title: '查询失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拨打电话
|
// 拨打电话
|
||||||
@@ -140,37 +193,161 @@
|
|||||||
selectedRemark.value = e.detail.value
|
selectedRemark.value = e.detail.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const addProofImage = () => {
|
// 删除上传的图片
|
||||||
// 使用 uni.chooseImage 上传
|
const deleteUpload = (event) => {
|
||||||
uni.chooseImage({
|
uploadFileList.value.splice(event.index, 1)
|
||||||
count: 4,
|
proofUrls.value.splice(event.index, 1)
|
||||||
success(res) {
|
}
|
||||||
const tempFiles = res.tempFilePaths || res.tempFiles.map(f => f.path)
|
|
||||||
proofImages.value = proofImages.value.concat(tempFiles)
|
// 上传单个文件到 OSS
|
||||||
|
async function uploadFile(filePath) {
|
||||||
|
const token = uni.getStorageSync('token');
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: baseUrl + apiPath + '/app/file/uploadOss', // 上传接口地址
|
||||||
|
header: {
|
||||||
|
'Authorization': token
|
||||||
|
},
|
||||||
|
filePath: filePath,
|
||||||
|
name: 'file',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
try {
|
||||||
|
const data = JSON.parse(res.data);
|
||||||
|
if (data.code === 0 && data.data) {
|
||||||
|
resolve(data.data);
|
||||||
|
} else {
|
||||||
|
console.error('上传失败:', data.msg);
|
||||||
|
resolve(null);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('解析上传响应失败:', e);
|
||||||
|
resolve(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error('上传失败:', res.statusCode);
|
||||||
|
resolve(null);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('上传请求失败:', err);
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上传图片后的回调
|
||||||
|
async function afterRead(event) {
|
||||||
|
// 当设置 mutiple 为 true 时, event.file.list 为数组
|
||||||
|
const { file } = event;
|
||||||
|
|
||||||
|
// 如果是单选,转换为数组处理
|
||||||
|
const fileList = Array.isArray(file) ? file : [file];
|
||||||
|
|
||||||
|
for (const item of fileList) {
|
||||||
|
// 标记为上传中
|
||||||
|
uploadFileList.value.push({
|
||||||
|
...item,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 依次上传文件
|
||||||
|
for (let i = 0; i < fileList.length; i++) {
|
||||||
|
const item = fileList[i];
|
||||||
|
const index = uploadFileList.value.findIndex(f => f.url === item.url);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const url = await uploadFile(item.url);
|
||||||
|
|
||||||
|
if (url) {
|
||||||
|
// 上传成功,更新状态
|
||||||
|
uploadFileList.value[index] = {
|
||||||
|
...uploadFileList.value[index],
|
||||||
|
status: 'success',
|
||||||
|
message: ''
|
||||||
|
};
|
||||||
|
proofUrls.value.push(url);
|
||||||
|
} else {
|
||||||
|
// 上传失败
|
||||||
|
uploadFileList.value[index] = {
|
||||||
|
...uploadFileList.value[index],
|
||||||
|
status: 'failed',
|
||||||
|
message: '上传失败'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('上传图片异常:', error);
|
||||||
|
uploadFileList.value[index] = {
|
||||||
|
...uploadFileList.value[index],
|
||||||
|
status: 'failed',
|
||||||
|
message: '上传失败'
|
||||||
|
};
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeProofImage = (idx) => {
|
const onConfirm = async () => {
|
||||||
proofImages.value.splice(idx, 1)
|
// 校验配送单信息
|
||||||
}
|
if (!orderIndex.value) {
|
||||||
|
uni.showToast({
|
||||||
const onConfirm = () => {
|
title: '没有配送单信息',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 校验凭证
|
// 校验凭证
|
||||||
if (proofImages.value.length === 0) {
|
if (proofUrls.value.length === 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请上传凭证',
|
title: '请上传凭证',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const payload = {
|
|
||||||
orderIndex: orderIndex.value,
|
try {
|
||||||
orderCode: orderCode.value,
|
uni.showLoading({ title: '提交中...' });
|
||||||
remark: selectedRemarkText.value,
|
|
||||||
proofImages: proofImages.value
|
// 调用确认交接接口
|
||||||
|
const res = await DeliveryOrderApi.riderConfirmHandover({
|
||||||
|
deliveryOrderId: Number(orderIndex.value),
|
||||||
|
// 注意:这里假设 remarks 的 index 就是 handoverRemarkId,如果后端需要实际ID可能需要调整
|
||||||
|
handoverRemarkId: selectedRemark.value === 0 ? undefined : selectedRemark.value,
|
||||||
|
imageUrlList: proofUrls.value
|
||||||
|
});
|
||||||
|
|
||||||
|
uni.hideLoading();
|
||||||
|
|
||||||
|
if (res.code === 0 && res.data === true) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '交接成功',
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
|
|
||||||
|
// 关闭弹框并通知父组件
|
||||||
|
emit('confirm', {
|
||||||
|
orderIndex: orderIndex.value,
|
||||||
|
orderCode: orderCode.value,
|
||||||
|
remark: selectedRemarkText.value,
|
||||||
|
proofImages: proofUrls.value
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg || '交接失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
uni.hideLoading();
|
||||||
|
console.error('确认交接异常:', error);
|
||||||
|
uni.showToast({
|
||||||
|
title: '交接失败,请重试',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
emit('confirm', payload)
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -212,6 +389,7 @@
|
|||||||
border: 1rpx solid #ddd;
|
border: 1rpx solid #ddd;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-btn {
|
.search-btn {
|
||||||
|
|||||||
@@ -5,14 +5,16 @@
|
|||||||
<view class="top-area" :style="headerStyle">
|
<view class="top-area" :style="headerStyle">
|
||||||
<view class="top-bg"></view>
|
<view class="top-bg"></view>
|
||||||
<view class="top-inner">
|
<view class="top-inner">
|
||||||
<view class="user-info">
|
<view class="user-info" @tap="sheep.$router.go('/pages/index/user')">
|
||||||
<image class="user-avatar" @tap="sheep.$router.go('/pages/index/user')"
|
<image class="user-avatar" :src="driverInfo.avatar || defaultAvatar" mode="cover" />
|
||||||
:src="driverInfo.avatar || defaultAvatar" mode="cover" />
|
|
||||||
<view class="user-meta">
|
<view class="user-meta">
|
||||||
<!-- <text class="user-status" @click="toggleOnline">{{ driverInfo.isOnline ? '在线中' : '离线' }}</text> -->
|
<!-- <text class="user-status" @click="toggleOnline">{{ driverInfo.isOnline ? '在线中' : '离线' }}</text> -->
|
||||||
<text class="user-status">
|
<text class="user-status" v-if="driverInfo.nickname">
|
||||||
{{ driverInfo.onlineStatus == 0 ? '离线' : (driverInfo.onlineStatus == 1 ? '在线' : '待审核') }}
|
{{ driverInfo.onlineStatus == 0 ? '离线' : (driverInfo.onlineStatus == 1 ? '在线' : '待审核') }}
|
||||||
</text>
|
</text>
|
||||||
|
<text class="user-status" v-else>
|
||||||
|
请登录
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tabs">
|
<view class="tabs">
|
||||||
@@ -53,7 +55,7 @@
|
|||||||
<text class="address-title">{{ order.shopAddress }}</text>
|
<text class="address-title">{{ order.shopAddress }}</text>
|
||||||
<text class="address-sub">商家 · {{ order.shopPhone || '' }}</text>
|
<text class="address-sub">商家 · {{ order.shopPhone || '' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="nav-icon" @click="openMap(order.shopLat, order.shopLng, order.shopAddress)">导航</view>
|
<view class="nav-icon" @click.stop="openMap(order.shopLat, order.shopLng, order.shopAddress)">导航</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="address-row">
|
<view class="address-row">
|
||||||
<view class="icon deliver">送</view>
|
<view class="icon deliver">送</view>
|
||||||
@@ -61,14 +63,14 @@
|
|||||||
<text class="address-title">{{ order.deliveryAddress }}</text>
|
<text class="address-title">{{ order.deliveryAddress }}</text>
|
||||||
<text class="address-sub">收货人:{{ order.receiverName }} {{ order.receiverPhone ? ('尾号' + (order.receiverPhone + '').slice(-4)) : ''}}</text>
|
<text class="address-sub">收货人:{{ order.receiverName }} {{ order.receiverPhone ? ('尾号' + (order.receiverPhone + '').slice(-4)) : ''}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="nav-icon" @click="openMap(order.deliveryLat, order.deliveryLng, order.deliveryAddress)">导航</view>
|
<view class="nav-icon" @click.stop="openMap(order.deliveryLat, order.deliveryLng, order.deliveryAddress)">导航</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 操作区 -->
|
<!-- 操作区 -->
|
||||||
<view class="order-actions">
|
<view class="order-actions">
|
||||||
<view class="contact" @click="callPhone(order.receiverPhone)">
|
<view class="contact" @click="openRemindPopupWithOrder(order)">
|
||||||
<text>联系</text>
|
<text>联系</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="confirm" @click="confirmArrive(order.id)" v-if="order.deliveryStatus == 2">
|
<view class="confirm" @click="confirmArrive(order.id)" v-if="order.deliveryStatus == 2">
|
||||||
@@ -77,15 +79,55 @@
|
|||||||
<view class="confirm" @click="confirmPickup(order.id)" v-if="order.deliveryStatus == 3">
|
<view class="confirm" @click="confirmPickup(order.id)" v-if="order.deliveryStatus == 3">
|
||||||
<text>确认取餐</text>
|
<text>确认取餐</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="confirm" style="background: #ffaa00;" v-if="order.deliveryStatus == 4">
|
||||||
|
<text>送达交接点</text>
|
||||||
|
</view>
|
||||||
|
<view class="confirm" v-if="order.deliveryStatus == 5" @click="openDeliveryPopup(order)">
|
||||||
|
<text>确认送达顾客</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
<!-- 催单弹框 -->
|
||||||
|
<up-popup v-model:show="showRemind" mode="bottom" :closeable="false" border-radius="12">
|
||||||
|
<view class="remind-popup">
|
||||||
|
<view class="remind-row">
|
||||||
|
<text class="remind-title">联系商家</text>
|
||||||
|
<view class="remind-btn" @click.stop="callShopPhone">拨打电话</view>
|
||||||
|
</view>
|
||||||
|
<view class="remind-row">
|
||||||
|
<text class="remind-title">联系顾客</text>
|
||||||
|
<view class="remind-btn" @click.stop="callCustomerPhone">拨打电话</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
|
|
||||||
<!-- 底部批量操作栏 -->
|
<!-- 底部批量操作栏 -->
|
||||||
<view class="bottom-bar">
|
<view class="bottom-bar">
|
||||||
|
<view v-if="activeTab == 'delivering'" class="batch-operation" @click="openBatchOperation">批量操作</view>
|
||||||
<view class="batch-item" @click="scanQr">扫一扫取单</view>
|
<view class="batch-item" @click="scanQr">扫一扫取单</view>
|
||||||
<view class="batch-item" @click="openManualInput">输入用户单编码</view>
|
<view class="batch-item" @click="openManualInput">输入用户单编码</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 批量操作模态弹框 -->
|
||||||
|
<u-modal :show="batchModalShow" :title="batchModalTitle" :content="batchModalContent" confirmText="确认送达" cancelText="取消"
|
||||||
|
:showCancelButton="hasDeliveryOrders" @confirm="onBatchConfirm" @cancel="batchModalShow = false" @close="batchModalShow = false"
|
||||||
|
:closeOnClickOverlay="false" :zoom="true" confirmColor="#1e9fff" />
|
||||||
|
|
||||||
|
<!-- 批量送达交接点异步操作弹框 -->
|
||||||
|
<u-modal :show="batchLoadingModalShow" :title="batchLoadingModalTitle" :content="batchLoadingModalContent" confirmText="确认送达"
|
||||||
|
:showCancelButton="false" :asyncClose="true" @confirm="onBatchLoadingConfirm" ref="batchLoadingModalRef"
|
||||||
|
confirmColor="#1e9fff" />
|
||||||
|
|
||||||
|
<!-- 确认送达顾客弹框 -->
|
||||||
|
<DeliveryPopup
|
||||||
|
:show="showDeliveryPopup"
|
||||||
|
:receiverPhone="currentOrderForDelivery?.receiverPhone || ''"
|
||||||
|
@update:show="showDeliveryPopup = $event"
|
||||||
|
@submit="handleDeliveryConfirm"
|
||||||
|
@close="showDeliveryPopup = false"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -95,13 +137,10 @@ import sheep from '@/sheep';
|
|||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
import OrderCodePopup from './components/order-code-popup.vue';
|
import OrderCodePopup from './components/order-code-popup.vue';
|
||||||
import DeliveryOrderApi from '@/sheep/api/member/deliveryOrder';
|
import DeliveryOrderApi from '@/sheep/api/member/deliveryOrder';
|
||||||
|
import DeliveryPopup from './components/delivery-popup.vue';
|
||||||
|
|
||||||
// 驿站/骑手信息(从 store 获取或 mock)
|
//骑手信息
|
||||||
const driverInfo = ref({
|
const driverInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
isOnline: true,
|
|
||||||
nickName: '骑手张三',
|
|
||||||
avatar: ''
|
|
||||||
});
|
|
||||||
|
|
||||||
const defaultAvatar = 'https://huichibao.oss-cn-guangzhou.aliyuncs.com/1/material/348b8223-8d03-46aa-8836-6757e8beebd2.png';
|
const defaultAvatar = 'https://huichibao.oss-cn-guangzhou.aliyuncs.com/1/material/348b8223-8d03-46aa-8836-6757e8beebd2.png';
|
||||||
|
|
||||||
@@ -148,7 +187,7 @@ const filteredOrders = computed(() => orders.value);
|
|||||||
// 加载订单列表数据
|
// 加载订单列表数据
|
||||||
async function loadOrders(isLoadMore = false) {
|
async function loadOrders(isLoadMore = false) {
|
||||||
if (loading.value) return;
|
if (loading.value) return;
|
||||||
|
if (driverInfo.value.auditStatus != 2) return;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
// 根据当前 tab 确定接口参数 status
|
// 根据当前 tab 确定接口参数 status
|
||||||
@@ -199,6 +238,10 @@ async function loadOrders(isLoadMore = false) {
|
|||||||
// 判断是否还有更多数据
|
// 判断是否还有更多数据
|
||||||
noMore.value = orders.value.length >= pagination.value.total;
|
noMore.value = orders.value.length >= pagination.value.total;
|
||||||
} else {
|
} else {
|
||||||
|
// 清空列表,防止旧数据残留
|
||||||
|
if (!isLoadMore) {
|
||||||
|
orders.value = [];
|
||||||
|
}
|
||||||
sheep.$helper.toast(res.msg || '加载失败');
|
sheep.$helper.toast(res.msg || '加载失败');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -275,10 +318,66 @@ async function confirmPickup(orderId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 催单弹框控制
|
||||||
|
const showRemind = ref(false);
|
||||||
|
const currentOrder = ref(null);
|
||||||
|
|
||||||
|
// 批量操作模态弹框控制
|
||||||
|
const batchModalShow = ref(false);
|
||||||
|
const batchModalTitle = ref('当前送达交接点订单数');
|
||||||
|
const batchModalContent = ref('');
|
||||||
|
const hasDeliveryOrders = ref(false);
|
||||||
|
|
||||||
|
// 批量送达异步操作弹框控制
|
||||||
|
const batchLoadingModalShow = ref(false);
|
||||||
|
const batchLoadingModalTitle = ref('当前送达交接点订单数');
|
||||||
|
const batchLoadingModalContent = ref('');
|
||||||
|
const batchOrderCount = ref(0);
|
||||||
|
|
||||||
|
// 确认送达顾客弹框控制
|
||||||
|
const showDeliveryPopup = ref(false);
|
||||||
|
const currentOrderForDelivery = ref(null);
|
||||||
|
|
||||||
|
function openRemindPopupWithOrder(order) {
|
||||||
|
currentOrder.value = order;
|
||||||
|
showRemind.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function openRemindPopup() {
|
||||||
|
showRemind.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeRemindPopup() {
|
||||||
|
showRemind.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function callShopPhone(phone) {
|
||||||
|
//订单获取商家电话
|
||||||
|
const orderPhone = currentOrder.value?.shopPhone || '';
|
||||||
|
if (!orderPhone) {
|
||||||
|
sheep.$helper.toast('未找到商家电话');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callPhone(orderPhone);
|
||||||
|
closeRemindPopup();
|
||||||
|
}
|
||||||
|
|
||||||
|
function callCustomerPhone(phone) {
|
||||||
|
//从订单获取顾客电话
|
||||||
|
const orderPhone = currentOrder.value?.receiverPhone || '';
|
||||||
|
if (!orderPhone) {
|
||||||
|
sheep.$helper.toast('未找到顾客电话');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callPhone(orderPhone);
|
||||||
|
closeRemindPopup();
|
||||||
|
}
|
||||||
|
|
||||||
// 拨打电话
|
// 拨打电话
|
||||||
function callPhone(phone) {
|
function callPhone(phone) {
|
||||||
|
console.log("电话:", phone)
|
||||||
if (!phone) {
|
if (!phone) {
|
||||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('未找到联系电话');
|
sheep.$helper.toast('未找到联系电话');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
@@ -296,7 +395,13 @@ function openMap(lat, lng, name) {
|
|||||||
latitude: Number(lat),
|
latitude: Number(lat),
|
||||||
longitude: Number(lng),
|
longitude: Number(lng),
|
||||||
name: name || '',
|
name: name || '',
|
||||||
scale: 18
|
scale: 18,
|
||||||
|
success: function () {
|
||||||
|
console.log('success');
|
||||||
|
},
|
||||||
|
error: function (err) {
|
||||||
|
console.log("错误信息:", err);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,6 +426,76 @@ function openManualInput() {
|
|||||||
orderPopupShow.value = true;
|
orderPopupShow.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 打开批量操作弹框
|
||||||
|
function openBatchOperation() {
|
||||||
|
// 筛选出配送中状态为待送达交接点(ddeliveryStatus=4)的订单
|
||||||
|
const deliveryOrders = orders.value.filter(o => o.type === 'delivering' && o.deliveryStatus === 4);
|
||||||
|
hasDeliveryOrders.value = deliveryOrders.length > 0;
|
||||||
|
|
||||||
|
if (hasDeliveryOrders.value) {
|
||||||
|
// 有待送达交接点的订单
|
||||||
|
batchModalTitle.value = '当前送达交接点订单数';
|
||||||
|
batchModalContent.value = `${deliveryOrders.length} 笔`;
|
||||||
|
batchModalShow.value = true;
|
||||||
|
} else {
|
||||||
|
// 没有待送达交接点的订单
|
||||||
|
batchModalTitle.value = '';
|
||||||
|
batchModalContent.value = '暂无待送达交接点的订单';
|
||||||
|
batchModalShow.value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量送达交接点确认
|
||||||
|
function onBatchConfirm() {
|
||||||
|
// 筛选出配送中状态为待送达交接点的订单
|
||||||
|
const deliveryOrders = orders.value.filter(o => o.type === 'delivering' && o.deliveryStatus === 4);
|
||||||
|
batchOrderCount.value = deliveryOrders.length;
|
||||||
|
|
||||||
|
if (deliveryOrders.length > 0) {
|
||||||
|
// 关闭第一个弹框,打开异步操作弹框
|
||||||
|
batchModalShow.value = false;
|
||||||
|
batchLoadingModalTitle.value = '当前送达交接点订单数';
|
||||||
|
batchLoadingModalContent.value = `${deliveryOrders.length} 笔`;
|
||||||
|
batchLoadingModalShow.value = true;
|
||||||
|
} else {
|
||||||
|
// 没有订单,直接关闭
|
||||||
|
batchModalShow.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量送达交接点异步确认(真正执行批量操作)
|
||||||
|
async function onBatchLoadingConfirm() {
|
||||||
|
// 筛选出配送中状态为待送达交接点的订单ID
|
||||||
|
const deliveryOrderIds = orders.value
|
||||||
|
.filter(o => o.type === 'delivering' && o.deliveryStatus === 4)
|
||||||
|
.map(o => o.id);
|
||||||
|
|
||||||
|
if (deliveryOrderIds.length === 0) {
|
||||||
|
batchLoadingModalShow.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 调用批量送达交接点接口,ids 为逗号分隔的订单ID字符串
|
||||||
|
const res = await DeliveryOrderApi.riderDeliveryHandoverBatch(deliveryOrderIds.join(','));
|
||||||
|
|
||||||
|
if (res.code === 0 && res.data === true) {
|
||||||
|
// 关闭异步弹框
|
||||||
|
batchLoadingModalShow.value = false;
|
||||||
|
sheep.$helper.toast('批量送达交接点操作成功');
|
||||||
|
// 刷新订单列表
|
||||||
|
refreshOrders();
|
||||||
|
} else {
|
||||||
|
batchLoadingModalShow.value = false;
|
||||||
|
sheep.$helper.toast(res.msg || '批量送达交接点失败');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('批量送达交接点异常:', error);
|
||||||
|
batchLoadingModalShow.value = false;
|
||||||
|
sheep.$helper.toast('批量送达交接点失败,请重试');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onConfirmCode(payload) {
|
function onConfirmCode(payload) {
|
||||||
// payload 包含 code, result, remark, images
|
// payload 包含 code, result, remark, images
|
||||||
// 这里简单展示提示,实际应调用后端或触发下一步逻辑
|
// 这里简单展示提示,实际应调用后端或触发下一步逻辑
|
||||||
@@ -328,6 +503,41 @@ function onConfirmCode(payload) {
|
|||||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('交接已确认');
|
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('交接已确认');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 确认送达顾客
|
||||||
|
async function handleDeliveryConfirm(imageUrl) {
|
||||||
|
console.log('送达照片URL:', imageUrl);
|
||||||
|
|
||||||
|
if (!currentOrderForDelivery.value?.id) {
|
||||||
|
sheep.$helper.toast('订单信息异常');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await DeliveryOrderApi.riderConfirmDelivery({
|
||||||
|
deliveryOrderId: currentOrderForDelivery.value.id,
|
||||||
|
imageUrl: imageUrl
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res.code === 0 && res.data === true) {
|
||||||
|
sheep.$helper.toast('已提交送达照片');
|
||||||
|
showDeliveryPopup.value = false;
|
||||||
|
// 刷新订单列表
|
||||||
|
refreshOrders();
|
||||||
|
} else {
|
||||||
|
sheep.$helper.toast(res.msg || '提交失败');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('确认送达异常:', error);
|
||||||
|
sheep.$helper.toast('提交失败,请重试');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开确认送达顾客弹框
|
||||||
|
function openDeliveryPopup(order) {
|
||||||
|
currentOrderForDelivery.value = order;
|
||||||
|
showDeliveryPopup.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
const headerStyle = ref({});
|
const headerStyle = ref({});
|
||||||
|
|
||||||
function setHeaderSafeArea() {
|
function setHeaderSafeArea() {
|
||||||
@@ -577,4 +787,45 @@ onShow(() => {
|
|||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
border: 1rpx solid #ddd;
|
border: 1rpx solid #ddd;
|
||||||
}
|
}
|
||||||
|
.batch-operation {
|
||||||
|
background: #1e9fff;
|
||||||
|
color: #fff;
|
||||||
|
padding: 14rpx 20rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 催单弹框样式 */
|
||||||
|
.remind-popup {
|
||||||
|
padding: 20rpx 0;
|
||||||
|
}
|
||||||
|
.remind-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
margin: 10rpx 16rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
.remind-title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.remind-btn {
|
||||||
|
background: #1e9fff;
|
||||||
|
color: #fff;
|
||||||
|
padding: 10rpx 18rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.remind-cancel {
|
||||||
|
text-align: center;
|
||||||
|
padding: 18rpx 0 70rpx;
|
||||||
|
color: #666;
|
||||||
|
font-size: 26rpx;
|
||||||
|
background: #fff;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="stats-item">
|
<view class="stats-item">
|
||||||
<text class="stats-title">今日完成单量(单)</text>
|
<text class="stats-title">今日完成单量(单)</text>
|
||||||
<text class="stats-value"> {{ todayOrders }} </text>
|
<text class="stats-value"> {{ formatMoney(todayOrders) }} </text>
|
||||||
<view class="stats-link" @tap="sheep.$router.go('/pages/user/order/orderRecord')">
|
<view class="stats-link" @tap="sheep.$router.go('/pages/user/order/orderRecord')">
|
||||||
订单统计 <uni-icons type="right" size="13"></uni-icons>
|
订单统计 <uni-icons type="right" size="13"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<s-layout title="订单详情" class="set-userinfo-wrap">
|
<s-layout title="订单详情" class="set-userinfo-wrap">
|
||||||
<view class="order-detail-page">
|
<view class="order-detail-page">
|
||||||
<!-- 地图占位(可替换为原生 map 组件或第三方地图组件) -->
|
<!-- 地图区域 -->
|
||||||
<view class="map-area">
|
<view class="map-area">
|
||||||
<!-- 真实项目建议使用 <map> 并渲染 polyline/markers -->
|
<map class="map-native" :latitude="order?.pickupLat" :longitude="order?.pickupLng" show-location
|
||||||
<image class="map-image" src="/static/img/map-placeholder.png" mode="widthFix" v-if="!mapAvailable" />
|
|
||||||
<map v-else class="map-native" :latitude="order?.pickupLat" :longitude="order?.pickupLng" show-location
|
|
||||||
enable-3D enable-zoom :scale="16"></map>
|
enable-3D enable-zoom :scale="16"></map>
|
||||||
<view class="map-overlay">
|
<cover-view class="map-overlay">
|
||||||
<view class="eta">距离商家{{ distanceText }},预计{{ etaText }}到达</view>
|
<cover-view class="eta">距离商家{{ distanceText }},预计{{ etaText }}到达</cover-view>
|
||||||
<view class="nav-btn" @click="navigateToShop">导航到商家</view>
|
<cover-view class="nav-btn" @click="navigateToShop">导航到商家</cover-view>
|
||||||
</view>
|
</cover-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 地址块 -->
|
<!-- 地址块 -->
|
||||||
@@ -67,7 +65,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 占位底部高度,避免内容被底部按钮遮挡 -->
|
<!-- 占位底部高度,避免内容被底部按钮遮挡 -->
|
||||||
<view style="height:140rpx;"></view>
|
<view style="height:200rpx;"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<!-- 底部操作 -->
|
<!-- 底部操作 -->
|
||||||
@@ -76,10 +74,13 @@
|
|||||||
<view class="icon-phone" @click="callPhone(order?.receiverPhone)"></view>
|
<view class="icon-phone" @click="callPhone(order?.receiverPhone)"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-actions">
|
<view class="right-actions">
|
||||||
<view class="btn remind">催单</view>
|
<view class="btn remind"
|
||||||
|
@click="sheep.$helper.toast('功能开发中ing')">催单</view>
|
||||||
<view class="btn remind" @click="openRemindPopup">电话联系</view>
|
<view class="btn remind" @click="openRemindPopup">电话联系</view>
|
||||||
<!-- <view class="btn confirm">转单</view> -->
|
<view class="btn confirm" v-if="order?.deliveryStatus == 2" @click="confirmArrive">确认到店</view>
|
||||||
<view class="btn confirm" @click="confirmArrive">确认到店</view>
|
<view class="btn confirm" v-if="order?.deliveryStatus == 3" @click="confirmPickup">确认取餐</view>
|
||||||
|
<view class="btn handover" v-if="order?.deliveryStatus == 4" @click="deliveryHandover">送达交接点</view>
|
||||||
|
<view class="btn handover" v-if="order?.deliveryStatus == 5" @click="openDeliveryPopup">确认送达顾客</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 催单弹框 -->
|
<!-- 催单弹框 -->
|
||||||
@@ -98,6 +99,15 @@
|
|||||||
<view class="remind-cancel" @click="showRemind = false">取消</view>
|
<view class="remind-cancel" @click="showRemind = false">取消</view>
|
||||||
</template>
|
</template>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
|
||||||
|
<!-- 确认送达顾客弹框 -->
|
||||||
|
<DeliveryPopup
|
||||||
|
:show="showDeliveryPopup"
|
||||||
|
:receiverPhone="order?.receiverPhone || ''"
|
||||||
|
@update:show="showDeliveryPopup = $event"
|
||||||
|
@submit="handleDeliveryConfirm"
|
||||||
|
@close="showDeliveryPopup = false"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</s-layout>
|
</s-layout>
|
||||||
</template>
|
</template>
|
||||||
@@ -111,11 +121,13 @@
|
|||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
|
import DeliveryOrderApi from '@/sheep/api/member/deliveryOrder';
|
||||||
|
import DeliveryPopup from '@/pages/index/components/delivery-popup.vue';
|
||||||
|
|
||||||
const orderId = ref(null);
|
const orderId = ref(null);
|
||||||
const order = ref(null);
|
const order = ref(null);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const mapAvailable = ref(false); // 如果需要使用 map 组件,置为 true
|
const mapAvailable = ref(true); // 如果需要使用 map 组件,置为 true
|
||||||
|
|
||||||
// 入口:从页面参数取 orderId,然后加载数据
|
// 入口:从页面参数取 orderId,然后加载数据
|
||||||
onLoad((options = {}) => {
|
onLoad((options = {}) => {
|
||||||
@@ -126,51 +138,36 @@
|
|||||||
async function fetchOrder() {
|
async function fetchOrder() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
// 优先尝试平台统一 request(项目内可能封装在 sheep.request 或 sheep.api)
|
// 使用 DeliveryOrderApi 获取配送单详情
|
||||||
if (sheep && typeof sheep.request === 'function') {
|
const res = await DeliveryOrderApi.getDetail(orderId.value);
|
||||||
const res = await sheep.request({
|
// 根据封装不同,这里兼容 res.data 或 res
|
||||||
url: '/order/detail',
|
const resData = (res && res.data) ? res.data : res;
|
||||||
method: 'GET',
|
console.log("res数据:", res);
|
||||||
data: {
|
|
||||||
id: orderId.value
|
if (resData) {
|
||||||
}
|
// 字段映射:将接口返回字段映射到页面使用字段
|
||||||
});
|
|
||||||
// 根据封装不同,这里兼容 res.data 或 res
|
|
||||||
order.value = (res && res.data) ? res.data : res;
|
|
||||||
} else if (sheep && sheep.$api && sheep.$api.trade && typeof sheep.$api.trade.detail === 'function') {
|
|
||||||
const res = await sheep.$api.trade.detail({
|
|
||||||
id: orderId.value
|
|
||||||
});
|
|
||||||
order.value = res?.data || res;
|
|
||||||
} else {
|
|
||||||
// 回退 mock 数据,避免界面空白,开发时替换为真实接口
|
|
||||||
order.value = {
|
order.value = {
|
||||||
id: orderId.value || 1001,
|
...resData,
|
||||||
shopName: '店铺名(示例)',
|
// 店铺坐标 (取货点)
|
||||||
pickupAddress: '广东省广州市天河区学院站荷光路118-121号',
|
pickupLat: resData.shopLatitude,
|
||||||
pickupLat: 23.1005,
|
pickupLng: resData.shopLongitude,
|
||||||
pickupLng: 113.3301,
|
pickupAddress: resData.shopAddress,
|
||||||
deliveryAddress: '广东省广州市天河区华景新城软件园区B栋西梯501',
|
// 收货地址
|
||||||
deliveryLat: 23.105,
|
deliveryLat: resData.receiverLatitude,
|
||||||
deliveryLng: 113.335,
|
deliveryLng: resData.receiverLongitude,
|
||||||
receiverName: '张先生',
|
deliveryAddress: resData.receiverAddress,
|
||||||
receiverPhone: '13900001234',
|
// 商品列表
|
||||||
note: '依据餐量提供餐具',
|
items: resData.orderItemDataList?.map(item => ({
|
||||||
items: [{
|
name: item.productName,
|
||||||
name: '商品名称A',
|
quantity: item.quantity,
|
||||||
spec: '规格1',
|
price: parseFloat(item.unitPrice) || 0
|
||||||
quantity: 2,
|
})) || [],
|
||||||
price: 23.89
|
// 备注
|
||||||
},
|
note: resData.orderRemark,
|
||||||
{
|
deliveryStatus: resData.deliveryStatus
|
||||||
name: '商品名称B',
|
|
||||||
spec: '规格2',
|
|
||||||
quantity: 1,
|
|
||||||
price: 45.00
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
console.log("order.value数据:", order.value);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('fetchOrder error', e);
|
console.error('fetchOrder error', e);
|
||||||
// 友好提示
|
// 友好提示
|
||||||
@@ -240,6 +237,42 @@
|
|||||||
showRemind.value = false;
|
showRemind.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 确认送达顾客弹框控制
|
||||||
|
const showDeliveryPopup = ref(false);
|
||||||
|
|
||||||
|
function openDeliveryPopup() {
|
||||||
|
showDeliveryPopup.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认送达顾客
|
||||||
|
async function handleDeliveryConfirm(imageUrl) {
|
||||||
|
console.log('送达照片URL:', imageUrl);
|
||||||
|
|
||||||
|
if (!orderId.value) {
|
||||||
|
sheep.$helper.toast('订单信息异常');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await DeliveryOrderApi.riderConfirmDelivery({
|
||||||
|
deliveryOrderId: orderId.value,
|
||||||
|
imageUrl: imageUrl
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res.code === 0 && res.data === true) {
|
||||||
|
sheep.$helper.toast('已提交送达照片');
|
||||||
|
showDeliveryPopup.value = false;
|
||||||
|
// 刷新订单状态
|
||||||
|
fetchOrder();
|
||||||
|
} else {
|
||||||
|
sheep.$helper.toast(res.msg || '提交失败');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('确认送达异常:', error);
|
||||||
|
sheep.$helper.toast('提交失败,请重试');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function callShopPhone() {
|
function callShopPhone() {
|
||||||
// 商家电话优先使用 order.shopPhone,否则尝试 fallback
|
// 商家电话优先使用 order.shopPhone,否则尝试 fallback
|
||||||
const phone = order.value?.shopPhone || order.value?.shopPhoneNumber || order.value?.receiverPhone || '';
|
const phone = order.value?.shopPhone || order.value?.shopPhoneNumber || order.value?.receiverPhone || '';
|
||||||
@@ -261,29 +294,68 @@
|
|||||||
closeRemindPopup();
|
closeRemindPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmArrive() {
|
// 确认到店
|
||||||
// 确认到店:调用接口或本地改变状态
|
async function confirmArrive() {
|
||||||
if (!order.value) return;
|
if (!order.value || !orderId.value) return;
|
||||||
// 示例:调用后端接口(兼容性判断)
|
|
||||||
(async () => {
|
try {
|
||||||
try {
|
uni.showLoading({ title: '提交中...' });
|
||||||
if (sheep && typeof sheep.request === 'function') {
|
const res = await DeliveryOrderApi.riderConfirmArrival(orderId.value);
|
||||||
await sheep.request({
|
uni.hideLoading();
|
||||||
url: '/order/confirmArrive',
|
|
||||||
method: 'POST',
|
if (res.code === 0 && res.data === true) {
|
||||||
data: {
|
sheep.$helper.toast('已确认到店');
|
||||||
id: order.value.id
|
// 刷新订单状态
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('已确认到店');
|
|
||||||
// 可在此刷新订单状态
|
|
||||||
fetchOrder();
|
fetchOrder();
|
||||||
} catch (e) {
|
} else {
|
||||||
console.error(e);
|
sheep.$helper.toast(res.msg || '确认到店失败');
|
||||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('确认失败,请重试');
|
|
||||||
}
|
}
|
||||||
})();
|
} catch (e) {
|
||||||
|
uni.hideLoading();
|
||||||
|
console.error('confirmArrive error', e);
|
||||||
|
sheep.$helper.toast('确认失败,请重试');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认取餐
|
||||||
|
async function confirmPickup() {
|
||||||
|
if (!order.value || !orderId.value) return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
uni.showLoading({ title: '提交中...' });
|
||||||
|
const res = await DeliveryOrderApi.riderConfirmPickup(orderId.value);
|
||||||
|
uni.hideLoading();
|
||||||
|
|
||||||
|
if (res.code === 0 && res.data === true) {
|
||||||
|
sheep.$helper.toast('已确认取餐');
|
||||||
|
// 刷新订单状态
|
||||||
|
fetchOrder();
|
||||||
|
} else {
|
||||||
|
sheep.$helper.toast(res.msg || '确认取餐失败');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
uni.hideLoading();
|
||||||
|
console.error('confirmPickup error', e);
|
||||||
|
sheep.$helper.toast('确认失败,请重试');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 送达交接点
|
||||||
|
async function deliveryHandover() {
|
||||||
|
if (!order.value || !orderId.value) return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
uni.showLoading({ title: '提交中...' });
|
||||||
|
await DeliveryOrderApi.riderDeliveryHandover(orderId.value);
|
||||||
|
uni.hideLoading();
|
||||||
|
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('已送达交接点');
|
||||||
|
// 刷新订单状态
|
||||||
|
fetchOrder();
|
||||||
|
} catch (e) {
|
||||||
|
console.error('deliveryHandover error', e);
|
||||||
|
uni.hideLoading();
|
||||||
|
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('提交失败,请重试');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//跳转交接记录
|
//跳转交接记录
|
||||||
@@ -329,7 +401,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.map-area {
|
.map-area {
|
||||||
height: 360rpx;
|
height: 560rpx;
|
||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -351,26 +423,32 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 20rpx;
|
left: 20rpx;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
bottom: 20rpx;
|
bottom: 45rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.eta {
|
.eta {
|
||||||
background: rgba(255, 255, 255, 0.95);
|
background: rgba(255, 255, 255, 0.95);
|
||||||
padding: 10rpx 14rpx;
|
padding: 0rpx 14rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
// line-height: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-btn {
|
.nav-btn {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 10rpx 14rpx;
|
padding: 0rpx 20rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
color: #1e9fff;
|
color: #1e9fff;
|
||||||
border: 1rpx solid #dbeeff;
|
border: 1rpx solid #dbeeff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
// line-height: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
@@ -578,6 +656,10 @@
|
|||||||
background: #1e9fff;
|
background: #1e9fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn.handover {
|
||||||
|
background: #2ecc71;
|
||||||
|
}
|
||||||
|
|
||||||
.remind-popup {
|
.remind-popup {
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
<view class="transfer-page">
|
<view class="transfer-page">
|
||||||
<scroll-view class="body" scroll-y>
|
<scroll-view class="body" scroll-y>
|
||||||
<u-steps direction="column" :current="currentIndex" class="steps-wrap">
|
<u-steps direction="column" :current="currentIndex" class="steps-wrap">
|
||||||
<u-steps-item v-for="(item, idx) in records" :key="idx">
|
<!-- <u-steps-item v-for="(item, idx) in records" :key="idx">
|
||||||
<template #title>
|
<template #title>
|
||||||
<text class="step-title">{{ item.title }}</text>
|
<text class="step-title">{{ item.operator }}</text>
|
||||||
</template>
|
</template>
|
||||||
<template #desc>
|
<template #desc>
|
||||||
<text class="step-desc">{{ item.time }}</text>
|
<text class="step-desc">{{ item.operator }}</text>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<view class="step-content">
|
<view class="step-content">
|
||||||
@@ -16,7 +16,20 @@
|
|||||||
<text class="op-note" v-if="item.note"> · {{ item.note }}</text>
|
<text class="op-note" v-if="item.note"> · {{ item.note }}</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-steps-item>
|
</u-steps-item> -->
|
||||||
|
<template v-for="(item, idx) in records" :key="idx">
|
||||||
|
<up-steps-item :desc="item.time">
|
||||||
|
<template #title>
|
||||||
|
<view>
|
||||||
|
<view class="step-title">{{ item.title }}</view>
|
||||||
|
<view>
|
||||||
|
<text class="step-desc">{{ item.operator }}</text>
|
||||||
|
<text class="op-note" v-if="item.note"> · {{ item.note }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</up-steps-item>
|
||||||
|
</template>
|
||||||
</u-steps>
|
</u-steps>
|
||||||
<view v-if="records.length === 0" class="empty">暂无交接记录</view>
|
<view v-if="records.length === 0" class="empty">暂无交接记录</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -33,6 +46,7 @@
|
|||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
|
import DeliveryOrderApi from '@/sheep/api/member/deliveryOrder';
|
||||||
|
|
||||||
const records = ref([]);
|
const records = ref([]);
|
||||||
const orderId = ref(null);
|
const orderId = ref(null);
|
||||||
@@ -42,38 +56,51 @@
|
|||||||
fetchRecords();
|
fetchRecords();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function formatTime(timestamp) {
|
||||||
|
if (!timestamp) return '';
|
||||||
|
const date = new Date(Number(timestamp));
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
const hours = String(date.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
|
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||||
|
}
|
||||||
|
|
||||||
async function fetchRecords() {
|
async function fetchRecords() {
|
||||||
try {
|
try {
|
||||||
if (sheep && typeof sheep.request === 'function') {
|
const res = await DeliveryOrderApi.getHandoverRecord(orderId.value);
|
||||||
const res = await sheep.request({
|
if (res.code === 0 && res.data) {
|
||||||
url: '/order/transferRecords',
|
console.log('交接记录原始数据:', res.data);
|
||||||
method: 'GET',
|
const rawRecords = res.data || [];
|
||||||
data: {
|
// 转换接口数据为页面所需格式
|
||||||
id: orderId.value
|
const transformedRecords = rawRecords.map(item => {
|
||||||
|
// 根据 deliveryStatus 生成标题
|
||||||
|
let title = '状态更新';
|
||||||
|
switch (item.deliveryStatus) {
|
||||||
|
case 1: title = '待接单'; break;
|
||||||
|
case 2: title = '骑手待到店'; break;
|
||||||
|
case 3: title = '待取货'; break;
|
||||||
|
case 4: title = '待送达交接点'; break;
|
||||||
|
case 5: title = '送达交接点待分配'; break;
|
||||||
|
case 6: title = '待送达顾客'; break;
|
||||||
|
case 7: title = '已完成'; break;
|
||||||
|
case 0: title = '已取消'; break;
|
||||||
|
case -1: title = '配送异常'; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: title,
|
||||||
|
time: formatTime(item.createTime),
|
||||||
|
operator: item.deliverymanName ? `${item.deliverymanName} ${item.deliverymanPhoneLastFour ? ('尾号' + item.deliverymanPhoneLastFour) : ''}` : '系统',
|
||||||
|
note: '' // 接口暂无备注字段
|
||||||
|
};
|
||||||
});
|
});
|
||||||
records.value = (res && res.data) ? res.data.records || res.data : res.records || res;
|
console.log('交接记录转换后:', transformedRecords);
|
||||||
|
records.value = transformedRecords;
|
||||||
} else {
|
} else {
|
||||||
// mock 数据
|
sheep.$helper.toast(res.msg || '获取交接记录失败');
|
||||||
records.value = [{
|
records.value = [];
|
||||||
title: '已接单',
|
|
||||||
time: '2026-01-15 10:02',
|
|
||||||
operator: '系统',
|
|
||||||
note: '订单自动接单'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '到店取货',
|
|
||||||
time: '2026-01-15 10:12',
|
|
||||||
operator: '骑手 张三',
|
|
||||||
note: '已取货'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '转单给同城骑手',
|
|
||||||
time: '2026-01-15 10:20',
|
|
||||||
operator: '客服 小李',
|
|
||||||
note: '因配送区域调整'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('fetchRecords error', e);
|
console.error('fetchRecords error', e);
|
||||||
@@ -125,7 +152,7 @@
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 6rpx;
|
margin: 15rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-content {
|
.step-content {
|
||||||
|
|||||||
@@ -3,23 +3,26 @@
|
|||||||
<view class="page">
|
<view class="page">
|
||||||
<up-form ref="acctForm" :model="form" :rules="rules" labelPosition="left" labelWidth="120">
|
<up-form ref="acctForm" :model="form" :rules="rules" labelPosition="left" labelWidth="120">
|
||||||
<up-form-item label="开户行城市" prop="bankCity" :required="true">
|
<up-form-item label="开户行城市" prop="bankCity" :required="true">
|
||||||
<up-input readonly v-model="bankCityLabel" placeholder="省-市" @tap="regionShow = true" />
|
<up-input readonly v-model="bankCityLabel" placeholder="省-市-区" @tap="regionShow = true" />
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
|
|
||||||
<up-form-item label="开户行别" prop="bankName" :required="true">
|
<up-form-item label="开户行" prop="bankName" :required="true">
|
||||||
<up-picker hasInput :columns="bankOptions" v-model="bankNameLabel" @confirm="onBankConfirm">
|
<!-- 点击打开银行选择弹框 -->
|
||||||
<template #trigger>
|
<view class="bank-selector" @click="openBankPopup">
|
||||||
<up-input readonly v-model="bankNameLabel" placeholder="请选择开户行" />
|
<up-input readonly v-model="bankNameLabel" placeholder="请选择开户行" disabled disabledColor="#fff" />
|
||||||
</template>
|
<view class="selector-arrow">
|
||||||
</up-picker>
|
<up-icon name="arrow-down" size="14" color="#999"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
|
|
||||||
<up-form-item label="开户行网点名称" prop="bankBranch" :required="true">
|
<up-form-item label="开户行网点名称" prop="bankBranch" :required="true">
|
||||||
<up-picker hasInput :columns="branchOptions" v-model="bankBranchLabel" @confirm="onBranchConfirm">
|
<!-- <up-picker hasInput :columns="branchOptions" v-model="bankBranchLabel" @confirm="onBranchConfirm">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<up-input readonly v-model="bankBranchLabel" placeholder="请选择网点名称" />
|
<up-input readonly v-model="bankBranchLabel" placeholder="请选择网点名称" />
|
||||||
</template>
|
</template>
|
||||||
</up-picker>
|
</up-picker> -->
|
||||||
|
<up-input v-model="form.bankBranch" placeholder="请输入网点名称" />
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
|
|
||||||
<up-form-item label="银行卡号" prop="cardNo" :required="true">
|
<up-form-item label="银行卡号" prop="cardNo" :required="true">
|
||||||
@@ -40,8 +43,8 @@
|
|||||||
<up-input v-model="form.phone" placeholder="预留手机号码" type="number" maxlength="11" />
|
<up-input v-model="form.phone" placeholder="预留手机号码" type="number" maxlength="11" />
|
||||||
</view>
|
</view>
|
||||||
<view style="width:160rpx;margin-left:10rpx;">
|
<view style="width:160rpx;margin-left:10rpx;">
|
||||||
<up-button :disabled="countdown > 0" plain @click="sendCode">
|
<up-button :disabled="countdown > 0" plain @click="handleGetSmsCode">
|
||||||
{{ countdown > 0 ? countdown + 's' : '获取验证码' }}
|
{{ smsBtnText }}
|
||||||
</up-button>
|
</up-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -61,163 +64,457 @@
|
|||||||
</view>
|
</view>
|
||||||
</up-form>
|
</up-form>
|
||||||
</view>
|
</view>
|
||||||
<su-region-picker level="2" :show="regionShow" @confirm="onRegionConfirm" @cancel="regionShow = false" />
|
<su-region-picker level="3" :show="regionShow" @confirm="onRegionConfirm" @cancel="regionShow = false" />
|
||||||
|
|
||||||
|
<!-- 银行选择弹框 -->
|
||||||
|
<up-popup :show="bankPopupShow" mode="bottom" @close="closeBankPopup" :round="16" safeAreaInsetBottom>
|
||||||
|
<view class="bank-popup">
|
||||||
|
<view class="bank-popup-header">
|
||||||
|
<text class="bank-popup-title">选择开户行</text>
|
||||||
|
<view class="bank-popup-close" @click="closeBankPopup">
|
||||||
|
<up-icon name="close" size="20" color="#999"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<view class="bank-search-box">
|
||||||
|
<view class="bank-search-input-wrap">
|
||||||
|
<up-icon name="search" size="16" color="#999"></up-icon>
|
||||||
|
<input class="bank-search-input" v-model="bankSearchKeyword" placeholder="搜索银行名称" @input="onBankSearch" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 银行列表 -->
|
||||||
|
<scroll-view class="bank-list" scroll-y="true">
|
||||||
|
<view v-for="(bankName, bankCode) in filteredBankList" :key="bankCode" class="bank-item"
|
||||||
|
@click="onSelectBank(bankCode, bankName)">
|
||||||
|
<text class="bank-item-name">{{ bankName }}</text>
|
||||||
|
<up-icon v-if="form.bankCode === bankCode" name="checkmark" size="16" color="#09aaff"></up-icon>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="filteredBankList.length === 0" class="bank-empty">
|
||||||
|
<text>未找到相关银行</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
</s-layout>
|
</s-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, onBeforeMount } from 'vue'
|
import {
|
||||||
|
reactive,
|
||||||
|
ref,
|
||||||
|
computed,
|
||||||
|
onBeforeMount
|
||||||
|
} from 'vue'
|
||||||
|
import bankListData from './bankList.json';
|
||||||
|
import DeliveryApi from '@/sheep/api/member/delivery';
|
||||||
|
import {
|
||||||
|
getSmsCode,
|
||||||
|
getSmsTimer
|
||||||
|
} from '@/sheep/hooks/useModal';
|
||||||
|
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
bankCity: '',
|
bankCity: '',
|
||||||
bankName: '',
|
bankName: '',
|
||||||
bankBranch: '',
|
bankBranch: '',
|
||||||
cardNo: '',
|
cardNo: '',
|
||||||
cardHolder: '',
|
cardHolder: '',
|
||||||
bankCode: '',
|
bankCode: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
captcha: '',
|
captcha: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
bankCity: [{ required: true, message: '请选择开户城市' }],
|
bankCity: [{
|
||||||
bankName: [{ required: true, message: '请选择开户行别' }],
|
required: true,
|
||||||
bankBranch: [{ required: true, message: '请选择网点名称' }],
|
message: '请选择开户城市'
|
||||||
cardNo: [{ required: true, message: '请输入银行卡号' }],
|
}],
|
||||||
cardHolder: [{ required: true, message: '请输入持卡人姓名' }],
|
bankName: [{
|
||||||
phone: [
|
required: true,
|
||||||
{ required: true, message: '请输入手机号' },
|
message: '请选择开户行别'
|
||||||
{ pattern: /^1\d{10}$/, message: '请输入正确的手机号码' },
|
}],
|
||||||
],
|
bankBranch: [{
|
||||||
captcha: [{ required: true, message: '请输入验证码' }],
|
required: true,
|
||||||
}
|
message: '请选择网点名称'
|
||||||
|
}],
|
||||||
const acctForm = ref(null)
|
cardNo: [{
|
||||||
const regionShow = ref(false)
|
required: true,
|
||||||
const bankOptions = [
|
message: '请输入银行卡号'
|
||||||
['中国工商银行', '中国建设银行', '中国农业银行', '中国银行', '交通银行', '招商银行']
|
}],
|
||||||
]
|
cardHolder: [{
|
||||||
const branchOptions = [
|
required: true,
|
||||||
['请选择网点']
|
message: '请输入持卡人姓名'
|
||||||
]
|
}],
|
||||||
const bankNameLabel = ref([])
|
phone: [{
|
||||||
const bankBranchLabel = ref([])
|
required: true,
|
||||||
const bankCityLabel = ref('')
|
message: '请输入手机号'
|
||||||
const countdown = ref(0)
|
},
|
||||||
let timer = null
|
{
|
||||||
const agree = ref(false)
|
pattern: /^1\d{10}$/,
|
||||||
|
message: '请输入正确的手机号码'
|
||||||
function onBankConfirm(selected) {
|
},
|
||||||
const first = Array.isArray(selected) ? selected[0] : selected
|
],
|
||||||
bankNameLabel.value = first?.value || first || ''
|
captcha: [{
|
||||||
form.bankName = bankNameLabel.value
|
required: true,
|
||||||
// 模拟获取分支列表,根据银行设置简单示例
|
message: '请输入验证码'
|
||||||
branchOptions[0] = bankNameLabel.value ? [`${bankNameLabel.value} 总行`, `${bankNameLabel.value} 广州分行`, `${bankNameLabel.value} 天河支行`] : ['请选择网点']
|
}],
|
||||||
}
|
|
||||||
|
|
||||||
function onBranchConfirm(selected) {
|
|
||||||
const first = Array.isArray(selected) ? selected[0] : selected
|
|
||||||
bankBranchLabel.value = first?.value || first || ''
|
|
||||||
form.bankBranch = bankBranchLabel.value
|
|
||||||
}
|
|
||||||
|
|
||||||
function onRegionConfirm(result) {
|
|
||||||
console.log("result", result);
|
|
||||||
form.bankCity = result
|
|
||||||
bankCityLabel.value = `${result.province_name || ''} ${result.city_name || ''}`.trim()
|
|
||||||
regionShow.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
function sendCode() {
|
|
||||||
// 简单校验手机号
|
|
||||||
if (!/^1\d{10}$/.test(form.phone)) {
|
|
||||||
uni.showToast({ title: '请输入正确手机号', icon: 'none' })
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if (countdown.value > 0) return
|
|
||||||
// 触发发送(此处模拟)
|
|
||||||
uni.showToast({ title: '验证码已发送', icon: 'none' })
|
|
||||||
countdown.value = 60
|
|
||||||
timer = setInterval(() => {
|
|
||||||
if (countdown.value <= 1) {
|
|
||||||
clearInterval(timer)
|
|
||||||
countdown.value = 0
|
|
||||||
timer = null
|
|
||||||
} else {
|
|
||||||
countdown.value -= 1
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSubmitAccount() {
|
const acctForm = ref(null)
|
||||||
try {
|
const regionShow = ref(false)
|
||||||
await acctForm.value.validate()
|
const bankPopupShow = ref(false)
|
||||||
if (!agree.value) {
|
const bankSearchKeyword = ref('')
|
||||||
uni.showToast({ title: '请先同意骑手协议', icon: 'none' })
|
const bankOptions = [
|
||||||
|
['中国工商银行', '中国建设银行', '中国农业银行', '中国银行', '交通银行', '招商银行']
|
||||||
|
]
|
||||||
|
const branchOptions = [
|
||||||
|
['请选择网点']
|
||||||
|
]
|
||||||
|
const bankNameLabel = ref([])
|
||||||
|
const bankBranchLabel = ref([])
|
||||||
|
const bankCityLabel = ref('')
|
||||||
|
const countdown = ref(0)
|
||||||
|
let timer = null
|
||||||
|
const agree = ref(false)
|
||||||
|
|
||||||
|
// 获取验证码按钮文本
|
||||||
|
const smsBtnText = computed(() => {
|
||||||
|
return getSmsTimer('accountInfo', form.phone)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取验证码
|
||||||
|
function handleGetSmsCode() {
|
||||||
|
if (!form.phone) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入手机号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 提交逻辑(示例):打印并提示
|
|
||||||
console.log('结算表单', JSON.parse(JSON.stringify(form)))
|
|
||||||
uni.showToast({ title: '提交申请成功', icon: 'none' })
|
|
||||||
// 跳转到审核中页面
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateTo({ url: '/pages/registered/audit' })
|
|
||||||
}, 600)
|
|
||||||
} catch (e) {
|
|
||||||
console.warn('结算表单校验未通过', e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onBeforeMount(() => {
|
// 调用 getSmsCode 发送验证码
|
||||||
// 尝试从注册页恢复部分信息(如持卡人姓名)
|
getSmsCode('registerDelivery', form.phone)
|
||||||
try {
|
}
|
||||||
const saved = uni.getStorageSync('riderFormData') || null
|
|
||||||
if (saved) {
|
// 银行列表数据
|
||||||
form.cardHolder = saved.realName || ''
|
const bankList = bankListData
|
||||||
|
|
||||||
|
// 筛选后的银行列表(带搜索功能)
|
||||||
|
const filteredBankList = computed(() => {
|
||||||
|
if (!bankSearchKeyword.value.trim()) {
|
||||||
|
return bankList
|
||||||
}
|
}
|
||||||
} catch (err) {
|
const keyword = bankSearchKeyword.value.trim().toLowerCase()
|
||||||
// ignore
|
const result = {}
|
||||||
}
|
for (const [code, name] of Object.entries(bankList)) {
|
||||||
})
|
if (name.toLowerCase().includes(keyword)) {
|
||||||
|
result[code] = name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
|
||||||
|
// 打开银行选择弹框
|
||||||
|
function openBankPopup() {
|
||||||
|
bankPopupShow.value = true
|
||||||
|
bankSearchKeyword.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭银行选择弹框
|
||||||
|
function closeBankPopup() {
|
||||||
|
bankPopupShow.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 搜索银行
|
||||||
|
function onBankSearch() {
|
||||||
|
// 搜索逻辑由 computed 属性 filteredBankList 自动处理
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择银行
|
||||||
|
function onSelectBank(bankCode, bankName) {
|
||||||
|
console.log("银行名称:", bankName);
|
||||||
|
form.bankCode = bankCode
|
||||||
|
form.bankName = bankName
|
||||||
|
bankNameLabel.value = bankName
|
||||||
|
closeBankPopup()
|
||||||
|
}
|
||||||
|
|
||||||
|
function onBranchConfirm(selected) {
|
||||||
|
const first = Array.isArray(selected) ? selected[0] : selected
|
||||||
|
bankBranchLabel.value = first?.value || first || ''
|
||||||
|
form.bankBranch = bankBranchLabel.value
|
||||||
|
}
|
||||||
|
|
||||||
|
function onRegionConfirm(result) {
|
||||||
|
console.log("result", result);
|
||||||
|
form.bankCity = result
|
||||||
|
bankCityLabel.value = `${result.province_name || ''} ${result.city_name || ''} ${result.district_name || ''}`.trim()
|
||||||
|
regionShow.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendCode() {
|
||||||
|
// 简单校验手机号
|
||||||
|
if (!/^1\d{10}$/.test(form.phone)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入正确手机号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (countdown.value > 0) return
|
||||||
|
// 触发发送(此处模拟)
|
||||||
|
uni.showToast({
|
||||||
|
title: '验证码已发送',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
countdown.value = 60
|
||||||
|
timer = setInterval(() => {
|
||||||
|
if (countdown.value <= 1) {
|
||||||
|
clearInterval(timer)
|
||||||
|
countdown.value = 0
|
||||||
|
timer = null
|
||||||
|
} else {
|
||||||
|
countdown.value -= 1
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onSubmitAccount() {
|
||||||
|
try {
|
||||||
|
await acctForm.value.validate()
|
||||||
|
if (!agree.value) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先同意骑手协议',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从缓存读取上一个页面的数据
|
||||||
|
let savedData = {}
|
||||||
|
try {
|
||||||
|
savedData = JSON.parse(uni.getStorageSync('riderRegisterData')) || {}
|
||||||
|
console.log("上一个页面数据:", savedData);
|
||||||
|
} catch (err) {
|
||||||
|
console.warn('读取缓存数据失败', err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取地区信息(form.bankCity 存储的是地区选择结果对象)
|
||||||
|
const regionData = form.bankCity || {}
|
||||||
|
|
||||||
|
// 构建提交数据
|
||||||
|
const submitData = {
|
||||||
|
// 第一个页面的数据
|
||||||
|
username: savedData.username || '',
|
||||||
|
idNumber: savedData.idNumber || '',
|
||||||
|
idStartTime: savedData.idStartTime || '',
|
||||||
|
idEndTime: savedData.idEndTime || '',
|
||||||
|
idValidType: savedData.idValidType || 2,
|
||||||
|
gender: savedData.gender || 1,
|
||||||
|
emergencyContactName: savedData.emergencyContactName || '',
|
||||||
|
emergencyContactPhone: savedData.emergencyContactPhone || '',
|
||||||
|
idFrontUrl: savedData.idFrontUrl || '',
|
||||||
|
idBackUrl: savedData.idBackUrl || '',
|
||||||
|
occupationType: savedData.occupationType || 1,
|
||||||
|
employmentType: savedData.employmentType || 1,
|
||||||
|
partTimePeriods: savedData.partTimePeriods || [],
|
||||||
|
healthCertificateUrl: savedData.healthCertificateUrl || '',
|
||||||
|
healthCertificateNo: savedData.healthCertificateNo || '',
|
||||||
|
healthCertificateType: savedData.healthCertificateType || 1,
|
||||||
|
healthCertificateStartTime: savedData.healthCertificateStartTime || '',
|
||||||
|
healthCertificateEndTime: savedData.healthCertificateEndTime || '',
|
||||||
|
// 第二个页面的数据
|
||||||
|
bankAccountPhone: form.phone || '',
|
||||||
|
bankCardNumber: form.cardNo || '',
|
||||||
|
bankCity: regionData.city_name || '',
|
||||||
|
bankCityCode: regionData.city_id || '',
|
||||||
|
bankDistrict: regionData.district_name || '',
|
||||||
|
bankDistrictCode: regionData.district_id || '',
|
||||||
|
bankProvince: regionData.province_name || '',
|
||||||
|
bankProvinceCode: regionData.province_id || '',
|
||||||
|
cardholderName: form.cardHolder || '',
|
||||||
|
code: form.captcha || '',
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('提交数据给后端:', submitData)
|
||||||
|
|
||||||
|
// 调用后端API注册骑手
|
||||||
|
uni.showLoading({ title: '提交中...' })
|
||||||
|
const res = await DeliveryApi.registerRider(submitData)
|
||||||
|
uni.hideLoading()
|
||||||
|
|
||||||
|
if (res.code === 0 && res.data === true) {
|
||||||
|
await sheep.$store('user').getInfo();
|
||||||
|
// // 提交成功,清除缓存
|
||||||
|
// try {
|
||||||
|
// uni.removeStorageSync('riderRegisterData')
|
||||||
|
// } catch (e) {
|
||||||
|
// console.warn('清除缓存失败', e)
|
||||||
|
// }
|
||||||
|
uni.showToast({ title: '提交申请成功', icon: 'success' })
|
||||||
|
// 跳转到审核中页面
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({ url: '/pages/registered/audit' })
|
||||||
|
}, 1500)
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: res.msg || '提交失败,请重试', icon: 'none' })
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.error('提交骑手注册申请异常:', e)
|
||||||
|
uni.showToast({ title: '提交失败,请重试', icon: 'none' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
// 尝试从注册页恢复部分信息(如持卡人姓名)
|
||||||
|
try {
|
||||||
|
const saved = uni.getStorageSync('riderRegisterData') || null
|
||||||
|
console.log("上一个页面数据:", saved);
|
||||||
|
} catch (err) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page {
|
.page {
|
||||||
padding: 38rpx;
|
padding: 38rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
.code-row {
|
|
||||||
display: flex;
|
|
||||||
// gap: 12px;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.agree-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 20rpx 0;
|
|
||||||
gap: 12rpx;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.checkbox {
|
|
||||||
width: 28rpx;
|
|
||||||
height: 28rpx;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
.checkbox.checked {
|
|
||||||
background: #09aaff;
|
|
||||||
border-color: #09aaff;
|
|
||||||
}
|
|
||||||
.agree-text {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.link {
|
|
||||||
color: #09aaff;
|
|
||||||
}
|
|
||||||
.submit-row {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
.code-row {
|
||||||
|
display: flex;
|
||||||
|
// gap: 12px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agree-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
gap: 12rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox.checked {
|
||||||
|
background: #09aaff;
|
||||||
|
border-color: #09aaff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agree-text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
color: #09aaff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-row {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 银行选择器样式 */
|
||||||
|
.bank-selector {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #fff;
|
||||||
|
// border: 1rpx solid #e6e6e6;
|
||||||
|
border: none;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
padding: 0 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-selector .uni-input {
|
||||||
|
flex: 1;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selector-arrow {
|
||||||
|
margin-left: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 银行选择弹框样式 */
|
||||||
|
.bank-popup {
|
||||||
|
max-height: 70vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-popup-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 24rpx 30rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-popup-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-popup-close {
|
||||||
|
padding: 10rpx;
|
||||||
|
margin-right: -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-search-box {
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-search-input-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
padding: 16rpx 20rpx;
|
||||||
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-search-input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 28rpx;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-list {
|
||||||
|
max-height: 60vh;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 28rpx 20rpx;
|
||||||
|
border-bottom: 1rpx solid #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-item-name {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-empty {
|
||||||
|
padding: 60rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,69 +1,108 @@
|
|||||||
<template>
|
<template>
|
||||||
<s-layout class="audit-wrap">
|
<view>
|
||||||
|
<up-navbar leftIcon="" placeholder></up-navbar>
|
||||||
<view class="audit-content">
|
<view class="audit-content">
|
||||||
<view class="icon-wrap" aria-hidden="true">
|
<view class="icon-wrap" aria-hidden="true">
|
||||||
<svg viewBox="0 0 64 64" class="clock-svg" xmlns="http://www.w3.org/2000/svg">
|
<svg viewBox="0 0 64 64" class="clock-svg" xmlns="http://www.w3.org/2000/svg">
|
||||||
<circle cx="32" cy="32" r="30" fill="#09aaff"/>
|
<circle cx="32" cy="32" r="30" fill="#09aaff" />
|
||||||
<path d="M32 18v14l10 6" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
<path d="M32 18v14l10 6" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
fill="none" />
|
||||||
</svg>
|
</svg>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">审核中</view>
|
<template v-if="userInfo.auditStatus == 1">
|
||||||
<view class="desc">审核结果将以短信进行通知,通过后分配订单哦~</view>
|
<view class="title">审核中</view>
|
||||||
<view class="btn-row">
|
<view class="desc">审核结果将以短信进行通知,通过后分配订单哦~</view>
|
||||||
<up-button type="primary" plain @click="onDone">完成</up-button>
|
<view class="btn-row">
|
||||||
</view>
|
<up-button type="primary" plain @click="onDone">完成</up-button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-if="userInfo.auditStatus == 3">
|
||||||
|
<view class="title">审核不通过</view>
|
||||||
|
<view class="desc">请重新申请~</view>
|
||||||
|
<view class="btn-row">
|
||||||
|
<up-button type="primary" plain @click="sheep.$router.go('/pages/registered/registerRiders')">
|
||||||
|
重新提交入驻申请
|
||||||
|
</up-button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</s-layout>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { } from 'vue'
|
import {
|
||||||
|
computed,
|
||||||
|
} from 'vue'
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
import AuthUtil from '@/sheep/api/member/auth';
|
||||||
|
|
||||||
function onDone() {
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
// 返回首页(重启栈)
|
|
||||||
uni.reLaunch({ url: '/pages/index/index' })
|
const onDone = async () => {
|
||||||
}
|
// // 返回首页(重启栈)
|
||||||
|
// uni.reLaunch({ url: '/pages/index/index' })
|
||||||
|
const {
|
||||||
|
code
|
||||||
|
} = await AuthUtil.logout();
|
||||||
|
if (code !== 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
uni.clearStorageSync();
|
||||||
|
console.log('缓存清空成功');
|
||||||
|
} catch (e) {
|
||||||
|
console.log('缓存清空失败', e);
|
||||||
|
}
|
||||||
|
sheep.$store('user').logout();
|
||||||
|
sheep.$router.go('/pages/index/user');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.audit-wrap {
|
.audit-wrap {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
.audit-content {
|
|
||||||
display: flex;
|
.audit-content {
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
align-items: center;
|
||||||
padding-top: 140rpx;
|
justify-content: flex-start;
|
||||||
}
|
padding-top: 140rpx;
|
||||||
.icon-wrap {
|
}
|
||||||
width: 140rpx;
|
|
||||||
height: 140rpx;
|
.icon-wrap {
|
||||||
border-radius: 50%;
|
width: 140rpx;
|
||||||
display: flex;
|
height: 140rpx;
|
||||||
align-items: center;
|
border-radius: 50%;
|
||||||
justify-content: center;
|
display: flex;
|
||||||
margin-bottom: 20rpx;
|
align-items: center;
|
||||||
}
|
justify-content: center;
|
||||||
.clock-svg {
|
margin-bottom: 20rpx;
|
||||||
width: 100%;
|
}
|
||||||
height: 100%;
|
|
||||||
}
|
.clock-svg {
|
||||||
.title {
|
width: 100%;
|
||||||
font-size: 36rpx;
|
height: 100%;
|
||||||
font-weight: 700;
|
}
|
||||||
color: #222;
|
|
||||||
margin-bottom: 20rpx;
|
.title {
|
||||||
}
|
font-size: 36rpx;
|
||||||
.desc {
|
font-weight: 700;
|
||||||
font-size: 24rpx;
|
color: #222;
|
||||||
color: #999;
|
margin-bottom: 20rpx;
|
||||||
text-align: center;
|
}
|
||||||
padding: 0 40rpx;
|
|
||||||
margin-bottom: 60rpx;
|
.desc {
|
||||||
}
|
font-size: 24rpx;
|
||||||
.btn-row {
|
color: #999;
|
||||||
width: 520rpx;
|
text-align: center;
|
||||||
}
|
padding: 0 40rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-row {
|
||||||
|
width: 520rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
202
pages/registered/bankList.json
Normal file
202
pages/registered/bankList.json
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
{
|
||||||
|
"ICBC": "中国工商银行",
|
||||||
|
"ABC": "中国农业银行",
|
||||||
|
"CCB": "中国建设银行",
|
||||||
|
"CMB": "招商银行",
|
||||||
|
"BOC": "中国银行",
|
||||||
|
"PSBC": "中国邮政储蓄银行",
|
||||||
|
"COMM": "交通银行",
|
||||||
|
"CITIC": "中信银行",
|
||||||
|
"CMBC": "中国民生银行",
|
||||||
|
"CEB": "中国光大银行",
|
||||||
|
"SHBANK": "上海银行",
|
||||||
|
"JSBANK": "江苏银行",
|
||||||
|
"JSRCU": "江苏省农村信用社联合社",
|
||||||
|
"ASCB": "鞍山银行",
|
||||||
|
"ARCU": "安徽省农村信用社",
|
||||||
|
"BJBANK": "北京银行",
|
||||||
|
"BJRCB": "北京农商行",
|
||||||
|
"BSB": "包商银行",
|
||||||
|
"BOHAIB": "渤海银行",
|
||||||
|
"BDCBANK": "保定银行",
|
||||||
|
"BOCFCB": "中银富登村镇银行",
|
||||||
|
"JKRFCZYH": "长春经开融丰村镇银行",
|
||||||
|
"CRCBANK": "重庆农村商业银行",
|
||||||
|
"CSRCB": "常熟农商银行",
|
||||||
|
"CDCB": "成都银行",
|
||||||
|
"CCQTGB": "重庆三峡银行",
|
||||||
|
"CSCB": "长沙银行",
|
||||||
|
"CQBANK": "重庆银行",
|
||||||
|
"LYRTCZYH": "长春绿园融泰村镇银行",
|
||||||
|
"BOCD": "承德银行",
|
||||||
|
"CCHRCZYH": "长春朝阳和润村镇银行",
|
||||||
|
"BOCZ": "沧州银行",
|
||||||
|
"BOCY": "朝阳银行",
|
||||||
|
"CABANK": "长安银行",
|
||||||
|
"CDRCB": "成都农商银行",
|
||||||
|
"DRCBCL": "东莞农村商业银行",
|
||||||
|
"HKBEA": "东亚银行",
|
||||||
|
"DLB": "大连银行",
|
||||||
|
"DYCCB": "东营银行",
|
||||||
|
"DZBANK": "德州银行",
|
||||||
|
"DLRCB": "大连农村商业银行",
|
||||||
|
"DYCB": "长城华西银行",
|
||||||
|
"BOD": "东莞银行",
|
||||||
|
"ORBANK": "鄂尔多斯银行",
|
||||||
|
"FXCB": "阜新银行",
|
||||||
|
"FDB": "富滇银行",
|
||||||
|
"FJNX": "福建省农村信用社联合社",
|
||||||
|
"FJHXBC": "福建海峡银行",
|
||||||
|
"FBBANK": "富邦华一银行",
|
||||||
|
"GDB": "广发银行",
|
||||||
|
"GDRCC": "广东省农村信用社联合社",
|
||||||
|
"GZRCU": "贵州省农村信用社联合社",
|
||||||
|
"NYBANK": "广东南粤银行",
|
||||||
|
"BGB": "广西北部湾银行",
|
||||||
|
"GRCB": "广州农村商业银行",
|
||||||
|
"GCB": "广州银行",
|
||||||
|
"GYCB": "贵阳银行",
|
||||||
|
"GSBANK": "甘肃银行",
|
||||||
|
"GHB": "广东华兴银行",
|
||||||
|
"GXRCU": "广西壮族自治区农村信用社联合社",
|
||||||
|
"GZB": "赣州银行",
|
||||||
|
"ZYCBANK": "贵州银行",
|
||||||
|
"GLBANK": "桂林银行",
|
||||||
|
"GSRCU": "甘肃省农村信用社",
|
||||||
|
"HXBANK": "华夏银行",
|
||||||
|
"BOHN": "海南省农村信用社",
|
||||||
|
"UBCHN": "海口联合农商银行",
|
||||||
|
"HURCB": "湖北省农信社",
|
||||||
|
"EGBANK": "恒丰银行",
|
||||||
|
"HANABANK": "韩亚银行",
|
||||||
|
"HSBANK": "徽商银行",
|
||||||
|
"HRXJB": "华融湘江银行",
|
||||||
|
"HBC": "湖北银行",
|
||||||
|
"HLDB": "葫芦岛银行",
|
||||||
|
"HSBK": "衡水市商业银行",
|
||||||
|
"BHB": "河北银行",
|
||||||
|
"HZCB": "杭州银行",
|
||||||
|
"HBRCU": "河北省农村信用社",
|
||||||
|
"HRBANK": "哈尔滨银行",
|
||||||
|
"QYBANK": "韩国企业银行",
|
||||||
|
"HNRCU": "河南省农村信用社",
|
||||||
|
"HNRCC": "湖南省农村信用社",
|
||||||
|
"HDBANK": "邯郸银行",
|
||||||
|
"HLJRCU": "黑龙江省农村信用社联合社",
|
||||||
|
"HKB": "汉口银行",
|
||||||
|
"HZCCB": "湖州银行",
|
||||||
|
"HSCZB": "湖商村镇银行",
|
||||||
|
"JXRCU": "江西省农村信用社",
|
||||||
|
"JSB": "晋商银行",
|
||||||
|
"JHBANK": "金华银行",
|
||||||
|
"BOJZ": "锦州银行",
|
||||||
|
"JZCBANK": "焦作中旅银行",
|
||||||
|
"JZBANK": "晋中银行",
|
||||||
|
"JLBANK": "吉林银行",
|
||||||
|
"JJBANK": "九江银行",
|
||||||
|
"NCB": "江西银行",
|
||||||
|
"JNBANK": "济宁银行",
|
||||||
|
"JINCHB": "晋城银行",
|
||||||
|
"CZRCB": "江南农村商业银行",
|
||||||
|
"JRCB": "江苏江阴农村商业银行",
|
||||||
|
"JXBANK": "嘉兴银行",
|
||||||
|
"CJCCB": "江苏长江商业银行",
|
||||||
|
"TCRCB": "江苏太仓农村商业银行",
|
||||||
|
"JLRCU": "吉林省农村信用社联合社",
|
||||||
|
"KLB": "昆仑银行",
|
||||||
|
"KSRB": "昆山农村商业银行",
|
||||||
|
"LSBANK": "莱商银行",
|
||||||
|
"LSBC": "临商银行",
|
||||||
|
"LANGFB": "廊坊银行",
|
||||||
|
"LHBANK": "漯河银行",
|
||||||
|
"LYCB": "辽阳银行",
|
||||||
|
"DAQINGB": "龙江银行",
|
||||||
|
"LSCCB": "乐山市商业银行",
|
||||||
|
"LNRCC": "辽宁省农村信用社",
|
||||||
|
"LZYH": "兰州银行",
|
||||||
|
"URB": "联合村镇银行",
|
||||||
|
"BOL": "洛阳银行",
|
||||||
|
"LZCCB": "柳州银行",
|
||||||
|
"LUZBANK": "泸州市商业银行",
|
||||||
|
"MYBANK": "绵阳市商业银行",
|
||||||
|
"KJCZYH": "梅县客家村镇银行",
|
||||||
|
"NXRCU": "宁夏黄河农村商业银行",
|
||||||
|
"H3CB": "内蒙古银行",
|
||||||
|
"CGNB": "四川天府银行",
|
||||||
|
"NXBANK": "宁夏银行",
|
||||||
|
"NMGNXS": "内蒙古农村信用社联合社",
|
||||||
|
"NBBANK": "宁波银行",
|
||||||
|
"NJCB": "南京银行",
|
||||||
|
"NBCBANK": "宁波通商银行",
|
||||||
|
"BNY": "南阳市商业银行",
|
||||||
|
"NHB": "南海农商银行",
|
||||||
|
"SPDB": "浦发银行",
|
||||||
|
"SPABANK": "平安银行",
|
||||||
|
"PZHCCB": "攀枝花市商业银行",
|
||||||
|
"BOP": "平顶山银行",
|
||||||
|
"QLBANK": "齐鲁银行",
|
||||||
|
"QDCCB": "青岛银行",
|
||||||
|
"QHRC": "青海省农村信用社",
|
||||||
|
"BOQZ": "泉州银行",
|
||||||
|
"BOQH": "青海银行",
|
||||||
|
"ZBCB": "齐商银行",
|
||||||
|
"QJCCB": "曲靖市商业银行",
|
||||||
|
"RZB": "日照银行",
|
||||||
|
"YDNSCZYH": "尧都农商银行村镇银行",
|
||||||
|
"SDEB": "顺德农商银行",
|
||||||
|
"SZSBK": "石嘴山银行",
|
||||||
|
"SJBANK": "盛京银行",
|
||||||
|
"SRCB": "深圳农村商业银行",
|
||||||
|
"SDRCU": "山东省农村信用社联合社",
|
||||||
|
"SXRCCU": "陕西省农信社",
|
||||||
|
"SXRCU": "山西省农村信用社",
|
||||||
|
"SHRCB": "上海农商银行",
|
||||||
|
"SNCCB": "遂宁银行",
|
||||||
|
"SCRCU": "四川省农村信用社联合社",
|
||||||
|
"SRBANK": "上饶银行",
|
||||||
|
"BOSZ": "苏州银行",
|
||||||
|
"SXCB": "绍兴银行",
|
||||||
|
"TJBHB": "天津滨海农村商业银行",
|
||||||
|
"TACCB": "泰安银行",
|
||||||
|
"TCCB": "天津银行",
|
||||||
|
"TZCB": "台州银行",
|
||||||
|
"TRCB": "天津农商银行",
|
||||||
|
"WHBANK": "乌海银行",
|
||||||
|
"KEB": "外换银行",
|
||||||
|
"WRCB": "无锡农村商业银行",
|
||||||
|
"BANKWF": "潍坊银行",
|
||||||
|
"WJRCB": "吴江农村商业银行",
|
||||||
|
"WZCB": "温州银行",
|
||||||
|
"ANTBANK": "网商银行",
|
||||||
|
"WHRCB": "武汉农村商业银行",
|
||||||
|
"URMQCCB": "乌鲁木齐银行",
|
||||||
|
"WHCCB": "威海市商业银行",
|
||||||
|
"CIB": "兴业银行",
|
||||||
|
"XMBANK": "厦门银行",
|
||||||
|
"XTB": "邢台银行",
|
||||||
|
"XJRCU": "新疆农村信用社",
|
||||||
|
"XIB": "厦门国际银行",
|
||||||
|
"XABANK": "西安银行",
|
||||||
|
"BOSH": "新韩银行",
|
||||||
|
"BOYK": "营口银行",
|
||||||
|
"WOORI": "友利银行",
|
||||||
|
"YZBANK": "银座村镇银行",
|
||||||
|
"YBCCB": "宜宾市商业银行",
|
||||||
|
"YTBANK": "烟台银行",
|
||||||
|
"YXCCB": "云南红塔银行",
|
||||||
|
"YKYHCCB": "营口沿海银行",
|
||||||
|
"NBYZ": "宁波鄞州农商行",
|
||||||
|
"YNRCC": "云南省农村信用社",
|
||||||
|
"RBOZ": "珠海华润银行",
|
||||||
|
"MTBANK": "浙江民泰商业银行",
|
||||||
|
"CZBANK": "浙商银行",
|
||||||
|
"ZZYH": "枣庄银行",
|
||||||
|
"ZRCBANK": "张家港农村商业银行",
|
||||||
|
"ZGCCB": "自贡银行",
|
||||||
|
"ZJNX": "浙江省农村信用社联合社",
|
||||||
|
"ZYB": "中原银行",
|
||||||
|
"CZCB": "浙江稠州商业银行",
|
||||||
|
"ZJKCCB": "张家口银行",
|
||||||
|
"ZJTLCB": "浙江泰隆商业银行",
|
||||||
|
"ZZBANK": "郑州银行"
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,7 @@
|
|||||||
<uni-forms-item name="nickname" label="昵称">
|
<uni-forms-item name="nickname" label="昵称">
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
v-model="state.model.nickname"
|
v-model="state.model.nickname"
|
||||||
|
:disabled="true"
|
||||||
type="nickname"
|
type="nickname"
|
||||||
placeholder="设置昵称"
|
placeholder="设置昵称"
|
||||||
:inputBorder="false"
|
:inputBorder="false"
|
||||||
@@ -52,10 +53,11 @@
|
|||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="sex" label="性别">
|
<uni-forms-item name="sex" label="性别">
|
||||||
<view class="ss-flex ss-col-center ss-h-100">
|
<view class="ss-flex ss-col-center ss-h-100">
|
||||||
<radio-group @change="onChangeGender" class="ss-flex ss-col-center">
|
<radio-group :disabled="true" @change="onChangeGender" class="ss-flex ss-col-center">
|
||||||
<label class="radio" v-for="item in sexRadioMap" :key="item.value">
|
<label class="radio" v-for="item in sexRadioMap" :key="item.value">
|
||||||
<view class="ss-flex ss-col-center ss-m-r-32">
|
<view class="ss-flex ss-col-center ss-m-r-32">
|
||||||
<radio
|
<radio
|
||||||
|
:disabled="true"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
color="var(--ui-BG-Main)"
|
color="var(--ui-BG-Main)"
|
||||||
style="transform: scale(0.8)"
|
style="transform: scale(0.8)"
|
||||||
@@ -186,11 +188,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
|
|
||||||
<su-fixed bottom placeholder bg="none">
|
<!-- <su-fixed bottom placeholder bg="none">
|
||||||
<view class="footer-box ss-p-20">
|
<view class="footer-box ss-p-20">
|
||||||
<button class="ss-rest-button logout-btn ui-Shadow-Main" @tap="onSubmit">保存</button>
|
<button class="ss-rest-button logout-btn ui-Shadow-Main" @tap="onSubmit">保存</button>
|
||||||
</view>
|
</view>
|
||||||
</su-fixed>
|
</su-fixed> -->
|
||||||
</s-layout>
|
</s-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -213,11 +215,11 @@
|
|||||||
const sexRadioMap = [
|
const sexRadioMap = [
|
||||||
{
|
{
|
||||||
name: '男',
|
name: '男',
|
||||||
value: '1',
|
value: '0',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '女',
|
name: '女',
|
||||||
value: '2',
|
value: '1',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -333,10 +335,10 @@
|
|||||||
state.model = clone(userInfo);
|
state.model = clone(userInfo);
|
||||||
|
|
||||||
// 获得社交用户的信息
|
// 获得社交用户的信息
|
||||||
if (sheep.$platform.name !== 'H5') {
|
// if (sheep.$platform.name !== 'H5') {
|
||||||
const result = await sheep.$platform.useProvider('wechat').getInfo();
|
// const result = await sheep.$platform.useProvider('wechat').getInfo();
|
||||||
state.thirdInfo = result || {};
|
// state.thirdInfo = result || {};
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
import request from '@/sheep/request';
|
import request from '@/sheep/request';
|
||||||
|
|
||||||
const DeliveryApi = {
|
const DeliveryApi = {
|
||||||
|
// 注册骑手
|
||||||
|
registerRider: (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/member/user/register/rider',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 骑手上线
|
// 骑手上线
|
||||||
postOnline: () => {
|
postOnline: () => {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -10,6 +10,14 @@ const DeliveryOrderApi = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 获取配送单详情信息
|
||||||
|
getDetail: (id) => {
|
||||||
|
return request({
|
||||||
|
url: `/deliveryOrder/getDetail/${id}`,
|
||||||
|
method: 'POST',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 当前配送员确认到店
|
// 当前配送员确认到店
|
||||||
riderConfirmArrival: (id) => {
|
riderConfirmArrival: (id) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -35,11 +43,10 @@ const DeliveryOrderApi = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 批量送达交接点
|
// 批量送达交接点
|
||||||
riderDeliveryHandoverBatch: (data) => {
|
riderDeliveryHandoverBatch: (ids) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/deliveryOrder/riderDeliveryHandoverBatch`,
|
url: `/deliveryOrder/riderDeliveryHandoverBatch?ids=${ids}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params: data
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -53,13 +60,23 @@ const DeliveryOrderApi = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 当前配送员确认送达顾客
|
// 当前配送员确认送达顾客
|
||||||
riderConfirmDelivery: (id) => {
|
riderConfirmDelivery: (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/deliveryOrder/riderConfirmDelivery/${id}`,
|
url: `/deliveryOrder/riderConfirmDelivery/${data.deliveryOrderId}`,
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取配送单交接记录
|
||||||
|
getHandoverRecord: (id) => {
|
||||||
|
return request({
|
||||||
|
url: `/deliveryOrder/getHandoverRecord/${id}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default DeliveryOrderApi;
|
export default DeliveryOrderApi;
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ const UserApi = {
|
|||||||
// 修改密码
|
// 修改密码
|
||||||
updateUserPassword: (data) => {
|
updateUserPassword: (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/member/user/update-password',
|
url: '/member/auth/update-password',
|
||||||
method: 'PUT',
|
method: 'POST',
|
||||||
data,
|
data,
|
||||||
custom: {
|
custom: {
|
||||||
loadingMsg: '验证中',
|
loadingMsg: '验证中',
|
||||||
@@ -69,8 +69,8 @@ const UserApi = {
|
|||||||
// 修改密码
|
// 修改密码
|
||||||
updateUserPasswordReset: (data) => {
|
updateUserPasswordReset: (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/member/user/update-password-by-reset',
|
url: '/member/auth/update-password-by-reset',
|
||||||
method: 'PUT',
|
method: 'POST',
|
||||||
data,
|
data,
|
||||||
custom: {
|
custom: {
|
||||||
loadingMsg: '验证中',
|
loadingMsg: '验证中',
|
||||||
@@ -82,8 +82,8 @@ const UserApi = {
|
|||||||
// 重置密码
|
// 重置密码
|
||||||
resetUserPassword: (data) => {
|
resetUserPassword: (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/member/user/reset-password',
|
url: '/member/auth/reset-password',
|
||||||
method: 'PUT',
|
method: 'POST',
|
||||||
data,
|
data,
|
||||||
custom: {
|
custom: {
|
||||||
loadingMsg: '验证中',
|
loadingMsg: '验证中',
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ const AreaApi = {
|
|||||||
// 获得地区树
|
// 获得地区树
|
||||||
getAreaTree: () => {
|
getAreaTree: () => {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/area/tree',
|
url: '/app/area/tree',
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,9 +45,9 @@
|
|||||||
<text class="head-title-active head-title-line" @tap="showAuthModal('smsLogin')">
|
<text class="head-title-active head-title-line" @tap="showAuthModal('smsLogin')">
|
||||||
验证码登录
|
验证码登录
|
||||||
</text>
|
</text>
|
||||||
<text class="head-title-active head-title-line" style="margin-left:25rpx;" @click="toRegister">
|
<!-- <text class="head-title-active head-title-line" style="margin-left:25rpx;" @click="toRegister">
|
||||||
骑手注册
|
骑手注册
|
||||||
</text>
|
</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -62,12 +62,16 @@ export function closeMenuTools() {
|
|||||||
export function getSmsCode(event, mobile) {
|
export function getSmsCode(event, mobile) {
|
||||||
const modalStore = $store('modal');
|
const modalStore = $store('modal');
|
||||||
const lastSendTimer = modalStore.lastTimer[event];
|
const lastSendTimer = modalStore.lastTimer[event];
|
||||||
|
// 如果场景未初始化,先初始化为0(表示可以发送)
|
||||||
if (typeof lastSendTimer === 'undefined') {
|
if (typeof lastSendTimer === 'undefined') {
|
||||||
$helper.toast('短信发送事件错误');
|
modalStore.$patch((state) => {
|
||||||
return;
|
if (typeof state.lastTimer[event] === 'undefined') {
|
||||||
|
state.lastTimer[event] = 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const duration = dayjs().unix() - lastSendTimer;
|
const duration = dayjs().unix() - (modalStore.lastTimer[event] || 0);
|
||||||
const canSend = duration >= 60;
|
const canSend = duration >= 60;
|
||||||
if (!canSend) {
|
if (!canSend) {
|
||||||
$helper.toast('请稍后再试');
|
$helper.toast('请稍后再试');
|
||||||
@@ -82,6 +86,9 @@ export function getSmsCode(event, mobile) {
|
|||||||
// 发送验证码 + 更新上次发送验证码时间
|
// 发送验证码 + 更新上次发送验证码时间
|
||||||
let scene = -1;
|
let scene = -1;
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
case 'registerDelivery':
|
||||||
|
scene = 5;
|
||||||
|
break;
|
||||||
case 'resetPassword':
|
case 'resetPassword':
|
||||||
scene = 4;
|
scene = 4;
|
||||||
break;
|
break;
|
||||||
@@ -109,9 +116,9 @@ export function getSmsTimer(event, mobile = '') {
|
|||||||
const modalStore = $store('modal');
|
const modalStore = $store('modal');
|
||||||
const lastSendTimer = modalStore.lastTimer[event];
|
const lastSendTimer = modalStore.lastTimer[event];
|
||||||
|
|
||||||
|
// 如果场景未初始化,返回"获取验证码"
|
||||||
if (typeof lastSendTimer === 'undefined') {
|
if (typeof lastSendTimer === 'undefined') {
|
||||||
$helper.toast('短信发送事件错误');
|
return '获取验证码';
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const duration = ref(dayjs().unix() - lastSendTimer - 60);
|
const duration = ref(dayjs().unix() - lastSendTimer - 60);
|
||||||
|
|||||||
@@ -60,6 +60,18 @@ const user = defineStore({
|
|||||||
}, 700)
|
}, 700)
|
||||||
}
|
}
|
||||||
this.userInfo = data;
|
this.userInfo = data;
|
||||||
|
if (!data.auditStatus) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/registered/registerRiders'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (data.auditStatus == 1 || data.auditStatus == 3) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/registered/audit'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
BIN
static/img/account-fill.png
Normal file
BIN
static/img/account-fill.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
static/img/account.png
Normal file
BIN
static/img/account.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
项目发布/logo.png
Normal file
BIN
项目发布/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
7
项目发布/测试证书/证书信息.md
Normal file
7
项目发布/测试证书/证书信息.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
证书名称:测试惠吃宝骑手APP
|
||||||
|
证书别名:huichibaodeliveryapp
|
||||||
|
密钥库密码:huichibao
|
||||||
|
密钥密码:huichibao
|
||||||
|
MD5:BC:87:B9:EC:B4:BF:B7:AB:78:F3:C4:B1:91:66:A7:F7
|
||||||
|
sha1:5B:89:DC:42:2F:68:66:0E:71:02:61:94:F6:B0:E0:24:D8:32:60:20
|
||||||
|
sha256:B7:04:81:4A:5F:68:CD:58:7F:CD:B4:72:47:3F:DB:E6:FF:E7:C8:F7:5A:0A:22:52:5E:DA:6E:14:63:2C:B7:1E
|
||||||
Reference in New Issue
Block a user