Showing
1 changed file
with
4 additions
and
1 deletions
@@ -132,7 +132,9 @@ function cutdown() | @@ -132,7 +132,9 @@ 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 | 135 | + |
136 | + if method and method == "app.cutdownprice.cut" then | ||
137 | + if (not app_version) or ( app_version < "2.9.5") then | ||
136 | ngx.log(ngx.ERR, "[NOT ALLOWED]") | 138 | ngx.log(ngx.ERR, "[NOT ALLOWED]") |
137 | 139 | ||
138 | local rsp ='{"code": 10000, "message": "请升级小程序"}' | 140 | local rsp ='{"code": 10000, "message": "请升级小程序"}' |
@@ -140,6 +142,7 @@ function cutdown() | @@ -140,6 +142,7 @@ function cutdown() | ||
140 | ngx.exit(ngx.HTTP_OK) | 142 | ngx.exit(ngx.HTTP_OK) |
141 | return | 143 | return |
142 | end | 144 | end |
145 | + end | ||
143 | end | 146 | end |
144 | 147 | ||
145 | ---- function read request body | 148 | ---- function read request body |
-
Please register or login to post a comment