网友回复
自己打包h5网页,然后把发布的h5放到electron目录自己去打包。具体步骤如下:
1、安装electron
cnpm install electron -g
2、安装electron-packager
cnpm install electron-packager -g
3、hbuilder中对uniapp的manifest.json修改
4、hbuilder中运行H5打包
{ "name" : "app-name", "version" : "0.1.0", "main" : "main.js" }新建main.js
const {app, BrowserWindow} = require('electron') const path = require('path') const url = require('url') // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let win function createWindow () { // Create the browser window. win = new BrowserWindow({width: 800, height: 600}) // and load the index.html of the app. win.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'f...
点击查看剩余70%