Commit bca9cf95 authored by GuanHua's avatar GuanHua

feat: 添加207环境的构建配置

parent 9104204b
......@@ -2,8 +2,8 @@ import BASE_CONFIG from '../base.config.json'
import { checkUrl } from '../utils'
const shopInfo = BASE_CONFIG.web.shopInfo
let webChannelInfo = shopInfo.filter(item => item.environment === 1 && item.type === 3)[0] // 渠道商城
let webChannelPointInfo = shopInfo.filter(item => item.environment === 1 && item.type === 5)[0] // 渠道积分商城
const webChannelInfo = shopInfo.filter(item => item.environment === 1 && item.type === 3)[0] // 渠道商城
const webChannelPointInfo = shopInfo.filter(item => item.environment === 1 && item.type === 5)[0] // 渠道积分商城
const defaultChannelRoute = '/channelmall' // 默认渠道商城根路径
const defaultIChannelPointRoute = '/pointsMall' // 默认渠道积分商城路径
......@@ -128,4 +128,4 @@ const ChannelRoute = {
],
}
export default ChannelRoute
\ No newline at end of file
export default ChannelRoute
......@@ -93,5 +93,28 @@ module.exports = {
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
},
207: {
SITE_ID: '1',
BACK_GATEWAY: 'http://10.0.1.207:8100',
USE_ROUTE_CONFIG: true,
SOCKET_URL: 'ws://10.0.1.207:8100',
ssh: JSON.stringify({
user: "root",
// Password optional, prompted if none given
password: "Shushangyun520",
host: "10.0.1.207",
port: 22,
localRoot: path.resolve('./dist/'),
remoteRoot: "/home/www/lingxi/lingxi-business-platform/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
}
}
......@@ -5,6 +5,7 @@
"upload:scm": "cross-env local=scm taskName=upload yarn scripts:build",
"upload:10": "cross-env local=10 taskName=upload yarn scripts:build",
"upload:25": "cross-env local=25 taskName=upload yarn scripts:build",
"upload:207": "cross-env local=207 taskName=upload yarn scripts:build",
"api": "god-ytt",
"scripts:build": "node scripts/run",
"scripts:build-yxc": "node scripts/run http://yxc-web-demo.shushangyun.com/api",
......@@ -20,6 +21,7 @@
"build:scm": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn build",
"build:all": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-all.wg.shushangyun.com yarn build",
"build:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.10:9400 yarn build",
"build:207": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn build",
"postinstall": "umi generate tmp",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"test": "umi-test",
......@@ -28,6 +30,7 @@
"start:scm": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn start",
"start:url": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true SOCKET_URL=ws://lingxi-all.wg.shushangyun.com yarn start",
"start:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.10:9400 yarn start",
"start:207": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn start",
"start:25": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.25:9400 yarn start"
},
"lint-staged": {
......
......@@ -369,11 +369,14 @@ const CommodityDetail = (props) => {
setSelectCommodityUnitPriceId(item.commodityUnitPriceAndPicId)
setCurrentPriceRange(sortUnitPrice(item.unitPrice))
setAttrAndValList(item)
let productId: number = item.id
if (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) {
productId = item.commodityUnitPriceAndPicId
if(getAuth()) {
let productId: number = item.id
if (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) {
productId = item.commodityUnitPriceAndPicId
}
getStockCountByProductId(productId)
}
getStockCountByProductId(productId)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment