[fea]
[删除车型维度]
This commit is contained in:
yangyakun
2025-01-23 14:55:57 +08:00
parent 496af11530
commit bf313f04c1
98 changed files with 1540 additions and 1689 deletions

View File

@@ -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
}