first commit

This commit is contained in:
ylj20011123 2025-08-20 11:48:20 +08:00
parent f0ab72c78b
commit c8f020d72e
6 changed files with 380 additions and 203 deletions

View File

@ -15,6 +15,8 @@
<view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME :
'请选择服务区' }}
</view>
<p class="area">{{ serviceInfo.SPREGIONTYPE_NAME ? serviceInfo.SPREGIONTYPE_NAME : '' }}
</p>
<image class="rightArrow"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
@ -489,6 +491,15 @@ export default {
color: #160002;
}
.area {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40px;
margin-left: 4px;
}
.rightArrow {
width: 12px;
height: 12px;

View File

@ -14,6 +14,8 @@
<view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME :
'' }}
</view>
<p class="area">{{ serviceInfo.SPREGIONTYPE_NAME ? serviceInfo.SPREGIONTYPE_NAME : '' }}
</p>
<image class="rightArrow"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
@ -120,7 +122,7 @@
<view class="onDutyPersonBoxHeader">
<text class="title">{{ selectTab === 1 ? "👥 当前在岗人员" : selectTab === 2 ? "📋 请假人员列表" : selectTab === 3
? "👑 值班经理信息" : ""
}}</text>
}}</text>
<!-- 居中的日历时间 -->

View File

@ -13,6 +13,8 @@
<view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME :
'' }}
</view>
<p class="area">{{ serviceInfo.SPREGIONTYPE_NAME ? serviceInfo.SPREGIONTYPE_NAME : '' }}
</p>
<image class="rightArrow"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
@ -33,7 +35,7 @@
<view class="center">
<text class="date-text">{{ selectDate ? $util.cutDate(new Date(selectDate), 'YYYY-MM') :
""
}}</text>
}}</text>
</view>
<view class="arrowBtn" @tap="handleChangeDate(1)">
<image class="arrowIcon" src="https://eshangtech.com/cyy_DIB/rightArrowIcon.png" />
@ -107,7 +109,7 @@
</view>
<view class="calendarGrid">
<view v-for="i in firstDayOfWeek" :key="`empty-${i}`" class="calendarCell empty"></view>
<view v-for="(n, index) in firstDayOfWeek" :key="index" class="calendarCell empty"></view>
<view v-for="day in monthDays" :key="day.date" class="calendarCell" :class="{
'weekend': day.isWeekend,
@ -522,6 +524,15 @@ export default {
color: #160002;
}
.area {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40px;
margin-left: 4px;
}
.rightArrow {
width: 12px;
height: 12px;

View File

@ -17,7 +17,8 @@
<!-- 月份的轮播框 -->
<view class="monthListBox" :style="{ paddingTop: menu.bottom + 8 + 'px' }">
<swiper class="swiperBox" previous-margin="40rpx" next-margin="40rpx" :current="selectIndex"
@animationfinish="handleChangeSwiper">
@animationfinish="handleChangeSwiper" :disable-programmatic-animation="false" :duration="300"
:easing-function="ease - out">
<swiper-item class="swiperItem" v-for="(item, index) in monthList" :key="index">
<view class="swiperItemContent"
:class="{ 'is-first': index === 0, 'is-last': index === monthList.length - 1 }">
@ -25,31 +26,26 @@
<!-- 轮播框里面的实际内容 写在这个里面 -->
<view class="swiperItemContentMonth">
{{ selectIndex === index ? item.month || "-" : "-" }}月对客营收
{{ selectIndex === index ? currentMonthData.monthText : '-月对客营收' }}
<span class="swiperItemContentUnit">/万元</span>
</view>
<!-- 月度营收的值 -->
<view class="swiperItemContentMonthRevenueBox">
<view class="leftRevenueValue">{{ selectIndex === index
? topShowData.MonthRevenueModel.CashPayChange || "-" : "-" }}
<view class="leftRevenueValue">{{ selectIndex === index ?
currentRevenueData.cashPayChange : '-' }}
</view>
<view class="rightRevenueValue">
<text v-if="selectIndex === index" class="addValue" :style="{
color:
topShowData.MonthRevenueModel.addNumber > 0
? '#E83944'
: topShowData.MonthRevenueModel.addNumber < 0
? '#0E9976'
: '',
}">{{ topShowData.MonthRevenueModel.addNumber ?
topShowData.MonthRevenueModel.addNumber : "-" }}%</text>
<text v-if="selectIndex === index && hasCurrentMonthData" class="addValue"
:style="revenueChangeStyle">
{{ revenueChangeText }}
</text>
<text class="rightNav">同比</text>
</view>
</view>
<view class="monthRevenueBox" v-if="selectIndex === index">
<view class="monthRevenueBox" v-if="selectIndex === index && hasCurrentMonthData">
<view class="leftBox" @click="handleShowYDModal">
<view class="rateChartsBox" v-if="moneyRateList && moneyRateList.length > 0">
<rateCharts :success="moneyRateList"
@ -85,7 +81,7 @@
}"></view>
<span class="itemName">{{
subItem.name
}}</span>
}}</span>
</view>
<view class="itemCenter">
{{
@ -103,7 +99,7 @@
: '',
}">{{
subItem.addQOQ ? `${subItem.addQOQ}` : ""
}}</view>
}}</view>
</view>
</view>
</view>
@ -120,7 +116,7 @@
<!-- <view class="itemType">累计</view>-->
</view>
<view class="itemBottom">
<span class="revenueNum" v-if="selectIndex === index">{{
<span class="revenueNum" v-if="selectIndex === index && hasCurrentMonthData">{{
topShowData && topShowData.MonthRevenueModel &&
topShowData.MonthRevenueModel.YearRevenueAmount
? $util.getMoney(
@ -129,7 +125,7 @@
)
: ""
}}</span>
<span class="revenueAdd" v-if="selectIndex === index" :style="{
<span class="revenueAdd" v-if="selectIndex === index && hasCurrentMonthData" :style="{
color:
topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAddNumber > 0
? '#E83944'
@ -155,14 +151,15 @@
}}
</span>
<span class="revenueAdd" v-if="selectIndex === index" :style="{
color:
topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAdd > 0
? '#E83944'
: topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAdd < 0
? '#0E9976'
: '',
}"><span class="revenueAddNotice">{{
<span class="revenueAdd" v-if="selectIndex === index && hasCurrentMonthData"
:style="{
color:
topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAdd > 0
? '#E83944'
: topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAdd < 0
? '#0E9976'
: '',
}"><span class="revenueAddNotice">{{
topShowData && topShowData.MonthRevenueModel &&
topShowData.MonthRevenueModel.YearRevenueAdd > 0
? "增幅"
@ -219,7 +216,7 @@
src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/monthIcon.svg" />
<text class="dateText">{{
$util.handleGetMonthDay(nowDay)
}}</text>
}}</text>
<text class="day">/{{ howDay }}</text>
</view>
<view class="revenyeTopRight">
@ -350,6 +347,10 @@ export default {
modalRateList: [],//
useInfo: {},
isReturn: true,
//
monthDataCache: {}, //
loadingMap: {}, //
swiperTransition: false, // swiper
}
},
components: {
@ -359,6 +360,58 @@ export default {
},
computed: {
...mapGetters({ user: "getUser" }),
// uniapp使computed
currentMonthData() {
if (this.selectIndex >= 0 && this.monthList[this.selectIndex]) {
return {
month: this.monthList[this.selectIndex].month || "-",
monthText: (this.monthList[this.selectIndex].month || "-") + "月对客营收"
};
}
return {
month: "-",
monthText: "-月对客营收"
};
},
currentRevenueData() {
if (this.topShowData && this.topShowData.MonthRevenueModel) {
return {
cashPayChange: this.topShowData.MonthRevenueModel.CashPayChange || "-",
addNumber: this.topShowData.MonthRevenueModel.addNumber || 0,
hasData: true
};
}
return {
cashPayChange: "-",
addNumber: 0,
hasData: false
};
},
//
revenueChangeStyle() {
const addNumber = this.currentRevenueData.addNumber;
let color = '';
if (addNumber > 0) {
color = '#E83944';
} else if (addNumber < 0) {
color = '#0E9976';
}
return { color: color };
},
//
revenueChangeText() {
const addNumber = this.currentRevenueData.addNumber;
return addNumber ? `${addNumber}%` : "-";
},
//
hasCurrentMonthData() {
return this.topShowData && this.topShowData.MonthRevenueModel;
}
},
watch: {
user: {
@ -443,7 +496,7 @@ export default {
uni.hideTabBar();
},
onPullDownRefresh: function () {
let _this = this
let _this = this;
let userInfo = JSON.parse(JSON.stringify(this.user));
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) {
_this.isReturn = false;
@ -453,7 +506,10 @@ export default {
});
}
if (!_this.isReturn) {
_this.handleGetOnLoad()
//
_this.monthDataCache = {};
_this.loadingMap = {};
_this.handleGetOnLoad();
}
uni.stopPullDownRefresh();
},
@ -461,15 +517,44 @@ export default {
// onLoad
async handleGetOnLoad() {
//
this.handleGetIndexInfo()
this.handleGetIndexInfo();
//
await this.handleGetTopData()
//
const promises = [
this.handleGetTopData(),
this.handleRealRevenue(),
this.handleGetYNRealData()
];
//
this.handleRealRevenue()
// 尿
this.handleGetYNRealData()
//
const currentIndex = this.selectIndex;
if (currentIndex > 0) {
promises.push(this.preloadMonthData(currentIndex - 1));
}
if (currentIndex < this.monthList.length - 1) {
promises.push(this.preloadMonthData(currentIndex + 1));
}
await Promise.allSettled(promises);
},
//
async preloadMonthData(index) {
if (index < 0 || index >= this.monthList.length) return;
const monthKey = this.monthList[index]?.realFull;
if (!monthKey || this.monthDataCache[monthKey] || this.loadingMap[monthKey]) {
return;
}
//
setTimeout(async () => {
try {
await this.handleGetTopData(index);
} catch (error) {
console.log('预加载数据失败:', error);
}
}, 500);
},
handleShowYDModal() {
this.ydModal = !this.ydModal;
@ -557,154 +642,231 @@ export default {
},
//
async handleGetYNRealData() {
let req = {
serverPartId: ""
}
const res = await request.$webJava("partner/today/data/statistics", req)
console.log('handleGetYNRealDatahandleGetYNRealDatahandleGetYNRealData', res);
let list = res.Result_Data
let result = []
if (list && list.length > 0) {
list.forEach((item) => {
if (item.dataType === 2000) {
result.push({
label: `油品`,
value: this.$util.fmoney(item.totalCount),
unit: item.totalCountUnit,
icon: "https://eshangtech.com/cyy_DIB/oilIcon.png"
})
} else if (item.dataType === 3000) {
result.push({
label: `加水`,
value: this.$util.fmoney(item.totalCount),
unit: item.totalCountUnit,
icon: "https://eshangtech.com/cyy_DIB/addWaterIcon.png"
})
} else if (item.dataType === 4000) {
result.push({
label: `尿素`,
value: this.$util.fmoney(item.totalCount),
unit: item.totalCountUnit,
icon: "https://eshangtech.com/cyy_DIB/ureaIcon.png"
})
} else if (item.dataType === 5000) {
result.push({
label: `充电`,
value: this.$util.fmoney(item.totalTicket),
unit: item.totalTicketUnit,
icon: "https://eshangtech.com/cyy_DIB/chargeIcon.png"
})
try {
let req = {
serverPartId: ""
};
const res = await request.$webJava("partner/today/data/statistics", req);
console.log('handleGetYNRealDatahandleGetYNRealDatahandleGetYNRealData', res);
let list = res.Result_Data;
let result = [];
//
const dataTypeMap = {
2000: {
label: '油品',
icon: 'https://eshangtech.com/cyy_DIB/oilIcon.png',
valueKey: 'totalCount',
unitKey: 'totalCountUnit'
},
3000: {
label: '加水',
icon: 'https://eshangtech.com/cyy_DIB/addWaterIcon.png',
valueKey: 'totalCount',
unitKey: 'totalCountUnit'
},
4000: {
label: '尿素',
icon: 'https://eshangtech.com/cyy_DIB/ureaIcon.png',
valueKey: 'totalCount',
unitKey: 'totalCountUnit'
},
5000: {
label: '充电',
icon: 'https://eshangtech.com/cyy_DIB/chargeIcon.png',
valueKey: 'totalTicket',
unitKey: 'totalTicketUnit'
}
})
};
if (list && list.length > 0) {
list.forEach((item) => {
const config = dataTypeMap[item.dataType];
if (config) {
result.push({
label: config.label,
value: this.$util.fmoney(item[config.valueKey]),
unit: item[config.unitKey],
icon: config.icon
});
}
});
}
this.otherRealData = result;
} catch (error) {
console.error('获取实时数据失败:', error);
this.otherRealData = [];
}
this.otherRealData = result
},
//
async handleChangeSwiper(e) {
console.log('e', e);
this.selectIndex = e.target.current
this.topShowData = null
this.moneyRateList = []
this.profitSharingList = []
this.modalRateList = []
await this.handleGetTopData(e.target.current)
const currentIndex = e.target.current;
//
if (this.swiperTransition) return;
this.swiperTransition = true;
this.selectIndex = currentIndex;
//
const monthKey = this.monthList[currentIndex]?.realFull;
if (this.monthDataCache[monthKey]) {
// 使
const cachedData = this.monthDataCache[monthKey];
this.topShowData = cachedData.topShowData;
this.moneyRateList = cachedData.moneyRateList;
this.profitSharingList = cachedData.profitSharingList;
this.modalRateList = cachedData.modalRateList;
} else {
//
this.topShowData = null;
this.moneyRateList = [];
this.profitSharingList = [];
this.modalRateList = [];
await this.handleGetTopData(currentIndex);
}
//
setTimeout(() => {
this.swiperTransition = false;
}, 100);
},
//
async handleRealRevenue() {
let req = {
pushProvinceCode: "530000",
StatisticsDate: this.nowDay,
};
const res = await request.$webGet("CommercialApi/Revenue/GetCurRevenue", req)
// this.currentMoney = res.Result_Data.CurRevenueAmount.toFixed(2);
this.currentMoney = res.Result_Data.CurRevenueAmount.toLocaleString('zh-CN')
try {
let req = {
pushProvinceCode: "530000",
StatisticsDate: this.nowDay,
};
const res = await request.$webGet("CommercialApi/Revenue/GetCurRevenue", req);
// this.currentMoney = res.Result_Data.CurRevenueAmount.toFixed(2);
this.currentMoney = res.Result_Data.CurRevenueAmount.toLocaleString('zh-CN');
} catch (error) {
console.error('获取实时营收数据失败:', error);
this.currentMoney = '暂无数据';
}
},
//
async handleGetTopData(index) {
let nowMonth = index ? this.monthList[index] : this.monthList[this.selectIndex]
let nowMonth = index !== undefined ? this.monthList[index] : this.monthList[this.selectIndex];
const monthKey = nowMonth.realFull;
const req = {
pushProvinceCode: "530000",
StatisticsMonth: nowMonth.realFull,
StatisticsDate: this.lastDay
//
if (this.loadingMap[monthKey]) {
return;
}
const data = await request.$webGet("CommercialApi/Revenue/GetSummaryRevenueMonth", req)
//
let dataObj = data.Result_Data
//
let resObj = JSON.parse(JSON.stringify(data.Result_Data))
console.log('dataObjdataObjdataObj', dataObj);
//
resObj.MonthRevenueModel.CashPayChange = this.$util.fmoney(this.$util.getMoney(resObj.MonthRevenueModel.CashPay / 10000), 2);
//
let addNumber = resObj.MonthRevenueModel.RevenueYOY ? Number((((resObj.MonthRevenueModel.CashPay - resObj.MonthRevenueModel.RevenueYOY) / resObj.MonthRevenueModel.RevenueYOY) * 100).toFixed(2)) : 0;
resObj.MonthRevenueModel.add = addNumber === 0 ? '' : addNumber > 0 ? "+" + addNumber : addNumber
resObj.MonthRevenueModel.addNumber = addNumber
//
resObj.MonthRevenueModel.YearRevenueAddNumber = resObj.MonthRevenueModel.YearRevenueAmount - resObj.MonthRevenueModel.YearRevenueYOY;
resObj.MonthRevenueModel.YearRevenueAdd = resObj.MonthRevenueModel.YearRevenueYOY ? (((resObj.MonthRevenueModel.YearRevenueAmount - resObj.MonthRevenueModel.YearRevenueYOY) / resObj.MonthRevenueModel.YearRevenueYOY) * 100).toFixed(2) : 0;
//
let shareList = [{}, {}];
//
let sum = 0
resObj.BusinessTypeList.forEach((item) => {
//
if (item.data) {
let number = ((item.value - item.data) / item.data) * 100;
if (number > 0) {
item.add = "+" + number.toFixed(2);
} else if (number < 0) {
item.add = number.toFixed(2);
} else {
item.add = null;
}
}
//
if (item.key) {
let number = ((item.value - item.key) / item.key) * 100;
if (number > 0) {
item.addQOQ = "+" + number.toFixed(2) + "%";
} else if (number < 0) {
item.addQOQ = number.toFixed(2) + "%";
} else {
item.addQOQ = null;
}
}
//
if (item.name === "自营") {
shareList[0] = item;
sum += Number(item.value)
} else if (item.name === "外包") {
shareList[1] = item;
sum += Number(item.value)
}
})
console.log('sum', sum);
console.log('shareListshareListshareList', shareList);
let modalListRate = []
if (shareList && shareList.length > 0) {
shareList.forEach((item) => {
modalListRate.push((Number(item.value) / sum * 100).toFixed(2))
})
//
if (this.monthDataCache[monthKey]) {
const cachedData = this.monthDataCache[monthKey];
this.topShowData = cachedData.topShowData;
this.moneyRateList = cachedData.moneyRateList;
this.profitSharingList = cachedData.profitSharingList;
this.modalRateList = cachedData.modalRateList;
return;
}
this.modalRateList = modalListRate
//
this.loadingMap[monthKey] = true;
this.moneyRateList = [
Number(shareList[0].value),
Number(shareList[1].value)
];
this.profitSharingList = shareList
console.log('profitSharingListprofitSharingListprofitSharingList', this.profitSharingList);
console.log('moneyRateListmoneyRateListmoneyRateList', this.moneyRateList);
console.log('resObjresObjresObjresObjresObj', resObj);
this.topShowData = resObj
try {
const req = {
pushProvinceCode: "530000",
StatisticsMonth: nowMonth.realFull,
StatisticsDate: this.lastDay
};
const data = await request.$webGet("CommercialApi/Revenue/GetSummaryRevenueMonth", req);
//
let dataObj = data.Result_Data;
//
let resObj = JSON.parse(JSON.stringify(data.Result_Data));
console.log('dataObjdataObjdataObj', dataObj);
//
resObj.MonthRevenueModel.CashPayChange = this.$util.fmoney(this.$util.getMoney(resObj.MonthRevenueModel.CashPay / 10000), 2);
//
let addNumber = resObj.MonthRevenueModel.RevenueYOY ? Number((((resObj.MonthRevenueModel.CashPay - resObj.MonthRevenueModel.RevenueYOY) / resObj.MonthRevenueModel.RevenueYOY) * 100).toFixed(2)) : 0;
resObj.MonthRevenueModel.add = addNumber === 0 ? '' : addNumber > 0 ? "+" + addNumber : addNumber;
resObj.MonthRevenueModel.addNumber = addNumber;
//
resObj.MonthRevenueModel.YearRevenueAddNumber = resObj.MonthRevenueModel.YearRevenueAmount - resObj.MonthRevenueModel.YearRevenueYOY;
resObj.MonthRevenueModel.YearRevenueAdd = resObj.MonthRevenueModel.YearRevenueYOY ? (((resObj.MonthRevenueModel.YearRevenueAmount - resObj.MonthRevenueModel.YearRevenueYOY) / resObj.MonthRevenueModel.YearRevenueYOY) * 100).toFixed(2) : 0;
//
let shareList = [{}, {}];
//
let sum = 0;
resObj.BusinessTypeList.forEach((item) => {
//
if (item.data) {
let number = ((item.value - item.data) / item.data) * 100;
if (number > 0) {
item.add = "+" + number.toFixed(2);
} else if (number < 0) {
item.add = number.toFixed(2);
} else {
item.add = null;
}
}
//
if (item.key) {
let number = ((item.value - item.key) / item.key) * 100;
if (number > 0) {
item.addQOQ = "+" + number.toFixed(2) + "%";
} else if (number < 0) {
item.addQOQ = number.toFixed(2) + "%";
} else {
item.addQOQ = null;
}
}
//
if (item.name === "自营") {
shareList[0] = item;
sum += Number(item.value);
} else if (item.name === "外包") {
shareList[1] = item;
sum += Number(item.value);
}
});
console.log('sum', sum);
console.log('shareListshareListshareList', shareList);
let modalListRate = [];
if (shareList && shareList.length > 0) {
shareList.forEach((item) => {
modalListRate.push((Number(item.value) / sum * 100).toFixed(2));
});
}
const moneyRateList = [
Number(shareList[0].value),
Number(shareList[1].value)
];
//
this.monthDataCache[monthKey] = {
topShowData: resObj,
moneyRateList: moneyRateList,
profitSharingList: shareList,
modalRateList: modalListRate
};
//
this.modalRateList = modalListRate;
this.moneyRateList = moneyRateList;
this.profitSharingList = shareList;
console.log('profitSharingListprofitSharingListprofitSharingList', this.profitSharingList);
console.log('moneyRateListmoneyRateListmoneyRateList', this.moneyRateList);
console.log('resObjresObjresObjresObjresObj', resObj);
this.topShowData = resObj;
} catch (error) {
console.error('获取数据失败:', error);
} finally {
//
delete this.loadingMap[monthKey];
}
},
//
handleGetIndexInfo() {
@ -743,7 +905,15 @@ export default {
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList', req)
console.log('sdjkajdas', data);
let list = data.Result_Data.List
uni.setStorageSync('currentService', list[0])
uni.setStorageSync('currentService', list[0]);
},
// uniapp
getCurrentMonthText(index) {
if (this.selectIndex === index && this.monthList[index]) {
return (this.monthList[index].month || "-") + "月对客营收";
}
return "-月对客营收";
}
}
}

View File

@ -43,7 +43,7 @@
<image v-else class="img_normal" :src="item.imagePath"></image>
<span class="name">{{ item.name }}</span>
<span v-if="item.notice !== 0 && item.isNotice" class="notice" style="{ background: red }">{{ item.notice
}}</span>
}}</span>
</view>
</view>
</view>
@ -77,20 +77,6 @@ export default {
methods: {
//
handleGoFirst(item) {
if (this.isReturn) {
let _this = this
uni.showModal({
title: '温馨提示',
content: '请您授权登录后再操作。',
success(res) {
if (res.confirm) {
_this.$util.toNextRoute('redirectTo', '/pages/register/register')
}
}
})
return
}
if (item.isNotice) {
this.$util.toNextRoute('navigateTo', item.homeUrl)
} else {
@ -122,17 +108,16 @@ export default {
},
//
handleGoFourth(item) {
if (this.isReturn) {
let _this = this
uni.showModal({
title: '温馨提示',
content: '请您授权登录后再操作。',
success(res) {
if (res.confirm) {
_this.$util.toNextRoute('redirectTo', '/pages/register/register')
}
}
})
//
let userInfo = uni.getStorageSync("vuex");
userInfo = userInfo ? JSON.parse(userInfo) : ""
console.log('userInfouserInfouserInfo', userInfo);
if (!userInfo.userData || !userInfo.userData.WeChat_UserId) {
this.$util.toNextRoute('redirectTo', '/pages/register/register')
} else if (userInfo.userData && userInfo.userData.WeChat_UserId && userInfo.userData.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
uni.redirectTo({
url: `/pages/commercialBI/noData?type=homeIndex`,
});
return
}

View File

@ -264,14 +264,12 @@ export default {
//
let userInfo = uni.getStorageSync("vuex");
if (
userInfo.userData &&
userInfo.userData.WeChat_UserId &&
userInfo.userData.AuthorityInfo[
"89a1f248-2113-4d57-84b1-c2e6edb9e8ee"
] === 1
) {
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`,
});
}