quasar mode add cordova
cd src-cordova
cordova platform add android
cordova requirements
cordova plugin add cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-wkwebview-engine
cd ../
quasar dev -m cordova -T android
quasar dev -m android --ide
quasar build -m android
quasar build -m cordova -T android
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 20000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore ./app-release-unsigned.apk alias_name
zipalign -v 4 ./app-release-unsigned.apk HelloWorld.apk
调试手机端:chrome://inspect/#devices
const a = axios.create({
baseURL: process.env.SERVER_URL + u,
});
// 手机打包这里需要更换下 baseURL: process.env.SERVER_URL + u,
export const createBase = (u = '') => {
const a = axios.create({
baseURL: 'http://39.105.185.242:8203/cc-admin',
});
module.exports = function a(ctx) {
return {
supportTS: false,
supportIE: false,
boot: [
'index',
'filter',
'msg',
'/api',
],
css: [
'app.styl',
],
extras: [
'roboto-font',
'material-icons',
'mdi-v5',
],
framework: {
iconSet: 'material-icons',
lang: 'zh-hans',
importStrategy: 'all',
plugins: [
'Notify',
'Dialog',
'AppFullscreen',
'Loading',
],
config: {
notify: {
position: 'top',
timeout: 4000,
color: 'info',
icon: 'info',
actions: [{ icon: 'close', color: 'white' }],
},
},
},
animations: 'all',
build: {
// vueRouterMode: 'history',
vueCompiler: true, // 仅 Vue运行时
devtool: 'source-map',
transpile: true, // 执行babel转码
scopeHoisting: true, // 提升运行时性能
analyze: false, // 显示分析
modern: true, // ES6
extractCSS: false, // 从Vue文件中提取CSS
minify: true, // 缩小代码
preloadChunks: true, // 预加载
sourceMap: ctx.dev,
gzip: false,
extendWebpack(cfg) {
},
env: {
PRODUCT_NAME: 'CC-ADMIN企业级快速开发平台',
BASE_URL: '/cc-admin',
SERVER_URL: 'http://39.105.185.242:8203',
// SERVER_URL: 'http://127.0.0.1:8203',
},
},
devServer: {
https: false,
port: 9666,
open: true,
proxy: {
'/cc-admin': {
target: 'http://39.105.185.242:8203',
changeOrigin: true,
},
},
},
};
};
quasar build -m cordova -T android
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 20000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore ./app-release-unsigned.apk alias_name
zipalign -v 4 ./app-release-unsigned.apk HelloWorld.apk
调试手机端:chrome://inspect/#devices
修改APP名称:
src-cordova\config.xml
生成配套图标:
https://icon.wuruihong.com/
图标目录:cc-admin-web\src-cordova\platforms\android\app\src\main\res
默认是这套:mipmap-hdpi
src-cordova\platforms\android\app\src\main\AndroidManifest.xml
在这配置的
<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:usesCleartextTraffic="true">