Bladeren bron

开发ing

zhoujump 3 dagen geleden
bovenliggende
commit
5a633389bc

+ 1 - 1
public/shareModule/injectShare.js

@@ -14,7 +14,7 @@
   addButton.addEventListener('click', function(){
     const parentElement = currentEl.parentNode;
     parentElement.insertBefore(shareCard, currentEl.nextSibling);
-    window.top.postMessage({msg:'mpShare init done'})
+    // window.top.postMessage({msg:'mpShare init done'})
     // addButton.style.display = 'none'
   })
   let addButtonStyle = document.createElement('style')

+ 3 - 0
src/App.vue

@@ -3,6 +3,7 @@
     <router-view
       :is-animation="isAnimation"
       :menu-router="menuRouter"
+      :user-menu-router="userMenuRouter"
       :menu-active="menuActive"
       :breadcrumb="breadcrumb"
       :is-collapse="isCollapse"
@@ -22,6 +23,7 @@ export default {
       roles: [],
       isAnimation: false,
       menuRouter: [],
+      userMenuRouter: [],
       menuActive: 0,
       breadcrumb: [],
       isCollapse: false,
@@ -85,6 +87,7 @@ export default {
     },
     refreshRoute() {
       this.menuRouter = this.$router.options.routes[0].children
+      this.userMenuRouter = this.$router.options.routes[1].children
       this.breadcrumb = this.$route.matched
       this.menuRouter.forEach((item, index) => {
         if (item.name === this.$route.name) {

+ 57 - 11
src/layout/index.vue

@@ -43,6 +43,16 @@
           </el-breadcrumb-item>
         </el-breadcrumb>
         <div class="packet">
+          <div @click="$router.push({name:'inviteRebate'})" class="item invite">
+            <div class="text">
+              <span>邀</span>
+              <span>请</span>
+              <span>有</span>
+              <span>奖</span>
+            </div>
+            <img class="coin" src="/static/image/goldcoin.png" />
+          </div>
+
           <div v-if="packetData.invitation" class="item" @click="$bus.$emit('showPacket',true)">
             <span class="el-icon-star-off" />
             邀请函
@@ -69,6 +79,10 @@
             <div class="nick-name">
               {{ this.user.nickname }}
             </div>
+            <div class="button" @click="goto({name:'userHome'})">
+              <span class="el-icon-refresh" />
+              切换身份
+            </div>
             <div class="button" @click="goto({name:'systemSetting'})">
               <span class="el-icon-setting" />
               系统设置
@@ -286,17 +300,6 @@ export default {
             &:hover{
               background: $menuHover;
             }
-            &.menu-inviteRebate{
-              &.is-active{
-                color: #543317;
-                background: linear-gradient(60deg, #f3e7dc, #ddbeab);
-                border-right: 4px solid #543317;
-              }
-              &:hover{
-                color: #543317;
-                background: linear-gradient(60deg, #f3e7dc, #ddbeab);
-              }
-            }
           }
           &:not(.el-menu--collapse) {
             width: 300px;
@@ -320,6 +323,7 @@ export default {
           display: flex;
           gap: 6px;
           .item{
+            transition-duration: 200ms;
             border: 1px solid #C4A793;
             cursor: pointer;
             font-size: 14px;
@@ -333,7 +337,49 @@ export default {
               border: 1px solid #D5DAE0;
               background-image: linear-gradient(60deg,#EFF2F6,#E1E6EE);
             }
+            &.invite{
+              margin-right: 16px;
+              gap: 2px;
+              display: flex;
+              align-items: center;
+              color: white;
+              border-radius: 24px;
+              border: 1px solid #E91161;
+              background-image: linear-gradient(60deg,#C124F5,#FF0814);
+              .text{
+                span{
+                  display: inline-block;
+                  animation: 3s wave infinite;
+                  &:nth-child(2){
+                    animation-delay: 100ms;
+                  }
+                  &:nth-child(3){
+                    animation-delay: 200ms;
+                  }
+                  &:nth-child(4){
+                    animation-delay: 300ms;
+                  }
+                }
+              }
+              .coin{
+                display: block;
+                height: 1.2em;
+                width: 1.2em;
+                object-fit: contain;
+                animation: 3s wave 400ms infinite;
+              }
+              @keyframes wave {
+                0%{ transform: translateY(0) }
+                10%{ transform: translateY(-2px) }
+                20%{ transform: translateY(1px) }
+                30%{ transform: translateY(0) }
+              }
+              &:hover{
+                scale: 1.02;
+              }
+            }
           }
+
         }
         .user-info{
           position: relative;

+ 125 - 0
src/layout/register.vue

@@ -0,0 +1,125 @@
+<script lang="ts">
+import Vue from 'vue'
+
+export default Vue.extend({
+  name: 'Register',
+  props: [
+    'userMenuRouter'
+  ],
+  data() {
+    return {
+      isHide: false
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    gotoPage(route) {
+      this.$router.push(route.path)
+    },
+    currentPage() {
+      return this.$route.name
+    },
+    isTabHide() {
+      return this.$route.meta.hidden
+    }
+  }
+})
+</script>
+
+<template>
+  <div :class="['home-body',isTabHide()?'hide-tab':'']">
+    <router-view class="router-view" />
+    <div class="tab-bar">
+      <template v-for="route in userMenuRouter">
+        <div v-if="!route.meta.hidden" :class="['tab-bar-item',route.name===currentPage()?'active':'']" @click="gotoPage(route)">
+          <div :class="['icon',route.meta.icon]" />
+          <div class="text">{{ route.meta.title }}</div>
+        </div>
+      </template>
+    </div>
+  </div>
+</template>
+
+<style scoped>
+.home-body{
+  display: grid;
+  width: 100%;
+  height: 100%;
+  grid-template-columns: 160px 1fr;
+  background-color: #FEFBFF;
+  .router-view{
+
+  }
+  .tab-bar{
+    background-color: #F2ECEE;
+    box-shadow: 0 0 4px #00000011;
+    border-radius: 0 32px 32px 0;
+    grid-row: 1;
+    padding: 64px 16px 16px;
+    display: flex;
+    flex-direction: column;
+    gap: 12px;
+    .tab-bar-item{
+      color: #665a70;
+      cursor: pointer;
+      display: flex;
+      gap: 4px;
+      flex-direction: column;
+      align-items: center;
+      width: 100%;
+      .icon{
+        text-align: center;
+        width: 120px;
+        border-radius: 64px;
+        font-size: 24px;
+        padding: 12px 0;
+      }
+      .text{
+        font-size: 14px;
+      }
+      &:hover{
+        color: #21182B;
+        .icon{
+          background-color: #E5DEE2;
+        }
+      }
+      &.active
+      {
+        color: #21182B;
+        .icon{
+          background-color: #DCDAF5;
+        }
+      }
+    }
+  }
+  @media (max-width: 768px) {
+    grid-template-columns: unset;
+    grid-template-rows: 1fr 82px;
+    .tab-bar{
+      border-radius: 0;
+      grid-row: unset;
+      flex-direction: row;
+      padding: 8px;
+      .tab-bar-item{
+        gap: 2px;
+        .icon{
+          padding: 10px 0;
+          font-size: 22px;
+        }
+      }
+    }
+  }
+  &.hide-tab {
+    grid-template-columns: 1fr;
+
+    .tab-bar {
+      display: none;
+    }
+
+    @media (max-width: 768px) {
+      grid-template-rows: 1fr;
+    }
+  }
+}
+</style>

File diff suppressed because it is too large
+ 1 - 1
src/permission.js


+ 76 - 37
src/router/index.js

@@ -405,7 +405,7 @@ export const constantRoutes = [
         component: () => import('@/views/setting/index'),
         name: 'setting',
         meta: {
-          title: '信息与配置',
+          title: '全局信息',
           icon: 'el-icon-setting',
           roles: 'setting'
         },
@@ -477,11 +477,31 @@ export const constantRoutes = [
             }
           },
           {
+            path: 'inviteRebate',
+            component: () => import('@/views/inviteRebate/index'),
+            name: 'inviteRebate',
+            meta: {
+              title: '邀请与返佣',
+              icon: 'el-icon-money',
+              roles: 'inviteRebate'
+            }
+          },
+          {
+            path: 'wallet',
+            component: () => import('@/views/wallet/index'),
+            name: 'wallet',
+            meta: {
+              title: '订单与钱包',
+              icon: 'el-icon-money',
+              roles: 'wallet'
+            }
+          },
+          {
             path: 'system',
             component: () => import('@/views/setting/systemSetting'),
             name: 'systemSetting',
             meta: {
-              title: '系统信息配置',
+              title: '系统配置',
               icon: 'el-icon-setting',
               roles: 'setting.system',
               func: [
@@ -510,20 +530,10 @@ export const constantRoutes = [
                 }
               ]
             }
-          }
+          },
         ]
       },
       {
-        path: 'inviteRebate',
-        component: () => import('@/views/inviteRebate/index'),
-        name: 'inviteRebate',
-        meta: {
-          title: '邀请返佣',
-          icon: 'el-icon-money',
-          roles: 'inviteRebate'
-        }
-      },
-      {
         path: '404',
         component: () => import('@/views/errorPage/404'),
         name: '404',
@@ -548,6 +558,59 @@ export const constantRoutes = [
     ]
   },
   {
+    path: '/register',
+    name: 'register',
+    component: () => import('@/layout/register'),
+    meta: {
+      title: '用户中心',
+      icon: 'el-icon-user'
+    },
+    children: [
+      {
+        path: 'home',
+        name: 'userHome',
+        component: () => import('@/views/user/home'),
+        meta: {
+          title: '首页',
+          icon: 'el-icon-s-home',
+          roles: 'allow'
+        }
+      },
+      {
+        path: 'me',
+        name: 'userMe',
+        component: () => import('@/views/user/me.vue'),
+        meta: {
+          title: '我的',
+          icon: 'el-icon-s-custom',
+          roles: 'allow'
+        }
+      },
+      {
+        path: '/',
+        name: 'userRegister',
+        component: () => import('@/views/user/register'),
+        meta: {
+          title: '用户注册',
+          icon: 'el-icon-user',
+          hidden: true,
+          roles: 'allow'
+        }
+      },
+      {
+        path: ':url',
+        name: 'userForm',
+        component: () => import('@/views/user/form'),
+        meta: {
+          title: '用户表单',
+          icon: 'el-icon-user',
+          hidden: true,
+          roles: 'allow'
+        }
+      }
+    ]
+  },
+  {
     path: '/login',
     name: 'login',
     component: () => import('@/views/login/index'),
@@ -559,30 +622,6 @@ export const constantRoutes = [
       roles: 'login'
     }
   },
-  {
-    path: '/register/:url',
-    name: 'userForm',
-    component: () => import('@/views/user/form.vue'),
-    hidden: true,
-    meta: {
-      title: '用户表单',
-      icon: 'el-icon-user',
-      hidden: true,
-      roles: 'user.form'
-    }
-  },
-  {
-    path: '/register',
-    name: 'userRegister',
-    component: () => import('@/views/user/register.vue'),
-    hidden: true,
-    meta: {
-      title: '用户注册',
-      icon: 'el-icon-user',
-      hidden: true,
-      roles: 'user.register'
-    }
-  },
   { path: '*', redirect: '/404', hidden: true }
 ]
 const createRouter = () => new Router({

+ 3 - 0
src/store/modules/user.js

@@ -30,6 +30,7 @@ export default {
           commit('SET_USER', {
             username: response.data.user_name,
             nickname: response.data.nick_name,
+            inviteCode: response.data.invite_code,
             avatar: response.data.avatar,
             email: response.data.email,
             phone: response.data.phone,
@@ -57,6 +58,7 @@ export default {
           commit('SET_USER', {
             username: response.data.user_name,
             nickname: response.data.nick_name,
+            inviteCode: response.data.invite_code,
             avatar: response.data.avatar,
             email: response.data.email,
             phone: response.data.phone,
@@ -99,6 +101,7 @@ export default {
             commit('SET_USER', {
               username: response.data.user_name,
               nickname: response.data.nick_name,
+              inviteCode: response.data.invite_code,
               avatar: response.data.avatar,
               email: response.data.email,
               phone: response.data.phone,

+ 142 - 3
src/views/inviteRebate/index.vue

@@ -2,14 +2,153 @@
 import Vue from 'vue'
 
 export default Vue.extend({
-  name: "index"
+  name: "index",
+  data() {
+    return {
+    }
+  },
+  computed: {
+    user() { return this.$store.state.user.user }
+  },
 })
 </script>
 
 <template>
-
+  <div class="body">
+    <div class="banner">
+      <img class="coin" src="/static/image/goldcoin.png">
+      <div class="title">邀请有奖</div>
+      <div class="desc">邀请新用户注册并消费,可获得现金奖励。</div>
+      <div class="invite-code">我的邀请码:<span class="code">{{user.inviteCode}}</span></div>
+    </div>
+    <div class="describe">
+      <div class="title">邀请返利</div>
+      <div class="desc">当您邀请朋友注册后,TA的每次消费,您都能获得TA消费金额一定比例的现金奖励。</div>
+    </div>
+    <div class="amount-count">
+      <div class="background">Rebate</div>
+      <div class="amount">
+        <div class="title">累计获得返利:</div>
+        <div class="count">¥100</div>
+      </div>
+      <div class="button-list">
+        <div class="button">
+          <div class="text">绑定取款账户</div>
+        </div>
+        <div class="button">
+          <div class="text">复制分享链接</div>
+        </div>
+      </div>
+    </div>
+  </div>
 </template>
 
 <style scoped>
-
+.body{
+  .describe{
+    color: #222222;
+    margin-top: 36px;
+    padding: 0 12px;
+    .title{
+      font-size: 26px;
+      font-weight: bolder;
+    }
+    .desc{
+      margin-top: 4px;
+      font-size: 15px;
+      color: #555555;
+    }
+  }
+  .banner{
+    border-radius: 16px;
+    padding: 16px 48px;
+    position: relative;
+    display: flex;
+    gap: 64px;
+    align-items: flex-end;
+    background-image: linear-gradient(90deg,#FF712D,#FFAB1D,#FF712D);
+    .coin{
+      transition-duration: 300ms;
+      transform-origin: center bottom;
+      filter: drop-shadow(0 0 8px #00000033);
+      width: 134px;
+      height: 96px;
+      object-fit: cover;
+      object-position: top center;
+      position: absolute;
+      right: 220px;
+      bottom: 0;
+    }
+    .title{
+      color: #fffcec;
+      font-weight: bolder;
+      font-size: 28px;
+      text-shadow: 0 0 6px #FF712D;
+    }
+    .desc{
+      color: #fffcec;
+      font-weight: bolder;
+      text-shadow: 0 0 6px #FF712D;
+    }
+    .invite-code{
+      margin-left: auto;
+      color: white;
+      font-size: 16px;
+      position: relative;
+      text-shadow: 0 0 6px #FF712D;
+      .code{
+        font-weight: bolder;
+      }
+    }
+    &:hover {
+      .coin{
+        transform: scale(1.04);
+      }
+    }
+  }
+  .amount-count{
+    position: relative;
+    overflow: hidden;
+    background-color: #759be8;
+    color: white;
+    border-radius: 16px;
+    margin-top: 36px;
+    padding: 24px 24px 24px 48px;
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-end;
+    .background{
+      pointer-events: none;
+      color: #ffffff09;
+      position: absolute;
+      font-size: 170px;
+      font-weight: bolder;
+      right: -20px;
+      bottom: -60px;
+    }
+    .button-list{
+      position: relative;
+      display: flex;
+      gap: 16px;
+      .button{
+        font-size: 14px;
+        cursor: pointer;
+        padding: 10px 20px;
+        border-radius: 8px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        background: #ffffff44;
+        &:hover{
+          background: #ffffff55;
+        }
+      }
+    }
+    .count{
+      margin-top: 12px;
+      font-size: 48px;
+      font-weight: bolder;
+    }
+  }
+}
 </style>

+ 19 - 11
src/views/preRegManage/edit.vue

@@ -490,7 +490,8 @@ export default Vue.extend({
       loading: false,
       copyShow: false,
       copyFormShow: false,
-      inForm: false
+      inForm: false,
+      askAi: ''
     }
   },
   watch: {
@@ -738,6 +739,10 @@ export default Vue.extend({
         e.preventDefault()
       }
     },
+    startAskAi() {
+      const url = `https://chat.baidu.com/search?word=匹配${this.askAi}的js正则表达式,不要输出前后斜杠`
+      window.open(url, '_blank')
+    },
     cloneToMe(currentData) {
       if (this.loading) { return }
       this.loading = true
@@ -998,7 +1003,7 @@ export default Vue.extend({
 
           <div class="tips">
             表单项介绍
-            <guide id="perRegFormItem"/>
+            <guide id="perRegFormItem" />
           </div>
           <el-input v-model="currentData.field_label" type="textarea" placeholder="请输入表单项介绍" />
 
@@ -1010,7 +1015,7 @@ export default Vue.extend({
           <template v-if="['input','select','textarea','time','date','region','email','phone'].includes(currentData.field_type)">
             <div class="tips">
               提示文字
-              <guide id="perRegFormPlaceholder"/>
+              <guide id="perRegFormPlaceholder" />
             </div>
             <el-input v-model="currentData.field_data.placeholder" placeholder="请输入提示文字" />
           </template>
@@ -1024,6 +1029,9 @@ export default Vue.extend({
               <el-option label="国内身份证号码" value="^[1-9]\d{5}(19\d{2}|20\d{2})((0[1-9])|(1[0-2]))((0[1-9])|([1-2]\d)|(3[0-1]))\d{3}(\d|X|x)$" />
               <el-option label="电子邮箱" value="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$" />
             </el-select>
+            <el-input v-model="askAi" class="pattern-select" placeholder="例:只允许输入网易邮箱">
+              <el-button slot="append" @click="startAskAi()">问Ai</el-button>
+            </el-input>
           </template>
 
           <template v-if="currentData.field_type==='region'">
@@ -1039,17 +1047,17 @@ export default Vue.extend({
           <template v-if="['timeRange','dateRange'].includes(currentData.field_type)">
             <div class="tips">
               起始提示文字
-              <guide id="perRegTimeStartPlaceholder"/>
+              <guide id="perRegTimeStartPlaceholder" />
             </div>
             <el-input v-model="currentData.field_data.placeholder" placeholder="请输入起始提示文字" />
             <div class="tips">
               结束提示文字
-              <guide id="perRegTimeEndPlaceholder"/>
+              <guide id="perRegTimeEndPlaceholder" />
             </div>
             <el-input v-model="currentData.field_data.endPlaceholder" placeholder="请输入结束提示文字" />
             <div class="tips">
               范围分隔符
-              <guide id="perRegTimeFencePlaceholder"/>
+              <guide id="perRegTimeFencePlaceholder" />
             </div>
             <el-input v-model="currentData.field_data.rangeSeparator" placeholder="请输入范围分隔符" />
           </template>
@@ -1057,7 +1065,7 @@ export default Vue.extend({
           <template v-if="['select','radio','checkbox'].includes(currentData.field_type)">
             <div class="tips">
               选项设定
-              <guide id="perRegOptionListEdit"/>
+              <guide id="perRegOptionListEdit" />
             </div>
             <div class="select-list">
               <div class="item">
@@ -1079,24 +1087,24 @@ export default Vue.extend({
           <template v-if="['number','slider'].includes(currentData.field_type)">
             <div class="tips">
               最小值
-              <guide id="perRegMinValue"/>
+              <guide id="perRegMinValue" />
             </div>
             <el-input v-model="currentData.field_data.min" @change="currentData.field_data.value=$event-0" />
             <div class="tips">
               最大值
-              <guide id="perRegMaxValue"/>
+              <guide id="perRegMaxValue" />
             </div>
             <el-input v-model="currentData.field_data.max" />
             <div class="tips">
               步进值
-              <guide id="perRegStepValue"/>
+              <guide id="perRegStepValue" />
             </div>
             <el-input v-model="currentData.field_data.step" />
           </template>
 
           <div class="tips">
             组件宽度
-            <guide id="perRegCompWidth"/>
+            <guide id="perRegCompWidth" />
           </div>
           <el-radio-group v-model="currentData.field_data.width" size="small">
             <el-radio-button :label="2">窄</el-radio-button>

+ 10 - 6
src/views/shareUtm/share.vue

@@ -790,20 +790,24 @@ export default Vue.extend({
         background-size: cover;
         background-position: center;
         position: relative;
-        background-image: url("/static/image/prototype/wallpost/prototypewall.jpg");
+        background-image: url("/static/image/prototype/wallpost/prototypewall1.jpg");
         display: flex;
         flex-direction: column;
-        justify-content: center;
+        justify-content: flex-end;
         align-items: center;
         overflow-y: auto;
+        .button-list{
+          margin-top: 24px;
+          margin-bottom: 38px;
+        }
         .post-inner{
-          padding: 8px 8px 13px 15px;
+          padding: 19px 20px 15px 20px;
           position: relative;
-          background-color: white;
+          //background-color: white;
           .border-box{
             z-index: 10;
-            border: 20px solid;
-            border-image: url("/static/image/prototype/wallpost/prototypepost.png") 20 stretch;
+            border: 21px solid;
+            border-image: url("/static/image/prototype/wallpost/prototypepost1.png") 21 stretch;
             position: absolute;
             top: 0;
             left: 0;

+ 190 - 0
src/views/user/home.vue

@@ -0,0 +1,190 @@
+<script lang="ts">
+import Vue from 'vue'
+
+export default Vue.extend({
+  name: "home",
+  data() {
+    return {
+      keywords: ''
+    }
+  },
+  computed: {
+    user() { return this.$store.state.user.user }
+  },
+  mounted() {
+    // this.autoFocus()
+  },
+  methods: {
+    autoFocus() {
+      this.$nextTick(() => {
+        document.getElementById('search').focus()
+      })
+    }
+  }
+})
+</script>
+
+<template>
+  <div class="user-body">
+    <div class="view">
+      <div class="head-bar">
+        <input id="search" class="search" placeholder="搜索我报名的展会" v-model="keywords"></input>
+        <img @click="$router.push({name:'userMe'})" class="avatar" :src="this.user.avatar?this.user.avatar:'/static/image/avatar.webp'">
+      </div>
+      <div class="expo-list-out">
+        <div class="expo-list">
+          <div class="expo-item">
+            <img class="head-image" src="/static/image/cover.webp"/>
+            <div class="text-cont">
+              <div class="expo-title">
+                展会展会111
+              </div>
+              <div class="expo-date">2025年12月12日</div>
+              <div class="expo-desc">
+                展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会
+              </div>
+              <div class="button-list">
+                <div class="button">申请邀请函</div>
+              </div>
+            </div>
+          </div>
+          <div class="expo-item">
+            <img class="head-image" src="/static/image/cover.webp"/>
+            <div class="text-cont">
+              <div class="expo-title">
+                展会展会111
+              </div>
+              <div class="expo-date">2025年12月12日</div>
+              <div class="expo-desc">
+                展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会
+              </div>
+              <div class="button-list">
+                <div class="button line">申请审核中</div>
+              </div>
+            </div>
+          </div>
+          <div class="expo-item">
+            <img class="head-image" src="/static/image/cover.webp"/>
+            <div class="text-cont">
+              <div class="expo-title">
+                展会展会111
+              </div>
+              <div class="expo-date">2025年12月12日</div>
+              <div class="expo-desc">
+                展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会
+              </div>
+              <div class="button-list">
+                <div class="button">待付款</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style scoped>
+.user-body{
+  height: 100%;
+  padding: 24px;
+  .view{
+    height: 100%;
+    margin: 0 auto;
+    width: 100%;
+    max-width: 768px;
+    display: grid;
+    grid-gap: 12px;
+    grid-template-rows:auto 1fr ;
+    .expo-list-out{
+      position: relative;
+      height: 100%;
+      width: 100%;
+      .expo-list{
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        overflow-y: auto;
+        .expo-item{
+          overflow: hidden;
+          border: 1px solid #CAC4CF;
+          border-radius: 16px;
+          &:not(:last-child){
+            margin-bottom: 16px;
+          }
+          .head-image{
+            background-color: #C8B3FD;
+            display: block;
+            width: 100%;
+            height: 160px;
+            object-fit: cover;
+          }
+          .text-cont{
+            padding: 18px 22px 16px;
+            background-color: #FEF7FF;
+            .expo-title{
+              color: #1D1B20;
+              font-size: 26px;
+            }
+            .expo-date{
+              color: #1D1B20;
+              margin-top: 4px;
+              font-size: 17px;
+            }
+            .expo-desc{
+              margin-top: 8px;
+              font-size: 15px;
+              color: #868188;
+              display: -webkit-box;
+              -webkit-line-clamp: 2;
+              -webkit-box-orient: vertical;
+              overflow: hidden;
+            }
+            .button-list{
+              margin-top: 16px;
+              display: flex;
+              justify-content: flex-end;
+              gap: 12px;
+              .button{
+                padding: 10px 24px;
+                border-radius: 24px;
+                color: #4a3777;
+                background-color: #C8B3FD;
+                &.line{
+                  outline: 1px solid #4a3777;
+                  background-color: unset;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    .head-bar{
+      display: grid;
+      grid-gap: 16px;
+      padding: 4px 0;
+      grid-template-columns: 1fr 48px;
+      .avatar{
+        border-radius: 50%;
+        width: 48px;
+        height: 48px;
+      }
+      .search{
+        font-size: 16px;
+        border: none;
+        outline: none;
+        padding: 0 24px;
+        background-color: #F2ECF4;
+        border-radius: 64px;
+        &:focus{
+          outline: 1px solid #4a3777;
+        }
+      }
+    }
+  }
+}
+</style>

+ 130 - 0
src/views/user/me.vue

@@ -0,0 +1,130 @@
+<script lang="ts">
+import Vue from 'vue'
+
+export default Vue.extend({
+  name: 'Me',
+  data() {
+    return {
+
+    }
+  },
+  computed: {
+    user() { return this.$store.state.user.user }
+  },
+  methods: {
+    gotoAdmin() {
+      this.$router.push({ name: 'Dashboard' })
+    },
+    logout() {
+      this.$store.dispatch('logout').then(() => {
+        this.$router.push({
+          name: 'userRegister'
+        })
+      })
+    }
+  }
+})
+</script>
+
+<template>
+  <div class="user-body">
+    <div class="view">
+      <div class="head-bar">
+        <div @click="$router.push({name:'userHome'})" class="search">搜索我报名的展会</div>
+      </div>
+      <div class="user-info">
+        <div class="avatar-text">
+          <img class="avatar" :src="this.user.avatar?this.user.avatar:'/static/image/avatar.webp'">
+          <div class="text">
+            <div class="nick-name">{{ user.nickname }}</div>
+            <div class="user-name">{{ user.username }}</div>
+          </div>
+        </div>
+        <div class="button-list">
+          <div class="button" @click="gotoAdmin()">切换身份</div>
+          <div class="button line" @click="logout()">退出登录</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style scoped>
+  .user-body{
+    height: 100%;
+    padding: 24px;
+    .view{
+      height: 100%;
+      margin: 0 auto;
+      width: 100%;
+      max-width: 768px;
+      .head-bar{
+        display: grid;
+        grid-gap: 16px;
+        padding: 4px 0;
+        grid-template-columns: 1fr;
+        .search{
+          height: 48px;
+          font-size: 16px;
+          border: none;
+          outline: none;
+          padding: 0 24px;
+          background-color: #F2ECF4;
+          border-radius: 64px;
+          color: #797575;
+          line-height: 47px;
+          &:focus{
+            outline: 1px solid #4a3777;
+          }
+        }
+      }
+      .user-info{
+        margin-top: 16px;
+        background-color: #FEF7FF;
+        padding: 16px;
+        border-radius: 24px;
+        border: 1px solid #CAC4CF;
+        display: flex;
+        gap: 12px;
+        flex-direction: column;
+        .button-list{
+          display: flex;
+          justify-content: flex-end;
+          gap: 12px;
+          .button{
+            padding: 10px 24px;
+            border-radius: 24px;
+            color: #4a3777;
+            background-color: #C8B3FD;
+            &.line{
+              outline: 1px solid #4a3777;
+              background-color: unset;
+            }
+          }
+        }
+        .avatar-text{
+          display: flex;
+          align-items: flex-end;
+          gap: 16px;
+          .text{
+            .nick-name{
+              font-size: 22px;
+              font-weight: bolder;
+              color: #4a3777;
+            }
+            .user-name{
+              color: #868188;
+              font-size: 16px;
+            }
+          }
+          .avatar{
+            width: 74px;
+            height: 74px;
+            background-color: #DCDAF5;
+            border-radius: 50%;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 44 - 26
src/views/user/register.vue

@@ -61,23 +61,23 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '展会信息获取失败:'+err,
+            message: '展会信息获取失败:' + err,
             type: 'error'
           })
         })
-      } else {
-        this.$router.push({
-          name: 'login'
-        })
       }
     },
     tokenLogin(token) {
       this.$store.dispatch('tokenLogin', { token: token }).then(res => {
-        this.gotoForm()
+        if (this.expo_key) {
+          this.gotoForm()
+        } else {
+          this.$router.push({ name: 'userHome' })
+        }
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '使用本地令牌登录失败'+err,
+          message: '使用本地令牌登录失败' + err,
           type: 'error'
         })
         this.$message.error(err.message)
@@ -122,7 +122,7 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '领英授权登录失败'+err,
+            message: '领英授权登录失败' + err,
             type: 'error'
           })
           showError()
@@ -146,7 +146,7 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '谷歌授权登录失败'+err,
+            message: '谷歌授权登录失败' + err,
             type: 'error'
           })
           showError()
@@ -174,7 +174,7 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '验证码发送失败:'+err,
+            message: '验证码发送失败:' + err,
             type: 'error'
           })
         })
@@ -201,7 +201,7 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '验证码发送失败'+err,
+            message: '验证码发送失败' + err,
             type: 'error'
           })
         })
@@ -233,14 +233,17 @@ export default Vue.extend({
         login_type: this.regWay ? '0' : '1',
         login_portal: 0
       }).then(res => {
-        this.gotoForm()
+        if (this.expo_key) {
+          this.gotoForm()
+        } else {
+          this.$router.push({ name: 'userHome' })
+        }
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '登录失败:'+err,
+          message: '登录失败:' + err,
           type: 'error'
         })
-
       })
     },
     gotoForm() {
@@ -265,7 +268,7 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '注册失败:'+err,
+            message: '注册失败:' + err,
             type: 'error'
           })
         })
@@ -280,7 +283,7 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '注册失败:'+err,
+            message: '注册失败:' + err,
             type: 'error'
           })
         })
@@ -298,7 +301,7 @@ export default Vue.extend({
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '注册失败:'+err,
+          message: '注册失败:' + err,
           type: 'error'
         })
       })
@@ -307,11 +310,12 @@ export default Vue.extend({
 })
 </script>
 <template>
-  <div class="body">
+  <div class="login-body">
     <div class="head">
-      <div class="title">
+      <div v-if="expo_key" class="title">
         {{ isLogin?'登录账号':'注册账号' }}
       </div>
+      <img v-else class="logo" src="/static/image/logo_big.png">
       <div class="desc">
         中国大陆观众建议使用手机号码进行注册登录。
       </div>
@@ -384,15 +388,15 @@ export default Vue.extend({
       <el-button type="primary" @click="submitLogin()">登录</el-button>
       <el-button type="text" @click="isLogin=false">没有账号?去注册。</el-button>
       <div class="third-login">
-        <div @click="openThirdLogin('wechat')" class="button wechat">
+        <div class="button wechat" @click="openThirdLogin('wechat')">
           <img class="icon" src="/static/image/icon/wechat.png">
           微信扫码登录
         </div>
-        <div @click="openThirdLogin('google')" class="button google">
+        <div class="button google" @click="openThirdLogin('google')">
           <img class="icon" src="/static/image/icon/google.png">
           谷歌授权登录
         </div>
-        <div @click="openThirdLogin('linkin')" class="button linkin">
+        <div class="button linkin" @click="openThirdLogin('linkin')">
           <img class="icon" src="/static/image/icon/linkin.png">
           领英授权登录
         </div>
@@ -446,15 +450,15 @@ export default Vue.extend({
       <el-button type="primary" @click="register()">注册</el-button>
       <el-button type="text" @click="isLogin=true">已有账号?去登陆。</el-button>
       <div class="third-login">
-        <div @click="openThirdLogin('wechat')" class="button wechat">
+        <div class="button wechat" @click="openThirdLogin('wechat')">
           <img class="icon" src="/static/image/icon/wechat.png">
           微信扫码登录
         </div>
-        <div @click="openThirdLogin('google')" class="button google">
+        <div class="button google" @click="openThirdLogin('google')">
           <img class="icon" src="/static/image/icon/google.png">
           谷歌授权登录
         </div>
-        <div @click="openThirdLogin('linkin')" class="button linkin">
+        <div class="button linkin" @click="openThirdLogin('linkin')">
           <img class="icon" src="/static/image/icon/linkin.png">
           领英授权登录
         </div>
@@ -495,7 +499,7 @@ export default Vue.extend({
   </div>
 </template>
 <style scoped lang="scss">
-.body{
+.login-body{
   width: 100%;
   height: 100%;
   overflow: hidden;
@@ -552,6 +556,10 @@ export default Vue.extend({
     border-radius: 4px;
     box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
     background: white;
+    @media (max-width:768px){
+      padding: 24px 20px;
+      margin: 24px 16px 0;
+    }
     .third-login{
       display: grid;
       grid-gap: 16px;
@@ -590,6 +598,12 @@ export default Vue.extend({
           }
         }
       }
+      @media (max-width:768px) {
+        grid-template-columns: 1fr 1fr;
+        .wechat{
+          display: none;
+        }
+      }
     }
     .piracy{
       color: #6B7280;
@@ -663,6 +677,10 @@ export default Vue.extend({
   .head{
     margin: 48px auto 0;
     max-width: 800px;
+    text-align: center;
+    .logo{
+      width: 180px;
+    }
     .title{
       text-align: center;
       font-size: 24px;

+ 15 - 0
src/views/wallet/index.vue

@@ -0,0 +1,15 @@
+<script lang="ts">
+import Vue from 'vue'
+
+export default Vue.extend({
+  name: "index"
+})
+</script>
+
+<template>
+
+</template>
+
+<style scoped>
+
+</style>