update: 登陆 统计 我的 去掉返回按钮
This commit is contained in:
parent
800dc310a7
commit
4be018f479
|
@ -1,8 +1,10 @@
|
|||
<template>
|
||||
<NavBar :count="0" :title="'数据统计'"></NavBar>
|
||||
<Box
|
||||
v-if="
|
||||
isShowModule(list[0].child.concat(list[1].child).concat(list[2].child))
|
||||
"
|
||||
:isShow="true"
|
||||
>
|
||||
<view
|
||||
v-for="(item, index) in list"
|
||||
|
@ -18,7 +20,7 @@
|
|||
:key="index"
|
||||
@click="(child as any).fn(child)"
|
||||
v-show="isShowModule([{ title: child.title }])"
|
||||
:class="{'box': isShowModule([{title: child.title}])}"
|
||||
:class="{ box: isShowModule([{ title: child.title }]) }"
|
||||
>
|
||||
<view v-if="isShowModule([{ title: child.title }])">
|
||||
<up-image
|
||||
|
@ -28,13 +30,16 @@
|
|||
height="60rpx"
|
||||
></up-image>
|
||||
</view>
|
||||
<view v-if="isShowModule([{title: child.title}])">{{ child.title }}</view>
|
||||
<view v-if="isShowModule([{ title: child.title }])">{{
|
||||
child.title
|
||||
}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="line" v-show="index < list.length - 1"></view>
|
||||
</view>
|
||||
</Box>
|
||||
|
||||
<!-- 当收货 出货 常用app全部为空 显示暂无权限 -->
|
||||
<up-empty
|
||||
v-else
|
||||
|
@ -51,6 +56,7 @@ import Title from "@/components/Title/index.vue";
|
|||
import TabBar from "@/components/TabBar/index.vue";
|
||||
import { useMemberStore } from "@/store/index";
|
||||
import { ProfileApi } from "@/services";
|
||||
|
||||
const store = useMemberStore();
|
||||
const list = reactive([
|
||||
{
|
||||
|
|
|
@ -1,9 +1,52 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view
|
||||
:class="{'box': isShow}"
|
||||
:style="{
|
||||
marginTop: navbarRect.height + navbarRect.top + 'px',
|
||||
height: navbarRect.safeHeight + 'px',
|
||||
}"
|
||||
>
|
||||
<slot></slot>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
isShow: boolean;
|
||||
}>(),
|
||||
{
|
||||
isShow: false
|
||||
}
|
||||
);
|
||||
const navbarRect = reactive({
|
||||
height: 32,
|
||||
top: 28,
|
||||
safeHeight: 500,
|
||||
});
|
||||
const getSafeHeight = () => {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
navbarRect.safeHeight =
|
||||
res.windowHeight -
|
||||
uni.upx2px(80) -
|
||||
navbarRect.height -
|
||||
navbarRect.top -
|
||||
40 -
|
||||
17;
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
};
|
||||
onMounted(() => {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
navbarRect.height = menuButtonInfo.height;
|
||||
navbarRect.top = menuButtonInfo.top;
|
||||
getSafeHeight();
|
||||
// #endif
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.box {
|
||||
background: #ffffff;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
}"
|
||||
class="navbar"
|
||||
>
|
||||
<view class="left" @click="handleMsg()">
|
||||
<view class="left" @click="handleMsg()" v-if="title === '工作台'">
|
||||
<view class="msg-badge">
|
||||
<up-badge max="99" :value="count"></up-badge>
|
||||
</view>
|
||||
|
@ -18,7 +18,7 @@
|
|||
></up-image>
|
||||
</view>
|
||||
|
||||
<view class="title">工作台</view>
|
||||
<view class="title">{{ title }}</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
@ -30,7 +30,8 @@ console.log(ProfileApi,ReceiveApi,ShipmentApi,PictureApi,ReceiveProductApi,Devic
|
|||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
count: number
|
||||
count: number,
|
||||
title: string
|
||||
}>(),
|
||||
{
|
||||
count: 0
|
||||
|
@ -58,7 +59,7 @@ const handleMsg = () => {
|
|||
<style lang="scss">
|
||||
.navbar {
|
||||
background: #f9f9f9;
|
||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.18);
|
||||
// box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.18);
|
||||
padding: 15rpx;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
{
|
||||
"path": "login/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom", // 控制头部是否显示
|
||||
"navigationBarTitleText": "登陆"
|
||||
}
|
||||
},
|
||||
|
@ -57,7 +58,9 @@
|
|||
{
|
||||
"path": "profile/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "个人中心"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -175,6 +178,7 @@
|
|||
{
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "数据统计"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<!-- 自定义工作台头部 -->
|
||||
<NavBar :count="state.count"></NavBar>
|
||||
<NavBar :count="state.count" :title="'工作台'"></NavBar>
|
||||
<view
|
||||
class="contaner"
|
||||
:style="{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<style lang="scss" scoped>
|
||||
.c-login-container {
|
||||
height: 80vh;
|
||||
margin-top: 10vh;
|
||||
margin-top: 20vh;
|
||||
.logo {
|
||||
text-align: center;
|
||||
image {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<NavBar :count="0" :title="'登陆'"></NavBar>
|
||||
<LoginLayout>
|
||||
<template #form-box>
|
||||
<u-form
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
<template>
|
||||
<NavBar :count="0" :title="'个人中心'"></NavBar>
|
||||
<Box>
|
||||
<view class="profile">
|
||||
<view>
|
||||
<image class="bg" :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/bg.png`" />
|
||||
<image
|
||||
class="bg"
|
||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/bg.png`"
|
||||
/>
|
||||
</view>
|
||||
<view class="baseinfo">
|
||||
<view class="head">
|
||||
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/user.png`" class="user"></image>
|
||||
<image
|
||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/user.png`"
|
||||
class="user"
|
||||
></image>
|
||||
<view>
|
||||
<view>
|
||||
<text class="name">{{ profile.userName || "-" }}</text>
|
||||
|
@ -28,7 +36,9 @@
|
|||
>
|
||||
<template #icon>
|
||||
<view style="width: 40rpx">
|
||||
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/${item.icon}`" />
|
||||
<image
|
||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/${item.icon}`"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
|
@ -37,6 +47,8 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</Box>
|
||||
|
||||
<TabBar></TabBar>
|
||||
<SmallModal
|
||||
:title="'确认退出吗?'"
|
||||
|
@ -52,8 +64,10 @@
|
|||
import { ProfileApi } from "@/services/index";
|
||||
import { reactive } from "vue";
|
||||
import { useMemberStore } from "@/store/index";
|
||||
import TabBar from '@/components/TabBar/index.vue'
|
||||
import TabBar from "@/components/TabBar/index.vue";
|
||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||
import Box from "@/components/Box/index.vue";
|
||||
|
||||
const isShowCancelModal = ref(false);
|
||||
|
||||
const handleModal = (v: boolean) => {
|
||||
|
@ -90,7 +104,7 @@ const list = reactive([
|
|||
|
||||
const hanldeClick = (item: any) => {
|
||||
if (item.name === "退出登录") {
|
||||
handleModal(true)
|
||||
handleModal(true);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue