zhb 2 månader sedan
förälder
incheckning
aa85be7f67

+ 1 - 32
components/LanguageDropdown.vue

@@ -1,6 +1,6 @@
 <template>
   <cwg-dropdown :menu-list="customMenuList" @menuClick="handleMenuClick">
-    <view class="lang-select">
+    <view class="pc-header-btn">
       <cwg-icon name="cwg-lang" color="#141d22" />
     </view>
   </cwg-dropdown>
@@ -52,37 +52,6 @@ function getFlagSrc(code: string) {
 
 <style scoped lang="scss">
 @import "@/uni.scss";
-
-.lang-select {
-  width: px2rpx(40);
-  height: px2rpx(40);
-  border-radius: px2rpx(4);
-  border: 1px solid rgba(108, 133, 149, 0);
-  display: flex;
-  align-items: center;
-  font-size: px2rpx(14);
-  cursor: pointer;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-
-  &:hover {
-    background: rgba(108, 133, 149, 0.12);
-    border-color: rgb(145, 163, 176);
-  }
-}
-
-.flag {
-  width: 22px;
-  height: 16px;
-  margin-right: 6px;
-}
-
-.arrow {
-  margin-left: 4px;
-  font-size: 12px;
-}
-
 :deep(.cwg-dropdown-menu-container .menu .menu-item) {
   min-height: px2rpx(36);
 }

+ 5 - 2
components/cwg-page-wrapper.vue

@@ -1,7 +1,8 @@
 <template>
   <view :class="['page-wrapper', { dark: isDark }]">
     <cwg-match-media :max-width="991" v-if="!isLoginPage">
-      <cwg-pc-header @open-right-drawer="openRightDrawer" @open-left-drawer="openLeftDrawer" class="header-box" :sidebarVisible="sidebarVisible" />
+      <cwg-pc-header @open-right-drawer="openRightDrawer" @open-left-drawer="openLeftDrawer" class="header-box"
+        :sidebarVisible="sidebarVisible" />
       <!--      占位-->
       <view class="fixed"></view>
     </cwg-match-media>
@@ -75,7 +76,9 @@ const isTabBarPage = ref(false)
 
 const rightDrawerRef = ref<any>(null)
 
-
+uni.$on('open-right-drawer', (data) => {
+  openRightDrawer()
+})
 function openRightDrawer() {
   rightDrawerRef.value?.open()
 }

+ 6 - 32
components/cwg-pc-header.vue

@@ -8,10 +8,12 @@
 			<image class="left-img" src="/static/images/logo.png" mode="widthFix" alt="logo" />
 		</div>
 		<div class="right">
-			<text class="icon bell">🔔<text class="dot"></text></text>
-			<text class="icon logo" @click="openRightDrawer">
-				<image class="img" src="/static/logo.png" alt="logo" />
-			</text>
+			<view class="pc-header-btn">
+				<cwg-icon name="xxtz" color="#141d22" />
+			</view>
+			<view class="pc-header-btn" @click="openRightDrawer">
+				<cwg-icon name="icon_my" color="#141d22" />
+			</view>
 		</div>
 	</header>
 </template>
@@ -79,34 +81,6 @@ function openLeftDrawer() {
 .right {
 	display: flex;
 	align-items: center;
-	gap: 18px;
-}
-
-.lang-select {
-	display: flex;
-	align-items: center;
-	background: #f5f7fa;
-	border-radius: 18px;
-	padding: 4px 12px;
-	font-size: 14px;
-	cursor: pointer;
-}
-
-.flag {
-	width: 22px;
-	height: 16px;
-	margin-right: 6px;
-}
-
-.arrow {
-	margin-left: 4px;
-	font-size: 12px;
-}
-
-.icon {
-	font-size: 20px;
-	position: relative;
-	cursor: pointer;
 }
 
 .bell .dot {

+ 2 - 4
components/cwg-sidebar.vue

@@ -38,11 +38,9 @@ interface MenuItem {
 }
 const emit = defineEmits(['menu-click']);
 const currentLang = computed(() => lang.value || locale.value)
-const currentLabel = computed(() => t(`language.${currentLang.value}`))
-
 const customMenuList = computed(() =>
     localesList.map((code) => ({
-        label: t(`language.${code}`),
+        label: `language.${code}`,
         lang: code,
         type: "lang",
         path: '/'
@@ -110,7 +108,7 @@ const menu = ref<MenuItem[]>(
             ]
         },
         {
-            path: '/pages/customer/support', isOpenMenu: false, label: currentLabel.value, icon: 'cwg-lang',
+            path: '/', isOpenMenu: false, label: 'language.index', icon: 'cwg-lang',
             children: customMenuList.value
         },
     ]);

+ 1 - 0
locale/ar.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "اختر اللغة",
+    "index": "العربية",
     "cn": "简体中文",
     "zh": "繁體中文",
     "en": "English",

+ 5 - 0
locale/cn.json

@@ -18,6 +18,10 @@
     "day": "日",
     "upload": "上传"
   },
+  "Latest": {
+    "PaymentWallet": "支付与钱包",
+    "More": "更多"
+  },
   "pages": {
     "login": {
       "index": "登录",
@@ -223,6 +227,7 @@
   },
   "language": {
     "selectLang": "选择语言",
+    "index": "简体中文",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/de.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Sprache auswählen",
+    "index": "Deutsch",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/en.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Select Language",
+    "index": "English",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/es.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Seleccionar idioma",
+    "index": "Español",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/fa.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "انتخاب زبان",
+    "index": "فارسی",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/id.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Pilih bahasa",
+    "index": "Indonesian",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/ko.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "언어 선택",
+    "index": "한국어",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/ms.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Pilih bahasa",
+    "index": "Malay",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/pt.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Selecionar idioma",
+    "index": "Português",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/th.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "เลือกภาษา",
+    "index": "ไทย",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/tr.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Dil seç",
+    "index": "Türkçe",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/vn.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "Chọn ngôn ngữ",
+    "index": "Tiếng Việt",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 1 - 0
locale/zhHant.json

@@ -222,6 +222,7 @@
   },
   "language": {
     "selectLang": "選擇語言",
+    "index": "繁體中文",
     "cn": "简体中文",
     "zhHant": "繁體中文",
     "en": "English",

+ 35 - 14
static/scss/global/global.scss

@@ -1025,21 +1025,23 @@ uni-content {
     // border: 1px solid rgba(108, 133, 149, 0.12);
     border-radius: px2rpx(8);
 }
-.crm-title-box{
-  background-color: var(--color-gray-second);
-  color: var(--color-white);
-  height: 40px;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 10px;
-  border-radius: 2px;
-  padding: 0 20px;
-  .tit {
-    font-size: 14px;
-    font-weight: bold;
+
+.crm-title-box {
+    background-color: var(--color-gray-second);
     color: var(--color-white);
-  }
+    height: 40px;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 10px;
+    border-radius: 2px;
+    padding: 0 20px;
+
+    .tit {
+        font-size: 14px;
+        font-weight: bold;
+        color: var(--color-white);
+    }
 }
 
 @media screen and (max-width: 991px) {
@@ -1138,4 +1140,23 @@ uni-content {
     &:active {
         transform: scale(0.95);
     }
+}
+
+.pc-header-btn {
+    width: px2rpx(40);
+    height: px2rpx(40);
+    border-radius: px2rpx(4);
+    border: 1px solid rgba(108, 133, 149, 0);
+    display: flex;
+    align-items: center;
+    font-size: px2rpx(14);
+    cursor: pointer;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+
+    &:hover {
+        background: rgba(108, 133, 149, 0.12);
+        border-color: rgb(145, 163, 176);
+    }
 }

+ 8 - 49
windows/top-window.vue

@@ -5,10 +5,12 @@
 		</div>
 		<div class="right">
 			<LanguageDropdown />
-			<text class="icon bell">🔔<text class="dot"></text></text>
-			<text class="icon logo" @click="openRightDrawer">
-				<image class="img" src="/static/logo.png" alt="logo" />
-			</text>
+			<view class="pc-header-btn">
+				<cwg-icon name="xxtz" color="#141d22" />
+			</view>
+			<view class="pc-header-btn">
+				<cwg-icon name="icon_my" color="#141d22" @click="openRightDrawer" />
+			</view>
 		</div>
 	</header>
 </template>
@@ -25,21 +27,11 @@ const props = defineProps({
 		default: false
 	},
 })
-const emit = defineEmits<{
-	(e: 'open-right-drawer'): void
-}>()
-
-function toggleTheme() {
-	// globalStore.setGlobalTheme(globalStore.theme === 'light' ? 'dark' : 'light');
-}
 
 function openRightDrawer() {
-	emit('open-right-drawer');
+	uni.$emit('open-right-drawer')
 }
 
-function openLeftDrawer() {
-	emit('open-left-drawer');
-}
 </script>
 
 <style scoped lang="scss">
@@ -60,12 +52,6 @@ function openLeftDrawer() {
 	align-items: center;
 }
 
-.back-arrow {
-	color: #e74c3c;
-	font-size: 22px;
-	cursor: pointer;
-	margin-right: 16px;
-}
 
 .center {
 	flex: 1;
@@ -74,34 +60,7 @@ function openLeftDrawer() {
 .right {
 	display: flex;
 	align-items: center;
-	gap: 18px;
-}
-
-.lang-select {
-	display: flex;
-	align-items: center;
-	background: #f5f7fa;
-	border-radius: 18px;
-	padding: 4px 12px;
-	font-size: 14px;
-	cursor: pointer;
-}
-
-.flag {
-	width: 22px;
-	height: 16px;
-	margin-right: 6px;
-}
-
-.arrow {
-	margin-left: 4px;
-	font-size: 12px;
-}
-
-.icon {
-	font-size: 20px;
-	position: relative;
-	cursor: pointer;
+	gap: 0;
 }
 
 .bell .dot {