Browse Source

feat:登录页面静态

PIWALIN 1 week ago
parent
commit
26438178ba

+ 40 - 38
src/components/shop-tabbar/shop-tabbar.vue

@@ -7,10 +7,14 @@
       @click="selectTabBar(index, item.pagePath)"
     >
       <view class="icon-wrapper">
-        <image v-if="currentTab === index" :src="item.iconShow" class="home-item-isShow"></image>
+        <view v-if="currentTab === index">
+          <image :src="item.round" class="PolygonIcon"></image>
+          <image :src="item.iconShow" class="home-item-isShow"></image>
+        </view>
+
         <image v-else :src="item.icon" class="home-item-img"></image>
       </view>
-      <span class="label">{{ item.text }}</span>
+      <span class="labelTile">{{ item.text }}</span>
     </view>
   </view>
 </template>
@@ -19,25 +23,16 @@
   import { tabBar } from '@/pages.json'
   import { t } from '@/locale'
   import { useTabbarStore } from '@/store/tabbar'
-  import { ref } from 'vue'
+  import { ref, watch } from 'vue'
 
   const tabbarStore = useTabbarStore()
   const currentTab = ref(0)
-
   function selectTabBar(index: number, url: string) {
-    currentTab.value = index
-    console.log(tabBar.list, '11111')
     tabbarStore.setCurIdx(index)
+    currentTab.value = index
     uni.switchTab({
       url: `/${url}`,
     })
-    // 使用 setTimeout 保证先更新视图再执行页面跳转
-    // setTimeout(() => {
-    //   tabbarStore.setCurIdx(id)
-    //   uni.switchTab({
-    //     url: `/${url}`,
-    //   })
-    // }, 100)
   }
 
   onLoad(() => {
@@ -64,7 +59,7 @@
   })
 </script>
 
-<style scoped>
+<style lang="css" scoped>
   .tab-bar {
     position: fixed;
     right: 0;
@@ -74,19 +69,18 @@
     align-items: center;
     justify-content: space-around;
     width: 100%;
-    height: 80px;
+    /* height: 160rpx; */
     background: #ffffff;
-    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
+    box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
   }
 
   .tab-item {
+    position: relative;
     display: flex;
     flex-direction: column;
     align-items: center;
-    width: 80px;
-    padding: 6px 0;
-    color: #999999;
-    cursor: pointer;
+    width: 100%;
+    color: #666;
     transition: color 0.3s ease;
   }
 
@@ -94,35 +88,43 @@
     display: flex;
     align-items: center;
     justify-content: center;
-    width: 45px;
-    height: 45px;
+    width: 100rpx;
+    /* height: 100rpx; */
     border-radius: 50%;
     transition: all 0.3s ease;
   }
-
-  .tab-item.active {
+  /* .tab-item.active {
     color: #60a5fa;
-  }
-
+  } */
   .tab-item.active .icon-wrapper {
-    /* background: #60a5fa; */
-    color: #ffffff;
-    transform: translateY(-18px);
+    transform: translateY(-48rpx);
   }
-
-  .label {
-    margin-top: 3px;
-    font-size: 12px;
+  .labelTile {
+    margin-top: 6rpx;
+    font-size: 24rpx;
     transition: all 0.3s ease;
   }
-
-  .tab-item.active .label {
-    transform: translateY(-8px);
+  .tab-item.active .labelTile {
+    color: #f88842;
+    transform: translateY(-60rpx);
   }
 
   .home-item-img {
-    width: 1.25rem;
-    height: 1.25rem;
+    width: 48rpx;
+    height: 48rpx;
     object-fit: contain;
   }
+  .home-item-isShow {
+    width: 100rpx;
+    height: 100rpx;
+    object-fit: contain;
+  }
+
+  .PolygonIcon {
+    position: absolute;
+    top: 18rpx;
+    left: -76rpx;
+    width: 250rpx;
+    height: 32rpx;
+  }
 </style>

+ 10 - 2
src/pages/myUser/component/setFocus.vue

@@ -12,7 +12,14 @@
       <view class="section" @click="nicknameBtn">
         <view class="section-left">更换手机号码</view>
         <view class="nickname">
-          <view class="phone">+8618716785955</view>
+          <view class="phone">
+            <wd-input
+              type="text"
+              v-model="phoneValue"
+              placeholder="请输入用户名"
+              @change="handleChange"
+            />
+          </view>
           <view>
             <image style="width: 48rpx; height: 48rpx" src="/src/static/icon/chevron-right.svg" />
           </view>
@@ -27,8 +34,9 @@
 </template>
 
 <script setup>
+  import { ref } from 'vue'
   import headerTitle from './headerTitle.vue'
-
+  const phoneValue = ref('')
   const cleanBtn = () => {
     console.log('清楚缓存')
   }

+ 211 - 45
src/pages/user/login.vue

@@ -18,11 +18,12 @@
         <!-- 账号 -->
         <view class="country-code">
           <view class="country-phone">
-            <image style="width: 24px; height: 24px" src="/src/static/icon/phone.svg"></image>
+            <image class="imgIcon" src="/src/static/icon/phone.svg"></image>
             <view class="login-text">手机号</view>
           </view>
           <view class="phone-input">
-            <view>+86</view>
+            <view @click="replacePhone">{{ replacePoneValue }}</view>
+            <image class="w-[32rpx] h-[32rpx]" src="/src/static/icon/chevron-right.svg"></image>
             <view>
               <input v-model="account" type="text" placeholder="请输入手机号" />
             </view>
@@ -31,10 +32,7 @@
         <!-- 验证码 -->
         <view class="country-password">
           <view class="country-phone">
-            <image
-              style="width: 24px; height: 24px"
-              src="/src/static/icon/Verification.svg"
-            ></image>
+            <image class="imgIcon" src="/src/static/icon/Verification.svg"></image>
             <view class="login-text">验证码</view>
           </view>
           <view class="phone-input">
@@ -42,7 +40,7 @@
               <input v-model="verification" type="text" placeholder="请输入验证码" />
             </view>
             <image
-              style="width: 1px; height: 16px; background: red"
+              style="width: 2rpx; height: 32rpx; background: #e7e7e7"
               src="/src/static/icon/textBor.svg"
             ></image>
             <view class="send-btn" :disabled="isCountingDown" @click="sendVerificationCode">
@@ -53,28 +51,160 @@
       </view>
 
       <wd-button @click="loginBtn" class="login-button">登录</wd-button>
+
+      <!-- 手机 -->
+      <view @click.stop="showArea = false" v-if="showArea" class="wrap">
+        <view class="wrap-content">
+          <wd-index-bar sticky>
+            <view v-for="item in areaData" :key="item.index">
+              <wd-index-anchor :index="item.index" />
+              <wd-cell
+                border
+                clickable
+                v-for="city in item.data"
+                :key="city"
+                :title="city"
+                @click="handleClick(item.index, city)"
+              ></wd-cell>
+            </view>
+          </wd-index-bar>
+        </view>
+      </view>
     </view>
   </view>
 </template>
 
 <script setup>
-  import { ref } from 'vue'
+  import { ref, computed } from 'vue'
   const account = ref('') // 账号
   const verification = ref('') // 验证码
-  const countdown = ref(0)
+  const countdown = ref(0) // 发送验证码
+  const replacePoneValue = ref('+86')
   const isCountingDown = ref(false)
+  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 buttonText = computed(() => {
     return isCountingDown.value ? `${countdown.value}秒后重新发送` : '发送验证码'
   })
 
-  // 点击登录
-  const loginBtn = () => {
-    console.log(account.value, verification.value)
-    console.log(2222)
-  }
-
-  // 发生验证码
+  // 发验证码
   const sendVerificationCode = () => {
     if (isCountingDown.value) return
     countdown.value = 60
@@ -87,6 +217,21 @@
       }
     }, 1000)
   }
+
+  // 更换手机
+  const replacePhone = () => {
+    showArea.value = true
+  }
+  // 选取手机地区区号
+  const handleClick = (item, area) => {
+    replacePoneValue.value = area
+  }
+
+  // 点击登录
+  const loginBtn = () => {
+    console.log(account.value, verification.value, replacePoneValue.value)
+    console.log(2222)
+  }
 </script>
 
 <style scoped lang="scss">
@@ -94,47 +239,45 @@
     display: flex;
     justify-content: center;
     min-height: 100vh;
-    background: linear-gradient(to bottom, #c4eee6, #fff);
+    background: linear-gradient(0deg, #fff 0%, #ffac78 100%);
   }
 
   .login-box {
     width: 90%;
-    font-size: 1rem;
   }
 
   .login_title {
     width: 100%;
-    height: 4.5rem;
-    margin: 6.25rem 0 1.25rem 0;
-  }
-
-  .title-en {
-    margin: 0 0 0.5rem 0;
-    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
-    font-size: 1.5rem;
-    font-weight: 600;
-    color: #333333;
+    height: 144rpx;
+    margin: 200rpx 0 40rpx 0;
+    .title-en {
+      margin: 0 0 16rpx 0;
+      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+      font-size: 48rpx;
+      font-weight: 600;
+      color: #333333;
+    }
   }
 
   .input-wrapper {
     position: relative;
     width: 100%;
-    height: 11.25rem;
-    margin: 0.625rem 0 1.25rem 0;
+    height: 360rpx;
+    margin: 20rpx 0 40rpx 0;
   }
 
   .country-code {
     width: 100%;
-    height: 5rem;
-    padding: 1rem 0;
+    height: 160rpx;
+    padding: 32rpx 0;
   }
 
   .phone-input {
     display: flex;
-    gap: 1rem;
+    gap: 20rpx;
     align-items: center;
-    height: 3.5rem;
-    border-bottom: 0.03125rem solid var(--Gray-Gray3, #e7e7e7);
+    height: 56px; /* 3.5rem = 56px */
+    border-bottom: 0.5px solid var(--Gray-Gray3, #e7e7e7);
   }
 
   .country-phone {
@@ -143,23 +286,23 @@
   }
 
   .login-text {
-    margin-left: 0.625rem;
+    margin-left: 20rpx;
   }
 
   .phone-input input {
     flex: 1;
-    padding: 0 1rem;
-    font-size: 0.875rem;
+    padding: 0 32rpx;
+    font-size: 28rpx;
   }
 
   .verification-input {
-    width: 27.75rem;
+    width: 27.75rem; /* 27.75rem = 444px */
   }
 
   .send-btn {
-    width: 13.75rem;
+    width: 440rpx;
     overflow: hidden;
-    font-size: 0.875rem;
+    font-size: 28rpx;
     color: #f88842;
     text-overflow: ellipsis;
     white-space: nowrap;
@@ -168,11 +311,34 @@
 
   .login-button {
     width: 100%;
-    height: 3rem;
-    margin: 5rem 0 1.25rem 0;
-    font-size: 1rem;
+    height: 96rpx;
+    margin: 160rpx 0 40rpx 0;
+    font-size: 32rpx;
     color: white;
     background: #f88842 !important;
-    border-radius: 0.5rem;
+    border-radius: 16rpx;
+  }
+
+  .wrap {
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 9999;
+    width: 100vw;
+    height: 100vh;
+    background: rgba(3, 3, 3, 0.2);
+  }
+
+  .wrap-content {
+    position: relative;
+    top: 176rpx;
+    display: flex;
+    flex-direction: column;
+    height: calc(100vh - var(--window-top) - env(safe-area-inset-bottom));
+  }
+
+  .imgIcon {
+    width: 48rpx;
+    height: 48rpx;
   }
 </style>

+ 0 - 23
src/static/tabbar/.svg

@@ -1,23 +0,0 @@
-<svg width="51" height="50" viewBox="0 0 51 50" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g filter="url(#filter0_d_164_25197)">
-<rect x="6.83334" y="4" width="38" height="38" rx="19" fill="url(#paint0_linear_164_25197)" shape-rendering="crispEdges"/>
-<path d="M25.8333 21C27.4902 21 28.8333 19.6569 28.8333 18C28.8333 16.3431 27.4902 15 25.8333 15C24.1765 15 22.8333 16.3431 22.8333 18C22.8333 19.6569 24.1765 21 25.8333 21Z" fill="white" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M17.8333 30.4857V31H33.8333V30.4857C33.8333 28.5655 33.8333 27.6055 33.4458 26.872C33.1049 26.2269 32.561 25.7024 31.892 25.3737C31.1314 25 30.1357 25 28.1445 25H23.5222C21.5309 25 20.5353 25 19.7747 25.3737C19.1057 25.7024 18.5618 26.2269 18.2209 26.872C17.8333 27.6055 17.8333 28.5655 17.8333 30.4857Z" fill="white" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-</g>
-<defs>
-<filter id="filter0_d_164_25197" x="0.833344" y="0" width="50" height="50" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
-<feOffset dy="2"/>
-<feGaussianBlur stdDeviation="3"/>
-<feComposite in2="hardAlpha" operator="out"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0.313333 0 0 0 0 0.702444 0 0 0 0 1 0 0 0 0.5 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_164_25197"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_164_25197" result="shape"/>
-</filter>
-<linearGradient id="paint0_linear_164_25197" x1="44.8333" y1="23" x2="6.83334" y2="23" gradientUnits="userSpaceOnUse">
-<stop stop-color="#50B3FF"/>
-<stop offset="1" stop-color="#A3D4FF"/>
-</linearGradient>
-</defs>
-</svg>

File diff suppressed because it is too large
+ 2 - 4
src/static/tabbar/Frame.svg


File diff suppressed because it is too large
+ 2 - 3
src/static/tabbar/Parenting.svg


+ 3 - 0
src/static/tabbar/Polygon.svg

@@ -0,0 +1,3 @@
+<svg width="116" height="16" viewBox="0 0 116 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path id="Polygon 2" d="M58.0006 0C77.0187 0 91.13 16 113.759 16C136.389 16 -20.3943 16 2.24173 16C24.8778 16 38.9824 0 58.0006 0Z" fill="white"/>
+</svg>

File diff suppressed because it is too large
+ 2 - 5
src/static/tabbar/goods.svg


BIN
src/static/tabbar/layer.svg


File diff suppressed because it is too large
+ 2 - 5
src/static/tabbar/macon.svg


File diff suppressed because it is too large
+ 0 - 1
src/static/tabbar/music.svg


File diff suppressed because it is too large
+ 2 - 3
src/static/tabbar/user.svg


Some files were not shown because too many files changed in this diff