助购层级逻辑优化
This commit is contained in:
parent
2a368763fb
commit
7f01ba829c
@ -287,7 +287,7 @@ mui.plusReady(function() {
|
||||
let _zgHtml = ""
|
||||
for (let levelId in _zgData) {
|
||||
let each = _zgData[levelId]
|
||||
_zgHtml += '<div class="row clearfix" data-user_id="'+each.userId+'" data-user_name="'+each.userName+'" data-level_name="'+each.level+'">'+
|
||||
_zgHtml += '<div class="row clearfix" data-user_id="'+each.userId+'" data-user_name="'+each.userName+'" data-level_name="'+each.level+'" data-level_id="'+each.level_id+'">'+
|
||||
'<p class="row_left">'+each.level+':</p>'+'<p class="row_right">'+each.userName.substr(0, 12)+'</p></div>'
|
||||
}
|
||||
$("#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();
|
||||
});
|
||||
|
@ -79,7 +79,7 @@ function getData(page) {
|
||||
}
|
||||
}
|
||||
html += '<div class="row" data-orderNo="' + this.orderNo + '" data-id="' + this.orderId +
|
||||
'" data-goodsType="' + this.goodsType + '" data-helpUserId="' + this.helpUserId + '" data-helpUserName="' + this.helpUser.userName + '"><div class="row_title"><div class="store_name">' + this.shopName +
|
||||
'" data-goodsType="' + this.goodsType + '" data-helpUserId="' + this.helpUserId + '" data-helpUserLevel="' + this.helpUserLevel + '" data-helpUserName="' + this.helpUser.userName + '"><div class="row_title"><div class="store_name">' + this.shopName +
|
||||
'</div><div class="indent_status shopPhone">商家电话:<a href="tel:' +
|
||||
this.phone + '">' + this.phone + '</a></div>' + shopConfirmHtml + '<div class="indent_status yellow">' +
|
||||
this.status + '</div></div><div class="row_con clearfix" data-id="' + this.orderId +
|
||||
@ -93,7 +93,7 @@ function getData(page) {
|
||||
html += '</div><div class="combination">共' + this.list.length + '件商品 合计:<o>¥' + this.realTotalMoney +
|
||||
'</o>(含运费¥' + this.deliverMoney + ')</div>';
|
||||
if(this.goodsType == 3){
|
||||
html += '<div class="combination">助购人:'+ this.helpUser.userName +'</div>';
|
||||
html += '<div class="combination">助购人:'+ this.helpUser.userName +'(第'+this.helpUserLevel+'层)</div>';
|
||||
}
|
||||
html += '<div class="btns clearfix">';
|
||||
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 += '<div class="row clearfix" data-user_id="'+each.userId+'" data-user_name="'+each.userName+'" data-level_name="'+each.level+'">'+
|
||||
_zgHtml += '<div class="row clearfix" data-user_id="'+each.userId+'" data-user_name="'+each.userName+'" data-level_name="'+each.level+'" data-level_id="'+each.level_id+'">'+
|
||||
'<p class="row_left">'+each.level+':</p>'+'<p class="row_right">'+each.userName.substr(0, 12)+'</p></div>'
|
||||
}
|
||||
$("#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秒;
|
||||
|
Loading…
x
Reference in New Issue
Block a user