返回请求选座信息接口必备的sign信息 :return:
(h5_token: str, time_stamp, api_param)
| 145 | |
| 146 | |
| 147 | def get_sign_code(h5_token: str, time_stamp, api_param) -> str: |
| 148 | """ |
| 149 | 返回请求选座信息接口必备的sign信息 |
| 150 | |
| 151 | :return: |
| 152 | """ |
| 153 | node = execjs.get() |
| 154 | with open('signcode.js', 'r', encoding='utf-8') as f: |
| 155 | js_file = f.read() |
| 156 | js_exec = node.compile(js_file) |
| 157 | param1 = '{}&{}&12574478&'.format(h5_token, time_stamp) |
| 158 | |
| 159 | context = param1 + api_param |
| 160 | sign_code = js_exec.call('calcaulate', context) |
| 161 | return sign_code |
| 162 | |
| 163 | |
| 164 | def get_select_seat_params(item_id, data_id=None): |
no outgoing calls
no test coverage detected