学习?学个屁 пре 2 недеља
родитељ
комит
a652f68af8
6 измењених фајлова са 34 додато и 68 уклоњено
  1. 1 1
      src/composables/useTheme.ts
  2. 2 2
      src/config/index.ts
  3. 2 1
      src/layouts/default.vue
  4. 6 9
      src/layouts/tabbar.vue
  5. 1 1
      src/manifest.json
  6. 22 54
      src/pages/index/index.vue

+ 1 - 1
src/composables/useTheme.ts

@@ -21,7 +21,7 @@ export const themeColorOptions: ThemeColorOption[] = [
 const useThemeStore = defineStore('theme', {
   state: () => ({
     theme: 'light' as 'light' | 'dark',
-    followSystem: true, // 是否跟随系统主题
+    followSystem: false, // 是否跟随系统主题
     hasUserSet: false, // 用户是否手动设置过主题
     currentThemeColor: themeColorOptions[0] as ThemeColorOption,
     showThemeColorSheet: false,

+ 2 - 2
src/config/index.ts

@@ -3,9 +3,9 @@ const mapEnvVersion = {
    * 	开发版
    */
   // develop: "http://192.168.1.166:8080/jeecg-boot",
-  develop: "http://192.168.0.217:8080/jeecg-boot",
+  // develop: "http://192.168.0.217:8080/jeecg-boot",
   // develop: "https://api.qlapp.cn/jeecgboot",
-  // develop: "http://192.168.0.11:8080/jeecg-boot",
+  develop: "http://192.168.0.11:8080/jeecg-boot",
   /**
    * 	体验版
    */

+ 2 - 1
src/layouts/default.vue

@@ -13,7 +13,8 @@ export default {
 </script>
 
 <template>
-  <wd-config-provider :theme-vars="themeVars" :theme="theme" :custom-class="`page-wraper ${theme}`">
+  <!-- :theme-vars="themeVars" :theme="theme" :custom-class="`page-wraper ${theme}`"-->
+  <wd-config-provider>
     <slot />
     <wd-notify />
     <wd-message-box />

+ 6 - 9
src/layouts/tabbar.vue

@@ -35,16 +35,13 @@ export default {
 </script>
 
 <template>
-  <wd-config-provider :theme-vars="themeVars" :custom-class="`page-wraper ${theme}`" :theme="theme">
+  <!-- :theme-vars="themeVars" :custom-class="`page-wraper ${theme}`" :theme="theme" -->
+  <wd-config-provider>
     <slot />
-    <wd-tabbar
-      :model-value="activeTabbar.name" placeholder bordered safe-area-inset-bottom fixed
-      @change="handleTabbarChange"
-    >
-      <wd-tabbar-item
-        v-for="(item, index) in tabbarList" :key="index" :name="item.name"
-        :value="getTabbarItemValue(item.name)" :title="item.title" :icon="item.icon"
-      />
+    <wd-tabbar :model-value="activeTabbar.name" placeholder bordered safe-area-inset-bottom fixed
+      @change="handleTabbarChange">
+      <wd-tabbar-item v-for="(item, index) in tabbarList" :key="index" :name="item.name"
+        :value="getTabbarItemValue(item.name)" :title="item.title" :icon="item.icon" />
     </wd-tabbar>
     <!-- #ifdef MP-WEIXIN -->
     <privacy-popup />

+ 1 - 1
src/manifest.json

@@ -42,7 +42,7 @@
   },
   "quickapp": {},
   "mp-weixin": {
-    "appid": "wx6260718c6fd46efb",
+    "appid": "wxe70e6c132e5b4c28",
     "setting": {
       "urlCheck": false
     },

+ 22 - 54
src/pages/index/index.vue

@@ -106,33 +106,18 @@ function getItemClass(path: string) {
 </script>
 
 <template>
-  <view
-    class="h-screen box-border header"
-    :style="{ paddingTop: `${statusBarHeight}px` }"
-  >
+  <view class="h-screen box-border header" :style="{ paddingTop: `${statusBarHeight}px` }">
     <view class="h-58rpx"></view>
     <view class="px-32rpx mt-48rpx" v-if="!token">
-      <view
-        class="bg-white rounded-16rpx flex items-center justify-between py-20rpx px-24rpx"
-      >
+      <view class="bg-white rounded-16rpx flex items-center justify-between py-20rpx px-24rpx">
         <view>您还未登录,快去登录吧!</view>
-        <commonbtn
-          bg-color="#0074FF"
-          @click="handleCommenPath('/pages/login/index')"
-          >去登录</commonbtn
-        >
+        <commonbtn bg-color="#0074FF" @click="handleCommenPath('/pages/login/index')">去登录</commonbtn>
       </view>
     </view>
     <view class="relative">
       <wd-drop-menu>
-        <wd-drop-menu-item
-          :options="dept.list"
-          v-model:model-value="orgCode"
-          value-key="orgCode"
-          label-key="departName"
-          :title="title"
-          @change="useUserStore().setTitile"
-        />
+        <wd-drop-menu-item :options="dept.list" v-model:model-value="orgCode" value-key="orgCode" label-key="departName"
+          :title="title" @change="useUserStore().setTitile" />
       </wd-drop-menu>
       <view class="absolute top-50% -translate-y-50% right-50rpx" v-if="token">
         <view class="flex items-center">
@@ -145,52 +130,32 @@ function getItemClass(path: string) {
     </view>
     <view class="px-32rpx">
       <view class="grid grid-cols-2 gap-3">
-        <view
-          class="flex items-center px-40rpx header rounded-2xl h-162rpx"
-          @click="handleCommenPath(item.route)"
-          v-for="item in topMenu"
-          :class="getItemClass(item.route)"
-          :key="item.id"
-        >
+        <view class="flex items-center px-40rpx header rounded-2xl h-162rpx" @click="handleCommenPath(item.route)"
+          v-for="item in topMenu" :class="getItemClass(item.route)" :key="item.id">
           <image :src="getIcon(item.route)" class="w-100rpx h-100rpx"></image>
           <view class="text-32rpx font-semibold">{{ item.name }}</view>
         </view>
       </view>
       <view class="mt-3" v-if="sysMsg">
-        <wd-notice-bar
-          :text="sysMsg.map((it) => it.titile)"
-          color="#000000"
-          background-color="#fff"
-          :delay="3"
-          direction="vertical"
-          @click="handleCommenPath('/subPack/notification/index')"
-        >
+        <wd-notice-bar :text="sysMsg.map((it) => it.titile)" color="#000000" background-color="#fff" :delay="3"
+          direction="vertical" @click="handleCommenPath('/subPack/notification/index')">
           <template #prefix>
-            <image
-              src="@/static/index/msg.png"
-              class="w-30rpx h-30rpx mr2"
-            ></image>
+            <image src="@/static/index/msg.png" class="w-30rpx h-30rpx mr2"></image>
           </template>
         </wd-notice-bar>
       </view>
       <view class="mt-3 rounded-2xl bg-white p-28rpx" v-if="StoreMenu">
         <view class="font-semibold text-32rpx">门店经营</view>
         <view class="grid grid-cols-4 gap-3 mt-3">
-          <view
-            class="flex items-center justify-center flex-col"
-            @click="handleCommenPath(item.route)"
-            v-for="item in StoreMenu"
-            :key="item.id"
-          >
+          <view class="flex items-center justify-center flex-col" @click="handleCommenPath(item.route)"
+            v-for="item in StoreMenu" :key="item.id">
             <image :src="getIcon(item.route)" class="w-52rpx h-52rpx"></image>
-            <view class="text-24rpx text-[rgb(0,0,0,0.6)] mt-3">{{
+            <view class="text-24rpx mt-3">{{
               item.name
             }}</view>
           </view>
-          <button
-            open-type="contact"
-            class="bg-transparent after:border-none after:h-full flex flex-col items-center justify-center p-l-0 pr-0"
-          >
+          <button open-type="contact"
+            class="bg-transparent after:border-none after:h-full flex flex-col items-center justify-center p-l-0 pr-0">
             <image src="@/static/index/kf.png" class="w-52rpx h-52rpx"></image>
             <view class="text-24rpx text-[rgb(0,0,0,0.6)] mt-3">平台客服</view>
           </button>
@@ -200,33 +165,36 @@ function getItemClass(path: string) {
   </view>
 </template>
 
-<route lang="json">
-{
+<route lang="json">{
   "name": "home",
   "style": {
     "navigationBarTitleText": "首页",
     "navigationStyle": "custom",
     "disableScroll": true
   }
-}
-</route>
+}</route>
 
 <style scoped lang="scss">
 :deep(.wd-drop-menu__list) {
   background-color: transparent !important;
+
   .wd-drop-menu__item {
     text-align: left !important;
+
     .wd-drop-menu__item-title {
       max-width: 300rpx !important;
     }
   }
 }
+
 .ls {
   background: linear-gradient(180deg, #ffecec 0%, #ffffff 100%);
 }
+
 .kc {
   background: linear-gradient(180deg, #fff9e5 0%, #ffffff 100%);
 }
+
 .sm {
   background: linear-gradient(180deg, #efffff 0%, #ffffff 100%);
 }