feat(首页)
This commit is contained in:
parent
77f4ff3c58
commit
eec95f90c1
|
@ -9,19 +9,18 @@
|
|||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/login",
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
"navigationBarTitleText": "uni-app"
|
||||
},
|
||||
"meta": {
|
||||
"auth": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"aliasPath": "/",
|
||||
"path": "pages/index/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app"
|
||||
"navigationBarTitleText": "登录"
|
||||
},
|
||||
"meta": {
|
||||
"auth": false
|
||||
|
|
|
@ -1,20 +1,32 @@
|
|||
<template>
|
||||
<pb-layout
|
||||
title="首页"
|
||||
navbar="normal"
|
||||
tabbar="/pages/index/index"
|
||||
:bgStyle="bgStyle"
|
||||
opacityBgUi="bg-white"
|
||||
color="black"
|
||||
>
|
||||
<pb-layout navbar="inner" tabbar="/pages/index/index" :bgStyle="bgStyle">
|
||||
<view class="dashboard-module ss-p-x-30">
|
||||
<view class="merchant-info">
|
||||
<view class="merchant-info__logo ss-m-b-20">
|
||||
<image :src="state.merchantInfo.logo" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="merchant-info__name ss-m-b-20">{{ state.merchantInfo.name }}</view>
|
||||
<view class="merchant-info__description">{{ state.merchantInfo.description }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</pb-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const bgStyle = {
|
||||
backgroundImage:
|
||||
'http://101.43.181.163:9001/mall-backend/24dd085ca57fbfaa27c3e16788237b1d7a95c854c01b5e3e219aad6709bbb748.jpg',
|
||||
backgroundColor: '',
|
||||
backgroundColor: '#fff',
|
||||
description: '',
|
||||
}
|
||||
|
||||
const state = ref({
|
||||
merchantInfo: {
|
||||
name: '测试商家',
|
||||
logo: 'http://101.43.181.163:9001/mall-backend/24dd085ca57fbfaa27c3e16788237b1d7a95c854c01b5e3e219aad6709bbb748.jpg',
|
||||
description: '测试商家描述',
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
import { ref } from "vue";
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
const useSysStore = defineStore(
|
||||
"sys",
|
||||
() => {
|
||||
const theme = ref("");
|
||||
const mode = ref("light");
|
||||
const modeAuto = ref(false);
|
||||
const fontSize = ref(1);
|
||||
'sys',
|
||||
() => {
|
||||
const theme = ref('')
|
||||
const mode = ref('light')
|
||||
const modeAuto = ref(false)
|
||||
const fontSize = ref(1)
|
||||
|
||||
function setTheme(stheme = "") {
|
||||
console.log("setTheme", stheme);
|
||||
theme.value = stheme ? stheme : "orange";
|
||||
}
|
||||
function setTheme(stheme = '') {
|
||||
console.log('setTheme', stheme)
|
||||
theme.value = stheme ? stheme : 'orange'
|
||||
}
|
||||
|
||||
return {
|
||||
theme,
|
||||
mode,
|
||||
modeAuto,
|
||||
fontSize,
|
||||
setTheme,
|
||||
};
|
||||
},
|
||||
{
|
||||
persist: {
|
||||
enabled: true,
|
||||
strategies: [{ key: "sys-store" }],
|
||||
return {
|
||||
theme,
|
||||
mode,
|
||||
modeAuto,
|
||||
fontSize,
|
||||
setTheme,
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
{
|
||||
persist: {
|
||||
enabled: true,
|
||||
strategies: [{ key: 'sys-store' }],
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
export default useSysStore;
|
||||
export default useSysStore
|
||||
|
|
Loading…
Reference in New Issue