Browse Source

上传文件至 '初始化'

sit
chaser 1 week ago
parent
commit
7c067b59e4
5 changed files with 190 additions and 0 deletions
  1. +49
    -0
      初始化/App.uvue
  2. +20
    -0
      初始化/index.html
  3. +9
    -0
      初始化/main.uts
  4. +43
    -0
      初始化/manifest.json
  5. +69
    -0
      初始化/pages.json

+ 49
- 0
初始化/App.uvue View File

@ -0,0 +1,49 @@
<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')
},
// #ifdef APP-ANDROID
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()
}
},
// #endif
onExit: function () {
console.log('App Exit')
},
}
</script>
<style>
@import "@/static/iconfont.css";
/*每个页面公共css */
.uni-row {
flex-direction: row;
}
body{
background-color: #ffffff;
}
.uni-column {
flex-direction: column;
}
</style>

+ 20
- 0
初始化/index.html View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main"></script>
</body>
</html>

+ 9
- 0
初始化/main.uts View File

@ -0,0 +1,9 @@
import App from './App.uvue'
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}

+ 43
- 0
初始化/manifest.json View File

@ -0,0 +1,43 @@
{
"name" : "111",
"appid" : "__UNI__ABF0653",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"uni-app-x" : {},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx7d74b5db6c1f7328",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"app" : {
"distribute" : {
"icons" : {
"android" : {
"hdpi" : "",
"xhdpi" : "",
"xxhdpi" : "",
"xxxhdpi" : ""
}
}
}
}
}

+ 69
- 0
初始化/pages.json View File

@ -0,0 +1,69 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/login",
"style": {
"navigationBarTitleText": "",
"navigationStyle":"custom"
}
},
{
"path": "pages/home/home",
"style": {
"navigationBarTitleText": "北京汽车有限公司",
"navigationStyle":"custom"
},
"needLogin": true
},
{
"path": "pages/index/wode",
"style": {
"navigationBarTitleText": "北京汽车有限公司",
"navigationStyle":"custom"
},
"needLogin": true
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app x",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/home/home",
"iconPath": "",
"selectedIconPath": "static/image/icon_component_HL.png",
"text": "首页"
}, {
"pagePath": "",
"iconPath": "",
"selectedIconPath": "static/image/icon_API_HL.png",
"text": "订单"
},
{
"pagePath": "pages/index/wode",
"iconPath": "",
"selectedIconPath": "static/image/icon_API_HL.png",
"text": "我的"
}
]
},
"condition" : { //
"current": 0, //(list )
"list": [
{
"name": "", //
"path": "", //
"query": "" //onLoad
}
]
}
}

Loading…
Cancel
Save