Browse Source

查询应用权限索引方式修改

xiaohaizhao 1 year ago
parent
commit
b8dbd10f27
1 changed files with 21 additions and 3 deletions
  1. 21 3
      pages/index/index.js

+ 21 - 3
pages/index/index.js

@@ -24,8 +24,10 @@ Page({
 			PageCur: options.PageCur
 		})
 		this.refreshData();
+
 		this.getCollectCount();
 		this.getFavoriteCount();
+
 		this.updateMsgCount();
 		this.getAnnunciate();
 		if (getApp().globalData.remindchangepassword_str) wx.showModal({
@@ -144,52 +146,69 @@ Page({
 			function getedd() {
 				let paths = [{
 					name: "商城",
+					key: "wmarket",
 					PageCur: "Market",
 					icon: "work-shangcheng"
 				}, {
 					name: "订货单",
+					key: "worderform",
 					path: "/packageA/orderForm/index",
 					icon: "work-dingdan"
 				}, {
 					name: "订单明细",
+					key: "worderdetails",
 					path: "/packageA/orderForm/rows",
 					icon: "work-dingdan"
 				}, {
 					name: "账户",
+					key: "waccount",
 					path: "/packageA/account/index",
 					icon: "work-zhanghu"
 				}, {
 					name: "促销活动",
+					key: "wdiscounts",
 					path: "/packageA/activity/index",
 					icon: "work-cuxiaohuodong"
 				}, {
 					name: "打款凭证",
+					key: "wpaymentdocument",
 					path: "/packageA/remitVoucher/index",
 					icon: "work-dakuanpingzheng"
 				}, {
 					name: "物流单",
+					key: "wlogisticsbill",
 					path: "/packageA/shipment/index",
 					icon: "icon-shouhuo"
 				}, {
 					name: "返退申请单",
+					key: "wreturn",
 					path: "/packageA/returnOne/index",
 					icon: "work-shujuchaxun"
 				}, {
 					name: "发货单",
+					key: "wdispatch",
 					path: "/packageA/dispatchBill/index",
 					icon: "icon-shouhuo"
 				}, {
 					name: "发货明细",
+					key: "wdeliverydetail",
 					path: "/packageA/dispatchBill/rows",
 					icon: "icon-shouhuo"
 				}, {
 					name: "工厂发退明细",
+					key: "wsentandback",
 					path: "/packageA/dispatchBill/sentandback",
 					icon: "icon-shouhuo"
 				}, {
 					name: "业绩目标",
+					key: "wtarget",
 					path: "/packageA/target/index",
 					icon: "work-yejimubiao"
+				}, {
+					name: "收藏夹",
+					key: "wfavorites",
+					path: "/packageA/favorites/index",
+					icon: "work-webshoucang"
 				}];
 				let edd = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-订单"], ["商品档案", "销售管理", "财务管理", "售后管理", "发货管理", "业绩查询"]),
 					list = [];
@@ -200,8 +219,9 @@ Page({
 							optionnames: s.meta.auth.map(a => a.optionname),
 						}
 						if (authList[s.name].options.some(s => s == "read")) {
-							let i = paths.findIndex(k => k.name == s.meta.title);
+							let i = paths.findIndex(k => k.key == s.name || k.name == s.meta.title);
 							if (i != -1) {
+								paths[i].name = s.meta.title;
 								paths[i].index = i;
 								paths[i].isneedpay = s.isneedpay;
 								list.push(paths[i])
@@ -280,8 +300,6 @@ Page({
 			setTimeout(this.refreshData, 10);
 			return;
 		}
-
-
 	},
 	/* 获取通告列表 */
 	/**