@ -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> |
@ -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> |
@ -0,0 +1,9 @@ | |||||
import App from './App.uvue' | |||||
import { createSSRApp } from 'vue' | |||||
export function createApp() { | |||||
const app = createSSRApp(App) | |||||
return { | |||||
app | |||||
} | |||||
} |
@ -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" : "" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,69 @@ | |||||
{ | |||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://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函数里面得到 | |||||
} | |||||
] | |||||
} | |||||
} |