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