|
|
@@ -1,19 +1,19 @@ |
|
|
|
import Encrypt from "./crypto.js"; |
|
|
|
let BASE_URL = ''; |
|
|
|
// BASE_URL = 'https://witt.black-pa.com'; //线上正式 |
|
|
|
// BASE_URL = 'https://bpa.black-pa.com:21527'; //线上开发 |
|
|
|
BASE_URL = 'https://bpa.black-pa.com:21528'; //线上测试 |
|
|
|
BASE_URL = 'https://bpa.black-pa.com:21527'; //线上开发 |
|
|
|
// BASE_URL = 'https://bpa.black-pa.com:21528'; //线上测试 |
|
|
|
|
|
|
|
const Franchisee = '/kitchen'; //加盟商:0 |
|
|
|
const Order = '/order'; //订单: 1 |
|
|
|
const Pay = '/wechat/'; //支付: 2 |
|
|
|
|
|
|
|
const accountInfo = uni.getAccountInfoSync(); |
|
|
|
// if (accountInfo.miniProgram.envVersion === 'trial') { |
|
|
|
// BASE_URL = 'https://bpa.black-pa.com:21528'; |
|
|
|
// } else if (accountInfo.miniProgram.envVersion === 'release') { |
|
|
|
// BASE_URL = 'https://witt.black-pa.com'; |
|
|
|
// } |
|
|
|
if (accountInfo.miniProgram.envVersion === 'trial') { |
|
|
|
BASE_URL = 'https://bpa.black-pa.com:21528'; |
|
|
|
} else if (accountInfo.miniProgram.envVersion === 'release') { |
|
|
|
BASE_URL = 'https://witt.black-pa.com'; |
|
|
|
} |
|
|
|
|
|
|
|
const request = (options) => { |
|
|
|
let BlackApp = Encrypt(`[${options.url}]_[${new Date().getTime()}]`); |
|
|
@@ -42,17 +42,17 @@ const request = (options) => { |
|
|
|
if (options.url !== '/api/StoreHelper/GetAllStore') { |
|
|
|
TenantId = getApp().globalData.companyId; |
|
|
|
} |
|
|
|
// if (accountInfo.miniProgram.envVersion === 'trial') { |
|
|
|
// // 体验版:测试环境:贵州 78d635f7-8ee4-4be4-b26a-462016196826 |
|
|
|
// // 正式环境贵州: a7c18ca4-04eb-4bfe-a272-3104f2d84ff1 |
|
|
|
// TenantId = '78d635f7-8ee4-4be4-b26a-462016196826'; |
|
|
|
// } else if (accountInfo.miniProgram.envVersion === 'release') { |
|
|
|
// // 正式版:正式环境:海科 01911b43-8844-4d93-b916-34208e31ba66 |
|
|
|
// TenantId = 'a7c18ca4-04eb-4bfe-a272-3104f2d84ff1'; |
|
|
|
// } else { |
|
|
|
// // 开发版:开发环境:银泰 68d4de9c-a277-4d7a-a192-e9fa91327d41 |
|
|
|
// TenantId = '68d4de9c-a277-4d7a-a192-e9fa91327d41'; |
|
|
|
// } |
|
|
|
if (accountInfo.miniProgram.envVersion === 'trial') { |
|
|
|
// 测试环境:贵州 78d635f7-8ee4-4be4-b26a-462016196826 |
|
|
|
// 正式环境贵州: a7c18ca4-04eb-4bfe-a272-3104f2d84ff1 |
|
|
|
TenantId = '78d635f7-8ee4-4be4-b26a-462016196826'; |
|
|
|
} else if (accountInfo.miniProgram.envVersion === 'release') { |
|
|
|
// 正式版:正式环境:海科 01911b43-8844-4d93-b916-34208e31ba66 |
|
|
|
TenantId = '01911b43-8844-4d93-b916-34208e31ba66'; |
|
|
|
} else { |
|
|
|
// 开发版:开发环境:银泰 68d4de9c-a277-4d7a-a192-e9fa91327d41 |
|
|
|
TenantId = '68d4de9c-a277-4d7a-a192-e9fa91327d41'; |
|
|
|
} |
|
|
|
uni.request({ |
|
|
|
url: BASE_URL + interfaceType + options.url, |
|
|
|
method: options.method || 'GET', |
|
|
@@ -60,7 +60,7 @@ const request = (options) => { |
|
|
|
header: Object.assign({}, options.header, { |
|
|
|
'BlackApp': BlackApp, |
|
|
|
'AppId': getApp().globalData.appId, |
|
|
|
'TenantId': '68d4de9c-a277-4d7a-a192-e9fa91327d41' || TenantId , |
|
|
|
'TenantId': TenantId , |
|
|
|
}), |
|
|
|
timeout: 20000, |
|
|
|
success: response => { |
|
|
|