Authored by chunhua.zhang

add

@@ -132,13 +132,16 @@ function cutdown() @@ -132,13 +132,16 @@ function cutdown()
132 132
133 local method = http_request.get_method() 133 local method = http_request.get_method()
134 local app_version = http_request.get_req_param("app_version") 134 local app_version = http_request.get_req_param("app_version")
135 - if method and method == "app.cutdownprice.cut" and app_version < "2.9.5" then  
136 - ngx.log(ngx.ERR, "[NOT ALLOWED]")  
137 -  
138 - local rsp ='{"code": 10000, "message": "请升级小程序"}'  
139 - ngx.say(rsp)  
140 - ngx.exit(ngx.HTTP_OK)  
141 - return 135 +
  136 + if method and method == "app.cutdownprice.cut" then
  137 + if (not app_version) or ( app_version < "2.9.5") then
  138 + ngx.log(ngx.ERR, "[NOT ALLOWED]")
  139 +
  140 + local rsp ='{"code": 10000, "message": "请升级小程序"}'
  141 + ngx.say(rsp)
  142 + ngx.exit(ngx.HTTP_OK)
  143 + return
  144 + end
142 end 145 end
143 end 146 end
144 147