首页提示不对修改

This commit is contained in:
ylj20011123 2025-11-26 13:58:19 +08:00
parent f995e93adf
commit 9c6c07f471
3 changed files with 351 additions and 221 deletions

View File

@ -73,6 +73,17 @@
}
]
},
{ // BI
"root": "pages/commercialBI",
"pages": [
{
"path": "noData",
"style": {
"navigationBarTitleText": ""
}
}
]
},
{
"root": "pages/everdayRenven",
"pages": [

View File

@ -0,0 +1,74 @@
<template>
<div class="main">
<image class="typeImg" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/noData.svg"></image>
<p class="text" v-if="type === 'index'">抱歉,数据为第三方接口传输无法进行画像分析</p>
<p class="noAuthor" v-else-if="type === 'noAuthor'">抱歉您没有权限查看数智化看板请联系管理员进行授权</p>
<p class="text" v-else>抱歉,第三方数据未传,无法分析</p>
</div>
</template>
<script>
export default {
name: "noData",
data() {
return {
type: ''
}
},
onLoad(query) {
if (query.type) {
this.type = query.type
}
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
console.log('userInfo', userInfo)
console.log(userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee'])
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee'] === 1) {
setTimeout(() => {
uni.switchTab({
url: `/pages/index/index`
})
}, 200)
}
},
onUnload() {
this.$util.addUserBehavior()
},
methods: {
}
}
</script>
<style scoped lang="scss">
.main {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 12px;
padding: 16px 0;
.img {
width: 60px;
height: 60px;
margin-bottom: 8px;
}
.typeImg {
width: 80px;
height: 80px;
margin-top: 40vh;
margin-bottom: 16px;
}
.text {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6C737A;
line-height: 20rpx;
}
}
</style>

View File

@ -154,7 +154,7 @@
<!-- 实时数据统计 -->
<view class="thingBox">
<!-- 实时营收 -->
<!-- 左侧主卡片 -->
<view class="revenue-banner" @click="handlePage">
<view class="revenue-header">
<view class="revenue-title">
@ -162,26 +162,20 @@
</view>
<image class="right" src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/goMore.svg" />
</view>
<view
style="width: 100%;display: flex;align-items: center;justify-content: space-between;margin-top: 8rpx;">
<view class="revenue-content">
<view class="revenue-amount">{{ currentMoney }}</view>
<view class="revenue-label"></view>
<view class="revenue-amount-wrapper">
<span class="revenue-amount">{{ currentMoney }}</span>
<span class="revenue-label"></span>
</view>
</view>
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
<view class="revenue-date">{{ currentTotal }} {{ currentTotal ? '万笔' : '' }}</view>
<view class="revenue-date">{{ $util.handleGetMonthDay(nowDay) }}/{{ howDay }}</view>
<view class="revenue-date">
<span>{{ currentTotal }} {{ currentTotal ? '万笔' : '' }}</span>
<span>{{ $util.handleGetMonthDay(nowDay) }}/{{ howDay }}</span>
</view>
</view>
<!-- 其他实时数据 -->
</view>
<!-- 右侧数据格 -->
<view class="data-grid" v-if="otherRealData && otherRealData.length > 0">
<view class="data-item" v-for="(subItem, subIndex) in otherRealData" :key="subIndex"
:style="{ marginBottom: subIndex <= 1 ? '16rpx' : '' }">
<view class="data-item" v-for="(subItem, subIndex) in otherRealData" :key="subIndex">
<view class="data-item-top">
<view class="data-icon">
<image class="icon" :src="subItem.icon" />
@ -189,15 +183,12 @@
<view class="data-label">{{ subItem.label || "" }}</view>
</view>
<view class="data-item-data">
<view class="data-value">
<span class="value">{{ subItem.value || "" }}</span>
<span class="unit">/{{ subItem.unit || "" }}</span>
<span class="unit">{{ subItem.unit || "" }}</span>
</view>
<view class="data-value">
<view class="data-item-total">
<span class="total">{{ subItem.totalCount || "" }}</span>
<span class="total" style="margin-left: 4rpx;">{{
subItem.totalCountUnit ? `/${subItem.totalCountUnit}` : "" }}</span>
</view>
<span class="total-unit">{{ subItem.totalCountUnit ? `${subItem.totalCountUnit}` : "" }}</span>
</view>
</view>
</view>
@ -342,6 +333,9 @@ export default {
watch: {
user: {
handler(newValue, value) {
console.log('newValuenewValuenewValue', newValue);
console.log('valuevaluevaluevaluevalue', value);
let _this = this
let userInfo = JSON.parse(JSON.stringify(newValue));
_this.useInfo = JSON.parse(JSON.stringify(newValue));
@ -349,9 +343,10 @@ export default {
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) {
_this.isReturn = false;
} else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.redirectTo({
url: `/pages/commercialBI/noData?type=homeIndex`,
});
//
// uni.redirectTo({
// url: `/pages/commercialBI/noData?type=noAuthor`,
// });
} else {
_this.topShowData = null
_this.moneyRateList = []
@ -407,13 +402,14 @@ export default {
let userInfo = JSON.parse(JSON.stringify(this.user));
_this.useInfo = JSON.parse(JSON.stringify(this.user));
// console.log('userInfouserInfo', userInfo);
if (userInfo) {
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) {
_this.isReturn = false;
} else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.redirectTo({
url: `/pages/commercialBI/noData?type=homeIndex`,
});
// uni.redirectTo({
// url: `/pages/commercialBI/noData?type=noAuthor`,
// });
}
}
// if (!_this.isReturn) {
@ -428,12 +424,14 @@ export default {
onPullDownRefresh: function () {
let _this = this;
let userInfo = JSON.parse(JSON.stringify(this.user));
if (userInfo) {
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) {
_this.isReturn = false;
} else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.redirectTo({
url: `/pages/commercialBI/noData?type=homeIndex`,
});
// uni.redirectTo({
// url: `/pages/commercialBI/noData?type=noAuthor`,
// });
}
}
if (!_this.isReturn) {
//
@ -504,27 +502,19 @@ export default {
handleShowYDModal() {
this.ydModal = !this.ydModal;
},
goToRobot() {
if (this.isReturn) {
let _this = this
uni.showModal({
title: '温馨提示',
content: '请您授权登录后再操作。',
success(res) {
if (res.confirm) {
_this.$util.toNextRoute('redirectTo', '/pages/register/register')
}
}
})
return
}
this.$util.toNextRoute("navigateTo", `/pages/robot/index`);
// this.$util.toNextRoute("navigateTo", `/pages/testPage/index`);
},
//
handleGoAttendanceStatus() {
if (this.isReturn) {
let userInfo = JSON.parse(JSON.stringify(this.user));
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.showModal({
title: '温馨提示',
content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权',
success(res) {
}
})
return
} else {
let _this = this
uni.showModal({
title: '温馨提示',
@ -537,15 +527,22 @@ export default {
})
return
}
}
this.$util.toNextRoute("navigateTo", `/pages/attendanceStatus/index`);
},
//
handleGoServiceMessage() {
this.$util.toNextRoute("navigateTo", `/pages/DigitalIntelligenceDashboard/index`);
},
//
handleGoOperate() {
if (this.isReturn) {
let userInfo = JSON.parse(JSON.stringify(this.user));
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.showModal({
title: '温馨提示',
content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权',
success(res) {
}
})
return
} else {
let _this = this
uni.showModal({
title: '温馨提示',
@ -558,6 +555,36 @@ export default {
})
return
}
}
this.$util.toNextRoute("navigateTo", `/pages/DigitalIntelligenceDashboard/index`);
},
//
handleGoOperate() {
if (this.isReturn) {
let userInfo = JSON.parse(JSON.stringify(this.user));
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.showModal({
title: '温馨提示',
content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权',
success(res) {
}
})
return
} else {
let _this = this
uni.showModal({
title: '温馨提示',
content: '请您授权登录后再操作。',
success(res) {
if (res.confirm) {
_this.$util.toNextRoute('redirectTo', '/pages/register/register')
}
}
})
return
}
}
this.$util.toNextRoute(
"navigateTo",
@ -572,6 +599,16 @@ export default {
},
handleGoMap() {
if (this.isReturn) {
let userInfo = JSON.parse(JSON.stringify(this.user));
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.showModal({
title: '温馨提示',
content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权',
success(res) {
}
})
return
} else {
let _this = this
uni.showModal({
title: '温馨提示',
@ -584,6 +621,7 @@ export default {
})
return
}
}
this.$util.toNextRoute("navigateTo", "/pages/map/index?type=index");
},
//
@ -1061,8 +1099,10 @@ export default {
.searchText {
font-family: 'PingFangSC';
font-weight: 400;
font-size: 24rpx;
font-weight: 500;
/* Slightly bolder */
font-size: 28rpx;
/* Slightly larger */
color: #9fa1aa;
line-height: 40rpx;
text-align: left;
@ -1101,8 +1141,10 @@ export default {
.swiperItemContentMonth {
font-family: 'PingFangSC';
font-weight: 400;
font-size: 28rpx;
font-weight: 500;
/* Slightly bolder */
font-size: 30rpx;
/* Slightly larger */
color: #160002;
line-height: 40rpx;
text-align: left;
@ -1110,8 +1152,10 @@ export default {
.swiperItemContentUnit {
font-family: 'PingFangSC';
font-weight: 400;
font-size: 24rpx;
font-weight: 500;
/* Slightly bolder */
font-size: 30rpx;
/* Slightly larger */
color: #A69E9F;
line-height: 40rpx;
text-align: left;
@ -1144,7 +1188,8 @@ export default {
.addValue {
font-family: 'DINAlternate';
font-weight: bold;
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
line-height: 40rpx;
text-align: left;
font-style: normal;
@ -1152,8 +1197,10 @@ export default {
.rightNav {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
font-weight: 500;
/* Slightly bolder */
font-size: 30rpx;
/* Slightly larger */
color: #A69E9F;
line-height: 40rpx;
text-align: left;
@ -1174,7 +1221,7 @@ export default {
.leftBox {
width: 144rpx;
height: 144rpx;
margin-right: 16rpx;
margin-right: 20rpx;
position: relative;
.rateChartsBox {
@ -1230,14 +1277,16 @@ export default {
.itemIcon {
width: 12rpx;
height: 12rpx;
margin-right: 12rpx;
margin-right: 20rpx;
border-radius: 50%;
}
.itemName {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
font-weight: 500;
/* Slightly bolder */
font-size: 30rpx;
/* Slightly larger */
color: #160002;
line-height: 40rpx;
text-align: left;
@ -1252,7 +1301,8 @@ export default {
width: 33%;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
color: #160002;
line-height: 40rpx;
text-align: right;
@ -1264,7 +1314,8 @@ export default {
width: 33%;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
color: #e83944;
line-height: 40rpx;
text-align: right;
@ -1287,8 +1338,10 @@ export default {
.itemName {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
font-weight: 500;
/* Slightly bolder */
font-size: 30rpx;
/* Slightly larger */
color: #160002;
line-height: 40rpx;
text-align: left;
@ -1296,8 +1349,10 @@ export default {
.unit {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
font-weight: 500;
/* Slightly bolder */
font-size: 30rpx;
/* Slightly larger */
color: #9a9a9a;
line-height: 36rpx;
text-align: left;
@ -1315,7 +1370,8 @@ export default {
.revenueNum {
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
color: #160002;
line-height: 44rpx;
text-align: left;
@ -1325,15 +1381,18 @@ export default {
.revenueAdd {
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
color: #e83944;
line-height: 44rpx;
text-align: left;
font-style: normal;
.revenueAddNotice {
font-size: 24rpx;
font-weight: 400;
font-size: 30rpx;
/* Slightly larger */
font-weight: 500;
/* Slightly bolder */
color: #a69e9f;
margin-right: 4px;
}
@ -1355,15 +1414,14 @@ export default {
box-sizing: border-box;
padding: 0 32rpx;
margin-top: 24rpx;
margin-bottom: 24rpx;
.revenue-banner {
background: #ffffff;
color: #160002;
padding: 24rpx 24rpx 8rpx;
background: linear-gradient(180deg, #F0E4ED 0%, #F0E8F1 18%, #FFFFFF 100%);
padding: 24rpx;
border-radius: 16rpx;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
margin-bottom: 24rpx;
border: 2rpx solid #f0f0f0;
.revenue-header {
display: flex;
@ -1371,130 +1429,103 @@ export default {
justify-content: space-between;
.revenue-title {
font-weight: 400;
font-size: 28rpx;
color: #160002;
font-weight: 500;
}
.right {
width: 32rpx;
height: 32rpx;
opacity: 0.7;
}
}
.revenue-content {
.revenue-amount-wrapper {
display: flex;
align-items: baseline;
margin-top: 12rpx;
.revenue-amount {
font-family: DINAlternate-Bold, DINAlternate;
font-size: 36rpx;
font-size: 30rpx;
line-height: 1.5;
font-weight: 600;
margin-right: 12rpx;
color: #27B25F;
color: @primary;
}
.revenue-label {
margin-left: 4rpx;
line-height: 1.5;
font-size: 24rpx;
color: #666;
color: @muted;
}
}
.revenue-date {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #999;
color: @muted;
margin-top: 8rpx;
}
}
}
.thingBox {
width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
margin-top: 24rpx;
margin-bottom: 24rpx;
.data-grid {
// display: grid;
// grid-template-columns: repeat(2, 1fr);
// gap: 16rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24rpx;
.data-item {
width: calc(50% - 8rpx);
background: #fff;
padding: 18rpx 18rpx 18rpx 18rpx;
padding: 24rpx;
border-radius: 16rpx;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
box-sizing: border-box;
// display: flex;
// align-items: center;
// align-items: flex-start;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
.data-item-top {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 12rpx;
.data-icon {
width: 50rpx;
height: 50rpx;
background: linear-gradient(135deg, #DCE6FF, #EEF3FF);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
width: 30rpx;
height: 30rpx;
margin-right: 8rpx;
.icon {
width: 32rpx;
height: 32rpx;
width: 100%;
height: 100%;
}
}
.data-label {
font-size: 28rpx;
color: #160002;
font-weight: 600;
// margin-bottom: 8rpx;
font-weight: 500;
line-height: 1;
}
}
.data-item-data {
margin-top: 8rpx;
// display: flex;
// align-items: center;
// justify-content: space-between;
.data-value {
// width: 50%;
width: 100%;
display: flex;
justify-content: space-between;
align-items: baseline;
.value {
font-size: 28rpx;
font-weight: 600;
color: #160002;
font-weight: 700;
color: @primary;
}
.unit {
font-size: 24rpx;
color: #160002;
margin-left: 4rpx;
font-weight: 600;
white-space: nowrap;
font-size: 24rpx;
color: @muted;
}
}
.total {
.data-item-total {
font-size: 24rpx;
color: #A69E9F;
}
}
color: @muted;
margin-top: 4rpx;
}
}
}
@ -1505,8 +1536,8 @@ export default {
width: calc(100% - 80rpx);
box-sizing: border-box;
padding: 2rpx;
background: #fff;
border-radius: 16rpx;
border-radius: 20rpx;
/* Slightly more rounded corners */
margin-left: 40rpx;
margin-bottom: 24rpx;
@ -1514,7 +1545,8 @@ export default {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 24rpx 24rpx;
padding: 28rpx 28rpx 12rpx;
/* Adjusted padding */
background: linear-gradient(180deg, #F0E4ED 0%, #F0E8F1 18%, #FFFFFF 100%);
border-radius: 16rpx;
display: flex;
@ -1537,7 +1569,8 @@ export default {
}
.dateText {
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
font-family: PingFangSC, PingFang SC;
font-weight: 500;
color: #fc2e20;
@ -1546,9 +1579,11 @@ export default {
}
.day {
font-size: 24rpx;
font-size: 30rpx;
/* Slightly larger */
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-weight: 500;
/* Slightly bolder */
color: #a69e9f;
line-height: 40rpx;
}
@ -1561,8 +1596,9 @@ export default {
align-items: center;
.right {
width: 32rpx;
height: 32rpx;
width: 36rpx;
/* Slightly larger icon */
height: 36rpx;
}
}
}
@ -1578,7 +1614,8 @@ export default {
display: inline-flex;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
font-size: 36rpx;
font-size: 48rpx;
/* Significantly larger */
color: #160002;
line-height: 40rpx;
text-align: right;
@ -1587,9 +1624,11 @@ export default {
.moneyLabel {
height: 100%;
font-size: 24rpx;
font-size: 28rpx;
/* Slightly larger */
font-family: DINAlternate-Bold, DINAlternate;
font-weight: 400;
font-weight: 500;
/* Slightly bolder */
color: #a69e9f;
display: inline-flex;
align-items: center;
@ -1615,7 +1654,7 @@ export default {
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
margin-right: 20rpx;
background: linear-gradient(180deg, #DCE6FF 0%, #EEF3FF 100%);
.leftIcon {
@ -1628,9 +1667,11 @@ export default {
width: calc(100% - 86rpx);
.moneyLabel {
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-weight: 500;
/* Slightly bolder */
color: #000;
line-height: 30rpx;
}
@ -1643,7 +1684,8 @@ export default {
justify-content: space-between;
.money {
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #160002;
@ -1655,9 +1697,11 @@ export default {
.moneyUnit {
width: 70rpx;
font-size: 24rpx;
font-size: 30rpx;
/* Slightly larger */
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-weight: 500;
/* Slightly bolder */
color: #a69e9f;
line-height: 30rpx;
margin-left: 8rpx;
@ -1678,15 +1722,14 @@ export default {
width: calc(100% - 64rpx);
margin-left: 32rpx;
margin-bottom: calc(80px + env(safe-area-inset-bottom));
background: #ffffff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 32rpx 0;
display: flex;
// display: grid;
// grid-template-columns: repeat(4, 1fr);
// gap: 24rpx;
box-shadow: @shadow;
background-color: #fff;
.funItem {
width: 25%;
@ -1713,9 +1756,11 @@ export default {
}
.funText {
font-size: 28rpx;
font-size: 30rpx;
/* Slightly larger */
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-weight: 500;
/* Slightly bolder */
color: #160002;
line-height: 30rpx;
}