配置修改


接口路径配置文件位置

LaiKeJavaPages
├── components
│   ├── laiketuiCommon.vue #配置文件

修改的配置内容



/**
 * 商户/商城id:管理后台的 "平台" -> "商户列表" ;默认商城ID = 1
 * 如果新建子商城,需要部署移动端,则需要修改为子商城ID
 */
let DEFAULT_STORE_ID  = 1;

/**
 * 商户/商城id:管理后台的 "平台" -> "商户列表"
 */
const LKT_STORE_ID = uni.getStorageSync('store_id') ? uni.getStorageSync('store_id') : DEFAULT_STORE_ID

/**
 * 根路径(需修改)
 * 此处使用网关地址
 */

// const LKT_ROOT_URL = 'https://java.houjiemeishi.com'
const LKT_ROOT_URL = 'http://localhost:18001'


/**
  * 网关路由(无需修改)
 */ 
// const VERSION = ''
const VERSION = 'gw'


/**
 * 带版本号的路径:图片路径(需修改)
 * 使用网关地址+pic后缀
 */
const LKT_ROOT_VERSION_URL =  'https://java.houjiemeishi.com/pic/'

/**
 *   接口URL
 */
const LKT_API_URL =  LKT_ROOT_URL + '/' + VERSION + '?store_id=' + LKT_STORE_ID + '&2=2&'

/**
 * 来客电商H5默认路径(需修改)
 * 此处使用h5地址
 */
// const LKT_H5_DEFURL = "http://localhost:8086/#"
const LKT_H5_DEFURL = 'https://java.houjiemeishi.com/#/'

如果部署在域名二级目录下,则修改下图红圈内容为二级目录名称,比如移动端地址为laike.net/h5,则设置base和domain为"/h5"

修改移动端代码store/index.js中的url,改为后端接口地址

Copyright © www.laiketui.com all right reserved,powered by Gitbook该文件修订时间: 2025-03-05 10:15:57

results matching ""

    No results matching ""