Browse Source

feat:登录,设计师

Jake 5 months ago
parent
commit
0c57eb7c89

+ 3 - 0
packages/assets/src/assets/svgs/login_account_icon.svg

@@ -0,0 +1,3 @@
+<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M11.875 10.0707C13.3 9.23945 14.25 7.6957 14.25 6.0332C14.25 3.4207 12.1125 1.2832 9.5 1.2832C6.8875 1.2832 4.75 3.30195 4.75 5.91445C4.75 7.6957 5.7 9.1207 7.125 9.95195C4.0375 10.902 1.9 13.752 1.78125 17.077C1.78125 17.552 2.01875 17.7895 2.375 17.7895C2.73125 17.7895 2.96875 17.552 2.96875 17.1957C3.0875 13.6332 5.9375 10.7832 9.5 10.7832C13.0625 10.7832 15.9125 13.6332 16.0312 17.1957C16.0312 17.552 16.2688 17.7895 16.625 17.7895C16.9812 17.7895 17.2188 17.552 17.2188 17.1957C17.1 13.8707 14.9625 11.0207 11.875 10.0707ZM5.9375 5.91445C5.9375 3.8957 7.48125 2.35195 9.5 2.35195C11.5188 2.35195 13.0625 3.8957 13.0625 5.91445C13.0625 7.9332 11.5188 9.47695 9.5 9.47695C7.48125 9.47695 5.9375 7.9332 5.9375 5.91445Z" fill="black"/>
+</svg>

File diff suppressed because it is too large
+ 2 - 0
packages/assets/src/assets/svgs/login_psw_eye.svg


+ 11 - 0
packages/assets/src/assets/svgs/login_psw_icon.svg

@@ -0,0 +1,11 @@
+<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_755_7741)">
+<path d="M15.7312 5.61538H15.0389C14.4235 2.38462 11.7312 0 8.50045 0C5.26968 0 2.57737 2.38462 1.96199 5.61538H1.26968C0.961989 5.61538 0.654297 5.84615 0.654297 6.23077V16.3846C0.654297 16.6923 0.885066 17 1.26968 17H15.7312C16.0389 17 16.3466 16.7692 16.3466 16.3846V6.23077C16.3466 5.84615 16.0389 5.61538 15.7312 5.61538ZM8.50045 1.23077C11.1158 1.23077 13.2697 3.07692 13.8851 5.61538H3.11584C3.73122 3.07692 5.88507 1.23077 8.50045 1.23077ZM15.1158 6.76923V15.6923H1.88507V6.76923" fill="black"/>
+<path d="M7.88477 9.61523H9.11553V13.0768H7.88477V9.61523Z" fill="black"/>
+</g>
+<defs>
+<clipPath id="clip0_755_7741">
+<rect width="17" height="17" fill="white"/>
+</clipPath>
+</defs>
+</svg>

+ 3 - 0
packages/assets/src/assets/svgs/right_arrow_icon.svg

@@ -0,0 +1,3 @@
+<svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0.956543 1L4.9132 4.95666L0.956543 8.91332" stroke="black" stroke-opacity="0.65"/>
+</svg>

File diff suppressed because it is too large
+ 6 - 0
packages/assets/src/assets/svgs/vip_icon.svg


+ 7 - 1
packages/assets/src/svgs.ts

@@ -2,4 +2,10 @@ import ts from "./typescript.svg";
 import pageHeaderBg from "./assets/svgs/page-header-bg.svg";
 import pageHeaderFilter from "./assets/svgs/page-header-filter.svg";
 import merchantPageHeaderBg from "./assets/svgs/merchant-page-header-bg.svg";
-export { ts, pageHeaderBg, pageHeaderFilter, merchantPageHeaderBg };
+import loginAccountIcon from "./assets/svgs/login_account_icon.svg";
+import loginPswIcon from "./assets/svgs/login_psw_icon.svg";
+import loginPswEye from "./assets/svgs/login_psw_eye.svg";
+import vipIcon from "./assets/svgs/vip_icon.svg";
+import rightArrowIcon from "./assets/svgs/right_arrow_icon.svg";
+
+export { ts, pageHeaderBg, pageHeaderFilter, merchantPageHeaderBg, loginAccountIcon, loginPswIcon, loginPswEye, vipIcon, rightArrowIcon };

+ 9 - 0
packages/merchant/src/pages.json

@@ -73,6 +73,15 @@
       }
     },
     {
+      "path": "pages/designer/index",
+      "type": "page",
+      "layout": "tabbar",
+      "style": {
+        "navigationBarTitleText": "全部设计师",
+        "navigationBarBackgroundColor": "#fff"
+      }
+    },
+    {
       "path": "pages/login/index",
       "type": "page",
       "style": {

+ 161 - 0
packages/merchant/src/pages/designer/index.vue

@@ -0,0 +1,161 @@
+<route lang="yaml">
+layout: tabbar
+style:
+  navigationBarTitleText: 全部设计师
+  navigationBarBackgroundColor: '#fff'
+</route>
+
+<script setup lang="ts">
+import Card from '@/components/card.vue'
+import { integral, interact, system } from '@/core/libs/svgs'
+import { beforeNow } from '@/utils/date-util'
+import dayjs from 'dayjs'
+import { vipIcon, rightArrowIcon } from '@designer-hub/assets/src/svgs'
+
+const msgs = ref([
+  {
+    title: '王磊回复了你',
+    createdAt: Date.now(),
+    content: '设计师李家豪刚刚点赞了你的设计圈点击前往查看',
+  },
+  {
+    title: '李琳赞了你的设计圈',
+    createdAt: Date.now(),
+    content: '设计师李家豪刚刚点赞了你的设计圈点击前往查看',
+  },
+])
+</script>
+
+<template>
+  <view class="flex-grow">
+    <div>
+      <wd-search
+        v-model="value"
+        @focus="focus"
+        @blur="blur"
+        @search="search"
+        @clear="clear"
+        @cancel="cancel"
+        @change="change"
+        maxlength="10"
+      />
+    </div>
+    <div class="p-3.5 gap-3.5 flex flex-col">
+      <template v-for="({ title, createdAt, content }, i) in msgs" :key="i">
+        <Card>
+          <div class="items-center">
+            <div class="">
+              <div class="flex items-center">
+                <div
+                  class="w-[55px] h-[55px] bg-neutral-100 rounded-full mr-2 flex items-center justify-center"
+                >
+                  <wd-img
+                    :src="{ integral: integral, system: system, interact: interact }"
+                  ></wd-img>
+                </div>
+                <div class="flex flex-col flex-1">
+                  <div class="flex-row flex items-center justify-between w-full">
+                    <div class="flex-row flex items-center">
+                      <div
+                        class="text-black/90 text-base font-normal font-['PingFang SC'] leading-[10.18px]"
+                      >
+                        苏小萌
+                      </div>
+
+                      <div
+                        class="h-4 bg-neutral-100 rounded-[20px] justify-start items-center inline-flex flex-row ml-[9px]"
+                      >
+                        <wd-img width="17" height="17" :src="vipIcon"></wd-img>
+
+                        <div
+                          class="text-black/40 text-[10px] font-normal font-['PingFang SC'] px-[7px] leading-none"
+                        >
+                          白银会员
+                        </div>
+                      </div>
+                    </div>
+                    <div
+                      class="text-black/60 text-xs font-normal font-['PingFang SC'] leading-snug flex items-center"
+                    >
+                      <div>分享主页</div>
+                      <wd-img width="13" height="13" :src="rightArrowIcon"></wd-img>
+                    </div>
+                  </div>
+                  <div class="flex items-center gap-2 mt-[18px]">
+                    <div
+                      class="text-black/30 text-xs font-normal font-['PingFang SC'] leading-none"
+                    >
+                      2天前访问
+                    </div>
+                    <div class="bg-[#eeeeee] w-[2px] h-[10px]"></div>
+                    <div
+                      class="text-black/30 text-xs font-normal font-['PingFang SC'] leading-none"
+                    >
+                      积分:0
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+
+            <div class="row-start-2 col-start-2 col-end-4">
+              <div class="flex items-center justify-between w-full mt-[20px]">
+                <div class="flex items-center">
+                  <div class="w-2 h-2 bg-[#89f4e2] rounded-full mr-[7px]"></div>
+                  <div class="text-black/90 text-xs font-normal font-['PingFang SC'] leading-snug">
+                    30天未跟进
+                  </div>
+                </div>
+                <div class="flex items-center">
+                  <div class="w-2 h-2 bg-[#ffb96a] rounded-full mr-[7px]"></div>
+                  <div class="text-black/90 text-xs font-normal font-['PingFang SC'] leading-snug">
+                    60天未产生积分
+                  </div>
+                </div>
+                <div class="flex items-center">
+                  <div class="w-2 h-2 bg-[#c493ff] rounded-full mr-[7px]"></div>
+                  <div class="text-black/90 text-xs font-normal font-['PingFang SC'] leading-snug">
+                    60天未消耗积分
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div
+              class="row-start-5 col-start-2 col-end-4 flex items-center mt-[26px] justify-around"
+            >
+              <div
+                class="px-3 py-1.5 rounded-[30px] border border-[#ff2d2d] justify-center items-center gap-1 flex"
+                style="border: 1px solid #ff2d2d"
+              >
+                <div style="color: #ff2d2d" class="flex items-center">+</div>
+                <div class="text-[#ff2d2d] text-xs font-normal font-['PingFang SC'] leading-none">
+                  重点跟进
+                </div>
+              </div>
+              <div
+                class="px-5 py-1 bg-[#e1ecff] rounded-[30px] border border-[#2357e9] justify-center items-center gap-1 inline-flex"
+              >
+                <div
+                  class="text-center text-[#2357e9] text-sm font-normal font-['PingFang SC'] leading-normal"
+                >
+                  打电话
+                </div>
+              </div>
+              <div
+                class="px-5 py-1 bg-[#0052d9] rounded-[30px] justify-center items-center gap-1 inline-flex"
+              >
+                <div
+                  class="text-center text-white text-sm font-normal font-['PingFang SC'] leading-normal"
+                >
+                  写跟进
+                </div>
+              </div>
+            </div>
+          </div>
+        </Card>
+      </template>
+    </div>
+  </view>
+</template>
+
+<style scoped lang="scss"></style>

+ 41 - 72
packages/merchant/src/pages/login/index.vue

@@ -6,6 +6,7 @@ style:
 import { weixinMiniAppLogin } from '@/core/libs/requests'
 import { logo } from '@/core/libs/svgs'
 import { useUserStore } from '@/store'
+import { loginAccountIcon, loginPswIcon, loginPswEye } from '@designer-hub/assets/src/svgs'
 
 const userStore = useUserStore()
 const { setUserInfo } = userStore
@@ -71,86 +72,54 @@ const getTestCode = async ({ detail }) => {
 }
 </script>
 <template>
-  <div class="flex-grow flex flex-col items-center justify-around px-3.5">
-    <div>
-      <wd-img :src="logo" width="78" height="78"></wd-img>
-      <div class="text-black text-2xl font-normal font-['PingFang SC'] leading-[10.18px]">
-        筑巢荟
+  <div class="flex-grow flex flex-col items-center justify-start px-7.5 bg-[#ffffff] pt-[100px]">
+    <div class="flex flex-col justify-start mb-[57px] title">
+      <div class="text-black text-2xl font-normal font-['PingFang SC']">你好!</div>
+      <div class="text-black text-2xl font-normal font-['PingFang SC'] mt-[9px]">
+        欢迎来到筑巢荟
       </div>
     </div>
-    <div class="w-full">
-      <button
-        type="primary"
-        size="large"
-        :style="{
-          backgroundColor: 'black',
-        }"
-        open-type="getPhoneNumber"
-        @getphonenumber="getPhoneNumber"
-      >
-        手机号一键登录
-      </button>
-      <div class="w-[318px] mt-8">
-        <span class="text-black/40 text-xs font-normal font-['PingFang SC'] leading-tight">
-          如您点击授权,您将同意并授权
-        </span>
-        <span class="text-[#0cbe7c] text-xs font-normal font-['PingFang SC'] leading-tight">
-          《筑巢荟用户服务协议》、《隐私政策》、《注册协议》
-        </span>
+    <div class="w-full form">
+      <div class="bg-[#F6F6F6] item mb-[10px] flex items-center">
+        <wd-img :src="loginAccountIcon" mode="widthFix" width="19px" class="mr-[16px]" />
+        <wd-input type="number" placeholder="请输入手机号" />
       </div>
+      <div class="bg-[#F6F6F6] item flex items-center">
+        <wd-img :src="loginPswIcon" mode="widthFix" width="19px" class="mr-[16px]" />
+        <wd-input type="number" placeholder="请输入密码" />
+      </div>
+    </div>
+    <div class="w-full flex items-center justify-between mt-[19px]">
+      <wd-checkbox :modelValue="true" shape="square">记住密码</wd-checkbox>
+      <div class="text-[#2357e9] text-xs font-normal font-['PingFang SC']">忘记密码?</div>
+    </div>
+    <div class="w-full mt-[50px]"><wd-button block :round="false">登录</wd-button></div>
+    <div class="mt-8">
+      <span class="text-black/40 text-xs font-normal font-['PingFang SC'] leading-tight">
+        登录即代表您已阅读并同意筑巢荟的
+      </span>
+      <span class="text-[#2357e9] text-xs font-normal font-['PingFang SC'] leading-tight">
+        《服务使用协议》
+      </span>
     </div>
   </div>
-  <!-- <view class="content">
-    <textarea v-model="loginCode" placeholder="" placeholder-class="textarea-placeholder" />
-    <textarea v-model="phoneCode" placeholder="" placeholder-class="textarea-placeholder" />
-    <button style="margin: 20px 0 20px 0" @click="toUserInfoPage">个人资料</button>
-    <uni-forms-item label="切换登录方式" labelWidth="70">
-      <uni-data-checkbox
-        :multiple="false"
-        v-model="loginType"
-        :localdata="loginTypeOption"
-        mode="button"
-      ></uni-data-checkbox>
-    </uni-forms-item>
-    <button @click="weixinLogin">前往登录</button> -->
-  <!-- #ifdef MP-WEIXIN -->
-  <!-- <button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"> -->
-  <!-- 手机号一键登录
-    </button> -->
-  <!-- #endif -->
-  <!-- #ifdef MP-WEIXIN -->
-  <!-- <button type="primary" open-type="getPhoneNumber" @getphonenumber="getTestCode">
-      获取测试码
-    </button> -->
-  <!-- #endif -->
-  <!-- </view> -->
 </template>
 
 <style lang="scss">
-.content {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  padding: 6rpx;
-}
-
-.logo {
-  width: 200rpx;
-  height: 200rpx;
-  margin-top: 200rpx;
-  margin-right: auto;
-  margin-bottom: 50rpx;
-  margin-left: auto;
-}
-
-.text-area {
-  display: flex;
-  justify-content: center;
-}
-
 .title {
-  font-size: 18px;
-  color: #8f8f94;
+  width: 100%;
+}
+.form {
+  .item {
+    border-radius: 10px;
+    // height: 50px;
+    padding: 10px;
+    :deep(.wd-input) {
+      background: transparent;
+      height: 100%;
+      border: none;
+      width: 100%;
+    }
+  }
 }
 </style>

+ 1 - 0
packages/merchant/src/types/uni-pages.d.ts

@@ -6,6 +6,7 @@
 interface NavigateToOptions {
   url: "/pages/home/index" |
        "/pages/about/about" |
+       "/pages/designer/index" |
        "/pages/login/index" |
        "/pages/material/index" |
        "/pages/messages/index" |

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