Authored by 郝肖肖

电子发票默认收货地址手机号

... ... @@ -65,6 +65,8 @@ const getAddressList = (req, res, next) => {
_.each(result.data, (d) => {
d.address_id = crypto.encryption(config.crypto.common, d.address_id + '');
d.address = cleanHtml.htmlDecode(d.address);
d.complete_mobile = d.mobile;
d.mobile = d.mobile.substr(0, 3) + '****' + d.mobile.substr(7);
});
defaultAd && (defaultAd.focus = true);
... ...
... ... @@ -17,7 +17,7 @@ const api = global.yoho.API;
*/
const getAddressDataAsync = (uid, limit) => {
return api.get('', {
method: 'app.address.gethidden',
method: 'app.address.get',
uid: uid,
limit: limit
}).then(result => {
... ...
... ... @@ -272,7 +272,7 @@
</span>
<div class="row-content">
<div class="invoice-content-radio-group">
<input value="" class='input invoice-mobile' type="text" maxlength="11" placeholder="请填写收票人手机">
<input value="{{invoice_mobile}}" class='input invoice-mobile' type="text" maxlength="11" placeholder="请填写收票人手机">
<span class="input-tip invoice-mobile-tip blue hide">
<span class="iconfont">&#xe60c;</span>
请输入正确的手机号
... ...
... ... @@ -95,6 +95,7 @@ function showInvoiceDialog() {
invoiceContent = $('.invoice-content-radio').first().data('value');
var title,
mobile = $('#address-list li.address.focus').data('complete-mobile') || '',
invoiceTypeName = '电子发票',
invoiceType = 2;
... ... @@ -134,10 +135,13 @@ function showInvoiceDialog() {
invoiceTypeName = '纸质发票';
} else {
$('.invoice-tab li:eq(0)').trigger('click');
$invoiceMobile.val($invoceDetail.data('mobile'));
mobile = $invoceDetail.data('mobile');
}
}
//设置默认收货地址手机号
$invoiceMobile.val(mobile.toString().substr(0, 3) + '****' + mobile.toString().substr(7));
// 设置radio选中
$('[data-value=' + invoiceTitleType + '].invoice-title-radio').find('.radio').addClass('checked');
$('[data-value=' + invoiceContent + '].invoice-content-radio').find('.radio').addClass('checked');
... ...
{{#each address}}
<li class="address{{#isY is_default}} default{{/isY}}{{#if focus}} focus{{/if}}"
data-id="{{address_id}}" data-name="{{consignee}}" data-mobile="{{mobile}}"
data-phone="{{phone}}" data-areacode="{{area_code}}" data-area="{{area}}" data-address="{{address}}">
data-phone="{{phone}}" data-areacode="{{area_code}}" data-area="{{area}}" data-address="{{address}}" data-complete-mobile="{{complete_mobile}}">
<div class="address-header"></div>
<div class="address-content">
<p class="default-or-not">
... ...