Bladeren bron

登录优化

shish 4 jaren geleden
bovenliggende
commit
0100f0acc4

+ 21 - 16
ghsApp/src/admin/home/apply.vue

@@ -1,27 +1,32 @@
 <template>
-    <view class="app-content">
-        <view class="apply-content_box">
-            <view v-for="item in menuList" :key="item.title" class="apply-list_box">
-                <view class="tit">
-                    {{item.title}}
-                </view>
-                <view class="tabs-wrap">
-                    <view v-for="s in item.list" :key="s.url" class="tabs-list">
-                        <view @click="pageTo(s)">
-                        <view class="tabs-img">
-                            <image :src="s.img" alt mode="widthFix" ></image>
-                        </view>
-                        <view class="tabs-name">{{s.name}}</view>
-                        </view>
-                    </view>
-                </view> 
+<view class="app-content">
+    <view class="apply-content_box">
+        <view v-for="item in menuList" :key="item.title" class="apply-list_box">
+            <view class="tit">
+                {{item.title}}
             </view>
+            <view class="tabs-wrap">
+                <view v-for="s in item.list" :key="s.url" class="tabs-list">
+                    <view @click="pageTo(s)">
+                    <view class="tabs-img">
+                        <image :src="s.img" alt mode="widthFix" ></image>
+                    </view>
+                    <view class="tabs-name">{{s.name}}</view>
+                    </view>
+                </view>
+            </view> 
         </view>
     </view>
+    <NotLogin></NotLogin>
+</view>
 </template>
 <script>
+import NotLogin from "@/components/not-login";
 export default {
     name:'Apply',
+    components: {
+        NotLogin
+    },
     data(){
         return {
             menuList: [

+ 3 - 1
ghsApp/src/admin/home/me.vue

@@ -105,9 +105,9 @@
       </view>
     </template>
     <ShopSelect ref="shopSelectComponent" class="bar" :isShowTit="false" top="0upx" @selectShopFn="selectShopFn" />
+    <NotLogin></NotLogin>
   </view>
 </template>
-
 <script>
 import AppAvatarModule from "@/components/module/app-avatar";
 import TuiListCell from "@/components/plugin/list-cell";
@@ -116,12 +116,14 @@ import { toggleShop } from "@/api/common";
 import ShopSelect from "@/components/module/shopSelect";
 import { list } from "@/mixins";
 import { mapGetters } from "vuex";
+import NotLogin from "@/components/not-login";
 export default {
   name: "me",
   components: {
     AppAvatarModule,
     TuiListCell,
     ShopSelect,
+    NotLogin
   },
   mixins: [list],
   computed: {

+ 6 - 3
ghsApp/src/admin/home/member.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-main app-content">
+  <view class="app-main app-content">
     <view class="input-wrap_box">
       <view>
         <AppSearchModule placeholder="输入英文字母搜索" @input="searchFn"/>
@@ -49,11 +49,13 @@
       <app-wrapper-empty :is-empty="$util.isEmpty(list.data)" />
     </block>
     </div>
-  </div>
+    <NotLogin></NotLogin>
+  </view>
 </template>
 
 <script>
 import AppTabs from "@/components/plugin/tabs";
+import NotLogin from "@/components/not-login";
 import TuiListCell from "@/components/plugin/list-cell";
 import BadgeModule from "@/components/plugin/badge";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
@@ -71,7 +73,8 @@ export default {
     AppWrapperEmpty,
     appVipModule,
     AppTag,
-    AppSearchModule
+    AppSearchModule,
+    NotLogin
   },
   mixins: [list],
   data() {

+ 7 - 3
ghsApp/src/admin/home/order.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-main app-content">
+  <view class="app-main app-content">
     <view class="input-wrap_box">
 
       <view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
@@ -42,10 +42,13 @@
       </block>
     </div>
 
-  </div>
+    <NotLogin></NotLogin>
+
+  </view>
 </template>
 <script>
 import AppTabs from "@/components/plugin/tabs";
+import NotLogin from "@/components/not-login";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ModalModule from "@/components/plugin/modal";
 import { list } from "@/mixins";
@@ -65,7 +68,8 @@ export default {
     AppSearchModule,
     DropShopSelect,
     OrderItem,
-    DateSelect
+    DateSelect,
+    NotLogin
   },
   mixins: [list,orderMixin],
   computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },

+ 1 - 1
ghsApp/src/admin/home/workbench.vue

@@ -83,7 +83,7 @@
 			</div>
 		</div>
 
-		<view v-if="$util.isEmpty(getLoginInfo.admin) || getLoginInfo.admin.currentShopId == 0"><NotLogin @goToLogin="goToLogin()"></NotLogin></view>
+		<NotLogin></NotLogin>
 
 	</view>
 </template>

+ 24 - 1
ghsApp/src/components/not-login.vue

@@ -1,6 +1,29 @@
 <template>
-  <view class="model" @click="pageTo({url:'/admin/home/login'})"></view>
+  <view class="model" v-if="showModel" @click="pageTo({url:'/admin/home/login'})"></view>
 </template>
+<script>
+import { mapGetters,mapActions } from "vuex";
+export default {
+	name: "not-login",
+	components: {},
+	mixins: [],
+  data() {
+		return {
+      showModel:false
+    }
+  },
+	computed: {
+		...mapGetters({ loginInfo: "getLoginInfo" })
+	},
+	mounted() {
+    if(this.$util.isEmpty(this.loginInfo.admin) || this.loginInfo.admin.currentShopId == 0){
+      this.showModel = true
+    }
+	},
+  methods: {
+  }
+}
+</script>
 <style lang="scss" scoped>
 .model {
   position: fixed;

+ 10 - 22
hdApp/src/admin/home/apply.vue

@@ -1,27 +1,12 @@
 <template>
   <view class="app-content">
     <view class="apply-content_box">
-      <view
-        v-for="item in menuList"
-        :key="item.title"
-        class="apply-list_box"
-      >
-        <view class="tit">
-          {{item.title}}
-        </view>
+      <view v-for="item in menuList" :key="item.title" class="apply-list_box" >
+        <view class="tit"> {{item.title}} </view>
         <div class="tabs-wrap">
-          <div
-            v-for="s in item.list"
-            :key="s.url"
-            class="tabs-list"
-          >
+          <div v-for="s in item.list" :key="s.url" class="tabs-list" >
             <div @click="pageTo(s)">
-              <div class="tabs-img">
-                <img
-                  :src="s.img"
-                  alt
-                  mode="widthFix"
-                />
+              <div class="tabs-img"> <img :src="s.img" alt mode="widthFix" />
               </div>
               <div class="tabs-name">{{s.name}}</div>
             </div>
@@ -29,13 +14,16 @@
         </div>
       </view>
     </view>
-    <!-- <kd-entrance></kd-entrance> -->
+    <NotLogin></NotLogin>
   </view>
 </template>
-
 <script>
+import NotLogin from "@/components/not-login";
 export default { // 应用页面
-  name: 'Apply',
+  name: 'apply',
+  components: {
+    NotLogin
+  },
   data () {
     return {
       menuList: [

+ 3 - 0
hdApp/src/admin/home/me.vue

@@ -87,6 +87,7 @@
       </view>
     </template>
     <DorpdownSelect ref="dorpdownSelect" :menuObj.sync="menuObj" top="0upx" :isShowTit="false" :selectItemId.sync="shopId" @selectSussess="changeShop()" ></DorpdownSelect>
+    <NotLogin></NotLogin>
   </view>
 </template>
 <script>
@@ -99,12 +100,14 @@ import { selectShop } from "@/mixins";
 import { getUser } from "@/utils/auth";
 import { list } from "@/mixins";
 import { mapGetters } from "vuex";
+import NotLogin from "@/components/not-login";
 export default {
   name: "me",
   components: {
     AppAvatarModule,
     TuiListCell,
     DorpdownSelect,
+    NotLogin
   },
   mixins: [selectShop, list],
   computed: {

+ 5 - 2
hdApp/src/admin/home/member.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-main app-content">
+  <view class="app-main app-content">
     <block v-if="!$util.isEmpty(list.data)">
       <block v-for="(item,index) in list.data" :key="index">
         <tui-list-cell :arrow="true" @click="pageTo({ url: '/admin/member/detail', query: { id: item.id } })" >
@@ -24,7 +24,8 @@
     <block v-else>
       <app-wrapper-empty :is-empty="true" />
     </block>
-  </div>
+    <NotLogin></NotLogin>
+  </view>
 </template>
 <script>
 import AppTabs from "@/components/plugin/tabs";
@@ -35,6 +36,7 @@ import appVipModule from "@/components/module/app-vip";
 import AppTag from '@/components/module/app-tag.vue'
 import { list } from "@/mixins";
 import { getList } from "@/api/member";
+import NotLogin from "@/components/not-login";
 export default {
   name: "admin-memebr",
   components: {
@@ -44,6 +46,7 @@ export default {
     AppWrapperEmpty,
     appVipModule,
     AppTag,
+    NotLogin
   },
   mixins: [list],
   data() {

+ 5 - 2
hdApp/src/admin/home/order.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-main app-content">
+  <view class="app-main app-content">
     <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
     <div class="list-wrap">
       <block v-if="!$util.isEmpty(list.data)">
@@ -75,7 +75,8 @@
         </div>
       </template>
     </modal-module>
-  </div>
+    <NotLogin></NotLogin>
+  </view>
 </template>
 <script>
 import AppTabs from "@/components/plugin/tabs";
@@ -87,6 +88,7 @@ import { list } from "@/mixins";
 import { mapGetters } from 'vuex';
 import { orderClass } from '@/api/order'
 import { getListB, freeShipping } from "@/api/order";
+import NotLogin from "@/components/not-login";
 export default {
   name: "order-list",
   components: {
@@ -94,6 +96,7 @@ export default {
     AppTabs,
     AppWrapperEmpty,
     ModalModule,
+    NotLogin
   },
   mixins: [list],
   data () {

+ 4 - 7
hdApp/src/admin/home/workbench.vue

@@ -66,23 +66,20 @@
         </div>
       </div>
     </div>
+    <NotLogin></NotLogin>
   </div>
 </template>
 <script>
 import { mapGetters, mapState } from "vuex";
-import FabModule from "@/components/plugin/fab";
-import AppAvatarModule from "@/components/module/app-avatar";
-import ModalModule from "@/components/plugin/modal";
 import { getDataTimestamp } from "@/utils/common";
 import { getWeixinId } from "@/api/invite/index";
 import { getUser } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
+import NotLogin from "@/components/not-login";
 export default {
-  name: "admin-workbench",
+  name: "workbench",
   components: {
-    ModalModule,
-    FabModule,
-    AppAvatarModule
+    NotLogin
   },
   data () {
     return {

+ 19 - 17
hdApp/src/components/not-login.vue

@@ -1,27 +1,28 @@
 <template>
-  <view class="model" @click="goToLogin()" v-if="show">
-  </view>
+  <view class="model" v-if="showModel" @click="pageTo({url:'/admin/home/login'})"></view>
 </template>
 <script>
+import { mapGetters,mapActions } from "vuex";
 export default {
-  props: {
-    show: {
-      type: Boolean,
-      default: true,
-    }
-  },
-  watch: {
-  },
+	name: "not-login",
+	components: {},
+	mixins: [],
   data() {
-    return {
-    };
-  },
-  methods: {
-    goToLogin() {
-      this.$emit('goToLogin')
+		return {
+      showModel:false
     }
   },
-};
+	computed: {
+		...mapGetters({ loginInfo: "getLoginInfo" })
+	},
+	mounted() {
+    if(this.$util.isEmpty(this.loginInfo.admin) || this.loginInfo.admin.currentShopId == 0){
+      this.showModel = true
+    }
+	},
+  methods: {
+  }
+}
 </script>
 <style lang="scss" scoped>
 .model {
@@ -32,5 +33,6 @@ export default {
   width: 100vw;
   height: 100vh;
   background: rgba(0, 0, 0, 0.6);
+  opacity:0;
 }
 </style>