pull/2/head
xiaozhiyong 2 years ago
parent 6a9e006874
commit 21a3701c47
  1. 19
      driverManagement/driverDetails/driverDetails.vue
  2. 15
      driverManagement/index/index.vue
  3. 229
      pages/index/newindex.css
  4. 185
      pages/index/newindex.vue
  5. BIN
      static/copy.png

@ -35,7 +35,10 @@
inactive-color="#BBBBBB" size='35' v-model="switchOpen" inactive-color="#BBBBBB" size='35' v-model="switchOpen"
@change="change"></u-switch> @change="change"></u-switch>
</view> </view>
<view>{{dirverDetails.customerInfoVo.phone}}</view> <view>
{{dirverDetails.customerInfoVo.phone}}
<view class="copy" v-if="dirverDetails.customerInfoVo.phone" @tap.stop="copy(dirverDetails.customerInfoVo.phone)"></view>
</view>
<view style="font-size: 22rpx;color: #999999;"> <view style="font-size: 22rpx;color: #999999;">
{{dirverDetails.customerInfoVo.createTime}} {{dirverDetails.customerInfoVo.createTime}}
</view> </view>
@ -328,6 +331,11 @@
// } // }
}, },
methods: { methods: {
copy(text) {
uni.setClipboardData({
data: text,
});
},
dirverIndexFn(e){ dirverIndexFn(e){
if(e){ if(e){
this.dirverIndex = 1;this.current=1 this.dirverIndex = 1;this.current=1
@ -852,4 +860,13 @@
position: relative; position: relative;
font-size: 28rpx; font-size: 28rpx;
} }
.copy {
position: relative;
top: 7rpx;
display: inline-block;
margin-left: 15rpx;
width: 32rpx;
height: 32rpx;
background: url('../../static/copy.png') 100%/ 100%;
}
</style> </style>

@ -39,6 +39,7 @@
<view :style="{color:item.userName?'':'#999999'}">{{item.userName?item.userName:' 无设置'}}</view> <view :style="{color:item.userName?'':'#999999'}">{{item.userName?item.userName:' 无设置'}}</view>
<view> <view>
{{item.phone?item.phone:'无设置'}} {{item.phone?item.phone:'无设置'}}
<view class="copy" v-if="item.phone" @tap.stop="copy(item.phone)"></view>
</view> </view>
<view class="form-item_body_left_bottom_text" style="">{{item.companyName?item.companyName :'无直属公司'}}</view> <view class="form-item_body_left_bottom_text" style="">{{item.companyName?item.companyName :'无直属公司'}}</view>
</view> </view>
@ -130,6 +131,11 @@
this.getList(); this.getList();
}, },
methods: { methods: {
copy(text) {
uni.setClipboardData({
data: text,
});
},
scrolltolower() { scrolltolower() {
this.getData.currentPage+=1 this.getData.currentPage+=1
console.log('触底了') console.log('触底了')
@ -379,4 +385,13 @@
.top { .top {
height: var(--status-bar-height); height: var(--status-bar-height);
} }
.copy {
position: relative;
top: 7rpx;
display: inline-block;
margin-left: 15rpx;
width: 32rpx;
height: 32rpx;
background: url('../../static/copy.png') 100%/ 100%;
}
</style> </style>

@ -1,11 +1,20 @@
/* page {
background: ;
} */
.home_page_container { .home_page_container {
position: relative; position: relative;
padding-top: 330rpx;
width: 100vw; width: 100vw;
/* height: 100vh; */
overflow: hidden; overflow: hidden;
/* display: flex;
height: 100vh;
flex-direction: column; */
} }
.home_page_header { /* .home_page_header {
width: 100%; width: 100%;
height: 703rpx; height: 703rpx;
background-color: #ADCEFF; background-color: #ADCEFF;
@ -30,10 +39,8 @@
.home_page_menu_circular { .home_page_menu_circular {
width: 600rpx; width: 600rpx;
height: 600rpx; height: 600rpx;
/* background-color:#2866FF ; */
border-radius: 50%; border-radius: 50%;
position: relative; position: relative;
/* transform: rotateZ(180deg); */
transition: all 1s; transition: all 1s;
z-index: 2; z-index: 2;
display: flex; display: flex;
@ -45,8 +52,7 @@
Width: 100; Width: 100;
Height: 52rpx; Height: 52rpx;
text-align: end; text-align: end;
/* padding-right:34rpx ; */ } */
}
.iconclass { .iconclass {
font-weight: 600; font-weight: 600;
@ -55,7 +61,7 @@
right: 34rpx; right: 34rpx;
} }
.home_page_header_title { /* .home_page_header_title {
font-size: 62rpx; font-size: 62rpx;
font-weight: 500; font-weight: 500;
display: flex; display: flex;
@ -99,10 +105,8 @@
.home_page_menu_item { .home_page_menu_item {
position: absolute; position: absolute;
/* width: fit-content;; */
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
/* background-color: #007AFF; */
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -152,42 +156,208 @@
border-radius: 0px 0px 10px 10px; border-radius: 0px 0px 10px 10px;
width: 290rpx; width: 290rpx;
padding: 15rpx ; padding: 15rpx ;
} */
.header {
position: fixed;
top: 0;
left: 0;
/* position: relative; */
width: 100%;
height: 336rpx;
background: #2866FF;
z-index: 10;
} }
.collection{ .info-frame {
/* padding: 27rpx; */ position: absolute;
height: 260rpx; left: 50%;
margin: 0 auto; bottom: -44rpx;
transform: translateX(-50%);
padding: 20rpx 0 20rpx 200rpx;
display: flex; display: flex;
flex-direction: column;
justify-content: space-evenly;
width: 670rpx;
height: 160rpx;
border-radius: 20rpx;
background: #fff;
}
.info-frame > view:nth-of-type(1),
.info-frame > view:nth-of-type(3) {
/* font-size: 32rpx; */
overflow: hidden;
width: 320rpx;
text-overflow: ellipsis;
/* margin-top: 60rpx; */
white-space: nowrap;
color: #666;
}
.info-frame > view:nth-of-type(2) {
/* font-size: 32rpx; */
color: #bbb;
}
.info-frame > image {
position: absolute;
left: 40rpx;
top: -30rpx;
width: 120rpx;
height: 120rpx;
/* border-radius: 50%; */
}
.domain {
/* flex: 1; */
padding-bottom: 320rpx;
}
.domain > .item {
margin-top: 30rpx; margin-top: 30rpx;
padding: 0 27rpx; }
.domain > .item:nth-of-type(1) {
margin-top: 90rpx;
}
.domain > .item > .title {
padding-left: 40rpx;
font-size: 32rpx;
color: #666;
}
.options-frame {
margin-top: 10rpx;
padding-left: 106rpx;
display: flex;
}
.options-frame > .option {
position: relative; position: relative;
box-sizing: border-box; margin-left: 20rpx;
/* justify-content: space-between; */ padding: 10rpx 14rpx;
width: 240rpx;
height: 140rpx;
background: #fff;
border-radius: 20rpx;
}
.options-frame > .option:nth-of-type(1) {
margin-left: 0;
} }
.collectionbg{ .options-frame > .option > .star {
position: absolute;
top: 0;
right: 0;
width: 80rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #ffffff;
border-radius: 20rpx;
z-index: 5;
}
.options-frame > .option > .wall {
position: relative;
padding-left: 20rpx;
padding-top: 9rpx;
width: 212rpx;
height: 120rpx;
background: rgba(40, 102, 255, .1) ;
border-radius: 20rpx;
}
.options-frame > .option > .wall > .name {
position: absolute;
left: 24rpx;
bottom: 12rpx;
font-size: 28rpx;
color: #666;
}
.collection{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 318rpx;
background: #F0F2FF;
z-index: 10;
}
.collection > .collect-frame {
display: flex;
justify-content: space-between;
position: absolute;
left: 0;
bottom: 0;
padding: 0 54rpx;
width: 100%;
height: 218rpx;
background: #adceff;
border-radius: 30rpx 30rpx 0 0;
}
.collection_item {
position: relative;
top: -74rpx;
display: flex;
justify-content: center;
align-items: center;
/* margin-left: calc((100% - 60/* 0rpx) / 2); */
width: 200rpx;
height: 240rpx;
background-color: #FFF;
border-radius: 20rpx;
animation: name 0.5s;
}
.collection-empty {
position: relative;
top: -74rpx;
width: 200rpx;
height: 240rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #FFF;
border: 6rpx dashed #BBBBBB;
border-radius: 20rpx;
}
/* .collectionbg{
width: calc(100% - 54rpx); width: calc(100% - 54rpx);
height: 100%; height: 100%;
position: absolute; position: absolute;
z-index: -1; z-index: -1;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
} } */
.collection_item{ /* .collection_item{
width: 200rpx; position: relative;
height: 100%;
background-color: #FFFFFF;
border-radius: 10px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-left: calc((100% - 600rpx) / 2); margin-left: calc((100% - 600rpx) / 2);
position: relative; width: 200rpx;
height: 100%;
background-color: #FFFFFF;
border-radius: 10px;
animation: name 0.5s; animation: name 0.5s;
} } */
.collection_itembg{
/* .collection_itembg{
width: 200rpx; width: 200rpx;
height: 100%; height: 100%;
/* background-color: #BBBBBB; */
border-radius: 10px; border-radius: 10px;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -199,7 +369,10 @@
color: #BBBBBB; color: #BBBBBB;
flex-direction: column; flex-direction: column;
} } */
@keyframes name{ @keyframes name{
from{opacity: 0;} from{opacity: 0;}
to{opacity: 1;} to{opacity: 1;}

@ -1,6 +1,6 @@
<template> <template>
<view class="home_page_container"> <view class="home_page_container">
<view :style="{paddingTop:styles.top+styles.height + 'px'}" class="home_page_header"> <!-- <view :style="{paddingTop:styles.top+styles.height + 'px'}" class="home_page_header">
<view class="home_page_header_title"> <view class="home_page_header_title">
{{user.name?`Hi ,${user.name}` : user.userPhone?user.userPhone:'暂未设置'}} {{user.name?`Hi ,${user.name}` : user.userPhone?user.userPhone:'暂未设置'}}
<uni-icons @tap.stop='close()' class="iconclass" color="#ffffff" custom-prefix="iconfont" <uni-icons @tap.stop='close()' class="iconclass" color="#ffffff" custom-prefix="iconfont"
@ -8,9 +8,9 @@
</uni-icons> </uni-icons>
</view> </view>
<view class="home_page_header_identity">{{user.roles[0].roleName}}</view> <view class="home_page_header_identity">{{user.roles[0].roleName}}</view>
</view> </view> -->
<view :style="{transform:`rotate(${180}deg)`}" class="home_page_menu"> <!-- <view :style="{transform:`rotate(${180}deg)`}" class="home_page_menu">
<view class="home_page_menu_name"> <view class="home_page_menu_name">
{{menuList[menuIndex].name?menuList[menuIndex].name:''}} {{menuList[menuIndex].name?menuList[menuIndex].name:''}}
</view> </view>
@ -25,8 +25,8 @@
size="25"></uni-icons> size="25"></uni-icons>
</view> </view>
</view> </view>
</view> </view> -->
<view :style="{transform:`translateY(${Submenu?0:-433}rpx)`}" class="Submenu"> <!-- <view :style="{transform:`translateY(${Submenu?0:-433}rpx)`}" class="Submenu">
<view @tap.stop="jump(item)" v-if="user.authList.includes(item.lable)" <view @tap.stop="jump(item)" v-if="user.authList.includes(item.lable)"
v-for="(item,index) in menuList[menuIndex].submenu" class="Submenu_item"> v-for="(item,index) in menuList[menuIndex].submenu" class="Submenu_item">
<view @tap.stop="collectionFn(item)" class="label"> <view @tap.stop="collectionFn(item)" class="label">
@ -35,28 +35,59 @@
</view> </view>
<view class="Submenu_item_name">{{item.name}}</view> <view class="Submenu_item_name">{{item.name}}</view>
</view> </view>
</view> -->
<view class="header">
<view class="info-frame">
<image src="../../static/tx.png"></image>
<view>{{user.userPhone || '暂未设置'}}</view>
<view>{{user.name ||'暂未设置'}}</view>
<view>{{user.roles[0].roleName}}</view>
<uni-icons @tap.stop='close()' class="iconclass" color="#bbb" custom-prefix="iconfont"
type="iconkaiguan" size="35">
</uni-icons>
</view>
</view> </view>
<view class="collection"> <view class="domain">
<view @tap.stop="jump(item)" v-for="(item,index) in collection" class="collection_item"> <view class="item" v-for="item,index in menuList" :key="index">
<view @tap.stop="remove(item)" class="tip"> <view class="title">{{item.name}}</view>
<uni-icons custom-prefix="iconfont" color="#ffffff" type="iconchiping" size="20"></uni-icons> <view class="options-frame" >
</view> <view class="option" v-for="optionItme,optionIndex in item.submenu" :key="optionIndex" @tap.stop="jump(optionItme)">
<view class="collection_item_name"> <view class="star" @tap.stop="collectionFn(optionItme)">
<uni-icons custom-prefix="iconfont" color="#2866FF" :type="item.icon" size="30"></uni-icons> <uni-icons :color="iconFn(optionItme)" custom-prefix="iconfont" type="iconshoucang-yishoucang" size="18"></uni-icons>
<view class="collection_item_text">{{item.name}}</view> </view>
<view class="wall">
<view class="name">{{optionItme.name}}</view>
<uni-icons color="#fff" custom-prefix="iconfont" :type="optionItme.icon" size="50"></uni-icons>
</view>
</view>
</view> </view>
</view> </view>
<view class="collectionbg"> </view>
<view v-for="(item,index) in 3" class="collection_itembg">
<view>
<text>点击</text> <view class="collection">
<uni-icons style="margin-left: 10rpx;" color="#bbbbbb" custom-prefix="iconfont" <view class="collect-frame">
type="iconshoucang-yishoucang" size="12"></uni-icons> <template v-for="(item,index) in collection">
<view v-if="item" @tap.stop="jump(item)" class="collection_item">
<view @tap.stop="remove(item)" class="tip">
<uni-icons custom-prefix="iconfont" color="#fff" type="iconchiping" size="20"></uni-icons>
</view>
<view class="collection_item_name">
<uni-icons custom-prefix="iconfont" color="#2866FF" :type="item.icon" size="30"></uni-icons>
<view class="collection_item_text">{{item.name}}</view>
</view>
</view> </view>
<view>收藏</view> <view v-else class="collection-empty">
<!-- <view>
<view>Here</view> --> <text>点击</text>
</view> <uni-icons style="margin-left: 10rpx;" color="#bbbbbb" custom-prefix="iconfont"
type="iconshoucang-yishoucang" size="12"></uni-icons>
</view>
<view>收藏</view>
</view>
</template>
</view> </view>
</view> </view>
</view> </view>
@ -99,7 +130,6 @@
watch: { watch: {
menuIndex: (n, o) => { menuIndex: (n, o) => {
console.log(n, 'menuIndex')
}, },
collection: function(n, o) { collection: function(n, o) {
uni.setStorageSync('collection', n); uni.setStorageSync('collection', n);
@ -117,20 +147,20 @@
url: '../login/login?type=1' url: '../login/login?type=1'
}) })
}) })
} else if (res.cancel) {
console.log('用户点击取消');
} }
} }
}); });
}, },
jump(e) { jump(e) {
console.log(e.router)
uni.navigateTo({
url: e.router,
})
return
if (this.user.authList.includes(e.lable)) { if (this.user.authList.includes(e.lable)) {
uni.navigateTo({ uni.navigateTo({
url: e.router, url: e.router,
fail(e) {
console.log('失败')
},
}) })
} else { } else {
uni.showToast({ uni.showToast({
@ -139,47 +169,44 @@
}) })
} }
}, },
remove(e) { remove(item) {
let indexk; let index = this.collection.findIndex(i => i.name === item.name)
this.collection.forEach((item, index) => { this.$set(this.collection,index,'')
if (e.name == item.name) {
indexk = index
}
})
this.collection.splice(indexk, 1);
}, },
iconFn(e) { iconFn(e) {
return this.collection.filter((item) => e.name == item.name).length == 0 ? '#bbbbbb' : '#FFB730'; return this.collection.filter((item) => e.name == item.name).length == 0 ? '#bbbbbb' : '#FFB730';
}, },
initFn() { initFn() {
this.menuList = JSON.parse(JSON.stringify(menus)) this.menuList = JSON.parse(JSON.stringify(menus))
this.menuList.forEach((item, index) => {
item = Object.assign(item, this.circularPositioning(index)); // this.menuList.forEach((item, index) => {
}) // item = Object.assign(item, this.circularPositioning(index));
this.trackingPosition.x = this.menuList[0].x; // })
this.trackingPosition.y = this.menuList[0].y; // this.trackingPosition.x = this.menuList[0].x;
this.collection = uni.getStorageSync('collection') || []; // this.trackingPosition.y = this.menuList[0].y;
this.collection = uni.getStorageSync('collection') || ['','',''];
this.user = uni.getStorageSync('user'); this.user = uni.getStorageSync('user');
}, },
collectionFn(e) { collectionFn(item) {
console.log(this.collection) let isHave = this.collection.find(i => i.name === item.name)
if (this.collection.length == 0) { //
this.collection.unshift(e) if(isHave) {
} else { this.remove(item)
let repeatTest = this.collection.filter((item) => e.name == item.name).length == 0 ? true : false; return
if (repeatTest) {
if (this.collection.length >= 3) {
this.collection.splice(this.collection.length - 1, 1)
}
this.collection.unshift(e)
} else {
this.remove(e)
// uni.showToast({
// title:'',
// icon:'none'
// })
}
} }
let isHaveEmptyIndex = this.collection.findIndex(i => i === '')
//
if(isHaveEmptyIndex !== -1) {
this.$set(this.collection,isHaveEmptyIndex,item)
return
}
if(this.collection.length === 3) {
//
this.collection.pop()
}
//
this.collection.unshift(item)
}, },
gestureAnalysis(e) {}, gestureAnalysis(e) {},
indexDis(e) { indexDis(e) {
@ -203,46 +230,10 @@
}, 500); }, 500);
}, },
menuClick(index) { menuClick(index) {
// let newList = []
// // let arrayList = this.menuList.length
// let arrayList = 8
// let alient = 0
// if (arrayList % 2 == 0){
// alient = Math.floor(arrayList/2)
// }else{
// alient = Math.floor(arrayList/2)+1
// }
// let bbb = 7;
// index =6;
// console.log("index:{}alient:{},menuIndex{}arrayList{}",index,alient,bbb,arrayList);
// // // 0
// for(let i = 0; i <= arrayList-1; i++){
// let aaa = bbb;
// if(i<=alient){
// aaa = bbb-(alient-i);
// if(aaa < 0){
// aaa = arrayList-aaa
// console.log("1inde:{},aaa:{}",i,aaa)
// }else{
// console.log("2inde:{},aaa:{}",i,aaa)
// }
// }else{
// aaa = bbb+(i-alient);
// if(aaa >= arrayList){
// aaa = aaa-arrayList
// console.log("3inde:{},aaa:{}",i,aaa)
// }else{
// console.log("4inde:{},aaa:{}",i,aaa)
// }
// }
// }
// // NO=8
this.Submenu = false this.Submenu = false
let average = 360 / this.menuList.length; let average = 360 / this.menuList.length;
this.trackingPosition.angle = index * average; this.trackingPosition.angle = index * average;
this.trackingPosition.fangle = -this.trackingPosition.angle; this.trackingPosition.fangle = -this.trackingPosition.angle;
// this.menuIndex = null
if (this.menuList[this.menuIndex].colorOpen) { if (this.menuList[this.menuIndex].colorOpen) {
this.menuList[this.menuIndex].colorOpen = false this.menuList[this.menuIndex].colorOpen = false
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Loading…
Cancel
Save