提交 f95430a1cf26456838da077bdacb81b28fd1b9a2

作者 wangyu
2 个父辈 e882ce5a fafee59e

Merge branch '天津中天' into 苏州英格玛

# Conflicts:
#	pages/main/advancepayment/adPayHome.js
... ... @@ -192,17 +192,17 @@ Page({
192 192 // })
193 193 },
194 194
195   - handleDetailsData: function (data) {
  195 + handleDetailsData: function (data) {
196 196
197   - let titles = JSON.parse(data['slip_titles'])
  197 + let titles = JSON.parse(data['slip_titles'])
198 198 let detail = JSON.parse(data['detail'])
199   - let mapping_keys = data["mapping_keys"] ? data["mapping_keys"]:[]
  199 + let mapping_keys = data["mapping_keys"] ? data["mapping_keys"] : []
200 200 var details = []
201 201 for (var i = 0; i < titles.length; ++i) {
202 202 var titleData = titles[i]
203 203 var value = detail[titleData['key']]
204 204 var title = titleData['title']
205   - if (!title){
  205 + if (!title) {
206 206 title = titleData['original_column']
207 207 }
208 208 if (!value) {
... ... @@ -210,16 +210,16 @@ Page({
210 210 if (value != undefined) {
211 211 value += 'tax_rate' == titleData['key'] ? '%' : ''
212 212 }
213   - }
  213 + }
214 214 if (!title || !value) continue;
215   - if (mapping_keys.indexOf(title) == -1 && value == '0') continue;
  215 + if (mapping_keys.indexOf(titleData['key']) == -1 && value == '0') continue;
216 216 details.push({
217 217 title: title,
218 218 value: value
219 219 })
220 220 }
221   - console.log('details', details)
222   - return details
  221 + console.log('details', details)
  222 + return details
223 223 },
224 224
225 225 goItemDetails: function (e) {
... ...
注册登录 后发表评论