123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <template>
- <view class="container_box">
- <u-navbar height="40px" title=" " bgColor="transparent">
- <view class="u-nav-slot btn-left" slot="left" @click="meunClick">
- <image src="@/static/image/home/bulletpoint.png" mode=""></image>
- </view>
- <view class="u-nav-slot btn-right" slot="right" @click="noticeClick">
- <image src="@/static/image/home/notice-icon.png" mode=""></image>
- <u-badge type="error" :isDot="true" :show="noticeShow" :absolute="true" :offset="[-2,1]"></u-badge>
- </view>
- </u-navbar>
- <view class="container_main">
- <view class="header-box">
- <image src="@/static/image/home/home-top-img.png" mode=""></image>
- </view>
- <view class="container_cont">
- <view class="operate-item" v-for="(item,i) in operateList" :key="i" @click="operateClick(item)">
- <view class="operate-img">
- <image :src="item.src" mode=""></image>
- <u-badge type="error" absolute max="99" :value="item.num" :offset="[-5,-5]"></u-badge>
- </view>
- <view class="operate-text">{{item.text}}</view>
- </view>
- </view>
- </view>
- <!-- 菜单弹框 -->
- <use-pop :userInfo="userInfo" v-model="meunShow" @close="meunShow = false"></use-pop>
-
- <!-- 今日任务有未读 -->
- <u-popup :show="updateShow" :closeOnClickOverlay="false" :safeAreaInsetBottom="false" mode="center" :round="16" @close="state.taskNumShow = false">
- <view class="reason-box">
- <image class="icon-img" src="https://qiuyu-shuzhi.oss-cn-beijing.aliyuncs.com/image/task-pop-img.png" mode=""></image>
- <view class="reason-box-title">象力WMS邀请你升级至新版本</view>
- <view class="btn-box">
- <button class="reset-button cancel-btn" @click="updateShow = false">稍后再说</button>
- <button class="reset-button confirm-btn" @click="toUpdate">下载更新</button>
- </view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import usePop from './components/use-pop.vue'
- import { downloadApk } from '@/common/request/apis/index'
- // const Base64 = require('js-base64').Base64
- import {
- mapGetters
- } from 'vuex'
- export default {
- components:{
- usePop
- },
- data() {
- return {
- operateList:[
- {
- src:require('@/static/image/home/icon-jhrw.png'),
- text:'拣货任务',
- num:0,
- url:'/pages/picking-task/index'
- },
- {
- src:require('@/static/image/home/icon-cgrk.png'),
- text:'采购入库',
- num:0,
- url:'/pages/purchase/index'
- },
- {
- src:require('@/static/image/home/icon-chcx.png'),
- text:'存货查询',
- num:0,
- url:'/pages/inventory-inquiry/index'
- },
- {
- src:require('@/static/image/home/icon-pdrw.png'),
- text:'盘点任务',
- num:0,
- url:'/pages/inventory-task/index'
- }
- ],
- meunShow:false,
- noticeShow:true,
- updateShow:true
- }
- },
- onLoad() {
- // JSON.parse(Base64.decode(that.$Route.query.classData))
- },
- onShow() {
- if(this.$store.state.update.update) {
- console.log('需要更新')
- this.updateShow = true
- }
- if(!this.isLogin) {
- uni.$u.toast("请先登录!");
- setTimeout(()=>{
- uni.redirectTo({
- url:'/pages/login/login'
- })
- },1500)
- }
- },
- computed: {
- ...mapGetters(['isLogin','userInfo'])
- },
- watch: {
- },
- methods: {
- toUpdate() {
-
- },
- meunClick() {
- if(!this.isLogin) {
- uni.$u.toast("请先登录!");
- setTimeout(()=>{
- uni.redirectTo({
- url:'/pages/login/login'
- })
- },1500)
- }else{
- this.meunShow = true
- }
- },
- operateClick(item) {
- uni.navigateTo({
- url:item.url
- })
- },
- noticeClick() {
- uni.navigateTo({
- url:'/pages/index/notice-page'
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .btn-left {
- image {
- width: 48rpx;
- height: 48rpx;
- }
- }
- .btn-right {
- position: relative;
- image {
- width: 40rpx;
- height: 44rpx;
- }
- }
- .container_box {
- .container_main {
- .header-box {
- image {
- width: 100%;
- height: 375rpx;
- }
- }
- }
- .container_cont {
- padding: 32rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- flex-wrap: wrap;
- .operate-item {
- width: 326rpx;
- height: 262rpx;
- border-radius: 16rpx;
- background: #FFF;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- margin-bottom: 32rpx;
- .operate-img {
- position: relative;
- image {
- width: 128rpx;
- height: 128rpx;
- }
- }
- .operate-text {
- color: #333;
- font-family: "PingFang SC";
- font-size: 32rpx;
- font-weight: 500;
- margin-top: 20rpx;
- }
- }
- }
- }
-
- .reason-box {
- width: 700rpx;
- background: url('https://qiuyu-shuzhi.oss-cn-beijing.aliyuncs.com/image/task-pop-bg.png') no-repeat;
- background-size: 100% 100%;
- padding: 0 60rpx 46rpx;
- box-sizing: border-box;
- .icon-img {
- width: 200rpx;
- height: 200rpx;
- border-radius: 50%;
- position: absolute;
- top: -100rpx;
- left: 50%;
- transform: translateX(-50%);
- }
- .reason-box-title {
- padding-top: 150rpx;
- color: #1D212A;
- font-family: "PingFang SC";
- font-size: 32rpx;
- font-weight: bold;
- text-align: center;
- }
- .btn-box {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 60rpx;
- .cancel-btn,
- .confirm-btn {
- width: 244rpx;
- height: 80rpx;
- border-radius: 16rpx;
- font-size: 32rpx;
- }
- .cancel-btn {
- border: 1px solid #BFC8DB;
- color: #86909C;
- }
- .confirm-btn {
- background: #0256FF;
- color: #FFF;
- font-weight: 500;
- }
- }
- }
- </style>
|