@ -1,21 +1,35 @@
|
|||||||
{
|
{
|
||||||
|
"name": "mkw-visit-wx",
|
||||||
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"lockfileVersion": 1,
|
"packages": {
|
||||||
"dependencies": {
|
"": {
|
||||||
"image-tools": {
|
"dependencies": {
|
||||||
|
"image-tools": "^1.4.0",
|
||||||
|
"moment": "^2.29.3",
|
||||||
|
"uview-ui": "^2.0.31"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/image-tools": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/image-tools/-/image-tools-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/image-tools/-/image-tools-1.4.0.tgz",
|
||||||
"integrity": "sha512-TKtvJ6iUwM0mfaD4keMnk1ENHFC470QEjBfA3IlvKdEOufzvWbjbaoNcoyYq6HlViF8+d5tOS1ooE6j7CHf1lQ=="
|
"integrity": "sha512-TKtvJ6iUwM0mfaD4keMnk1ENHFC470QEjBfA3IlvKdEOufzvWbjbaoNcoyYq6HlViF8+d5tOS1ooE6j7CHf1lQ=="
|
||||||
},
|
},
|
||||||
"moment": {
|
"node_modules/moment": {
|
||||||
"version": "2.29.3",
|
"version": "2.29.3",
|
||||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
|
||||||
"integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
|
"integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"uview-ui": {
|
"node_modules/uview-ui": {
|
||||||
"version": "2.0.31",
|
"version": "2.0.31",
|
||||||
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.31.tgz",
|
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.31.tgz",
|
||||||
"integrity": "sha512-I/0fGuvtiKHH/mBb864SGYk+SJ7WaF32tsBgYgeBOsxlUp+Th+Ac2tgz2cTvsQJl6eZYWsKZ3ixiSXCAcxZ8Sw=="
|
"integrity": "sha512-I/0fGuvtiKHH/mBb864SGYk+SJ7WaF32tsBgYgeBOsxlUp+Th+Ac2tgz2cTvsQJl6eZYWsKZ3ixiSXCAcxZ8Sw==",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,115 +1,340 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="containers" :style="{'height':winHeight+'px'}">
|
<view class="containers" :style="{'height':winHeight+'px', 'padding-top': statusBarHeight + 20 + 'px'}">
|
||||||
<view class="title justify-between">
|
<view class="header-area">
|
||||||
<text>迈柯唯访客</text>
|
<view class="logo-container">
|
||||||
<text @click="toUrl(0)" style="color: #f27707;">我的拜访记录</text>
|
<image class="logo" :src="logoIndex" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="bdfk">
|
<view class="visit-record">
|
||||||
<!-- <view>
|
<view class="visit-text">
|
||||||
<u--image :showLoading="true" :src="ptfk" width="315rpx" height="600rpx" @click="toUrl(1)"></u--image>
|
<text @click="toUrl(0)">拜访记录</text>
|
||||||
</view> -->
|
<text class="english" @click="toUrl(0)">Visit Records</text>
|
||||||
<view class="sgry">
|
</view>
|
||||||
<u--image :src="xxpx" width="315rpx" height="280rpx" @click="toUrl(5)"></u--image>
|
</view>
|
||||||
<view>
|
</view>
|
||||||
<u--image :src="ptfk" width="315rpx" height="280rpx" @click="toUrl(1)"></u--image>
|
<view class="section-title">
|
||||||
</view>
|
<view class="title-text">
|
||||||
</view>
|
<text class="chinese">迈柯唯访客</text>
|
||||||
<view class="sgry">
|
<text class="english">Visitor</text>
|
||||||
<u--image :src="wlcl" width="315rpx" height="280rpx" @click="toUrl(3)"></u--image>
|
</view>
|
||||||
<view>
|
</view>
|
||||||
<u--image :src="sgry" width="315rpx" height="280rpx" @click="toUrl(2)"></u--image>
|
<view class="bdfk">
|
||||||
</view>
|
<view class="btn-card" @click="toUrl(5)">
|
||||||
</view>
|
<image :src="xxpx" class="btn-icon"></image>
|
||||||
</view>
|
<view class="btn-text">
|
||||||
<view class="title justify-between">
|
<text class="chinese">学习培训</text>
|
||||||
<text>迈柯唯管理员</text>
|
<text class="english">Learning and training</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
</view>
|
||||||
<u--image :src="bdgl" width="670rpx" height="336rpx" @click="toUrl(4)"></u--image>
|
<view class="btn-card" @click="toUrl(1)">
|
||||||
</view>
|
<image :src="ptfk" class="btn-icon"></image>
|
||||||
|
<view class="btn-text">
|
||||||
</view>
|
<text class="chinese">普通访客</text>
|
||||||
</template>
|
<text class="english">Ordinary visitor</text>
|
||||||
|
</view>
|
||||||
<script>
|
</view>
|
||||||
export default {
|
<view class="btn-card" @click="toUrl(3)">
|
||||||
data() {
|
<image :src="wlsj" class="btn-icon"></image>
|
||||||
return {
|
<view class="btn-text">
|
||||||
ptfk: require('../../static/img/ptfk.png'),
|
<text class="chinese">物流司机</text>
|
||||||
wlcl: require('../../static/img/wlcl1.png'),
|
<text class="english">Logistics driver</text>
|
||||||
sgry: require('../../static/img/sgry1.png'),
|
</view>
|
||||||
xxpx: require('../../static/img/xxpx.png'),
|
</view>
|
||||||
bdgl: require('../../static/img/bdgl.png'),
|
<view class="btn-card" @click="toUrl(2)">
|
||||||
winHeight: 0,
|
<image :src="sgry" class="btn-icon"></image>
|
||||||
isBd:""
|
<view class="btn-text">
|
||||||
}
|
<text class="chinese">施工人员</text>
|
||||||
},
|
<text class="english">Construction worker</text>
|
||||||
onLoad() {
|
</view>
|
||||||
this.winHeight = uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().statusBarHeight * 2-20;
|
</view>
|
||||||
|
</view>
|
||||||
},
|
<view class="section-title admin-section">
|
||||||
onShow(){
|
<view class="title-text">
|
||||||
this.isBd = uni.getStorageSync("userInfo_BD_token").token
|
<text class="chinese">迈柯唯管理员</text>
|
||||||
console.log("bd",this.isBd)
|
<text class="english">Administrator</text>
|
||||||
},
|
</view>
|
||||||
methods: {
|
</view>
|
||||||
toUrl(type) {
|
<view class="admin-btn-container">
|
||||||
let url = ""
|
<view class="admin-btn" @click="toUrl(4)">
|
||||||
switch (type) {
|
<view class="admin-icon">
|
||||||
case 1:
|
<image :src="gly" class="admin-icon-img"></image>
|
||||||
url = "/pages/visit/addrecord?type=1"
|
</view>
|
||||||
break;
|
<view class="admin-text">
|
||||||
case 2:
|
<text class="chinese">迈柯唯管理员</text>
|
||||||
url = "/pages/visit/addrecord?type=2"
|
<text class="english">Administrator</text>
|
||||||
break;
|
</view>
|
||||||
case 3:
|
<view class="arrow">
|
||||||
url = "/pages/visit/addrecord?type=3"
|
<text>></text>
|
||||||
break;
|
</view>
|
||||||
case 0:
|
</view>
|
||||||
url = "/pages/visit/visithistory"
|
</view>
|
||||||
break;
|
|
||||||
case 5:
|
</view>
|
||||||
url = "/pages/visit/tostudy"
|
</template>
|
||||||
break;
|
|
||||||
case 4:
|
<script>
|
||||||
if(!this.util.isNull(this.isBd)){
|
export default {
|
||||||
url = "/pages/bd/mine"
|
data() {
|
||||||
}else{
|
return {
|
||||||
url = "/pages/index/login"
|
ptfk: require('../../static/img/ptfk.png'),
|
||||||
}
|
wlsj: require('../../static/img/wlsj.png'),
|
||||||
|
sgry: require('../../static/img/sgry.png'),
|
||||||
break;
|
xxpx: require('../../static/img/xxpx.png'),
|
||||||
}
|
bdgl: require('../../static/img/bdgl.png'),
|
||||||
uni.navigateTo({
|
gly: require('../../static/img/gly.png'),
|
||||||
url:url
|
logoIndex: require('../../static/img/logo-index.png'),
|
||||||
})
|
winHeight: 0,
|
||||||
}
|
statusBarHeight: 0,
|
||||||
}
|
isBd:""
|
||||||
}
|
}
|
||||||
</script>
|
},
|
||||||
|
onLoad() {
|
||||||
<style scoped>
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
.containers {
|
this.statusBarHeight = systemInfo.statusBarHeight;
|
||||||
background-color: #fff;
|
this.winHeight = systemInfo.screenHeight - systemInfo.statusBarHeight * 2-20;
|
||||||
padding: 0 40rpx;
|
|
||||||
padding-bottom:20px;
|
},
|
||||||
}
|
onShow(){
|
||||||
|
this.isBd = uni.getStorageSync("userInfo_BD_token").token
|
||||||
.title {
|
console.log("bd",this.isBd)
|
||||||
color: #182849;
|
},
|
||||||
font-size: 32rpx;
|
methods: {
|
||||||
padding: 40rpx 0;
|
toUrl(type) {
|
||||||
padding-top: 70rpx
|
let url = ""
|
||||||
}
|
switch (type) {
|
||||||
.title:first-child{
|
case 1:
|
||||||
padding-top:30rpx
|
url = "/pages/visit/addrecord?type=1"
|
||||||
}
|
break;
|
||||||
.bdfk {
|
case 2:
|
||||||
display: flex;
|
url = "/pages/visit/addrecord?type=2"
|
||||||
justify-content: space-between;
|
break;
|
||||||
}
|
case 3:
|
||||||
|
url = "/pages/visit/addrecord?type=3"
|
||||||
.sgry view {
|
break;
|
||||||
margin-top: 40rpx
|
case 0:
|
||||||
}
|
url = "/pages/visit/visithistory"
|
||||||
</style>
|
break;
|
||||||
|
case 5:
|
||||||
|
url = "/pages/visit/tostudy"
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if(!this.util.isNull(this.isBd)){
|
||||||
|
url = "/pages/bd/mine"
|
||||||
|
}else{
|
||||||
|
url = "/pages/index/login"
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url:url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.containers {
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: url('../../static/img/bg.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding: 0 40rpx 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-area {
|
||||||
|
height: 300rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 80rpx;
|
||||||
|
right: 40rpx;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.visit-record {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 115rpx;
|
||||||
|
left: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.visit-text {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.visit-text text:first-child {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.visit-text .english {
|
||||||
|
color: #cccccc;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.bdfk {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-rows: 1fr 1fr;
|
||||||
|
gap: 4%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: 2%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-card {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 4%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
aspect-ratio: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-icon {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-text {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 1.1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-text .chinese {
|
||||||
|
color: #182849;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-bottom: 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-text .english {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
position: relative;
|
||||||
|
padding: 16% 0 2% 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-section {
|
||||||
|
padding: 6% 0 2% 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text .chinese {
|
||||||
|
color: #182849;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-bottom: 2rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text .english {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-btn-container {
|
||||||
|
position: relative;
|
||||||
|
padding: 2% 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-btn {
|
||||||
|
width: calc(100% - 10rpx) !important;
|
||||||
|
height: 104px !important;
|
||||||
|
background-color: #ffffff !important;
|
||||||
|
border-radius: 20rpx !important;
|
||||||
|
position: relative !important;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1) !important;
|
||||||
|
margin: 0 5rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-icon {
|
||||||
|
width: 60rpx !important;
|
||||||
|
height: 60rpx !important;
|
||||||
|
position: absolute !important;
|
||||||
|
left: 110rpx !important;
|
||||||
|
top: 50% !important;
|
||||||
|
transform: translateY(-50%) !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-icon-img {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-text {
|
||||||
|
position: absolute !important;
|
||||||
|
left: 50% !important;
|
||||||
|
top: 50% !important;
|
||||||
|
transform: translate(-50%, -50%) !important;
|
||||||
|
display: flex !important;
|
||||||
|
flex-direction: column !important;
|
||||||
|
align-items: center !important;
|
||||||
|
line-height: 1.3 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-text .chinese {
|
||||||
|
color: #182849;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-text .english {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow {
|
||||||
|
position: absolute !important;
|
||||||
|
right: 110rpx !important;
|
||||||
|
top: 50% !important;
|
||||||
|
transform: translateY(-50%) !important;
|
||||||
|
color: #999999 !important;
|
||||||
|
font-size: 40rpx !important;
|
||||||
|
font-weight: normal !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sgry view {
|
||||||
|
margin-top: 40rpx
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 1.2 KiB |