当前位置: 首页 > news >正文

网站商务方案抖音推广平台有哪些

网站商务方案,抖音推广平台有哪些,中山网站专业制作,thinkphp 网站管理网上找了一堆都不行#xff0c;根据这个步骤来肯定能用 1. 在项目下新建一个config.json文件 2. json文件中写入一些配置 3. vue.config.js中配置打包时把config.json文件copy到应用目录下 pluginOptions:{electronBuilder:{nodeIntegration:true,builderOptions: {extraReso…网上找了一堆都不行根据这个步骤来肯定能用 1. 在项目下新建一个config.json文件 2. json文件中写入一些配置 3. vue.config.js中配置打包时把config.json文件copy到应用目录下 pluginOptions:{electronBuilder:{nodeIntegration:true,builderOptions: {extraResources: [{ from: ./config.json, to: ../ }],nsis: {allowToChangeInstallationDirectory: true,oneClick: false,installerIcon: ./public/safeicon.ico, //安装logoinstallerHeaderIcon: ./public/safeicon.ico //安装logo},win: {icon: ./public/safeicon.ico //打包windows版本的logo},productName: APP, //应用的名称}}} 4. 修改 electorn 的入口文件 background.js 配置 const mainWindow new BrowserWindow({width: 800,height: 600,title: APPName,webPreferences: {nodeIntegration: true, // 允许html页面上的javascipt代码访问nodejs 环境api代码的能力enableRemoteModule: true, // 是否允许使用remotecontextIsolation: false,// 加载本地图片webSecurity: false, // 允许跨域webviewTag: true // 允许webview},icon: app://./safeicon.ico,show: false,autoHideMenuBar: true, // 隐藏顶部工具栏生产环境时设置为trueframe: false // 无边框})主要是开启这两个配置       nodeIntegration: true,  // 允许html页面上的javascipt代码访问nodejs 环境api代码的能力       enableRemoteModule: true, // 是否允许使用remote 5.  新增工具类 src\utils\getConfig.js const path window.require window.require(path); const fs window.require window.require(fs); const electron window.require window.require(electron)export function getSystem() {//这是mac系统if (process.platform darwin) {return 1;}//这是windows系统if (process.platform win32) {return 2;}//这是linux系统if (process.platform linux) {return 3;} } /**** returns 获取安装路径*/ export function getExePath() {// return path.dirname(C:);return path.dirname(electron.remote.app.getPath(exe)); } /**** returns 获取配置文件路径*/ export function getConfigPath() {if (getSystem() 1) {return getExePath() /config.json;} else {return getExePath() \\config.json;} } /*** 读取配置文件*/ export function readConfig() {return new Promise((res, rej) {console.log(fs, fs)fs.readFile(getConfigPath(), utf-8, (err, data) {let config if (data) {//有值config JSON.parse(data)}res(config)})}) } 6. 使用读取配置 import { readConfig } from /utils/getConfig.jsif (process.env.NODE_ENV ! development) {(async function () {const res await readConfig()console.log(res);axios.defaults.baseURL http://res.ip:res.port;})() } else {axios.defaults.baseURL /api; } 我此处是判断是否是开发环境不是开发环境下就去读取 config.json 的配置。你们根据实际情况调整。 ctrl shift i 开启控制台查看配置已生效
http://www.pierceye.com/news/675280/

相关文章:

  • 网站域名怎么做变更企业查询系统
  • 12306网站多少钱做的怎么研发软件app
  • 手机端建站井冈山保育院网站建设
  • 服装设计网站怎么做wordpress网站商务通
  • 重庆建设医院官方网站医疗网站源码
  • 大学生想做网站天元建设集团有限公司商业承兑汇票拒付最新消息
  • 怎么区分营销型网站文章类型的网站模版
  • 网站充值接口怎么做国家企业官网查询系统
  • 厦门网站建设工程网站备案幕布大小
  • 做家教去什么网站滕州做网站哪家好
  • 深圳市涂能装饰设计公司网站网站建设活动策划方案
  • 建设三合一网站找设计公司上哪个网站
  • 代理ip做网站流量饭店网站模板
  • 保险网站查询软件开发工程师和程序员的区别
  • 江都区城乡建设局网站马局下载app下载安卓免费
  • 网站做后台kuler 网站
  • 北京建网站公司飞沐扬中信息网
  • 商河网站建设公司南县网站建设推荐
  • 湛江企业网站建站模板网站开发 平台
  • c做的网站app开发制作专业吗
  • 杭州做网站公司做网站的文章
  • 那里有制作网站公司做网站需要了解的内容
  • 网站防护怎么做企业网站建设的ppt
  • 凡科网的网站建设好用吗wordpress在线朗读
  • 闽侯县建设局网站营销网站seo推广费用
  • 长乐区住房和城乡建设局网站测网站打开的速度的网址
  • 手机网站产品展示模板wordpress评论改成微博
  • 后盾网原创实战网站建设教程做网站和编程序
  • 东莞整站优化推广公司找火速如何做网站连接
  • 做ppt的模板的网站想学服装设计怎么入门