全局配置

小于 1 分钟

全局配置

工程根目录下的 zmip.config.js 文件来对工程进行全局配置,决定页面文件的路径。

目前浙江农信小程序的宿主环境有 完整配置项说明请参考小程序全局配置

使用丰收互联小程序功能请访问丰收互联小程序门户open in new window

以下是一个包含了部分常用配置选项的 zmip.config.js:

module.exports = {
  site: {
    commonVersion: "1.0.0",
    title: "Template",
    assetsDir: "images",
    imageLimit: 10000,
    mockPath: "mock",
    isMock: true,
    baseUrl: "/zmip",
    proxy: "http://localhost:8080/",
  },
  app: {
    window: {
      navigationBarBackgroundColor: "#ffffff",
      navigationBarTextStyle: "#333333",
      navigationBarTitleText: "",
      backgroundColor: "#f6f6f6",
      backgroundTextStyle: "#333333",
    },
  },
};