Browse Source

首页取消请求菜单

xiaochengxu
qb 1 year ago
parent
commit
28b43d5f5c
  1. 238
      pages/index/index.vue
  2. 8
      unpackage/dist/dev/mp-weixin/api/user.js
  3. 44
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  4. 2
      unpackage/dist/dev/mp-weixin/project.config.json
  5. 6
      unpackage/dist/dev/mp-weixin/utils/cacheimg.js

238
pages/index/index.vue

@ -193,125 +193,125 @@
}
async function init() {
let tabber = uni.getStorageSync('homerouter')
if (tabber) {
details.tablist = tabber
return
}
let res = await appMenuroutes({})
console.log(res, '-------------');
console.log('刷新后')
if (res.code == 200) {
//
getimgcache(res.data[0])
//
// details.tablist = [
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/ordersorting/ordersorting',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/lnventorysorting/lnventorysorting',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/ScanUpType/ScanUpType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/PeopleScanUpType/PeopleScanUpType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/RelocationType/RelocationType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/Retention/Retention',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/MergeTray/MergeTray',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/DownGoodsType/DownGoodsType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/RemoveTray/RemoveTray',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/Check/Check',
// },
// ]
// },
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/pickingScan/pickingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/SelfPickupScan/SelfPickupScan',
// },
// ]
// },
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/LoadingScan/LoadingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/signinScan/signinScan',
// },
// ]
// },
// {
// type: 1,
// name: '线',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '线',
// router: '/pagesHome/pages/OfflineUpload/OfflineUpload',
// },
// ]
// },
// ]
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
// let tabber = uni.getStorageSync('homerouter')
// if (tabber) {
// details.tablist = tabber
// return
// }
// let res = await appMenuroutes({})
// console.log(res, '-------------');
// console.log('')
// if (res.code == 200) {
//
// getimgcache(res.data[0])
//
// details.tablist = [
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/ordersorting/ordersorting',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/lnventorysorting/lnventorysorting',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/ScanUpType/ScanUpType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/PeopleScanUpType/PeopleScanUpType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/RelocationType/RelocationType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/Retention/Retention',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/MergeTray/MergeTray',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/DownGoodsType/DownGoodsType',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/RemoveTray/RemoveTray',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/Check/Check',
// },
// ]
// },
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/pickingScan/pickingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/SelfPickupScan/SelfPickupScan',
// },
// ]
// },
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/LoadingScan/LoadingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/signinScan/signinScan',
// },
// ]
// },
// {
// type: 1,
// name: '线',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '线',
// router: '/pagesHome/pages/OfflineUpload/OfflineUpload',
// },
// ]
// },
// ]
// } else {
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
// }
}
async function initbuts() {
let authbut = uni.getStorageSync('authbuts')

8
unpackage/dist/dev/mp-weixin/api/user.js vendored

@ -386,13 +386,6 @@ function warehouseTrayTypezeroOrderUpdateRemark(data) {
data
});
}
function appMenuroutes(data) {
return utils_request.service({
url: `blade-system/app/routes`,
method: "get",
data
});
}
function appbuttons(data) {
return utils_request.service({
url: `blade-system/app/buttons`,
@ -1064,7 +1057,6 @@ exports.addvaluegetAllPackageList = addvaluegetAllPackageList;
exports.addvaluesaveAddvalueInfo = addvaluesaveAddvalueInfo;
exports.addvaluescanAddvaluePackage = addvaluescanAddvaluePackage;
exports.addvalueupdateAddvalueInfo = addvalueupdateAddvalueInfo;
exports.appMenuroutes = appMenuroutes;
exports.appbuttons = appbuttons;
exports.billLadingZeroBillOrderData = billLadingZeroBillOrderData;
exports.billLadingdetailList = billLadingdetailList;

44
unpackage/dist/dev/mp-weixin/pages/index/index.js vendored

@ -1,7 +1,6 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_user = require("../../api/user.js");
const utils_cacheimg = require("../../utils/cacheimg.js");
require("../../utils/request.js");
require("../../store/index.js");
require("../../utils/functions.js");
@ -178,22 +177,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
});
}
async function init() {
let tabber = common_vendor.index.getStorageSync("homerouter");
if (tabber) {
details.tablist = tabber;
return;
}
let res = await api_user.appMenuroutes({});
console.log(res, "-------------");
console.log("刷新后");
if (res.code == 200) {
getimgcache(res.data[0]);
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initbuts() {
let authbut = common_vendor.index.getStorageSync("authbuts");
@ -230,33 +213,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
common_vendor.index.setStorageSync("homerouter", details.tablist);
}
});
async function getimgcache(list) {
let maxarr = [];
if (!list)
return;
for (let item of list.children) {
let arr = {
type: 1,
name: item.name,
minilist: []
};
for (let ite of item.children) {
let result = null;
if (ite.source != null) {
result = await utils_cacheimg.getImageCache(ite.source);
}
let obj = {
icon: result,
name: ite.name,
router: ite.path
};
arr.minilist.push(obj);
}
maxarr.push(arr);
}
details.tablist = maxarr;
console.log(details.tablist);
}
const { tablist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return {

2
unpackage/dist/dev/mp-weixin/project.config.json vendored

@ -13,8 +13,6 @@
"bigPackageSizeSupport": true,
"ignoreDevUnusedFiles": false,
"lazyCodeLoading": "requiredComponents",
"enhance": false,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],

6
unpackage/dist/dev/mp-weixin/utils/cacheimg.js vendored

@ -1,7 +1 @@
"use strict";
function getImageCache(filePath, fileMd51) {
return new Promise((resolve, reject) => {
resolve(filePath);
});
}
exports.getImageCache = getImageCache;

Loading…
Cancel
Save