chenfuhao 1 tydzień temu
rodzic
commit
f121651be1

+ 45 - 45
pnpm-lock.yaml

@@ -5729,20 +5729,20 @@ snapshots:
 
   '@babel/generator@7.26.2':
     dependencies:
-      '@babel/parser': 7.26.2
-      '@babel/types': 7.26.0
-      '@jridgewell/gen-mapping': 0.3.5
+      '@babel/parser': 7.26.10
+      '@babel/types': 7.26.10
+      '@jridgewell/gen-mapping': 0.3.8
       '@jridgewell/trace-mapping': 0.3.25
       jsesc: 3.0.2
 
   '@babel/helper-annotate-as-pure@7.25.9':
     dependencies:
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
 
   '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9':
     dependencies:
       '@babel/traverse': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
     transitivePeerDependencies:
       - supports-color
 
@@ -5779,23 +5779,23 @@ snapshots:
       '@babel/core': 7.26.0
       '@babel/helper-compilation-targets': 7.25.9
       '@babel/helper-plugin-utils': 7.25.9
-      debug: 4.3.7
+      debug: 4.4.0
       lodash.debounce: 4.0.8
-      resolve: 1.22.8
+      resolve: 1.22.10
     transitivePeerDependencies:
       - supports-color
 
   '@babel/helper-member-expression-to-functions@7.25.9':
     dependencies:
       '@babel/traverse': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
     transitivePeerDependencies:
       - supports-color
 
   '@babel/helper-module-imports@7.25.9':
     dependencies:
       '@babel/traverse': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
     transitivePeerDependencies:
       - supports-color
 
@@ -5810,7 +5810,7 @@ snapshots:
 
   '@babel/helper-optimise-call-expression@7.25.9':
     dependencies:
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
 
   '@babel/helper-plugin-utils@7.25.9': {}
 
@@ -5837,14 +5837,14 @@ snapshots:
   '@babel/helper-simple-access@7.25.9':
     dependencies:
       '@babel/traverse': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
     transitivePeerDependencies:
       - supports-color
 
   '@babel/helper-skip-transparent-expression-wrappers@7.25.9':
     dependencies:
       '@babel/traverse': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
     transitivePeerDependencies:
       - supports-color
 
@@ -5858,14 +5858,14 @@ snapshots:
     dependencies:
       '@babel/template': 7.25.9
       '@babel/traverse': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
     transitivePeerDependencies:
       - supports-color
 
   '@babel/helpers@7.26.0':
     dependencies:
       '@babel/template': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
 
   '@babel/parser@7.26.10':
     dependencies:
@@ -6423,7 +6423,7 @@ snapshots:
     dependencies:
       '@babel/core': 7.26.0
       '@babel/helper-plugin-utils': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
       esutils: 2.0.3
 
   '@babel/preset-typescript@7.26.0(@babel/core@7.26.0)':
@@ -6444,8 +6444,8 @@ snapshots:
   '@babel/template@7.25.9':
     dependencies:
       '@babel/code-frame': 7.26.2
-      '@babel/parser': 7.26.2
-      '@babel/types': 7.26.0
+      '@babel/parser': 7.26.10
+      '@babel/types': 7.26.10
 
   '@babel/template@7.26.9':
     dependencies:
@@ -6457,10 +6457,10 @@ snapshots:
     dependencies:
       '@babel/code-frame': 7.26.2
       '@babel/generator': 7.26.2
-      '@babel/parser': 7.26.2
+      '@babel/parser': 7.26.10
       '@babel/template': 7.25.9
-      '@babel/types': 7.26.0
-      debug: 4.3.7
+      '@babel/types': 7.26.10
+      debug: 4.4.0
       globals: 11.12.0
     transitivePeerDependencies:
       - supports-color
@@ -6624,7 +6624,7 @@ snapshots:
       '@dcloudio/uni-app-uts': 3.0.0-4040520250104002(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))
       '@dcloudio/uni-app-vite': 3.0.0-4040520250104002(postcss@8.4.49)(rollup@4.28.0)(vite@5.2.8(@types/node@20.17.9)(sass@1.77.8)(terser@5.36.0))(vue@3.4.21(typescript@5.7.2))
       '@dcloudio/uni-app-vue': 3.0.0-4040520250104002
-      debug: 4.3.7
+      debug: 4.4.0
       fs-extra: 10.1.0
       licia: 1.46.0
       postcss-selector-parser: 6.1.2
@@ -6640,13 +6640,13 @@ snapshots:
 
   '@dcloudio/uni-app-uts@3.0.0-4040520250104002(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))':
     dependencies:
-      '@babel/parser': 7.26.2
-      '@babel/types': 7.26.0
+      '@babel/parser': 7.26.10
+      '@babel/types': 7.26.10
       '@dcloudio/uni-cli-shared': 3.0.0-4040520250104002(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))
       '@dcloudio/uni-i18n': 3.0.0-4040520250104002
       '@dcloudio/uni-nvue-styler': 3.0.0-4040520250104002
       '@dcloudio/uni-shared': 3.0.0-4040520250104002
-      '@jridgewell/gen-mapping': 0.3.5
+      '@jridgewell/gen-mapping': 0.3.8
       '@jridgewell/trace-mapping': 0.3.25
       '@rollup/pluginutils': 5.1.3(rollup@4.28.0)
       '@vue/compiler-core': 3.4.21
@@ -6654,7 +6654,7 @@ snapshots:
       '@vue/compiler-sfc': 3.4.21
       '@vue/consolidate': 1.0.0
       '@vue/shared': 3.4.21
-      debug: 4.3.7
+      debug: 4.4.0
       es-module-lexer: 1.5.4
       estree-walker: 2.0.2
       fs-extra: 10.1.0
@@ -6681,7 +6681,7 @@ snapshots:
       '@vitejs/plugin-vue': 5.1.0(vite@5.2.8(@types/node@20.17.9)(sass@1.77.8)(terser@5.36.0))(vue@3.4.21(typescript@5.7.2))
       '@vue/compiler-dom': 3.4.21
       '@vue/compiler-sfc': 3.4.21
-      debug: 4.3.7
+      debug: 4.4.0
       fs-extra: 10.1.0
       picocolors: 1.1.1
     transitivePeerDependencies:
@@ -6852,7 +6852,7 @@ snapshots:
       '@vue/compiler-sfc': 3.4.21
       '@vue/server-renderer': 3.4.21(vue@3.4.21(typescript@5.7.2))
       '@vue/shared': 3.4.21
-      debug: 4.3.7
+      debug: 4.4.0
       fs-extra: 10.1.0
       mime: 3.0.0
       module-alias: 2.2.3
@@ -6880,7 +6880,7 @@ snapshots:
       '@dcloudio/uni-shared': 3.0.0-4040520250104002
       '@vue/server-renderer': 3.4.21(vue@3.4.21(typescript@5.7.2))
       '@vue/shared': 3.4.21
-      debug: 4.3.7
+      debug: 4.4.0
       localstorage-polyfill: 1.0.1
       postcss-selector-parser: 6.1.2
       safe-area-insets: 1.4.1
@@ -6899,9 +6899,9 @@ snapshots:
 
   '@dcloudio/uni-mp-compiler@3.0.0-4040520250104002(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))':
     dependencies:
-      '@babel/generator': 7.26.2
-      '@babel/parser': 7.26.2
-      '@babel/types': 7.26.0
+      '@babel/generator': 7.26.10
+      '@babel/parser': 7.26.10
+      '@babel/types': 7.26.10
       '@dcloudio/uni-cli-shared': 3.0.0-4040520250104002(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))
       '@dcloudio/uni-shared': 3.0.0-4040520250104002
       '@vue/compiler-core': 3.4.21
@@ -6927,7 +6927,7 @@ snapshots:
       '@vue/compiler-dom': 3.4.21
       '@vue/compiler-sfc': 3.4.21
       '@vue/shared': 3.4.21
-      debug: 4.3.7
+      debug: 4.4.0
     transitivePeerDependencies:
       - '@nuxt/kit'
       - '@vueuse/core'
@@ -6993,7 +6993,7 @@ snapshots:
     dependencies:
       '@dcloudio/uni-cli-shared': 3.0.0-4040520250104002(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))
       '@dcloudio/uni-shared': 3.0.0-4040520250104002
-      debug: 4.3.7
+      debug: 4.4.0
     transitivePeerDependencies:
       - '@nuxt/kit'
       - '@vueuse/core'
@@ -7124,7 +7124,7 @@ snapshots:
   '@eslint/eslintrc@2.1.4':
     dependencies:
       ajv: 6.12.6
-      debug: 4.3.7
+      debug: 4.4.0
       espree: 9.6.1
       globals: 13.24.0
       ignore: 5.3.2
@@ -7140,7 +7140,7 @@ snapshots:
   '@humanwhocodes/config-array@0.13.0':
     dependencies:
       '@humanwhocodes/object-schema': 2.0.3
-      debug: 4.3.7
+      debug: 4.4.0
       minimatch: 3.1.2
     transitivePeerDependencies:
       - supports-color
@@ -7160,7 +7160,7 @@ snapshots:
       '@antfu/install-pkg': 0.4.1
       '@antfu/utils': 0.7.10
       '@iconify/types': 2.0.0
-      debug: 4.3.7
+      debug: 4.4.0
       kolorist: 1.8.0
       local-pkg: 0.5.1
       mlly: 1.7.3
@@ -7657,7 +7657,7 @@ snapshots:
 
   '@jridgewell/source-map@0.3.6':
     dependencies:
-      '@jridgewell/gen-mapping': 0.3.5
+      '@jridgewell/gen-mapping': 0.3.8
       '@jridgewell/trace-mapping': 0.3.25
 
   '@jridgewell/sourcemap-codec@1.5.0': {}
@@ -7887,7 +7887,7 @@ snapshots:
     dependencies:
       '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.2)
       '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.7.2)
-      debug: 4.3.7
+      debug: 4.4.0
       eslint: 8.57.1
       ts-api-utils: 1.4.3(typescript@5.7.2)
     optionalDependencies:
@@ -7901,7 +7901,7 @@ snapshots:
     dependencies:
       '@typescript-eslint/types': 6.21.0
       '@typescript-eslint/visitor-keys': 6.21.0
-      debug: 4.3.7
+      debug: 4.4.0
       globby: 11.1.0
       is-glob: 4.0.3
       minimatch: 9.0.3
@@ -8261,7 +8261,7 @@ snapshots:
       '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0)
       '@babel/template': 7.25.9
       '@babel/traverse': 7.25.9
-      '@babel/types': 7.26.0
+      '@babel/types': 7.26.10
       '@vue/babel-helper-vue-transform-on': 1.2.5
       '@vue/babel-plugin-resolve-type': 1.2.5(@babel/core@7.26.0)
       html-tags: 3.3.1
@@ -8277,7 +8277,7 @@ snapshots:
       '@babel/core': 7.26.0
       '@babel/helper-module-imports': 7.25.9
       '@babel/helper-plugin-utils': 7.25.9
-      '@babel/parser': 7.26.2
+      '@babel/parser': 7.26.10
       '@vue/compiler-sfc': 3.5.13
     transitivePeerDependencies:
       - supports-color
@@ -10869,7 +10869,7 @@ snapshots:
 
   mlly@1.7.3:
     dependencies:
-      acorn: 8.14.0
+      acorn: 8.14.1
       pathe: 1.1.2
       pkg-types: 1.2.1
       ufo: 1.5.4
@@ -10899,7 +10899,7 @@ snapshots:
   normalize-package-data@2.5.0:
     dependencies:
       hosted-git-info: 2.8.9
-      resolve: 1.22.8
+      resolve: 1.22.10
       semver: 5.7.2
       validate-npm-package-license: 3.0.4
 
@@ -12027,7 +12027,7 @@ snapshots:
   unimport@3.14.3(rollup@4.28.0):
     dependencies:
       '@rollup/pluginutils': 5.1.3(rollup@4.28.0)
-      acorn: 8.14.0
+      acorn: 8.14.1
       escape-string-regexp: 5.0.0
       estree-walker: 3.0.3
       local-pkg: 0.5.1
@@ -12177,7 +12177,7 @@ snapshots:
 
   vue-eslint-parser@9.4.3(eslint@8.57.1):
     dependencies:
-      debug: 4.3.7
+      debug: 4.4.0
       eslint: 8.57.1
       eslint-scope: 7.2.2
       eslint-visitor-keys: 3.4.3

+ 12 - 0
src/components/commonIndexBar/index.vue

@@ -46,6 +46,18 @@
 </script>
 
 <style lang="scss" scoped>
+  :deep(.wd-index-bar__index) {
+    font-family: 'PingFang SC';
+    font-size: 32rpx;
+    font-style: normal;
+    font-weight: 400;
+    line-height: 48rpx; /* 150% */
+    color: var(--333, $shop-text-3);
+    text-align: center;
+  }
+  :deep(.wd-index-bar__index.is-active) {
+    color: var(--ff-4-c-1-b, $shop-primary);
+  }
   .wrap {
     position: fixed;
     top: 0;

+ 3 - 1
src/locale/en.json

@@ -32,5 +32,7 @@
   "login.tip": "You may make modifications after entering",
   "login.woman": "Woman",
   "login.man": "Man",
-  "login.resend": "Resend"
+  "login.resend": "Resend",
+  "home.select": "Select A Country",
+  "home.area": "Area"
 }

+ 3 - 1
src/locale/zh-Hans.json

@@ -32,5 +32,7 @@
   "login.tip": "您可以在输入后进行修改",
   "login.woman": "女",
   "login.man": "男",
-  "login.resend": "重新发送"
+  "login.resend": "重新发送",
+  "home.select": "选择国家",
+  "home.area": "地区"
 }

+ 6 - 1
src/pages/index/index.vue

@@ -12,7 +12,7 @@
   <view class="bg-white overflow-hidden pb-tab" :style="{ marginTop: safeAreaInsets?.top + 'px' }">
     <wd-sticky>
       <view class="pos-msg-container w-100vw bg-white">
-        <view class="pos-container">
+        <view class="pos-container" @click.stop="goSelectCountry">
           <image style="width: 36rpx" src="@/static/images/pos.svg" mode="widthFix"></image>
           <view class="pos-name">Serbia</view>
           <image style="width: 36rpx" src="@/static/images/select.svg" mode="widthFix"></image>
@@ -129,6 +129,11 @@
   const search = () => {
     console.log(homeSearch.value)
   }
+  const goSelectCountry = () => {
+    uni.navigateTo({
+      url: '/pages/select-country/index',
+    })
+  }
 </script>
 
 <style lang="scss" scoped>

+ 232 - 4
src/pages/select-country/index.vue

@@ -1,25 +1,253 @@
+<route lang="json">
+{
+  "style": {
+    "navigationStyle": "custom",
+    "navigationBarTitleText": "%home.select%"
+  }
+}
+</route>
 <template>
   <view class="select-country-main-wrap">
-    <view class="top-header"></view>
-    <view class="content"></view>
-    <view class="bottom-footer"></view>
+    <view class="top-header">
+      <view class="left-nav"></view>
+      {{ t('home.select') }}
+    </view>
+    <view class="content" @click.stop="showArea = true">
+      <view class="content-title">{{ t('home.area') }}</view>
+      <view class="area">Serbia</view>
+      <wd-img
+        class="right-nav"
+        width="48rpx"
+        height="48rpx"
+        src="/static/images/home/right.svg"
+      ></wd-img>
+    </view>
+    <view class="map"></view>
+    <view class="bottom-footer">{{ t('commonPopup.confirm') }}</view>
+    <CommonIndexBar
+      :areaData="areaData"
+      @handleClick="handleClick"
+      v-model="showArea"
+      @close="showArea = false"
+    />
   </view>
 </template>
 
-<script setup lang="ts"></script>
+<script setup lang="ts">
+  import { t } from '@/locale'
+  const showArea = ref(false) // 是否显示地区
+  const areaData = ref([
+    {
+      index: 'A',
+      data: ['阿坝', '阿拉善', '阿里', '安康', '安庆', '鞍山', '安顺', '安阳', '澳门'],
+    },
+    {
+      index: 'B',
+      data: [
+        '北京',
+        '白银',
+        '保定',
+        '宝鸡',
+        '保山',
+        '包头',
+        '巴中',
+        '北海',
+        '蚌埠',
+        '本溪',
+        '毕节',
+        '滨州',
+        '百色',
+        '亳州',
+      ],
+    },
+    {
+      index: 'C',
+      data: [
+        '重庆',
+        '成都',
+        '长沙',
+        '长春',
+        '沧州',
+        '常德',
+        '昌都',
+        '长治',
+        '常州',
+        '巢湖',
+        '潮州',
+        '承德',
+        '郴州',
+        '赤峰',
+        '池州',
+        '崇左',
+        '楚雄',
+        '滁州',
+        '朝阳',
+      ],
+    },
+    {
+      index: 'D',
+      data: [
+        '大连',
+        '东莞',
+        '大理',
+        '丹东',
+        '大庆',
+        '大同',
+        '大兴安岭',
+        '德宏',
+        '德阳',
+        '德州',
+        '定西',
+        '迪庆',
+        '东营',
+      ],
+    },
+    {
+      index: 'E',
+      data: ['鄂尔多斯', '恩施', '鄂州'],
+    },
+    {
+      index: 'F',
+      data: ['福州', '防城港', '佛山', '抚顺', '抚州', '阜新', '阜阳'],
+    },
+    {
+      index: 'G',
+      data: ['广州', '桂林', '贵阳', '甘南', '赣州', '甘孜', '广安', '广元', '贵港', '果洛'],
+    },
+    {
+      index: 'H',
+      data: [
+        '杭州',
+        '哈尔滨',
+        '合肥',
+        '海口',
+        '呼和浩特',
+        '海北',
+        '海东',
+        '海南',
+        '海西',
+        '邯郸',
+        '汉中',
+        '鹤壁',
+        '河池',
+        '鹤岗',
+        '黑河',
+        '衡水',
+        '衡阳',
+        '河源',
+        '贺州',
+        '红河',
+        '淮安',
+        '淮北',
+        '怀化',
+        '淮南',
+        '黄冈',
+        '黄南',
+        '黄山',
+        '黄石',
+        '惠州',
+        '葫芦岛',
+        '呼伦贝尔',
+        '湖州',
+        '菏泽',
+      ],
+    },
+  ])
+  const handleClick = ({ index, city }) => {
+    console.log(index, city)
+  }
+</script>
 
 <style lang="scss" scoped>
   .select-country-main-wrap {
     box-sizing: border-box;
     padding: 0 32rpx;
+    .top-header {
+      position: relative;
+      box-sizing: border-box;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 88rpx;
+      padding: 6rpx 0;
+      font-family: 'PingFang SC';
+      font-size: 36rpx;
+      font-style: normal;
+      font-weight: 600;
+      line-height: 52rpx; /* 144.444% */
+      color: var(--333, $shop-text-3);
+      text-align: center;
+      text-transform: capitalize;
+      .left-nav {
+        position: absolute;
+        top: 50%;
+        left: 0;
+        width: 60rpx;
+        height: 60rpx;
+        background-image: url(@/static/images/home/left.svg);
+        background-size: cover;
+        transform: translateY(-50%);
+      }
+    }
+    .content {
+      position: relative;
+      box-sizing: border-box;
+      flex: 1 0 0;
+      width: 100%;
+      height: 148rpx;
+      padding: 24rpx 0 24rpx 0rpx;
+      margin: 24rpx 0;
+      font-family: 'PingFang SC';
+      font-size: 32rpx;
+      font-style: normal;
+      font-weight: 400;
+      line-height: 48rpx; /* 150% */
+      color: var(--333, $shop-text-3);
+      border-bottom: 1rpx solid var(--Gray-Gray3, #e7e7e7);
+      .area {
+        font-family: 'PingFang SC';
+        font-size: 28rpx;
+        line-height: 44rpx; /* 157.143% */
+        color: var(--666, $shop-text-6);
+      }
+      .right-nav {
+        position: absolute;
+        top: 50%;
+        right: 0;
+        transform: translateY(-50%);
+      }
+    }
+    .map {
+      display: flex;
+      flex-direction: column;
+      flex-shrink: 0;
+      align-items: flex-start;
+      width: 100%;
+      height: 457.334rpx;
+      background-image: url(@/static/images/home/test-map.svg);
+      background-size: cover;
+    }
     .bottom-footer {
+      position: fixed;
+      bottom: 0;
       box-sizing: border-box;
       display: flex;
       flex: 1 0 0;
       align-items: center;
       justify-content: center;
+      width: 100%;
       height: 84rpx;
       padding: 10rpx 66rpx;
+      margin-top: 500rpx;
+      font-family: 'PingFang SC';
+      font-size: 32rpx;
+      font-style: normal;
+      font-weight: 600;
+      line-height: 48rpx; /* 150% */
+      color: $shop-white;
+      text-align: center;
+      text-transform: capitalize;
       background: var(
         --ff-4-c-1-bfc-7-b-1-c,
         linear-gradient(270deg, $shop-primary 0%, $shop-help 100%)

+ 2 - 13
src/pages/user/login.vue

@@ -149,7 +149,7 @@
       }
     }, 1000)
   }
-  function handleClick(index: string, city: string) {
+  const handleClick = ({ index, city }) => {
     console.log(index, city)
   }
 
@@ -271,18 +271,7 @@
   :deep(.wd-cell.is-hover) {
     background: #ccc !important;
   }
-  :deep(.wd-index-bar__index) {
-    font-family: 'PingFang SC';
-    font-size: 32rpx;
-    font-style: normal;
-    font-weight: 400;
-    line-height: 48rpx; /* 150% */
-    color: var(--333, $shop-text-3);
-    text-align: center;
-  }
-  :deep(.wd-index-bar__index.is-active) {
-    color: var(--ff-4-c-1-b, $shop-primary);
-  }
+
   :deep(.wd-input__value) {
     box-sizing: border-box;
     height: 112rpx !important;

+ 3 - 0
src/static/images/home/left.svg

@@ -0,0 +1,3 @@
+<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M19.0306 22.3667L11.6639 15L19.0306 7.63333" stroke="#333333" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

+ 5 - 0
src/static/images/home/right.svg

@@ -0,0 +1,5 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="chevron-right">
+<path id="union" fill-rule="evenodd" clip-rule="evenodd" d="M9.69064 18.6889L8.31178 17.31L13.6223 11.9994L8.31178 6.68887L9.69064 5.31001L16.3801 11.9994L9.69064 18.6889Z" fill="black" fill-opacity="0.4"/>
+</g>
+</svg>

Plik diff jest za duży
+ 6 - 0
src/static/images/home/test-map.svg


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików