Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
ce34c007
Commit
ce34c007
authored
May 29, 2025
by
tao.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 1.公共样式 2.store
parent
eaaf1758
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
79 additions
and
29 deletions
+79
-29
App.vue
App.vue
+20
-14
index.js
api/index.js
+0
-4
common.less
common.less
+25
-0
TabBar.vue
components/TabBar.vue
+4
-2
main.js
main.js
+6
-3
counter.js
stores/counter.js
+17
-0
Brand.vue
views/Brand.vue
+1
-1
Home.vue
views/Home.vue
+1
-1
Integral.vue
views/Integral.vue
+1
-1
My.vue
views/My.vue
+4
-3
No files found.
App.vue
View file @
ce34c007
<
script
>
<
script
>
export
default
{
export
default
{
onLaunch
:
function
()
{
onLaunch
:
function
()
{
console
.
log
(
'App Launch'
)
console
.
log
(
"App Launch"
);
},
},
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'App Show'
)
console
.
log
(
"App Show"
);
},
},
onHide
:
function
()
{
onHide
:
function
()
{
console
.
log
(
'App Hide'
)
console
.
log
(
"App Hide"
);
}
},
}
};
</
script
>
</
script
>
<
style
>
<
style
lang=
"less"
>
/*每个页面公共css */
/*每个页面公共css */
</
style
>
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
</
style
>
api/index.js
View file @
ce34c007
...
@@ -6,7 +6,3 @@ export const userApi = {
...
@@ -6,7 +6,3 @@ export const userApi = {
demo
:
(
data
)
=>
api
.
post
(
'/demo'
,
data
),
demo
:
(
data
)
=>
api
.
post
(
'/demo'
,
data
),
}
}
// 导出 http 实例,方便直接使用
export
{
api
}
\ No newline at end of file
common.less
0 → 100644
View file @
ce34c007
// 主题色
@color-gold-main: #D3A358; // 尊贵金,用于主题色
@color-gold-cover: #B27C1E; // 真诚棕,用于覆盖主题色等上层或其他场景重点高亮颜色
// 辅助色
@color-gold-light: #5FDE0A5; // 闪耀金,用于辅助色
@color-white-soft: #FEF7F2; // 柔和白,用于辅助色
@color-purple-energy: #A68DBB; // 能量紫,用于辅助色
@color-pink-cute: #E5C5DB; // 可爱粉,用于辅助色
// 中性色
@color-black-deep: #1D1E25; // 深黑,用于一级文字/图标等
@color-black-medium: #6F6D67; // 中黑,用于次级文字/图标等
@color-gray-medium: #DBDFE3; // 中灰,用于未选中/失效状态等
@color-gray-light: #F6F8FA; // 浅灰,用于页面背景色/卡片底色等
.hide-scrollbar {
&::-webkit-scrollbar {
display:none;
width:0;
height:0;
color:transparent;
}
}
components/TabBar.vue
View file @
ce34c007
...
@@ -63,7 +63,9 @@ const handleTabClick = (index, item) => {
...
@@ -63,7 +63,9 @@ const handleTabClick = (index, item) => {
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"less"
scoped
>
@import '@/common.less';
.tab-bar {
.tab-bar {
position: fixed;
position: fixed;
bottom: 0;
bottom: 0;
...
@@ -122,7 +124,7 @@ const handleTabClick = (index, item) => {
...
@@ -122,7 +124,7 @@ const handleTabClick = (index, item) => {
top: 81rpx;
top: 81rpx;
&.active {
&.active {
color
:
#b27c1e
;
color:
@color-gold-cover
;
font-weight: 500;
font-weight: 500;
}
}
}
}
...
...
main.js
View file @
ce34c007
import
App
from
"./App"
;
import
App
from
"./App"
;
import
apiRequest
from
"@/api/request.js"
;
import
*
as
Pinia
from
'pinia'
;
// #ifndef VUE3
// #ifndef VUE3
import
Vue
from
"vue"
;
import
Vue
from
"vue"
;
import
"./uni.promisify.adaptor"
;
import
"./uni.promisify.adaptor"
;
import
{
api
}
from
"@/api/index.js"
;
// 全局挂载后使用
// 全局挂载后使用
Vue
.
prototype
.
$api
=
api
;
Vue
.
prototype
.
$api
=
api
Request
.
api
;
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
App
.
mpType
=
"app"
;
App
.
mpType
=
"app"
;
...
@@ -22,8 +22,11 @@ app.$mount();
...
@@ -22,8 +22,11 @@ app.$mount();
import
{
createSSRApp
}
from
"vue"
;
import
{
createSSRApp
}
from
"vue"
;
export
function
createApp
()
{
export
function
createApp
()
{
const
app
=
createSSRApp
(
App
);
const
app
=
createSSRApp
(
App
);
app
.
use
(
Pinia
.
createPinia
());
app
.
config
.
globalProperties
.
$api
=
apiRequest
.
api
;
return
{
return
{
app
,
app
,
Pinia
};
};
}
}
// #endif
// #endif
stores/counter.js
0 → 100644
View file @
ce34c007
import
{
defineStore
}
from
'pinia'
;
export
const
useCounterStore
=
defineStore
(
'counter'
,
{
state
:
()
=>
{
return
{
count
:
0
};
},
// 也可以这样定义
// state: () => ({ count: 0 })
actions
:
{
increment
()
{
console
.
log
(
this
.
count
);
this
.
count
++
;
},
},
});
\ No newline at end of file
views/Brand.vue
View file @
ce34c007
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
// 品牌故事组件逻辑
// 品牌故事组件逻辑
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.brand-container {
.brand-container {
padding: 20rpx;
padding: 20rpx;
...
...
views/Home.vue
View file @
ce34c007
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
// 首页组件逻辑
// 首页组件逻辑
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.home-container {
.home-container {
padding: 20rpx;
padding: 20rpx;
...
...
views/Integral.vue
View file @
ce34c007
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
// 积分服务组件逻辑
// 积分服务组件逻辑
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.integral-container {
.integral-container {
padding: 20rpx;
padding: 20rpx;
...
...
views/My.vue
View file @
ce34c007
...
@@ -194,7 +194,8 @@ onMounted(() => {
...
@@ -194,7 +194,8 @@ onMounted(() => {
defineExpose
({});
defineExpose
({});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"less"
scoped
>
@import '@/common.less';
.my-container {
.my-container {
min-height: 100vh;
min-height: 100vh;
background-color: #f5f5f5;
background-color: #f5f5f5;
...
@@ -217,7 +218,7 @@ defineExpose({});
...
@@ -217,7 +218,7 @@ defineExpose({});
}
}
.user-info {
.user-info {
background-color
:
#fef7f2
;
background-color:
@color-white-soft
;
padding: 30rpx;
padding: 30rpx;
width: 686rpx;
width: 686rpx;
...
@@ -325,7 +326,7 @@ defineExpose({});
...
@@ -325,7 +326,7 @@ defineExpose({});
.tool-title {
.tool-title {
font-size: 32rpx;
font-size: 32rpx;
font-weight: 500;
font-weight: 500;
color
:
#1d1e25
;
color:
@color-black-deep
;
margin-left: 21rpx;
margin-left: 21rpx;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment