[6.10.0]
[fea] [删除车型维度]
This commit is contained in:
@@ -30,38 +30,6 @@ Object readMediaUrlConfigFromJsonFile(env){
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取各车型宣传视频本地配置
|
||||
* @param env
|
||||
* @return
|
||||
*/
|
||||
Object readProductWithVehicleConfigFromJsonFile(env){
|
||||
try {
|
||||
// 加载config.json 文件
|
||||
File file = new File("${rootDir}/app/config/productWithVehicle.json")
|
||||
def jsonSlurper = new JsonSlurper()
|
||||
// 解析json
|
||||
def config = jsonSlurper.parse(file)
|
||||
def flavorNames = variantVehicleName()
|
||||
def jsonOutput = new JsonOutput()
|
||||
def getKey = flavorNames
|
||||
config.get(env).each {key, value ->
|
||||
// 匹配flavor对应的 json
|
||||
println "${env}____ 对比${flavorNames.toLowerCase()}---------${key}---${value}"
|
||||
if(flavorNames.toLowerCase().contains("${env}${key.toLowerCase()}")){
|
||||
getKey = key
|
||||
println "对比结果${flavorNames.toLowerCase()}---------${key}"
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return jsonOutput.toJson(config.get(env).get(getKey))
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -139,5 +107,4 @@ ext {
|
||||
isBaiLing = this.&isBaiLing
|
||||
readMediaUrlConfigFromJsonFile = this.&readMediaUrlConfigFromJsonFile
|
||||
readMusicUrlConfigFromJsonFile = this.&readMusicUrlConfigFromJsonFile
|
||||
readProductWithVehicleConfigFromJsonFile = this.&readProductWithVehicleConfigFromJsonFile
|
||||
}
|
||||
Reference in New Issue
Block a user