update
This commit is contained in:
parent
abde28cc4d
commit
a207469c80
@ -26,11 +26,11 @@
|
|||||||
<div class="uni-flex ai-base jc-between">
|
<div class="uni-flex ai-base jc-between">
|
||||||
<span class="center-num">{{ sMsg.totalMoneyShow }}</span>
|
<span class="center-num">{{ sMsg.totalMoneyShow }}</span>
|
||||||
<span class="budgetamount">
|
<span class="budgetamount">
|
||||||
<text class="budget-title">计划营收(元):</text>
|
<!-- <text class="budget-title">计划营收(元):</text>
|
||||||
<text :class="sMsg.budgetAmount < sMsg.cashPay ? 'up-text-title' : 'down-text-title'">
|
<text :class="sMsg.budgetAmount < sMsg.cashPay ? 'up-text-title' : 'down-text-title'">
|
||||||
{{ sMsg.budgetamoutShow }}
|
{{ sMsg.budgetamoutShow }}
|
||||||
<span style="font-size: 24rpx;margin-left: 12rpx;">{{ sMsg.diffBili }}%</span>
|
<span style="font-size: 24rpx;margin-left: 12rpx;">{{ sMsg.diffBili }}%</span>
|
||||||
</text>
|
</text> -->
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -122,7 +122,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="uni-flex jc-between">
|
<div class="uni-flex jc-between">
|
||||||
<div style="margin-bottom: 0;"><span style="font-size: 32rpx;">{{ operationModel[0].data
|
<div style="margin-bottom: 0;"><span style="font-size: 32rpx;">{{ operationModel[0].data
|
||||||
}}</span>元
|
}}</span>元
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 0;" v-if="operationModel[1].data"><span
|
<div style="margin-bottom: 0;" v-if="operationModel[1].data"><span
|
||||||
style="font-size: 32rpx;">{{
|
style="font-size: 32rpx;">{{
|
||||||
@ -394,6 +394,8 @@ export default {
|
|||||||
let colors1 = ['#FFAC37', '#d8ece9', '#e0e3f7', '#f7f5f6', '#b2b7e3'];
|
let colors1 = ['#FFAC37', '#d8ece9', '#e0e3f7', '#f7f5f6', '#b2b7e3'];
|
||||||
let list = []
|
let list = []
|
||||||
let list2 = []
|
let list2 = []
|
||||||
|
console.log('_this.pageData_this.pageData', _this.pageData);
|
||||||
|
|
||||||
_this.pageData.listBusinessModel.map((m, i) => {
|
_this.pageData.listBusinessModel.map((m, i) => {
|
||||||
if (m.Revenue_Amount != 0) {
|
if (m.Revenue_Amount != 0) {
|
||||||
let n = {
|
let n = {
|
||||||
@ -421,6 +423,8 @@ export default {
|
|||||||
|
|
||||||
})
|
})
|
||||||
if (list2.length > 0) {
|
if (list2.length > 0) {
|
||||||
|
console.log('list2list2list2', list2);
|
||||||
|
|
||||||
_this.ServiceRevenueData.push(list2)
|
_this.ServiceRevenueData.push(list2)
|
||||||
_this.sellData = list
|
_this.sellData = list
|
||||||
|
|
||||||
@ -436,6 +440,7 @@ export default {
|
|||||||
list.push(n)
|
list.push(n)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log('listlistlistlist', list);
|
||||||
_this.ServiceRevenueData.push(list)
|
_this.ServiceRevenueData.push(list)
|
||||||
}
|
}
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
@ -631,7 +636,6 @@ export default {
|
|||||||
this.sMsg = totalData
|
this.sMsg = totalData
|
||||||
// 饼图分析及数据条形分析
|
// 饼图分析及数据条形分析
|
||||||
const [progressList, pieList] = this.getProgressData(busniessTypePie, totalData.cashPay)
|
const [progressList, pieList] = this.getProgressData(busniessTypePie, totalData.cashPay)
|
||||||
console.log('progressListprogressListprogressList', progressList);
|
|
||||||
|
|
||||||
this.operationModel = progressList
|
this.operationModel = progressList
|
||||||
// 经营类型分析
|
// 经营类型分析
|
||||||
@ -643,7 +647,9 @@ export default {
|
|||||||
});
|
});
|
||||||
// 经营业态
|
// 经营业态
|
||||||
// this.ServiceRevenueData = []
|
// this.ServiceRevenueData = []
|
||||||
|
|
||||||
this.ServiceRevenueData = [busniessTradeFathPie, busniessTradePie]
|
this.ServiceRevenueData = [busniessTradeFathPie, busniessTradePie]
|
||||||
|
|
||||||
if (totalData.uploadCount !== totalData.totalUploadCount) {
|
if (totalData.uploadCount !== totalData.totalUploadCount) {
|
||||||
this.getUnUpLoadShops(theRequest)
|
this.getUnUpLoadShops(theRequest)
|
||||||
|
|
||||||
@ -851,7 +857,8 @@ cover-view.page-title {
|
|||||||
|
|
||||||
/* 门店卡片 */
|
/* 门店卡片 */
|
||||||
.shop-card {
|
.shop-card {
|
||||||
width: 210rpx;
|
// width: 210rpx;
|
||||||
|
width: calc((100% - 40rpx) / 3);
|
||||||
height: 240rpx;
|
height: 240rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
@ -1,115 +1,115 @@
|
|||||||
<template>
|
<template>
|
||||||
<uni-ec-canvas
|
<uni-ec-canvas class="uni-ec-canvas" id="revenuecharts" ref="revenuecharts" canvas-id="revenuecharts" :ec="ec"
|
||||||
class="uni-ec-canvas"
|
@inited="inited"></uni-ec-canvas>
|
||||||
id="revenuecharts"
|
|
||||||
ref="revenuecharts"
|
|
||||||
canvas-id="revenuecharts"
|
|
||||||
:ec="ec"
|
|
||||||
@inited="inited"
|
|
||||||
></uni-ec-canvas>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import uniEcCanvas from './uni-ec-canvas/uni-ec-canvas.vue';
|
import uniEcCanvas from './uni-ec-canvas/uni-ec-canvas.vue';
|
||||||
export default {
|
export default {
|
||||||
props:['data'],
|
props: ['data'],
|
||||||
components:{
|
components: {
|
||||||
uniEcCanvas
|
uniEcCanvas
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
ec(){
|
ec() {
|
||||||
if(this.data){
|
if (this.data) {
|
||||||
return {
|
console.log('传入的data', this.data);
|
||||||
option:{
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
formatter: '{b}: {c} ({d}%)'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '业态',
|
|
||||||
type: 'pie',
|
|
||||||
selectedMode: 'single',
|
|
||||||
radius: [0, '32%'],
|
|
||||||
center: ['50%','50%'],
|
|
||||||
startAngle: 40,
|
|
||||||
label: {
|
|
||||||
// position: 'inner',
|
|
||||||
formatter: '{b} \n {d}% ',
|
|
||||||
fontSize: 13,
|
|
||||||
color: '#D1D1D1',
|
|
||||||
// show: false,
|
|
||||||
},
|
|
||||||
startAngle: 115,
|
|
||||||
labelLine: {
|
|
||||||
// show: false,
|
|
||||||
length: 62,
|
|
||||||
length2: 12,
|
|
||||||
smooth: true,
|
|
||||||
lineStyle:{
|
|
||||||
color: '#D1D1D1'
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
return {
|
||||||
data: [
|
option: {
|
||||||
...this.data[0]
|
tooltip: {
|
||||||
],
|
trigger: 'item',
|
||||||
color:['#FEA427','#7786E3','#75B7AD','#9BC9F8','#FFAC37',]
|
formatter: '{b}: {c} ({d}%)'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '业态',
|
||||||
|
type: 'pie',
|
||||||
|
selectedMode: 'single',
|
||||||
|
radius: [0, '32%'],
|
||||||
|
center: ['40%', '50%'],
|
||||||
|
startAngle: 40,
|
||||||
|
label: {
|
||||||
|
// position: 'inner',
|
||||||
|
// formatter: '{b} \n {d}% ',
|
||||||
|
// fontSize: 13,
|
||||||
|
// color: '#D1D1D1',
|
||||||
|
show: false,
|
||||||
},
|
},
|
||||||
{
|
startAngle: 115,
|
||||||
name: '业态',
|
labelLine: {
|
||||||
type: 'pie',
|
// show: false,
|
||||||
radius: ['48%', '72%'],
|
length: 62,
|
||||||
center: ['50%','50%'],
|
length2: 12,
|
||||||
labelLine: {
|
smooth: true,
|
||||||
length: 30,
|
lineStyle: {
|
||||||
},
|
color: '#D1D1D1'
|
||||||
label: {
|
|
||||||
show:false,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
color: this.data[1].length> 7 ? ['#FFC3CD','#F4A4B2','#FE6582','#FFE7C0','#FEDA9D','#FEC057','#F9C8A0','#FAB176','#ffa25b','#E1C9F7','#CDA6F1',
|
},
|
||||||
'#E0E2F6','#C5CDF9','#9AA6EF','#D8ECEA','#8FE5B2','#70D599','#ADE5EE'] :
|
data: [
|
||||||
['#70D599', '#FFE7C0', '#ADE5EE','#C5CDF9','#e0e3f7', '#AFB7E6', '#F3B1C9' ],
|
...this.data[0]
|
||||||
|
],
|
||||||
|
color: ['#FEA427', '#7786E3', '#75B7AD', '#9BC9F8', '#FFAC37',]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '业态',
|
||||||
|
type: 'pie',
|
||||||
|
radius: ['48%', '72%'],
|
||||||
|
center: ['40%', '50%'],
|
||||||
|
labelLine: {
|
||||||
|
length: 30,
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
color: this.data[1].length > 7 ? ['#FFC3CD', '#F4A4B2', '#FE6582', '#FFE7C0', '#FEDA9D', '#FEC057', '#F9C8A0', '#FAB176', '#ffa25b', '#E1C9F7', '#CDA6F1',
|
||||||
|
'#E0E2F6', '#C5CDF9', '#9AA6EF', '#D8ECEA', '#8FE5B2', '#70D599', '#ADE5EE'] :
|
||||||
|
['#70D599', '#FFE7C0', '#ADE5EE', '#C5CDF9', '#e0e3f7', '#AFB7E6', '#F3B1C9'],
|
||||||
|
|
||||||
data: [
|
data: [
|
||||||
...this.data[1]
|
...this.data[1]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
orient: 'vertical', // vertical | horizontal
|
||||||
|
right: 25, // left | center | right | 数值
|
||||||
|
bottom: 'center'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
methods:{
|
},
|
||||||
inited(chart){
|
methods: {
|
||||||
let _this =this
|
inited(chart) {
|
||||||
// console.log('图表初始化完毕')
|
let _this = this
|
||||||
// console.log('chart实例', this.ec)
|
// console.log('图表初始化完毕')
|
||||||
|
// console.log('chart实例', this.ec)
|
||||||
chart.on('click',function(params){
|
|
||||||
if(params.componentIndex==0){
|
|
||||||
_this.$emit('selectCate',params.dataIndex+1)
|
|
||||||
}
|
|
||||||
// console.log(params)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
chart.on('click', function (params) {
|
||||||
|
if (params.componentIndex == 0) {
|
||||||
|
_this.$emit('selectCate', params.dataIndex + 1)
|
||||||
|
}
|
||||||
|
// console.log(params)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* page {
|
/* page {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
} */
|
} */
|
||||||
.uni-ec-canvas{
|
.uni-ec-canvas {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
height: 526rpx;
|
height: 526rpx;
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
display:block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -15,6 +15,7 @@ const methods = {
|
|||||||
*/
|
*/
|
||||||
// let regionList = [] // 营收上传列表 reginListModel[]
|
// let regionList = [] // 营收上传列表 reginListModel[]
|
||||||
this.groupType = obj.GroupType
|
this.groupType = obj.GroupType
|
||||||
|
this.provinceCode = obj.ProvinceCode
|
||||||
const requestParamas = {
|
const requestParamas = {
|
||||||
Statistics_Date: obj.time,
|
Statistics_Date: obj.time,
|
||||||
Statistics_Month: obj.month,
|
Statistics_Month: obj.month,
|
||||||
@ -37,14 +38,14 @@ const methods = {
|
|||||||
if (data.Result_Code != 100) return
|
if (data.Result_Code != 100) return
|
||||||
|
|
||||||
// 处理一下数据 云南长短款只计算自营的 那么就是data 的营收数据 只拿自营的即可
|
// 处理一下数据 云南长短款只计算自营的 那么就是data 的营收数据 只拿自营的即可
|
||||||
let newData = []
|
// let newData = []
|
||||||
if (data.Result_Data.List && data.Result_Data.List.length > 0) {
|
// if (data.Result_Data.List && data.Result_Data.List.length > 0) {
|
||||||
data.Result_Data.List.forEach((item) => {
|
// data.Result_Data.List.forEach((item) => {
|
||||||
if (item.Business_TypeName === '自营') {
|
// if (item.Business_TypeName === '自营') {
|
||||||
newData.push(item)
|
// newData.push(item)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// 在营门店数量统计
|
// 在营门店数量统计
|
||||||
@ -72,11 +73,11 @@ const methods = {
|
|||||||
if (bayonetCount.Result_Code != 100) return
|
if (bayonetCount.Result_Code != 100) return
|
||||||
|
|
||||||
if (isServerPartDetail) { // 是服务区营收推送页面
|
if (isServerPartDetail) { // 是服务区营收推送页面
|
||||||
return _this.getSeverpartReginList(newData, busniessCounts.Result_Data.List,
|
return _this.getSeverpartReginList(data.Result_Data.List, busniessCounts.Result_Data.List,
|
||||||
tradeData.Result_Data.List, budgetAmount.Result_Data.List)
|
tradeData.Result_Data.List, budgetAmount.Result_Data.List)
|
||||||
}
|
}
|
||||||
|
|
||||||
return _this.getReginList(newData, busniessCounts.Result_Data.List,
|
return _this.getReginList(data.Result_Data.List, busniessCounts.Result_Data.List,
|
||||||
tradeData.Result_Data.List, budgetAmount.Result_Data.List,
|
tradeData.Result_Data.List, budgetAmount.Result_Data.List,
|
||||||
bayonetCount.Result_Data.List, mobileShare.Result_Data, mallDeliver.Result_Data)
|
bayonetCount.Result_Data.List, mobileShare.Result_Data, mallDeliver.Result_Data)
|
||||||
// [reginList, totalData, busniessTypePie, busniessTradePie]
|
// [reginList, totalData, busniessTypePie, busniessTradePie]
|
||||||
@ -102,8 +103,18 @@ const methods = {
|
|||||||
oldData.totalOffAmount += newData.TotalOffAmount
|
oldData.totalOffAmount += newData.TotalOffAmount
|
||||||
oldData.mobilePayment += newData.MobilePayment
|
oldData.mobilePayment += newData.MobilePayment
|
||||||
oldData.cashPay += newData.CashPay
|
oldData.cashPay += newData.CashPay
|
||||||
oldData.diffLessPrice += newData.Different_Price_Less
|
// oldData.diffLessPrice += newData.Different_Price_Less
|
||||||
oldData.diffMorePrice += newData.Different_Price_More
|
// oldData.diffMorePrice += newData.Different_Price_More
|
||||||
|
if (this.provinceCode === '530000') {
|
||||||
|
if (newData.Business_TypeName === '自营') {
|
||||||
|
oldData.diffLessPrice += newData.Different_Price_Less || 0
|
||||||
|
oldData.diffMorePrice += newData.Different_Price_More || 0
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
oldData.diffLessPrice += newData.Different_Price_Less || 0
|
||||||
|
oldData.diffMorePrice += newData.Different_Price_More || 0
|
||||||
|
}
|
||||||
|
|
||||||
if (newData.BusinessType == 1000) { // 商超
|
if (newData.BusinessType == 1000) { // 商超
|
||||||
|
|
||||||
oldData.scCount = oldData.scCount ? oldData.scCount + 1 : 1
|
oldData.scCount = oldData.scCount ? oldData.scCount + 1 : 1
|
||||||
@ -119,9 +130,20 @@ const methods = {
|
|||||||
oldData.totalOffAmount = newData.TotalOffAmount
|
oldData.totalOffAmount = newData.TotalOffAmount
|
||||||
oldData.mobilePayment = newData.MobilePayment
|
oldData.mobilePayment = newData.MobilePayment
|
||||||
oldData.cashPay = newData.CashPay
|
oldData.cashPay = newData.CashPay
|
||||||
oldData.diffLessPrice = newData.Different_Price_Less
|
// oldData.diffLessPrice = newData.Different_Price_Less
|
||||||
oldData.diffMorePrice = newData.Different_Price_More
|
// oldData.diffMorePrice = newData.Different_Price_More
|
||||||
|
if (this.provinceCode === '530000') {
|
||||||
|
if (newData.Business_TypeName === '自营') {
|
||||||
|
oldData.diffLessPrice = newData.Different_Price_Less || 0
|
||||||
|
oldData.diffMorePrice = newData.Different_Price_More || 0
|
||||||
|
} else {
|
||||||
|
oldData.diffLessPrice = 0
|
||||||
|
oldData.diffMorePrice = 0
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
oldData.diffLessPrice = newData.Different_Price_Less || 0
|
||||||
|
oldData.diffMorePrice = newData.Different_Price_More || 0
|
||||||
|
}
|
||||||
if (newData.BusinessType == 1000) { // 商超
|
if (newData.BusinessType == 1000) { // 商超
|
||||||
|
|
||||||
oldData.scCount = 1
|
oldData.scCount = 1
|
||||||
@ -137,6 +159,9 @@ const methods = {
|
|||||||
return { ...oldData }
|
return { ...oldData }
|
||||||
},
|
},
|
||||||
getBusniessPie(typeName, item, list) { // 经营模式数据
|
getBusniessPie(typeName, item, list) { // 经营模式数据
|
||||||
|
console.log('typeNametypeName', typeName);
|
||||||
|
console.log('itemitemitem', item);
|
||||||
|
console.log('listlistlist', list);
|
||||||
|
|
||||||
const oldData = list.find(m => m.name === item[typeName])
|
const oldData = list.find(m => m.name === item[typeName])
|
||||||
if (oldData) {
|
if (oldData) {
|
||||||
@ -231,7 +256,6 @@ const methods = {
|
|||||||
let busniessTypePie = [] // 经营模式饼图统计数据
|
let busniessTypePie = [] // 经营模式饼图统计数据
|
||||||
let busniessTradePie = [] // 经营业态饼图统计数据
|
let busniessTradePie = [] // 经营业态饼图统计数据
|
||||||
let busniessTradeFathPie = [] // 区域经营饼图统计数据
|
let busniessTradeFathPie = [] // 区域经营饼图统计数据
|
||||||
|
|
||||||
data.map(async (n, index) => {
|
data.map(async (n, index) => {
|
||||||
n.show = false
|
n.show = false
|
||||||
totalShow = _this.getTotalShowData(n, totalShow, index); // 总营收数据统计
|
totalShow = _this.getTotalShowData(n, totalShow, index); // 总营收数据统计
|
||||||
@ -364,7 +388,6 @@ const methods = {
|
|||||||
if (budgetAmount.length) {
|
if (budgetAmount.length) {
|
||||||
totalShow.budgetAmount = budgetAmount[0].BUDGET_AMOUNT
|
totalShow.budgetAmount = budgetAmount[0].BUDGET_AMOUNT
|
||||||
}
|
}
|
||||||
console.log('list', list)
|
|
||||||
return [list, totalShow, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie]
|
return [list, totalShow, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -333,9 +333,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
user: {
|
user: {
|
||||||
handler(newValue, value) {
|
handler(newValue, value) {
|
||||||
console.log('newValuenewValuenewValue', newValue);
|
|
||||||
console.log('valuevaluevaluevaluevalue', value);
|
|
||||||
|
|
||||||
let _this = this
|
let _this = this
|
||||||
let userInfo = JSON.parse(JSON.stringify(newValue));
|
let userInfo = JSON.parse(JSON.stringify(newValue));
|
||||||
_this.useInfo = JSON.parse(JSON.stringify(newValue));
|
_this.useInfo = JSON.parse(JSON.stringify(newValue));
|
||||||
@ -353,6 +350,7 @@ export default {
|
|||||||
_this.profitSharingList = []
|
_this.profitSharingList = []
|
||||||
_this.modalRateList = []
|
_this.modalRateList = []
|
||||||
}
|
}
|
||||||
|
console.log('_this.isReturn_this.isReturn', _this.isReturn);
|
||||||
|
|
||||||
if (!_this.isReturn) {
|
if (!_this.isReturn) {
|
||||||
_this.handleGetOnLoad()
|
_this.handleGetOnLoad()
|
||||||
@ -370,30 +368,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// uni.getLocation({
|
|
||||||
// type: "gcj02",
|
|
||||||
// altitude: true,
|
|
||||||
// success: (res) => {
|
|
||||||
// let seatInfo = {
|
|
||||||
// latitude: res.latitude,
|
|
||||||
// longitude: res.longitude,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
|
|
||||||
// _this.handleGetNearService(seatInfo.latitude, seatInfo.longitude)
|
|
||||||
// },
|
|
||||||
// fail: (err) => {
|
|
||||||
// // 因为错误 所以默认给读书铺的位置
|
|
||||||
// let seatInfo = {
|
|
||||||
// latitude: 24.95152,
|
|
||||||
// longitude: 102.553311,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
|
|
||||||
// _this.handleGetNearService(seatInfo.latitude, seatInfo.longitude)
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
|
|
||||||
this.single = timestampToTimeMonth(new Date(this.lastDay).getTime());
|
this.single = timestampToTimeMonth(new Date(this.lastDay).getTime());
|
||||||
uni.setStorageSync("lastDay", this.lastDay);
|
uni.setStorageSync("lastDay", this.lastDay);
|
||||||
|
|
||||||
@ -406,16 +380,9 @@ export default {
|
|||||||
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;
|
||||||
} else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
|
} else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
|
||||||
// uni.redirectTo({
|
|
||||||
// url: `/pages/commercialBI/noData?type=noAuthor`,
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!_this.isReturn) {
|
|
||||||
// _this.handleGetOnLoad()
|
|
||||||
// }
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
||||||
@ -493,7 +460,7 @@ export default {
|
|||||||
// 后台预加载,不影响当前显示
|
// 后台预加载,不影响当前显示
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
try {
|
try {
|
||||||
await this.handleGetTopData(index);
|
await this.handleGetTopData(index, 'noChange');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('预加载数据失败:', error);
|
console.log('预加载数据失败:', error);
|
||||||
}
|
}
|
||||||
@ -838,10 +805,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 拿到顶部轮播框的数据
|
// 拿到顶部轮播框的数据
|
||||||
async handleGetTopData(index) {
|
async handleGetTopData(index, ischange) {
|
||||||
|
// 因为预加载附近月份的时候 会将当前的数据给替换掉 肯定不会的 加个内容 进入页面之后的预加载附近月份 不改变当前月的数据
|
||||||
|
|
||||||
let nowMonth = index !== undefined ? this.monthList[index] : this.monthList[this.selectIndex];
|
let nowMonth = index !== undefined ? this.monthList[index] : this.monthList[this.selectIndex];
|
||||||
const monthKey = nowMonth.realFull;
|
const monthKey = nowMonth.realFull;
|
||||||
|
|
||||||
|
console.log('nowMonthnowMonth', nowMonth);
|
||||||
|
|
||||||
// 检查是否正在加载,避免重复请求
|
// 检查是否正在加载,避免重复请求
|
||||||
if (this.loadingMap[monthKey]) {
|
if (this.loadingMap[monthKey]) {
|
||||||
return;
|
return;
|
||||||
@ -940,11 +911,16 @@ export default {
|
|||||||
modalRateList: modalListRate
|
modalRateList: modalListRate
|
||||||
};
|
};
|
||||||
|
|
||||||
// 设置当前数据
|
console.log('monthKeymonthKey', monthKey);
|
||||||
this.modalRateList = modalListRate;
|
if (ischange === 'noChange') {
|
||||||
this.moneyRateList = moneyRateList;
|
|
||||||
this.profitSharingList = shareList;
|
} else {
|
||||||
this.topShowData = resObj;
|
// 设置当前数据
|
||||||
|
this.modalRateList = modalListRate;
|
||||||
|
this.moneyRateList = moneyRateList;
|
||||||
|
this.profitSharingList = shareList;
|
||||||
|
this.topShowData = resObj;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取数据失败:', error);
|
console.error('获取数据失败:', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user