更新
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
<view class="index_topbody">
|
||||
<view :style="{marginTop:'calc(267rpx - ' + shikHeig + ')'}" class="index_top_car">
|
||||
<view class="index_top_car_header_photo">
|
||||
<image style="width: 140rpx; height:140rpx;border-radius: 50%;" :src=" user.headPhoto || '/static/tx.png' "></image>
|
||||
<image style="width: 140rpx; height:140rpx;border-radius: 50%;"
|
||||
:src=" user.headPhoto || '/static/tx.png' "></image>
|
||||
</view>
|
||||
<view style="padding-top: 70rpx;">
|
||||
<view class="bgtext" style="">{{user.name?user.name:'暂未设置'}}</view>
|
||||
@@ -28,8 +29,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</topBar>
|
||||
<view class="index_list">
|
||||
<view class="index_list_item">
|
||||
@@ -43,7 +44,7 @@
|
||||
</image>
|
||||
<view class="listtext">司机列表</view>
|
||||
</view>
|
||||
<view v-if="jurisdiction('driver:info:add')" @tap="jump(2)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('driver:info:add')" @tap="jump(2)" class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/dirverIndex.png">
|
||||
</image>
|
||||
<view class="listtext">新增司机</view>
|
||||
@@ -57,12 +58,14 @@
|
||||
<view class="left_text">油品分发</view>
|
||||
</view>
|
||||
<view class="index_list_item_right">
|
||||
<view v-if="jurisdiction('distributeReverse:info:list')" @tap="jump(1)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('distributeReverse:info:list')" @tap="jump(1)"
|
||||
class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/oliList.png">
|
||||
</image>
|
||||
<view class="listtext">分发列表</view>
|
||||
</view>
|
||||
<view v-if="jurisdiction('distributeReverse:info:add')" @tap="jump(3)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('distributeReverse:info:add')" @tap="jump(3)"
|
||||
class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/addoli.png">
|
||||
</image>
|
||||
<view class="listtext">新增分发</view>
|
||||
@@ -70,32 +73,35 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="index_list_item">
|
||||
<view style="background: linear-gradient(122deg, #EEBA5F 0%, #FBAF2B 100%);"class="index_list_item_left">
|
||||
<image style="width: 107rpx; height: 103rpx; margin-bottom: 15rpx;" src="@/static/order.png"></image>
|
||||
<view style="background: linear-gradient(122deg, #EEBA5F 0%, #FBAF2B 100%);"
|
||||
class="index_list_item_left">
|
||||
<image style="width: 107rpx; height: 103rpx; margin-bottom: 15rpx;" src="@/static/order.png">
|
||||
</image>
|
||||
<view class="left_text">订单管理</view>
|
||||
</view>
|
||||
<view class="index_list_item_right">
|
||||
<view v-if="jurisdiction('oilOrder:info:list')" @tap="jump(4)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('oilOrder:info:list')" @tap="jump(4)" class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/orderList.png">
|
||||
</image>
|
||||
<view class="listtext">订单列表</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="index_list_item">
|
||||
<view style="background: linear-gradient(122deg, #EEBA5F 0%, #FBAF2B 100%);"
|
||||
<view style="background: linear-gradient(122deg, #EEBA5F 0%, #FBAF2B 100%);"
|
||||
class="index_list_item_left">
|
||||
<image style="width: 107rpx; height: 103rpx; margin-bottom: 15rpx;" src="@/static/order.png"></image>
|
||||
<image style="width: 107rpx; height: 103rpx; margin-bottom: 15rpx;" src="@/static/order.png">
|
||||
</image>
|
||||
<view class="left_text">动销排名</view>
|
||||
</view>
|
||||
<view class="index_list_item_right">
|
||||
<view v-if="jurisdiction('ranking:info:list')" @tap="jump(6)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('ranking:info:list')" @tap="jump(6)" class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/orderList.png">
|
||||
</image>
|
||||
<view class="listtext"> 油站动销</view>
|
||||
</view>
|
||||
<view v-if="jurisdiction('ranking:info:list')" @tap="jump(8)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('ranking:info:list')" @tap="jump(8)" class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/orderList.png">
|
||||
</image>
|
||||
<view class="listtext"> 企业动销 </view>
|
||||
@@ -103,23 +109,25 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="index_list_item">
|
||||
<view style="background: linear-gradient(122deg, #EEBA5F 0%, #FBAF2B 100%);"
|
||||
<view style="background: linear-gradient(122deg, #EEBA5F 0%, #FBAF2B 100%);"
|
||||
class="index_list_item_left">
|
||||
<image style="width: 107rpx; height: 103rpx; margin-bottom: 15rpx;" src="@/static/order.png"></image>
|
||||
<image style="width: 107rpx; height: 103rpx; margin-bottom: 15rpx;" src="@/static/order.png">
|
||||
</image>
|
||||
<view class="left_text">调价管理</view>
|
||||
</view>
|
||||
<view class="index_list_item_right">
|
||||
<view v-if="jurisdiction('priceAdjust:info:list')" @tap="jump(5)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('priceAdjust:info:list')" @tap="jump(5)"
|
||||
class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/orderList.png">
|
||||
</image>
|
||||
<view class="listtext">调价申请</view>
|
||||
</view>
|
||||
<view v-if="jurisdiction('priceTask:info:list')" @tap="jump(7)" class="index_list_item_right_item">
|
||||
<view v-if="jurisdiction('priceTask:info:list')" @tap="jump(7)" class="index_list_item_right_item">
|
||||
<image style="width: 43rpx; height: 43rpx;margin-right: 15rpx;" src="@/static/orderList.png">
|
||||
</image>
|
||||
<view class="listtext">调价任务</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -138,59 +146,50 @@
|
||||
title: 'Hello',
|
||||
shikHeig: '',
|
||||
user: {
|
||||
authList:[]
|
||||
authList: []
|
||||
},
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.user = uni.getStorageSync('user')
|
||||
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
try {
|
||||
let that = this
|
||||
// let that = this
|
||||
let style = uni.getMenuButtonBoundingClientRect()
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('.index_top_car').boundingClientRect(data => {
|
||||
let shikHeig = Number(style.height) + Number(style.top) + (Number(data.height) / 2)
|
||||
that.shikHeig = shikHeig + 'px'
|
||||
console.log("得到布局位置信息" + JSON.stringify(data));
|
||||
console.log("节点离页面顶部的距离为" + data.top, shikHeig);
|
||||
this.shikHeig = shikHeig + 'px'
|
||||
}).exec();
|
||||
} catch (err) {
|
||||
console.log('失败')
|
||||
console.log('onLoad err')
|
||||
}
|
||||
this.upDate()
|
||||
},
|
||||
methods: {
|
||||
upDate(){
|
||||
console.log('检查更新中----');
|
||||
upDate() {
|
||||
const updateManager = wx.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(function (res) {
|
||||
// 请求完新版本信息的回调
|
||||
console.log(res.hasUpdate,'版本信息')
|
||||
updateManager.onCheckForUpdate(function(res) {
|
||||
// 请求完新版本信息的回调
|
||||
console.log(res.hasUpdate, '版本信息')
|
||||
})
|
||||
// updateManager.onUpdateFailed(function () {
|
||||
// console.log('安装包下载失败')
|
||||
// // 新版本下载失败
|
||||
// });
|
||||
updateManager.onUpdateReady(function () {
|
||||
wx.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success: function (res) {
|
||||
console.log(res,'****')
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
updateManager.onUpdateReady(function() {
|
||||
wx.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
jurisdiction(e){
|
||||
// console.log(`%c 当前校验项:${e},校验结果:${this.user.authList.includes(e)},返回权限数据↓`,'color:red;font-size:50px;');
|
||||
// console.log(this.user.authList)
|
||||
jurisdiction(e) {
|
||||
return this.user.authList.includes(e)
|
||||
},
|
||||
jump(e) {
|
||||
@@ -198,9 +197,6 @@
|
||||
case 0:
|
||||
uni.navigateTo({
|
||||
url: "/driverManagement/index/index",
|
||||
fail(e) {
|
||||
console.log(e, '--')
|
||||
},
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
@@ -208,40 +204,40 @@
|
||||
url: "/oilDistribution/index/index",
|
||||
})
|
||||
break;
|
||||
case 2:
|
||||
case 2:
|
||||
uni.navigateTo({
|
||||
url:'/driverManagement/addDiver/addDiver'
|
||||
url: '/driverManagement/addDiver/addDiver'
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
case 3:
|
||||
uni.navigateTo({
|
||||
url:'/oilDistribution/distribute/distribute'
|
||||
url: '/oilDistribution/distribute/distribute'
|
||||
})
|
||||
|
||||
|
||||
break
|
||||
case 4:
|
||||
case 4:
|
||||
uni.navigateTo({
|
||||
url:'/orderList/index/index'
|
||||
url: '/orderList/index/index'
|
||||
})
|
||||
break
|
||||
case 5:
|
||||
case 5:
|
||||
uni.navigateTo({
|
||||
url:'/priceAdjustment/page/index/index'
|
||||
url: '/priceAdjustment/page/index/index'
|
||||
})
|
||||
break
|
||||
case 6:
|
||||
case 6:
|
||||
uni.navigateTo({
|
||||
url:'/salesRanking/page/index/index'
|
||||
url: '/salesRanking/page/index/index'
|
||||
})
|
||||
break
|
||||
case 7:
|
||||
case 7:
|
||||
uni.navigateTo({
|
||||
url:'/priceAdjustmentTask/page/index'
|
||||
url: '/priceAdjustmentTask/page/index'
|
||||
})
|
||||
break
|
||||
case 8:
|
||||
case 8:
|
||||
uni.navigateTo({
|
||||
url:'/salesRanking/page/index/enterpriseIndex'
|
||||
url: '/salesRanking/page/index/enterpriseIndex'
|
||||
})
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user