网站信息,登录,用户

This commit is contained in:
Jason
2022-09-08 19:09:53 +08:00
parent 669b91a99e
commit 0f47284235
13 changed files with 399 additions and 175 deletions

View File

@@ -2,6 +2,7 @@ import { createSSRApp } from 'vue'
import App from './App.vue'
import plugins from './plugins'
import './styles/index.scss'
import './router'
export function createApp() {
const app = createSSRApp(App)
app.use(plugins)

View File

@@ -3,9 +3,9 @@
class="bg-white login min-h-full flex flex-col items-center px-[40rpx] pt-[80rpx] box-border"
>
<view>
<u-image src="" mode="widthFix" height="160" width="160" />
<u-image :src="appStore.config.website.logo" mode="widthFix" height="160" width="160" />
</view>
<view class="mt-4">这里是商城名称</view>
<view class="mt-4">{{ appStore.config.website.name }}</view>
<view class="w-full mt-[60rpx]">
<u-form borderBottom>
<template v-if="scene == LoginTypeEnum.ACCOUNT">
@@ -117,8 +117,9 @@ import { login } from '@/api/account'
import { smsSend } from '@/api/app'
import { SMSEnum } from '@/enums/appEnums'
import { useLockFn } from '@/hooks/useLockFn'
import { useAppStore } from '@/stores/app'
import { useUserStore } from '@/stores/user'
import { reactive, ref, shallowRef, watch } from 'vue'
import { reactive, ref, shallowRef } from 'vue'
enum LoginTypeEnum {
MOBILE = 'mobile',
ACCOUNT = 'account',
@@ -130,6 +131,7 @@ const codeTips = ref('')
const isCheckAgreement = ref(false)
const userStore = useUserStore()
const appStore = useAppStore()
const formData = reactive({
username: '',
password: '',

View File

@@ -7,7 +7,9 @@ interface AppSate {
export const useAppStore = defineStore({
id: 'appStore',
state: (): AppSate => ({
config: {}
config: {
website: {}
}
}),
getters: {},
actions: {