提交
21
.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
20
index.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
11874
package-lock.json
generated
Normal file
75
package.json
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "uni-preset-vue",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev:app": "uni -p app",
|
||||
"dev:app-android": "uni -p app-android",
|
||||
"dev:app-ios": "uni -p app-ios",
|
||||
"dev:app-harmony": "uni -p app-harmony",
|
||||
"dev:custom": "uni -p",
|
||||
"dev:h5": "uni",
|
||||
"dev:h5:ssr": "uni --ssr",
|
||||
"dev:mp-alipay": "uni -p mp-alipay",
|
||||
"dev:mp-baidu": "uni -p mp-baidu",
|
||||
"dev:mp-jd": "uni -p mp-jd",
|
||||
"dev:mp-kuaishou": "uni -p mp-kuaishou",
|
||||
"dev:mp-lark": "uni -p mp-lark",
|
||||
"dev:mp-qq": "uni -p mp-qq",
|
||||
"dev:mp-toutiao": "uni -p mp-toutiao",
|
||||
"dev:mp-weixin": "uni -p mp-weixin",
|
||||
"dev:mp-xhs": "uni -p mp-xhs",
|
||||
"dev:quickapp-webview": "uni -p quickapp-webview",
|
||||
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
|
||||
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
|
||||
"build:app": "uni build -p app",
|
||||
"build:app-android": "uni build -p app-android",
|
||||
"build:app-ios": "uni build -p app-ios",
|
||||
"build:app-harmony": "uni build -p app-harmony",
|
||||
"build:custom": "uni build -p",
|
||||
"build:h5": "uni build",
|
||||
"build:h5:ssr": "uni build --ssr",
|
||||
"build:mp-alipay": "uni build -p mp-alipay",
|
||||
"build:mp-baidu": "uni build -p mp-baidu",
|
||||
"build:mp-jd": "uni build -p mp-jd",
|
||||
"build:mp-kuaishou": "uni build -p mp-kuaishou",
|
||||
"build:mp-lark": "uni build -p mp-lark",
|
||||
"build:mp-qq": "uni build -p mp-qq",
|
||||
"build:mp-toutiao": "uni build -p mp-toutiao",
|
||||
"build:mp-weixin": "uni build -p mp-weixin",
|
||||
"build:mp-xhs": "uni build -p mp-xhs",
|
||||
"build:quickapp-webview": "uni build -p quickapp-webview",
|
||||
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
|
||||
"build:quickapp-webview-union": "uni build -p quickapp-webview-union"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/uni-app": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-app-harmony": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-components": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-h5": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4020420240722002",
|
||||
"vue": "^3.4.21",
|
||||
"vue-i18n": "^9.1.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dcloudio/types": "^3.4.8",
|
||||
"@dcloudio/uni-automator": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-4020420240722002",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-4020420240722002",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-4020420240722002",
|
||||
"@types/node": "^22.4.0",
|
||||
"@vue/runtime-core": "^3.4.21",
|
||||
"less": "^4.2.0",
|
||||
"sass": "^1.77.8",
|
||||
"vite": "5.2.8"
|
||||
}
|
||||
}
|
10
shims-uni.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/// <reference types='@dcloudio/types' />
|
||||
import 'vue'
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
type Hooks = App.AppInstance & Page.PageInstance;
|
||||
|
||||
interface ComponentCustomOptions extends Hooks {
|
||||
|
||||
}
|
||||
}
|
22
src/App.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
console.log('App Launch')
|
||||
},
|
||||
onShow: function () {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function () {
|
||||
console.log('App Hide')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
uni-page-body,html,body,page {
|
||||
height: 100%;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
47
src/api/login.js
Normal file
@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
'url': '/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
'url': '/getInfo',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
'url': '/logout',
|
||||
'method': 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
'url': '/captchaImage',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
}
|
41
src/api/system/user.js
Normal file
@ -0,0 +1,41 @@
|
||||
import upload from '@/utils/upload'
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) {
|
||||
return upload({
|
||||
url: '/system/user/profile/avatar',
|
||||
name: data.name,
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
172
src/components/OrderCard.vue
Normal file
@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<view class="orderCard" @click="onShowDetail">
|
||||
<view class="orderCardHeader">
|
||||
<text class="orderCardType">扣车</text>
|
||||
<text class="orderCardTitle"> 四川省泸州市江阳区酒谷大道四段18号泸州长江机械有限公司</text>
|
||||
</view>
|
||||
<view class="orderCardStatus">
|
||||
<view class="orderCardStatusData">
|
||||
<image :src="imageDzlq" class="orderCardDistanceIcon" mode="aspectFit"></image>
|
||||
<text class="orderCardDistanceValue">12.8km</text>
|
||||
|
||||
<template v-if="orderData.flag === '1'">
|
||||
<image :src="imageFqsj" class="orderCardPredictIcon"></image>
|
||||
<text class="orderCardPredictDate">26分钟</text>
|
||||
到达
|
||||
</template>
|
||||
</view>
|
||||
<text :class="{ toRescued: orderData.flag === '0', inRescue: orderData.flag === '1' }" class="orderCardFlag">
|
||||
<template v-if="orderData.flag === '0'">待救援</template>
|
||||
<template v-if="orderData.flag === '1'">救援中</template>
|
||||
</text>
|
||||
</view>
|
||||
<view class="orderCardProcess">
|
||||
<view v-if="orderData.flag === '0'" class="orderCardSendOrders">
|
||||
系统正在派单中...
|
||||
</view>
|
||||
<view v-if="orderData.flag === '1'">
|
||||
<text class="orderCardDriver">先伟</text>
|
||||
驾驶
|
||||
<text class="orderCardCarNo">鲁A12345</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orderCardFooter">
|
||||
<text class="orderCardDateTime">2024-08-18 10:33</text>
|
||||
<view class="orderCardBtnGroup">
|
||||
<template v-if="orderData.flag === '0'">
|
||||
<view @click.stop class="orderCardBtnGroupItem" style="background-color: #fff;color: #317DFA">删除订单</view>
|
||||
<view @click.stop class="orderCardBtnGroupItem">指派司机</view>
|
||||
</template>
|
||||
<template v-else-if="orderData.flag === '1'">
|
||||
<view @click.stop class="orderCardBtnGroupItem">联系司机</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineProps, reactive} from 'vue'
|
||||
import imageDzlq from '@/static/images/dzlq.png'
|
||||
import imageFqsj from '@/static/images/fqsj.png'
|
||||
|
||||
const props = defineProps({
|
||||
orderData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
*/
|
||||
const onShowDetail = () => {
|
||||
console.log('查看详情')
|
||||
uni.navigateTo({
|
||||
url: '/pages/RescueDetail/RescueDetail'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.orderCard {
|
||||
background-color: #fff;
|
||||
padding: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 12rpx;
|
||||
box-shadow: 2rpx 4rpx 8rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.orderCardHeader {
|
||||
line-height: 1.5;
|
||||
|
||||
.orderCardType {
|
||||
background-color: #EAF1FE;
|
||||
color: #317DFA;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 16rpx 0 16rpx 0;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.orderCardTitle {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.orderCardStatus {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.orderCardStatusData {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.orderCardDistanceIcon, .orderCardPredictIcon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.orderCardDistanceValue {
|
||||
color: #919191;
|
||||
}
|
||||
|
||||
.orderCardPredictDate {
|
||||
color: #317DFA;
|
||||
}
|
||||
|
||||
.orderCardFlag {
|
||||
font-size: 24rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 4rpx;
|
||||
|
||||
&.inRescue {
|
||||
background-color: #ECF8EA;
|
||||
color: #2FB821;
|
||||
}
|
||||
|
||||
&.toRescued {
|
||||
background-color: #FAE9E9;
|
||||
color: #D42424;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.orderCardProcess {
|
||||
.orderCardSendOrders, .orderCardDriver, .orderCardCarNo {
|
||||
color: #317DFA;
|
||||
}
|
||||
}
|
||||
|
||||
.orderCardFooter {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.orderCardDateTime {
|
||||
color: #919191;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.orderCardBtnGroup {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 16rpx;
|
||||
}
|
||||
|
||||
.orderCardBtnGroupItem {
|
||||
background-color: #317DFA;
|
||||
color: #fff;
|
||||
border: 1px solid #317DFA;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
56
src/components/VNavigationBar.vue
Normal file
@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<!-- header -->
|
||||
<view :style="{ backgroundColor, paddingTop: homeHeaderPaddingTop + 'px', height: homeHeaderMenuHeight + 'px' }" class="navigationBar">
|
||||
<uni-icons class="navigationBarBack" size="24" type="left" :color="titleColor"></uni-icons>
|
||||
<view class="navigationBarTitle" :style="{ color: titleColor }">
|
||||
{{ title }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
/* 计算标题位置 */
|
||||
import {getWXStatusHeight} from "@/common/utils";
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import {ref, defineProps, toRefs} from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: '#317DFA'
|
||||
},
|
||||
title: String,
|
||||
titleColor: {
|
||||
type: String,
|
||||
default: '#fff'
|
||||
}
|
||||
})
|
||||
|
||||
const { title } = toRefs(props)
|
||||
|
||||
const homeHeaderPaddingTop = ref(0)
|
||||
const homeHeaderMenuHeight = ref(0)
|
||||
const homeHeaderMenuLeft = ref(0)
|
||||
onLoad(() => {
|
||||
const {barHeight, barTop, menuButtonLeft} = getWXStatusHeight()
|
||||
homeHeaderPaddingTop.value = barTop
|
||||
homeHeaderMenuHeight.value = barHeight
|
||||
homeHeaderMenuLeft.value = menuButtonLeft - 6
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.navigationBar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.navigationBarBack {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
}
|
||||
.navigationBarTitle {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
85
src/components/VTabBar.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<view class="tabBarList">
|
||||
<view v-for="(item, index) in tabBarList" class="tabBarItem" :class="{active: index === activeTab}" @click="toTabBarPath(item)">
|
||||
<image v-if="activeTab !== index" class="tabBarItemIcon" :src="item.icon"></image>
|
||||
<image v-else-if="activeTab === index" class="tabBarItemIcon" :src="item.selectedIcon"></image>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<!--<view class="tabBarItem">-->
|
||||
<!-- <image class="tabBarItemIcon" src="@//static/images/tabbar/index_nor.png"></image>-->
|
||||
<!-- <text>首页</text>-->
|
||||
<!--</view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {reactive} from 'vue'
|
||||
import image_index_nor from '@/static/images/tabbar/index_nor.png'
|
||||
import image_index from '@/static/images/tabbar/index.png'
|
||||
|
||||
const props = defineProps({
|
||||
activeTab: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
|
||||
const tabBarList = reactive([
|
||||
{
|
||||
path: '/pages/home/home',
|
||||
name: '首页',
|
||||
icon: image_index_nor,
|
||||
selectedIcon: image_index
|
||||
},
|
||||
{
|
||||
path: '/pages/index/index',
|
||||
name: '运力',
|
||||
icon: image_index_nor,
|
||||
selectedIcon: image_index
|
||||
},
|
||||
{
|
||||
path: '/pages/index/index',
|
||||
name: '我的',
|
||||
icon: image_index_nor,
|
||||
selectedIcon: image_index
|
||||
}
|
||||
])
|
||||
|
||||
const toTabBarPath = (item) => {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
const url = `/${currentPage.route}`;
|
||||
if (url === item.path) {
|
||||
return
|
||||
}
|
||||
console.log('url', url)
|
||||
uni.reLaunch({
|
||||
url: item.path
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tabBarList {
|
||||
padding: 12rpx 60rpx;
|
||||
padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS 设备 */
|
||||
padding-bottom: env(safe-area-inset-bottom); /* 兼容 iPhone X 及以上设备 */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
background-color: #242A38;
|
||||
.tabBarItem {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
&.active {
|
||||
color: #317DFA;
|
||||
}
|
||||
}
|
||||
.tabBarItemIcon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
36
src/config.js
Normal file
@ -0,0 +1,36 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||
// baseUrl: 'http://192.168.1.3:8080/lanan',
|
||||
// baseUrl: 'https://www.nuoyunr.com/lanan',
|
||||
// baseUrl: 'http://localhost:8080/lanan',
|
||||
baseUrl: 'http://192.168.1.8:48080/admin-api/',
|
||||
|
||||
htmlUrl: 'http://192.168.1.3:80',
|
||||
// imagesUrl: 'http://43.140.199.34/lananRsc/',
|
||||
imagesUrl: 'http://www.nuoyunr.com/lananRsc/',
|
||||
// imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
|
||||
// http://43.140.199.34/lananRsc
|
||||
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
name: "ruoyi-app",
|
||||
// 应用版本
|
||||
version: "1.1.0",
|
||||
// 应用logo
|
||||
logo: "/static/logo.png'",
|
||||
// 官方网站
|
||||
site_url: "http://ruoyi.vip",
|
||||
// 政策协议
|
||||
agreements: [{
|
||||
title: "隐私政策",
|
||||
url: "https://ruoyi.vip/protocol.html"
|
||||
},
|
||||
{
|
||||
title: "用户服务协议",
|
||||
url: "https://ruoyi.vip/protocol.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
19
src/main.js
Normal file
@ -0,0 +1,19 @@
|
||||
import {createSSRApp} from "vue";
|
||||
|
||||
import store from './store' // store
|
||||
import config from '@/config'
|
||||
import './permission' // permission
|
||||
import request from '@/utils/request'
|
||||
import App from "./App.vue";
|
||||
|
||||
Vue.prototype.$request = request
|
||||
Vue.prototype.$store = store
|
||||
Vue.prototype.$imgurl = config.baseUrl
|
||||
|
||||
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App);
|
||||
return {
|
||||
app,
|
||||
};
|
||||
}
|
72
src/manifest.json
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"name" : "",
|
||||
"appid" : "",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
}
|
76
src/pages.json
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "subLoginPages",
|
||||
"pages": [{
|
||||
"path": "pages/Login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登陆",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/PrivacyPolicy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}]
|
||||
}
|
||||
],
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/home/home",
|
||||
"style": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/order",
|
||||
"style": {
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/RescueDetail/RescueDetail"
|
||||
},
|
||||
{
|
||||
"path": "pages/tabBar/car/car",
|
||||
"style": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/tabBar/my/my",
|
||||
"style": {
|
||||
}
|
||||
}
|
||||
],
|
||||
// "tabBar": {
|
||||
// "color": "#FFFFFF",
|
||||
// "selectedColor": "#1890ff",
|
||||
// "borderStyle": "white",
|
||||
// "backgroundColor": "#242A38",
|
||||
// "list": [{
|
||||
// "pagePath": "pages/tabBar/index/index",
|
||||
// "iconPath": "static/images/tabbar/index_nor.png",
|
||||
// "selectedIconPath": "static/images/tabbar/index.png",
|
||||
// "text": "首页"
|
||||
// }, {
|
||||
// "pagePath": "pages/tabBar/car/car",
|
||||
// "iconPath": "static/images/tabbar/mall_nor.png",
|
||||
// "selectedIconPath": "static/images/tabbar/mall.png",
|
||||
// "text": "运力"
|
||||
// }, {
|
||||
// "pagePath": "pages/tabBar/my/my",
|
||||
// "iconPath": "static/images/tabbar/order_nor.png",
|
||||
// "selectedIconPath": "static/images/tabbar/order.png",
|
||||
// "text": "我的"
|
||||
// }]
|
||||
// },
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F6F7FC",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"uniIdRouter": {}
|
||||
}
|
215
src/pages/RescueDetail/RescueDetail.vue
Normal file
@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<view class="rescueDetailContainerBox">
|
||||
<v-navigation-bar background-color="#fff" title="救援详情" title-color="#333"></v-navigation-bar>
|
||||
<view class="rescueDetailContainer">
|
||||
<view class="rescueDetailMapBox">
|
||||
<map id="rescueDetailMap"></map>
|
||||
</view>
|
||||
<!-- 订单详情 -->
|
||||
<view class="rescueDetailBody">
|
||||
<view class="infoCard orderDetail">
|
||||
<view class="orderDetailHeader">
|
||||
<text class="orderDetailHeaderCarNo">川E69752</text>
|
||||
|
|
||||
<text class="orderDetailHeaderCarName">比亚迪宋</text>
|
||||
|
|
||||
<text class="orderDetailHeaderCarColor">蓝色</text>
|
||||
</view>
|
||||
<view class="orderCardStatusData">
|
||||
<image :src="imageDzlq" class="orderCardDistanceIcon" mode="aspectFit"></image>
|
||||
<text class="orderCardDistanceValue">12.8km</text>
|
||||
|
||||
<template v-if="orderDetail.flag === '1'">
|
||||
<image :src="imageFqsj" class="orderCardPredictIcon"></image>
|
||||
<text class="orderCardPredictDate">26分钟</text>
|
||||
到达
|
||||
</template>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="orderDetailDriver">
|
||||
<text>陆师傅</text>
|
||||
<view class="orderDetailDriverMark">
|
||||
<image :src="imageStar" class="orderDetailDriverMarkIcon" mode="aspectFit"></image>
|
||||
<text>5.0</text>
|
||||
</view>
|
||||
<text>208单</text>
|
||||
</view>
|
||||
<view class="orderDetailBtnGroup">
|
||||
<view class="orderDetailBtnItem" style="background-color: #fff;color: #317DFA">取消订单</view>
|
||||
<view class="orderDetailBtnItem">联系司机</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="infoCard orderAmountDetail">
|
||||
订单金额:<text class="orderAmount">{{1500}}</text>元
|
||||
<uni-icons class="orderAmountDetailExtra" type="right" color="#C6C6CB"></uni-icons>
|
||||
</view>
|
||||
|
||||
<!-- 评价详情 -->
|
||||
<view class="infoCard orderEvaluate">
|
||||
<text class="orderEvaluateTitle">评价内容</text>
|
||||
<uni-rate></uni-rate>
|
||||
<view class="orderEvaluateContentBox">
|
||||
<textarea class="orderEvaluateContent"></textarea>
|
||||
</view>
|
||||
<view class="orderEvaluateBtn">提交评价</view>
|
||||
</view>
|
||||
<!-- 进度信息 -->
|
||||
<view class="infoCard orderProcessInfo">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<v-tab-bar :active-tab="0"></v-tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import VNavigationBar from "@/components/VNavigationBar.vue";
|
||||
import imageDzlq from '@/static/images/dzlq.png'
|
||||
import imageFqsj from '@/static/images/fqsj.png'
|
||||
import imageStar from '@/static/images/icon/star.png'
|
||||
import {reactive} from 'vue'
|
||||
import VTabBar from "@/components/VTabBar.vue";
|
||||
|
||||
const orderDetail = reactive({
|
||||
flag: '1'
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.rescueDetailContainerBox {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.rescueDetailContainer {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
background-color: #F6F7FC;
|
||||
}
|
||||
|
||||
.rescueDetailMapBox {
|
||||
height: 720rpx;
|
||||
|
||||
#rescueDetailMap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.rescueDetailBody {
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
|
||||
.infoCard {
|
||||
background-color: #fff;
|
||||
padding: 24rpx 28rpx;
|
||||
}
|
||||
|
||||
.orderDetail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
.orderDetailHeader {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.orderCardStatusData {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 4rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
.orderCardDistanceIcon, .orderCardPredictIcon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.orderCardDistanceValue {
|
||||
color: #919191;
|
||||
}
|
||||
|
||||
.orderCardPredictDate {
|
||||
color: #317DFA;
|
||||
}
|
||||
}
|
||||
.orderDetailDriver {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 12rpx;
|
||||
color: #000;
|
||||
|
||||
.orderDetailDriverMark {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.orderDetailDriverMarkIcon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
}
|
||||
.orderDetailBtnGroup {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
column-gap: 16rpx;
|
||||
|
||||
.orderDetailBtnItem {
|
||||
background-color: #317DFA;
|
||||
color: #fff;
|
||||
border: 1px solid #317DFA;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.orderAmountDetail {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.orderAmount {
|
||||
color: #FE4031;
|
||||
}
|
||||
.orderAmountDetailExtra {
|
||||
font-size: 32rpx;
|
||||
color: #C6C6CB;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
.orderEvaluate {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
.orderEvaluateTitle {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.orderEvaluateContentBox {
|
||||
padding: 16rpx;
|
||||
background-color: #F2F2F2;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.orderEvaluateContent {
|
||||
width: 100%;
|
||||
height: 180rpx;
|
||||
}
|
||||
.orderEvaluateBtn {
|
||||
background-color: #317DFA;
|
||||
color: #fff;
|
||||
border: 1px solid #317DFA;
|
||||
padding: 16rpx;
|
||||
border-radius: 12rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
280
src/pages/home/home.vue
Normal file
@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<view class="home-container">
|
||||
<!-- header -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view :style="{ paddingTop: homeHeaderPaddingTop + 'px' }" class="home-header">
|
||||
<view :style="{height: homeHeaderMenuHeight + 'px'}" class="home-header-setting">
|
||||
<view :style="{borderRadius: homeHeaderMenuHeight / 2 + 'px'}" class="home-header-menu-date">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view :style="{ paddingTop: '100rpx' }" class="home-header">
|
||||
<view :style="{height: '40px'}" class="home-header-setting">
|
||||
<view :style="{borderRadius: '20rpx'}" class="home-header-menu-date">
|
||||
<!-- #endif -->
|
||||
<view class="home-header-menu-date-label">日期</view>
|
||||
<view class="home-header-menu-date-value">星期一</view>
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view :style="{left: homeHeaderMenuLeft + 'px'}" class="home-header-menu-district">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view :style="{right: '0rpx'}" class="home-header-menu-district">
|
||||
<!-- #endif -->
|
||||
<text>泸州</text>
|
||||
<text>▼</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-header-menu">
|
||||
<view v-for="(item, index) in homeHeaderMenuList" class="home-header-menu-item" @click="gotoPath(item)">
|
||||
<image :src="item.icon" class="home-header-menu-item-icon" mode="aspectFit"></image>
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- body -->
|
||||
<view class="home-body">
|
||||
<!-- 我的订单 -->
|
||||
<view class="home-body-myOrder">
|
||||
<view class="home-body-module-header">
|
||||
<text class="home-body-module-header-title">
|
||||
我的订单
|
||||
</text>
|
||||
<text class="home-body-module-header-extra">
|
||||
待评价▸
|
||||
</text>
|
||||
</view>
|
||||
<view class="home-body-myOrder-grid">
|
||||
<view v-for="item in myOrderData" :class="[item.class]" :style="{'--card_color': item.color}"
|
||||
class="home-body-myOrder-grid-item">
|
||||
<text class="home-body-myOrder-grid-item-value">{{ item.num }}</text>
|
||||
<view class="home-body-myOrder-grid-item-label">
|
||||
<image :src="item.icon" class="home-body-myOrder-grid-item-label-icon" mode="aspectFit"></image>
|
||||
<text class="home-body-myOrder-grid-item-label-text">{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-body-atOnceRescue-btn">
|
||||
立即救援
|
||||
</view>
|
||||
</view>
|
||||
<!-- 救援推荐 -->
|
||||
<view class="home-body-rescueRecommended">
|
||||
<view class="home-body-module-header">
|
||||
<text class="home-body-module-header-title">
|
||||
救援推荐
|
||||
</text>
|
||||
<text class="home-body-module-header-extra">
|
||||
历史订单▸
|
||||
</text>
|
||||
</view>
|
||||
<view class="home-body-rescueRecommended-container">
|
||||
<order-card v-for="item in orderList" :order-data="item"></order-card>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<v-tab-bar :active-tab="0"></v-tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import {reactive, ref} from 'vue';
|
||||
import {getWXStatusHeight} from '@/utils/utils.js'
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import menuCarManager from '@/static/ycar.png'
|
||||
import image_dh from '@/static/dh.png'
|
||||
import OrderCard from "@/components/OrderCard.vue";
|
||||
import VTabBar from "@/components/VTabBar.vue";
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
/* 计算标题位置 */
|
||||
const {barHeight, barTop, menuButtonLeft, menuButtonRight, barWidth} = getWXStatusHeight()
|
||||
const homeHeaderPaddingTop = ref(0)
|
||||
const homeHeaderMenuHeight = ref(0)
|
||||
const homeHeaderMenuLeft = ref(0)
|
||||
onLoad(() => {
|
||||
homeHeaderPaddingTop.value = barTop
|
||||
homeHeaderMenuHeight.value = barHeight
|
||||
homeHeaderMenuLeft.value = menuButtonRight - barWidth - 6
|
||||
})
|
||||
// #endif
|
||||
|
||||
|
||||
// 标题导航菜单
|
||||
const homeHeaderMenuList = ref([
|
||||
{title: '我的订单', icon: menuCarManager, path: '/pages/order/order'},
|
||||
{title: '车辆管理', icon: menuCarManager, path: ''},
|
||||
{title: '数据统计', icon: menuCarManager, path: ''},
|
||||
{title: '消息通知', icon: menuCarManager, path: ''},
|
||||
])
|
||||
const gotoPath = (menu) => {
|
||||
uni.navigateTo({
|
||||
url: menu.path
|
||||
})
|
||||
}
|
||||
|
||||
const myOrderData = reactive([
|
||||
{title: '待支付', class: 'dzf', num: 23, icon: image_dh, color: '#FCF0EE'},
|
||||
{title: '待取车', class: 'dqc', num: 23, icon: image_dh, color: '#F9F6E2'},
|
||||
{title: '救援中', class: 'jyz', num: 23, icon: image_dh, color: '#F0EFFA'},
|
||||
{title: '已完成', class: 'ywc', num: 23, icon: image_dh, color: '#ECF3FE'},
|
||||
])
|
||||
|
||||
const orderList = ref([
|
||||
{flag: '0'},
|
||||
{flag: '1'}
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.home-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #F6F7FC;
|
||||
}
|
||||
|
||||
.home-header {
|
||||
background-color: #317DFA;
|
||||
|
||||
.home-header-setting {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.home-header-menu-date, .home-header-menu-district {
|
||||
}
|
||||
|
||||
.home-header-menu-date {
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
|
||||
.home-header-menu-date-label, .home-header-menu-date-value {
|
||||
padding: 8rpx 24rpx;
|
||||
}
|
||||
|
||||
.home-header-menu-date-label {
|
||||
background-color: #5A97FB;
|
||||
}
|
||||
|
||||
.home-header-menu-date-value {
|
||||
background-color: #FEFEFE;
|
||||
color: #317DFA;
|
||||
}
|
||||
}
|
||||
|
||||
.home-header-menu-district {
|
||||
position: absolute;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
.home-header-menu {
|
||||
padding: 32rpx 24rpx 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.home-header-menu-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 8rpx;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.home-header-menu-item-icon {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.home-body {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
padding: 0 20rpx;
|
||||
overflow: auto;
|
||||
|
||||
.home-body-module-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 20rpx 0;
|
||||
|
||||
.home-body-module-header-title {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.home-body-module-header-extra {
|
||||
color: #919191;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.home-body-myOrder-grid {
|
||||
display: grid;
|
||||
gap: 16rpx;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
.home-body-myOrder-grid-item {
|
||||
background-color: var(--card_color);
|
||||
padding: 32rpx 20rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
//color: #fff;
|
||||
|
||||
//&.dzf {
|
||||
// background-image: url("~@/static/dzf.png");
|
||||
//}
|
||||
//
|
||||
//&.dqc {
|
||||
// background-image: url("~@/static/dpq.png");
|
||||
//}
|
||||
//
|
||||
//&.jyz {
|
||||
// background-image: url("~@/static/zxz.png");
|
||||
//}
|
||||
//
|
||||
//&.ywc {
|
||||
// background-image: url("~@/static/yyd.png");
|
||||
//}
|
||||
|
||||
.home-body-myOrder-grid-item-value {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.home-body-myOrder-grid-item-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 8rpx;
|
||||
|
||||
.home-body-myOrder-grid-item-label-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.home-body-atOnceRescue-btn {
|
||||
margin-top: 20rpx;
|
||||
background-color: #317DFA;
|
||||
color: #FEFEFE;
|
||||
padding: 20rpx 0;
|
||||
text-align: center;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.home-body-rescueRecommended {
|
||||
.home-body-rescueRecommended-container {
|
||||
padding-bottom: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
159
src/pages/order/order.vue
Normal file
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<!-- header -->
|
||||
<view class="order-container">
|
||||
<v-navigation-bar class="order-header" title="我的订单"></v-navigation-bar>
|
||||
<view class="order-container-search">
|
||||
<view class="order-container-search-inputBox">
|
||||
<uni-icons color="#8D8D92" size="18" type="search"></uni-icons>
|
||||
<input v-model="queryParams.name" class="order-container-search-input"></input>
|
||||
<uni-icons color="#8D8D92" size="18" type="clear"></uni-icons>
|
||||
</view>
|
||||
<view class="order-container-search-btn" @click="onSearch">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-container-tabs">
|
||||
<view v-for="item in tabList" :class="{active: activeKey === item.value}" class="order-container-tabItem"
|
||||
@click="chooseTab(item)">
|
||||
{{ item.label }}
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view :refresher-enabled="true" :refresher-triggered="refresherFlag" :scroll-y="true"
|
||||
class="order-container-listBox" refresher-background="transparent" @refresherrefresh="pullDownRefresh">
|
||||
<view class="order-container-list">
|
||||
<order-card v-for="item in orderList" :order-data="item"></order-card>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<v-tab-bar :active-tab="0"></v-tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||
import {reactive, ref} from 'vue'
|
||||
import OrderCard from "@/components/OrderCard.vue";
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import VTabBar from "@/components/VTabBar.vue";
|
||||
|
||||
const tabList = reactive([
|
||||
{label: '待支付', value: '0'},
|
||||
{label: '待取车', value: '1'},
|
||||
{label: '救援中', value: '2'},
|
||||
{label: '已完成', value: '3'},
|
||||
{label: '待评价', value: '4'}
|
||||
])
|
||||
// 参数
|
||||
const queryParams = reactive({
|
||||
name: '',
|
||||
flag: '0'
|
||||
})
|
||||
// 订单列表
|
||||
const orderList = ref()
|
||||
// 当前激活tab标识
|
||||
const activeKey = ref('0')
|
||||
// 下拉刷新标识
|
||||
const refresherFlag = ref(false)
|
||||
// 切换tab的函数
|
||||
const chooseTab = (tabItem) => {
|
||||
activeKey.value = tabItem.value
|
||||
refresherFlag.value = true
|
||||
}
|
||||
// 搜索事件
|
||||
const onSearch = () => {
|
||||
if (refresherFlag.value) {
|
||||
uni.showToast({
|
||||
title: '已经在查询了,请稍后...',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
refresherFlag.value = true
|
||||
}
|
||||
/**
|
||||
* 下拉刷新方法
|
||||
*/
|
||||
const pullDownRefresh = () => {
|
||||
refresherFlag.value = true
|
||||
setTimeout(() => {
|
||||
orderList.value = [
|
||||
{flag: '0'},
|
||||
{flag: '1'}
|
||||
]
|
||||
refresherFlag.value = false
|
||||
}, 2000)
|
||||
}
|
||||
onLoad(() => {
|
||||
setTimeout(() => {
|
||||
refresherFlag.value = true
|
||||
}, 200)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.order-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #F6F7FC;
|
||||
}
|
||||
|
||||
.order-container-search {
|
||||
background-color: #317DFA;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 20rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
.order-container-search-inputBox {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 12rpx;
|
||||
background-color: #fff;
|
||||
padding: 10rpx 8rpx;
|
||||
border-radius: 28rpx;
|
||||
|
||||
.order-container-search-input {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.order-container-search-btn {
|
||||
background-color: #5A97FB;
|
||||
color: #fff;
|
||||
padding: 12rpx 32rpx;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order-container-tabs {
|
||||
padding: 0 20rpx 4rpx;
|
||||
background-color: #317DFA;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.order-container-tabItem {
|
||||
padding: 20rpx 0;
|
||||
color: #fff;
|
||||
|
||||
&.active {
|
||||
border-bottom: 6rpx solid #fff;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-container-listBox {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
|
||||
.order-container-list {
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
275
src/pages/subLoginPages/pages/Login.vue
Normal file
@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="logo">
|
||||
<image class="logo-img" src="/static/logo.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<u-button text="手机号一键登录" :customStyle="{color:'#8a6e4b'}"
|
||||
color="linear-gradient(to right, rgb(244, 230, 186), rgb(252, 236, 210))" open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhone"></u-button>
|
||||
<!-- <view class="mask" @click="authorize" v-if="isShow">
|
||||
|
||||
</view> -->
|
||||
|
||||
<!-- <u-button text="账密登陆" color="linear-gradient(to right, #FF6100, #FF0000)" @click="login()"></u-button> -->
|
||||
<!-- <view class="mask" @click="authorize" v-if="isShow">
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="privacy-policy-area" @click="getprivacyPolicyChecked()">
|
||||
<!-- <view class="privacy-policy-checkbox">
|
||||
<u-checkbox-group v-model="privacyPolicyChecked" @change="checkboxChange">
|
||||
<u-checkbox activeColor="#8a6e4b" size="22" name="1"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view> -->
|
||||
<view class="xzindex" v-if="privacyPolicyChecked == false">
|
||||
|
||||
</view>
|
||||
<view class="indexxz" v-if="privacyPolicyChecked == true">
|
||||
<uni-icons type="checkmarkempty" size="14" color="#fffff"></uni-icons>
|
||||
</view>
|
||||
<view class="privacy-policy-text">
|
||||
<text>请仔细阅读</text>
|
||||
<text class="privacy-policy-text-btn" @click="goPolicy">《用户协议》</text> <text
|
||||
class="privacy-policy-text-btn" @click="goPolicy">《隐私政策》</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
privacyPolicyChecked: false,
|
||||
isShow: true,
|
||||
loginStatus: null,
|
||||
returnUrl: null
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.wxlogin()
|
||||
// 微信登录code有效期 五分钟
|
||||
this.loginStatus = setInterval(() => {
|
||||
this.wxlogin()
|
||||
}, 300000)
|
||||
},
|
||||
onLoad(option) {
|
||||
this.privacyPolicyChecked = false
|
||||
if (option.url) {
|
||||
this.returnUrl = option.url
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getprivacyPolicyChecked(){
|
||||
console.log('执行了',this.privacyPolicyChecked);
|
||||
|
||||
this.privacyPolicyChecked =! this.privacyPolicyChecked
|
||||
},
|
||||
wxlogin() {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success(res) {
|
||||
console.log(543, res);
|
||||
if (res.code) {
|
||||
uni.setStorageSync('c1', res.code);
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goPolicy() {
|
||||
uni.navigateTo({
|
||||
url: "/subLoginPages/pages/privacyPolicy"
|
||||
})
|
||||
},
|
||||
// 账密登陆
|
||||
login() {
|
||||
uni.request({
|
||||
url: this.baseUrl + '/login',
|
||||
method: 'POST',
|
||||
|
||||
data: {
|
||||
username: 'test',
|
||||
password: '123123aa'
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
uni.setStorageSync('token', res.data.token);
|
||||
uni.switchTab({
|
||||
url: "/pages/tabbar/home/Home"
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//授权
|
||||
authorize() {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请阅读并勾选用户协议",
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
//获取手机号
|
||||
getPhone(e) {
|
||||
if (this.privacyPolicyChecked == false) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请阅读并勾选用户协议",
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.privacyPolicyChecked == true) {
|
||||
uni.checkSession({
|
||||
success: () => {
|
||||
uni.request({
|
||||
// url: that.$baseUrl + "/wxLogin?code=" + e.detail.code + '&encryptedIv=' + e.detail.iv + '&encryptedData=' + e.detail.encryptedData,
|
||||
url: getApp().globalData.config.baseUrl + "/wxLogin",
|
||||
method: "POST",
|
||||
data: {
|
||||
code: uni.getStorageSync('c1'),
|
||||
encryptedIv: e.detail.iv,
|
||||
encryptedData: e.detail.encryptedData,
|
||||
inviteId: uni.getStorageSync('inviteId')?uni.getStorageSync('inviteId'):null
|
||||
},
|
||||
success: (rex) => {
|
||||
console.log('71', rex, rex.code, rex.data)
|
||||
if (rex.data.code == 200) {
|
||||
if (this.loginStatus) {
|
||||
clearInterval(this.loginStatus)
|
||||
}
|
||||
uni.setStorageSync('App-Token', rex.data.token);
|
||||
if (this.returnUrl) {
|
||||
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
console.log('首页');
|
||||
uni.reLaunch({
|
||||
url: '/pages/tabBar/mine/mine'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: rex.msg
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log("fail", res);
|
||||
uni.showToast({
|
||||
icon: "error",
|
||||
title: "登录失败,请重新点击并授权!",
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
duration: 2000,
|
||||
title: "登录状态过期,重新登录"
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
//复选框
|
||||
checkboxChange(e) {
|
||||
console.log('141', e);
|
||||
if (e.length) {
|
||||
this.isShow = false;
|
||||
} else {
|
||||
this.isShow = true;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.xzindex{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 6px;
|
||||
background-color: white;
|
||||
border:1px solid #D2C3AF ;
|
||||
}
|
||||
.indexxz{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 6px;
|
||||
line-height: 16px;
|
||||
background-color: #D2C3AF;
|
||||
border:1px solid #D2C3AF ;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
height: 100vh;
|
||||
background-color: #242a38;
|
||||
|
||||
.logo {
|
||||
width: 300rpx;
|
||||
margin: 60rpx auto;
|
||||
|
||||
.logo-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 60rpx;
|
||||
position: relative;
|
||||
color: #000;
|
||||
|
||||
.mask {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-policy-area {
|
||||
width: 90%;
|
||||
margin: 20rpx auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.privacy-policy-checkbox {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.privacy-policy-text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
|
||||
.privacy-policy-text-btn {
|
||||
color: #8a6e4b;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
28
src/pages/subLoginPages/pages/PrivacyPolicy.vue
Normal file
@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<view class="content" v-html="text">
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
str
|
||||
} from "@/utils/privacyPolicy.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: ""
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.text = str;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style socped lang="scss">
|
||||
.content {
|
||||
padding: 40rpx;
|
||||
background: #fff
|
||||
}
|
||||
</style>
|
9
src/pages/tabBar/car/car.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<view class="">car</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
280
src/pages/tabBar/index/index.vue
Normal file
@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<view class="home-container">
|
||||
<!-- header -->
|
||||
<view :style="{ paddingTop: homeHeaderPaddingTop + 'px' }" class="home-header">
|
||||
<view :style="{height: homeHeaderMenuHeight + 'px'}" class="home-header-setting">
|
||||
<view :style="{borderRadius: homeHeaderMenuHeight / 2 + 'px'}" class="home-header-menu-date">
|
||||
<view class="home-header-menu-date-label">日期</view>
|
||||
<view class="home-header-menu-date-value">星期一</view>
|
||||
</view>
|
||||
<view :style="{left: homeHeaderMenuLeft + 'px'}" class="home-header-menu-district">
|
||||
<text>泸州</text>
|
||||
<text>▼</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-header-menu">
|
||||
<view v-for="(item, index) in homeHeaderMenuList" class="home-header-menu-item" @click="gotoPath(item)">
|
||||
<image :src="item.icon" class="home-header-menu-item-icon" mode="aspectFit"></image>
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- body -->
|
||||
<view class="home-body">
|
||||
<!-- 我的订单 -->
|
||||
<view class="home-body-myOrder">
|
||||
<view class="home-body-module-header">
|
||||
<text class="home-body-module-header-title">
|
||||
我的订单
|
||||
</text>
|
||||
<text class="home-body-module-header-extra">
|
||||
待评价▸
|
||||
</text>
|
||||
</view>
|
||||
<view class="home-body-myOrder-grid">
|
||||
<view v-for="item in myOrderData" :class="[item.class]" :style="{'--card_color': item.color}"
|
||||
class="home-body-myOrder-grid-item dzf">
|
||||
<text class="home-body-myOrder-grid-item-value">{{item.num}}</text>
|
||||
<view class="home-body-myOrder-grid-item-label">
|
||||
<image :src="item.icon" class="home-body-myOrder-grid-item-label-icon" mode="aspectFit"></image>
|
||||
<text class="home-body-myOrder-grid-item-label-text">{{item.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-body-atOnceRescue-btn">
|
||||
立即救援
|
||||
</view>
|
||||
</view>
|
||||
<!-- 救援推荐 -->
|
||||
<view class="home-body-rescueRecommended">
|
||||
<view class="home-body-module-header">
|
||||
<text class="home-body-module-header-title">
|
||||
救援推荐
|
||||
</text>
|
||||
<text class="home-body-module-header-extra">
|
||||
历史订单▸
|
||||
</text>
|
||||
</view>
|
||||
<view class="home-body-rescueRecommended-container">
|
||||
<order-card v-for="item in orderList" :order-data="item"></order-card>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<v-tab-bar></v-tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import {reactive, ref} from 'vue';
|
||||
import {getWXStatusHeight} from '@/common/utils.js'
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import menuCarManager from '@/static/ycar.png'
|
||||
import image_dh from '@/static/dh.png'
|
||||
import OrderCard from "@/components/OrderCard.vue";
|
||||
import VTabBar from "@/components/VTabBar.vue";
|
||||
|
||||
/* 计算标题位置 */
|
||||
const {barHeight, barTop, menuButtonLeft} = getWXStatusHeight()
|
||||
const homeHeaderPaddingTop = ref(0)
|
||||
const homeHeaderMenuHeight = ref(0)
|
||||
const homeHeaderMenuLeft = ref(0)
|
||||
onLoad(() => {
|
||||
homeHeaderPaddingTop.value = barTop
|
||||
homeHeaderMenuHeight.value = barHeight
|
||||
homeHeaderMenuLeft.value = menuButtonLeft - 6
|
||||
})
|
||||
|
||||
|
||||
// 标题导航菜单
|
||||
const homeHeaderMenuList = ref([
|
||||
{title: '我的订单', icon: menuCarManager, path: '/pages/order/order'},
|
||||
{title: '车辆管理', icon: menuCarManager, path: ''},
|
||||
{title: '数据统计', icon: menuCarManager, path: ''},
|
||||
{title: '消息通知', icon: menuCarManager, path: ''},
|
||||
])
|
||||
const gotoPath = (menu) => {
|
||||
console.log('menu.path', menu.path)
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
pagePath: menu.path,
|
||||
success(e) {
|
||||
console.log('e', e)
|
||||
},
|
||||
fail(err) {
|
||||
console.log('err', err)
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
// uni.navigateTo({
|
||||
// url: menu.path
|
||||
// })
|
||||
uni.switchTab({
|
||||
url: menu.path
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
|
||||
const myOrderData = reactive([
|
||||
{title: '待支付', class: 'dzf', num: 23, icon: image_dh, color: '#FCF0EE'},
|
||||
{title: '待取车', class: 'dqc', num: 23, icon: image_dh, color: '#F9F6E2'},
|
||||
{title: '救援中', class: 'jyz', num: 23, icon: image_dh, color: '#F0EFFA'},
|
||||
{title: '已完成', class: 'ywc', num: 23, icon: image_dh, color: '#ECF3FE'},
|
||||
])
|
||||
|
||||
const orderList = ref([
|
||||
{ flag: '0' },
|
||||
{ flag: '1' }
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.home-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #F6F7FC;
|
||||
}
|
||||
|
||||
.home-header {
|
||||
background-color: #317DFA;
|
||||
|
||||
.home-header-setting {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.home-header-menu-date, .home-header-menu-district {
|
||||
}
|
||||
|
||||
.home-header-menu-date {
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
|
||||
.home-header-menu-date-label, .home-header-menu-date-value {
|
||||
padding: 8rpx 24rpx;
|
||||
}
|
||||
|
||||
.home-header-menu-date-label {
|
||||
background-color: #5A97FB;
|
||||
}
|
||||
|
||||
.home-header-menu-date-value {
|
||||
background-color: #FEFEFE;
|
||||
color: #317DFA;
|
||||
}
|
||||
}
|
||||
|
||||
.home-header-menu-district {
|
||||
position: absolute;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
.home-header-menu {
|
||||
padding: 32rpx 24rpx 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.home-header-menu-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 8rpx;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.home-header-menu-item-icon {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.home-body {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
padding: 0 20rpx;
|
||||
overflow: auto;
|
||||
|
||||
.home-body-module-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 20rpx 0;
|
||||
|
||||
.home-body-module-header-title {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.home-body-module-header-extra {
|
||||
color: #919191;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.home-body-myOrder-grid {
|
||||
display: grid;
|
||||
gap: 16rpx;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
.home-body-myOrder-grid-item {
|
||||
background-color: var(--card_color);
|
||||
padding: 32rpx 20rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
//color: #fff;
|
||||
|
||||
//&.dzf {
|
||||
// background-image: url("~@/static/dzf.png");
|
||||
//}
|
||||
//
|
||||
//&.dqc {
|
||||
// background-image: url("~@/static/dpq.png");
|
||||
//}
|
||||
//
|
||||
//&.jyz {
|
||||
// background-image: url("~@/static/zxz.png");
|
||||
//}
|
||||
//
|
||||
//&.ywc {
|
||||
// background-image: url("~@/static/yyd.png");
|
||||
//}
|
||||
|
||||
.home-body-myOrder-grid-item-value {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.home-body-myOrder-grid-item-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 8rpx;
|
||||
.home-body-myOrder-grid-item-label-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.home-body-atOnceRescue-btn {
|
||||
margin-top: 20rpx;
|
||||
background-color: #317DFA;
|
||||
color: #FEFEFE;
|
||||
padding: 20rpx 0;
|
||||
text-align: center;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.home-body-rescueRecommended {
|
||||
.home-body-rescueRecommended-container {
|
||||
padding-bottom: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
9
src/pages/tabBar/my/my.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<view class="">my</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
106
src/permission.js
Normal file
@ -0,0 +1,106 @@
|
||||
import {
|
||||
getToken
|
||||
} from '@/utils/auth'
|
||||
|
||||
import {
|
||||
baseUrl
|
||||
} from "@/config.js"
|
||||
//只要是未登录状态,想要跳转到名单内的路径时,直接跳到登录页
|
||||
const loginPage = "/subLoginPages/pages/login"
|
||||
// 页面白名单,不受拦截
|
||||
// const whiteList = [
|
||||
// '/subLoginPages/pages/login',
|
||||
// '/pages/tabBar/mine/mine'
|
||||
// ]
|
||||
// 拦截名单,受拦截
|
||||
const blockedList = [
|
||||
// '/subCarPages/index/index'
|
||||
'/subCarPages/buy/buy', // 求购车辆
|
||||
'/subCarPages/sell/sell', // 发布车辆
|
||||
'/subCarPages/userPost/userPost', //我的发布
|
||||
'/subSchoolPages/registration/registration', //学车报名
|
||||
'/subInspectionPages/details/details', // 检测商品
|
||||
'/subRepairPages/details/details', // 汽修商品
|
||||
'/subSchoolPages/appointment/appointment', // 预约报名
|
||||
'/pages/tabBar/order/order', // 消费记录
|
||||
'/pages/tabBar/mine/Recharge', // 充值
|
||||
'/subCouponPages/index/index', // 我的优惠券
|
||||
'/pages/tabBar/mine/mine' // 个人中心
|
||||
]
|
||||
|
||||
function hasPermission(url) {
|
||||
let islogin = getToken(); // Get the token (e.g., from a cookie or local storage)
|
||||
// console.log(1, islogin);
|
||||
islogin = Boolean(islogin); // Convert to a boolean value
|
||||
// console.log(2, islogin);
|
||||
|
||||
const hasParams = url.indexOf('?') !== -1;
|
||||
|
||||
const isBlockedURL = blockedList.some((blockedURL) => {
|
||||
return hasParams ? blockedURL === url.split('?')[0] : blockedURL === url;
|
||||
});
|
||||
|
||||
if (isBlockedURL && !islogin) {
|
||||
console.log('未登录');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
uni.addInterceptor('navigateTo', {
|
||||
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
|
||||
invoke(e) {
|
||||
if (!hasPermission(e.url)) {
|
||||
uni.navigateTo({
|
||||
url: loginPage + '?url=' + e.url
|
||||
})
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
success(e) {}
|
||||
})
|
||||
|
||||
|
||||
|
||||
uni.addInterceptor('switchTab', {
|
||||
// tabbar页面跳转前进行拦截
|
||||
invoke(e) {
|
||||
if (!hasPermission(e.url)) {
|
||||
uni.navigateTo({
|
||||
url: loginPage + '?url=' + e.url
|
||||
})
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
success(e) {}
|
||||
})
|
||||
|
||||
uni.addInterceptor('reLaunch', {
|
||||
// tabbar页面跳转前进行拦截
|
||||
invoke(e) {
|
||||
if (!hasPermission(e.url)) {
|
||||
uni.navigateTo({
|
||||
url: loginPage + '?url=' + e.url
|
||||
})
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
success(e) {}
|
||||
})
|
||||
|
||||
uni.addInterceptor('redirectTo', {
|
||||
// tabbar页面跳转前进行拦截
|
||||
invoke(e) {
|
||||
if (!hasPermission(e.url)) {
|
||||
uni.navigateTo({
|
||||
url: loginPage + '?url=' + e.url
|
||||
})
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
success(e) {}
|
||||
})
|
6
src/shime-uni.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export {};
|
||||
|
||||
declare module "vue" {
|
||||
type Hooks = App.AppInstance & Page.PageInstance;
|
||||
interface ComponentCustomOptions extends Hooks {}
|
||||
}
|
BIN
src/static/-h-wxdl.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/static/bxwh.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/static/clbx.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/static/clxx.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/static/dd.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
src/static/detection/dd.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
src/static/detection/ddw.png
Normal file
After Width: | Height: | Size: 337 B |
BIN
src/static/detection/loginbj.png
Normal file
After Width: | Height: | Size: 507 KiB |
BIN
src/static/detection/shouji.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
src/static/detection/sja.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
src/static/detection/sy.png
Normal file
After Width: | Height: | Size: 441 B |
BIN
src/static/detection/syw.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
src/static/detection/wd.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
src/static/detection/wdw.png
Normal file
After Width: | Height: | Size: 528 B |
BIN
src/static/detection/xiaofeij.png
Normal file
After Width: | Height: | Size: 463 B |
BIN
src/static/dh.png
Normal file
After Width: | Height: | Size: 831 B |
BIN
src/static/dingwei.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
src/static/dljy.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
src/static/dpq.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/static/dzf.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/static/home.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/static/homex.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/static/ht.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
src/static/images/Frame 1398@2x.png
Normal file
After Width: | Height: | Size: 319 B |
BIN
src/static/images/bddh.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
src/static/images/cldd.png
Normal file
After Width: | Height: | Size: 333 B |
BIN
src/static/images/cllx.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
src/static/images/ddian.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/static/images/dzlq.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
src/static/images/fqsj.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
src/static/images/htai.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
src/static/images/icon/car.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/static/images/icon/inspection.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/static/images/icon/insurance.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/static/images/icon/repair.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/static/images/icon/rescue.png
Normal file
After Width: | Height: | Size: 899 B |
BIN
src/static/images/icon/school.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/static/images/icon/star.png
Normal file
After Width: | Height: | Size: 875 B |
BIN
src/static/images/icon/sysc.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/static/images/kouche.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/static/images/lxr.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
src/static/images/profile.jpg
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
src/static/images/syou.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/static/images/tabbar/index.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
src/static/images/tabbar/index_nor.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
src/static/images/tabbar/mall.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
src/static/images/tabbar/mall_nor.png
Normal file
After Width: | Height: | Size: 498 B |
BIN
src/static/images/tabbar/mine.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
src/static/images/tabbar/mine_nor.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
src/static/images/tabbar/order.png
Normal file
After Width: | Height: | Size: 400 B |
BIN
src/static/images/tabbar/order_nor.png
Normal file
After Width: | Height: | Size: 347 B |
BIN
src/static/images/tche.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src/static/jiejin.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
src/static/jyls.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
src/static/jyz.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
src/static/jzkq.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/static/kc.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
src/static/kou.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
src/static/loginbj.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
src/static/logo.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
src/static/message.png
Normal file
After Width: | Height: | Size: 1016 B |
BIN
src/static/messagex.png
Normal file
After Width: | Height: | Size: 831 B |
BIN
src/static/my.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/static/myx.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/static/qcjc.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
src/static/qcwx.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/static/quesheng.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
src/static/rscgm.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
src/static/rzsj.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
src/static/smrz.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/static/sy.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
src/static/tc.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
src/static/wwwx.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/static/xclbx.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
src/static/xdljy.png
Normal file
After Width: | Height: | Size: 37 KiB |