lib/lhj/command/yapi.rb in lhj-tools-0.1.63 vs lib/lhj/command/yapi.rb in lhj-tools-0.1.64
- old
+ new
@@ -59,11 +59,11 @@
def process(config_file)
load_config(config_file)
res_body = req_api_model
unless res_body['errcode'].to_i.zero?
- puts '请修改 ~/.lhj/yapi.yml文件的对应的__wpkreporterwid_,_yapi_token,_yapi_uid这三个值'.red
+ puts '请执行 lhj yapi-init 初始化配置'.red
return
end
return unless res_body && !res_body.empty?
# 1.print request result
@@ -310,16 +310,10 @@
default = m[:default]
puts_h "///#{des} #{default}"
case type
when 'integer'
puts_h "@property (nonatomic, assign) NSInteger #{key};"
- if des.include?('分') || des.include?('0.01')
- puts_h_red '/////////==========删掉其中一个属性'
- puts_h_red "@property (nonatomic, strong) MLCentNumber *#{key};"
- end
- when 'cent'
- puts_h "@property (nonatomic, strong) MLCentNumber *#{key};"
when 'string'
puts_h "@property (nonatomic, copy) NSString *#{key};"
when 'number'
puts_h "@property (nonatomic, strong) NSNumber *#{key};"
when 'float'
@@ -344,11 +338,9 @@
des = m[:description] || ''
des.gsub!(/\n/, ' ')
default = m[:default]
case type
when 'integer'
- puts_h "int #{key};//#{des} #{default}"
- when 'cent'
puts_h "int #{key};//#{des} #{default}"
when 'string'
puts_h "String #{key};//#{des} #{default}"
when 'number'
puts_h "double #{key};//#{des} #{default}"