Skip to content

Commit

Permalink
初始化仓库
Browse files Browse the repository at this point in the history
  • Loading branch information
gaojianghua committed Nov 1, 2023
0 parents commit 0dd34d4
Show file tree
Hide file tree
Showing 19 changed files with 3,395 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Mac
.DS_Store
**/.DS_Store

# vim/vi
*.swp

# JavaScript
node_modules/
.node_modules/
.eslintcache
unpackage/dist/build/
unpackage/dist/dev/

# python
*.pyc
39 changes: 39 additions & 0 deletions App.uvue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script lang="uts">
let firstBackTime = 0
export default {
onLaunch: function () {
console.log('App Launch')
},
onShow: function () {
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
},
onLastPageBackPress: function () {
console.log('App LastPageBackPress')
if (firstBackTime == 0) {
uni.showToast({
title: '再按一次退出应用',
position: 'bottom',
})
firstBackTime = Date.now()
setTimeout(() => {
firstBackTime = 0
}, 2000)
} else if (Date.now() - firstBackTime < 2000) {
firstBackTime = Date.now()
uni.exit()
}
},
onExit: function () {
console.log('App Exit')
},
}
</script>

<style>
@import "./common/uni.css";
@import "./common/main.css";
@import "./common/common.css";
</style>
31 changes: 31 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<p align="center">
<img alt="logo" src="https://gongyue-shop.oss-cn-hangzhou.aliyuncs.com/GongYueLogo.png" width="120" height="120" style="margin-bottom: 10px;">
</p>
<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">UniApp-X TMP</h3>
<h3 align="center">UniApp-X骨架模板</h3>

## 说明

UniApp-X TMP,是基于[uni-app-x](https://uniapp.dcloud.net.cn/uni-app-x/)的项目骨架模板。集成实际业务中所需的各种封装工具,使开发者快速上手开发或项目二开。

## 目录骨架
- common 为公共css集成
* common.css 是用户自定义全局样式文件
* icon.css 是字体图标文件
* main.css 是全局原子css文件
* uni.css 是uniapp初始化css文件

- components 为自定义组件目录
* common 是公共组件目录
* global 是全局组件目录
* pages 是页面组件目录

- pages 为一级路由栈页面
* account 文件夹内是登录注册页面以及组件
* tabbar 文件夹内是tabbar底部导航栏对应的页面

- static 为静态资源目录
* 资源类型应做分类存放,再基于所属页面存放对应静态资源

- utils 为项目工具函数目录
* request 是uView的请求封装库
62 changes: 62 additions & 0 deletions common/common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* 设置全局样式 */
/* (1) 页面高度100%,默认字体28upx,默认行高1.8,背景颜色 */
page {
height: 100%;
font-size: 28rpx;
line-height: 1.8;
background: #FFFFFF;
}

body {
padding: 0;
margin: 0;
}

.page {
height: 100%;
background: #f5f5f5;
}

/* (2) 图片默认100%宽度 */
image {
width: 100%;
height: 100%;
}

/* 主色调 */
/* 主背景颜色(橙色)*/
.main-bg-color {
background: #fb7299;
}

/* 主点击背景颜色(淡橙色)*/
.main-bg-color-active:active {
background: rgba(247, 106, 133, 0.65);
}

/* 主字体颜色(橙色)*/
.main-text-color {
color: #fb7299;
}

/* 主边框颜色 */
.main-border-color {
border-color: #fb7290;
}

/* 主题卡片 */
.main-cell {
width: 100%;
height: 100%;
backdrop-filter: saturate(150%) contrast(70%) blur(1px);
-webkit-backdrop-filter: saturate(150%) contrast(70%) blur(1px);
background-color: rgba(255, 255, 255, .5);
box-shadow: 0 5rpx 5rpx rgba(100, 100, 100, 0.5);
background-size: 100% 100%;
}

/* 自定义 */
view,
text {
box-sizing: border-box !important;
}
45 changes: 45 additions & 0 deletions common/icon.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0dd34d4

Please sign in to comment.