Browse Source

增加组件

wangning 5 years ago
parent
commit
ffcdb93924

+ 4 - 0
ghsApp/src/admin/home/apply.vue

@@ -28,8 +28,12 @@
 </template>
 
 <script>
+import noneHd from "@/components/none-hd";
     export default { // 应用页面
         name:'Apply',
+        components: {
+          noneHd
+        },
         data(){
             return {
                 menuList: [

+ 2 - 0
ghsApp/src/admin/home/me.vue

@@ -146,6 +146,7 @@ import { selectShop } from "@/mixins";
 import { getUser } from "@/utils/auth";
 import { list } from "@/mixins";
 import { mapGetters } from "vuex";
+import noneHd from "@/components/none-hd";
 export default {
   // 我的
   name: "Me",
@@ -153,6 +154,7 @@ export default {
     AppAvatarModule,
     TuiListCell,
     DorpdownSelect,
+    noneHd
   },
   mixins: [selectShop, list],
   computed: {

+ 2 - 0
ghsApp/src/admin/home/member.vue

@@ -69,6 +69,7 @@ import appVipModule from "@/components/module/app-vip";
 import AppTag from "@/components/module/app-tag.vue";
 import { list } from "@/mixins";
 import { getClass, getList } from "@/api/member";
+import noneHd from "@/components/none-hd";
 export default {
   name: "admin-memebr",
   components: {
@@ -78,6 +79,7 @@ export default {
     AppWrapperEmpty,
     appVipModule,
     AppTag,
+    noneHd
   },
   mixins: [list],
   data() {

+ 2 - 0
ghsApp/src/admin/home/order.vue

@@ -151,6 +151,7 @@ import AppSearchModule from "@/components/module/app-search";
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 import AppAvatarModule from "@/components/module/app-avatar";
 import rangeDatePick from "@/components/pyh-rdtpicker/pyh-rdtpicker.vue";
+import noneHd from "@/components/none-hd";
 export default {
   name: "order-list",
   components: {
@@ -162,6 +163,7 @@ export default {
     AppSearchModule,
     DorpdownSelect,
     AppAvatarModule,
+    noneHd
   },
   mixins: [list],
   computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },

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

@@ -123,6 +123,7 @@ import { getDataTimestamp } from "@/utils/common";
 import { getWeixinId } from "@/api/invite/index";
 import { getUser } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
+import noneHd from "@/components/none-hd";
 // import priceSocket from "@/mixins/priceSocket";
 
 export default {
@@ -130,7 +131,8 @@ export default {
 	components: {
 		ModalModule,
 		FabModule,
-		AppAvatarModule
+		AppAvatarModule,
+    noneHd
 	},
 	// mixins:[priceSocket],
 	data() {

+ 46 - 16
ghsApp/src/components/none-hd.vue

@@ -1,59 +1,89 @@
 <template>
   <view class="model" v-if="show">
-    <image :src="`${constant.imgUrl}/ghs/home/deserve.png`" class="noData_img"></image>
-    <view class="no_data_text">您还没有花店,无法采购哦~</view>
-    <view class="freeApply" @click=" pageTo({url: '/pagesClient/official/index'})">免费申请</view>
+    <image
+      :src="`${constant.imgUrl}/ghs/home/deserve.png`"
+      class="noData_img"
+    ></image>
+    <view class="no_data_text">{{title}}</view>
+    <view class="freeApply" @click="apply">{{btnText}}</view>
+    <view class="experience" v-if="authShow" @click="experienceClick">体验</view>
   </view>
 </template>
 
 <script>
 export default {
   props: {
-    show:{
-      type:Boolean,
-      default: true
+    show: {
+      type: Boolean,
+      default: true,
     },
+    btnText: {
+      type: String,
+      default: '222',
+    },
+    title: {
+      type: String,
+      default: '111',
+    },
+    authShow: {
+      type: Boolean,
+      default: false,
+    }
   },
   data() {
     return {
       constant: this.$constant,
+    };
+  },
+  methods: {
+    apply() {
+      this.$emit('bthClick')
+    },
+    experienceClick(){
+      this.$emit('experienceClick')
     }
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-.model{
+.model {
   position: fixed;
   z-index: 9999;
   top: 0;
   left: 0;
   width: 100vw;
   height: 100vh;
-  background: rgba(0,0,0, 0.6);
+  background: rgba(0, 0, 0, 0.6);
   color: #fff;
+  overflow: hidden;
   text-align: center;
-  &>.noData_img{
+  & > .noData_img {
     width: 318upx;
     height: 318upx;
     margin: 332upx auto 0;
   }
-  &>.no_data_text{
+  & > .no_data_text {
     font-size: 32px;
-    color: #FFFFFF;
+    color: #ffffff;
     text-align: center;
     margin: 50upx 0;
   }
-  &>.freeApply{
+  & > .freeApply {
     width: 376px;
     height: 88px;
     line-height: 88upx;
-    background: linear-gradient(90deg, #3385FF, #33B0FF);
+    background: linear-gradient(90deg, #3385ff, #33b0ff);
     border-radius: 44px;
     margin: 0 auto;
     font-size: 32px;
-    color: #FFFFFF;
+    color: #ffffff;
     text-align: center;
   }
+  &>.experience{
+    margin-top: 40upx;
+    color: #fff;
+    font-size: 30upx;
+  }
 }
 </style>

+ 5 - 1
ghsApp/src/mixins/globalMixins.js

@@ -13,7 +13,11 @@ export default {
 			// 全局混入,插入全局工具函数
 			$util: this.$util,
 			// 全局混入,插入全局跳转函数
-			pageTo: pageTo
+      pageTo: pageTo,
+      AUTHORITY_SHOW: false,
+      shopAdminId: null,
+      MODEL_TITLE: '您还没有网店哦',
+      MODEL_BTN_TEXT: '免费申请'
 		}
 	},
 	computed: {