Showing
3 changed files
with
10 additions
and
8 deletions
@@ -25,11 +25,13 @@ | @@ -25,11 +25,13 @@ | ||
25 | let addressList = addressData.data; | 25 | let addressList = addressData.data; |
26 | 26 | ||
27 | for (let i = 0; i < addressList.length; i++) { | 27 | for (let i = 0; i < addressList.length; i++) { |
28 | + let phone = _.get(addressList[i], 'phone') === 'null' ? '' : addressList[i].phone; | ||
29 | + | ||
28 | result.push({ | 30 | result.push({ |
29 | id: addressList[i].address_id || '', | 31 | id: addressList[i].address_id || '', |
30 | addressee: addressList[i].consignee || '', | 32 | addressee: addressList[i].consignee || '', |
31 | - address: addressList[i].area + addressList[i].address + (addressList[i].zip_code || ''), | ||
32 | - phone: (addressList[i].mobile || '') + (addressList[i].phone || ''), | 33 | + address: addressList[i].area + addressList[i].address + ' ' + (addressList[i].zip_code || ''), |
34 | + phone: (addressList[i].mobile || '') + ' ' + phone, | ||
33 | isPreferred: addressList[i].is_default === 'Y' ? 'true' : ''// 默认地址 | 35 | isPreferred: addressList[i].is_default === 'Y' ? 'true' : ''// 默认地址 |
34 | }); | 36 | }); |
35 | } | 37 | } |
@@ -57,7 +59,6 @@ | @@ -57,7 +59,6 @@ | ||
57 | }, { | 59 | }, { |
58 | isSelect: true, | 60 | isSelect: true, |
59 | labelText: '省份:', | 61 | labelText: '省份:', |
60 | - tips: '注:标"*"的为支持货到付款的地区', | ||
61 | tipsUrl: '/help/?category_id=48', | 62 | tipsUrl: '/help/?category_id=48', |
62 | selects: [{ | 63 | selects: [{ |
63 | key: 'province' | 64 | key: 'province' |
@@ -122,6 +123,7 @@ | @@ -122,6 +123,7 @@ | ||
122 | 123 | ||
123 | for (let i = 0; i < addressList.length; i++) { | 124 | for (let i = 0; i < addressList.length; i++) { |
124 | if (addressList[i].address_id === id) { | 125 | if (addressList[i].address_id === id) { |
126 | + addressList[i].phone = _.get(addressList[i], 'phone') === 'null' ? '' : addressList[i].phone; | ||
125 | respData.data = addressList[i]; | 127 | respData.data = addressList[i]; |
126 | break; | 128 | break; |
127 | } | 129 | } |
@@ -63,6 +63,7 @@ | @@ -63,6 +63,7 @@ | ||
63 | <label for="{{key}}">{{labelText}}</label> | 63 | <label for="{{key}}">{{labelText}}</label> |
64 | <input type="text" name='{{key}}' id="{{key}}" class="input-1 width-150" value="{{value}}"> | 64 | <input type="text" name='{{key}}' id="{{key}}" class="input-1 width-150" value="{{value}}"> |
65 | {{/if}} | 65 | {{/if}} |
66 | + {{#if tips}} | ||
66 | <span class="form-prompt form-info" id="{{key}}-tip"> | 67 | <span class="form-prompt form-info" id="{{key}}-tip"> |
67 | {{tips}} | 68 | {{tips}} |
68 | {{#isSelect}} | 69 | {{#isSelect}} |
@@ -71,6 +72,7 @@ | @@ -71,6 +72,7 @@ | ||
71 | <!--</a>--> | 72 | <!--</a>--> |
72 | {{/isSelect}} | 73 | {{/isSelect}} |
73 | </span> | 74 | </span> |
75 | + {{/if}} | ||
74 | </div> | 76 | </div> |
75 | {{/each}} | 77 | {{/each}} |
76 | </div> | 78 | </div> |
@@ -43,8 +43,7 @@ var address = { | @@ -43,8 +43,7 @@ var address = { | ||
43 | loadAreaData: function(pCode, toDomId, defaultValue, allCode) { | 43 | loadAreaData: function(pCode, toDomId, defaultValue, allCode) { |
44 | var the = this, | 44 | var the = this, |
45 | $toDom = $('#' + toDomId), | 45 | $toDom = $('#' + toDomId), |
46 | - i = 0, | ||
47 | - point = ''; | 46 | + i = 0; |
48 | 47 | ||
49 | var active, | 48 | var active, |
50 | val, | 49 | val, |
@@ -76,12 +75,11 @@ var address = { | @@ -76,12 +75,11 @@ var address = { | ||
76 | $toDom.append('<option value="0">' + defaultValue + '</option>'); | 75 | $toDom.append('<option value="0">' + defaultValue + '</option>'); |
77 | if (toDomId === the.streetsDomId) { | 76 | if (toDomId === the.streetsDomId) { |
78 | allCode === pCode ? selectAll = 'selected' : selectAll = ''; | 77 | allCode === pCode ? selectAll = 'selected' : selectAll = ''; |
79 | - $toDom.append('<option value="' + pCode + '" ' + selectAll + '>*全部</option>'); | 78 | + $toDom.append('<option value="' + pCode + '" ' + selectAll + '>全部</option>'); |
80 | } | 79 | } |
81 | for (i in jsonData.options) { | 80 | for (i in jsonData.options) { |
82 | if (jsonData.options[i]) { | 81 | if (jsonData.options[i]) { |
83 | val = jsonData.options[i]; | 82 | val = jsonData.options[i]; |
84 | - point = (toDomId === the.streetsDomId && val.is_support === 'Y') ? '*' : ''; | ||
85 | nId = val.value; | 83 | nId = val.value; |
86 | selecter = ''; | 84 | selecter = ''; |
87 | 85 | ||
@@ -89,7 +87,7 @@ var address = { | @@ -89,7 +87,7 @@ var address = { | ||
89 | nId === allCode.substr(0, nId.length)) { | 87 | nId === allCode.substr(0, nId.length)) { |
90 | selecter = 'selected'; | 88 | selecter = 'selected'; |
91 | } | 89 | } |
92 | - $toDom.append('<option value="' + nId + '" ' + selecter + '>' + point + val.text + '</option>'); | 90 | + $toDom.append('<option value="' + nId + '" ' + selecter + '>' + val.text + '</option>'); |
93 | } | 91 | } |
94 | } | 92 | } |
95 | } | 93 | } |
-
Please register or login to post a comment