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

View File

@ -14,6 +14,8 @@
<view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME : <view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME :
'' }} '' }}
</view> </view>
<p class="area">{{ serviceInfo.SPREGIONTYPE_NAME ? serviceInfo.SPREGIONTYPE_NAME : '' }}
</p>
<image class="rightArrow" <image class="rightArrow"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image> src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view> </view>

View File

@ -13,6 +13,8 @@
<view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME : <view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME :
'' }} '' }}
</view> </view>
<p class="area">{{ serviceInfo.SPREGIONTYPE_NAME ? serviceInfo.SPREGIONTYPE_NAME : '' }}
</p>
<image class="rightArrow" <image class="rightArrow"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image> src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view> </view>
@ -107,7 +109,7 @@
</view> </view>
<view class="calendarGrid"> <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="{ <view v-for="day in monthDays" :key="day.date" class="calendarCell" :class="{
'weekend': day.isWeekend, 'weekend': day.isWeekend,
@ -522,6 +524,15 @@ export default {
color: #160002; color: #160002;
} }
.area {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40px;
margin-left: 4px;
}
.rightArrow { .rightArrow {
width: 12px; width: 12px;
height: 12px; height: 12px;

View File

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

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

View File

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