Commit 84136940f122798b932e712203d5d24431945b3b

Authored by lixi
1 parent 574c38f2

更新新增称重服务接口封装的代码

commons/api/weighingServiceSave.py
@@ -46,12 +46,14 @@ class weighingServiceSave(): @@ -46,12 +46,14 @@ class weighingServiceSave():
46 self.market=market 46 self.market=market
47 self.url = weighingServiceSave.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) 47 self.url = weighingServiceSave.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
48 self.header = weighingServiceSave.header 48 self.header = weighingServiceSave.header
49 - self.header["jmsf_duplicate_commit_token"] = duplicateToken(market).jmsf_duplicate_commit_token() 49 + self.header["jmsf_duplicate_commit_token"] = duplicateToken(self.market).jmsf_duplicate_commit_token()
50 self.header["UAP_accessToken"] = self.market.cookies["UAP_accessToken"] 50 self.header["UAP_accessToken"] = self.market.cookies["UAP_accessToken"]
51 self.header["UAP_refreshToken"] = self.market.cookies["UAP_refreshToken"] 51 self.header["UAP_refreshToken"] = self.market.cookies["UAP_refreshToken"]
52 self.header["UAP_firmId"] = self.market.cookies["UAP_firmId"] 52 self.header["UAP_firmId"] = self.market.cookies["UAP_firmId"]
53 self.header["Host"] = com.get_global_config("global_data", "host", "gateway") 53 self.header["Host"] = com.get_global_config("global_data", "host", "gateway")
54 54
  55 + def refresh_commit_token(self):
  56 + self.header["jmsf_duplicate_commit_token"] = duplicateToken(self.market).jmsf_duplicate_commit_token()
55 57
56 58
57 59