From 7f01ba829c8f66faf20e3661e75db5eabb75d521 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 9 Oct 2019 21:30:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A9=E8=B4=AD=E5=B1=82=E7=BA=A7=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/confirmOrder.js | 5 ++++- js/indentcon.js | 31 +++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/js/confirmOrder.js b/js/confirmOrder.js index 4a0f4c6..21db8af 100644 --- a/js/confirmOrder.js +++ b/js/confirmOrder.js @@ -287,7 +287,7 @@ mui.plusReady(function() { let _zgHtml = "" for (let levelId in _zgData) { let each = _zgData[levelId] - _zgHtml += '
'+ + _zgHtml += '
'+ '

'+each.level+':

'+'

'+each.userName.substr(0, 12)+'

' } $("#pay_select_level .con_1").html(_zgHtml) @@ -575,6 +575,9 @@ mui.plusReady(function() { if(document.getElementById("displayHelpLevel").dataset["user_id"] !== undefined){ data_send["helpUserId"] = document.getElementById("displayHelpLevel").dataset["user_id"] } + if(document.getElementById("displayHelpLevel").dataset["level_no"] !== undefined){ + data_send["helpUserLevel"] = document.getElementById("displayHelpLevel").dataset["level_no"] + } $('.remark').each(function() { data_send['remark_' + ($(this).attr('data-shopid'))] = $(this).val(); }); diff --git a/js/indentcon.js b/js/indentcon.js index 85e1626..b0a61be 100644 --- a/js/indentcon.js +++ b/js/indentcon.js @@ -79,7 +79,7 @@ function getData(page) { } } html += '
' + this.shopName + + '" data-goodsType="' + this.goodsType + '" data-helpUserId="' + this.helpUserId + '" data-helpUserLevel="' + this.helpUserLevel + '" data-helpUserName="' + this.helpUser.userName + '">
' + this.shopName + '
商家电话:' + this.phone + '
' + shopConfirmHtml + '
' + this.status + '
共' + this.list.length + '件商品 合计:¥' + this.realTotalMoney + '(含运费¥' + this.deliverMoney + ')
'; if(this.goodsType == 3){ - html += '
助购人:'+ this.helpUser.userName +'
'; + html += '
助购人:'+ this.helpUser.userName +'(第'+this.helpUserLevel+'层)
'; } html += '
'; if (this.orderStatus == -2) { @@ -280,14 +280,19 @@ mui.plusReady(function() { // 助购层级获取 if(goodsType == '3'){ var helpUserId = $(this).parent().parent().attr('data-helpUserId'); + var helpUserLevel = $(this).parent().parent().attr('data-helpUserLevel'); var helpUserName = $(this).parent().parent().attr('data-helpUserName'); $("#selectHelpLevel").show().data("user_id", helpUserId).data("user_name", helpUserName); - $("#displayHelpLevel").text(helpUserName) + $("#displayHelpLevel").text(helpUserName+"(第"+helpUserLevel+"层)") + var _tmp = document.getElementById("displayHelpLevel"); + _tmp.dataset["user_id"]=helpUserId; + _tmp.dataset["user_name"]=helpUserName; + _tmp.dataset["level_id"]=helpUserLevel; JZL.ajax(qlgUrl('app/user_level/TreeList'),{},function(_zgData){ let _zgHtml = "" for (let levelId in _zgData) { let each = _zgData[levelId] - _zgHtml += '
'+ + _zgHtml += '
'+ '

'+each.level+':

'+'

'+each.userName.substr(0, 12)+'

' } $("#pay_select_level .con_1").html(_zgHtml) @@ -509,14 +514,20 @@ mui.plusReady(function() { } else { srcc = 'payByWallet'; } - + var postData = { + orderNo: orderNo, + isBatch: 0, + payPwd: payPwd + } + if(document.getElementById("displayHelpLevel").dataset["user_id"] !== undefined){ + postData["helpUserId"] = document.getElementById("displayHelpLevel").dataset["user_id"] + } + if(document.getElementById("displayHelpLevel").dataset["level_no"] !== undefined){ + postData["helpUserLevel"] = document.getElementById("displayHelpLevel").dataset["level_no"] + } mui.ajax(hyhUrl('app/' + payCode + '/' + srcc), { - data: { - orderNo: orderNo, - isBatch: 0, - payPwd: payPwd - }, + data: postData, dataType: 'json', //服务器返回json格式数据 type: 'post', //HTTP请求类型 timeout: 10000, //超时时间设置为10秒;