lilei 4 년 전
부모
커밋
50770d75eb
2개의 변경된 파일36개의 추가작업 그리고 0개의 파일을 삭제
  1. 18 0
      main.js
  2. 18 0
      pages.json

+ 18 - 0
main.js

@@ -20,6 +20,24 @@ Vue.prototype.toashMsg = function (title) {
 		duration: 2000
 	})
 }
+/**
+ * 权限检查
+ */
+Vue.prototype.$hasPermissions = function (value) {
+ let isExist = false;
+ let permissionsStr = store.state.vuex_userData.permCodes;
+ // console.log(permissionsStr,'permissionsStr')
+ if (permissionsStr == undefined || permissionsStr == null) {
+  return false;
+ }
+ let has = permissionsStr.find(item => {
+   return item == value
+ })
+ if (has) {
+  isExist = true;
+ }
+ return isExist;
+}
 const app = new Vue({
 	store,
     ...App

+ 18 - 0
pages.json

@@ -48,6 +48,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/goods/goods",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "商品",
+                "enablePullDownRefresh": false
+            }
+            
+        },
+		{
+            "path" : "pages/goods/goodsDetail",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "商品详情",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "white",