diff --git a/js/confirmOrder.js b/js/confirmOrder.js
index 1e20e9d..9f5b733 100644
--- a/js/confirmOrder.js
+++ b/js/confirmOrder.js
@@ -271,7 +271,20 @@ mui.plusReady(function() {
$('.js_r').html(html1);
$('#loginName').html(data.loginName);
$('.userMoney').html(data.userMoney);
-
+
+ // 助购层级获取
+ // TODO: ajax
+ var _zgData = [
+ {level_id:1, user_id:2, user_name: "UID2名称", level_name: "第一层"},
+ {level_id:2, user_id:4, user_name: "UID4名称", level_name: "第二层"},
+ {level_id:3, user_id:6, user_name: "konodioda~~~~~~~~~~~~~6", level_name: "第三层"},
+ ]
+ let _zgHtml = ""
+ _zgData.forEach(function(each){
+ _zgHtml += '
'+
+ '
'+each.level_name+':
'+'
'+each.user_name.substr(0, 12)+'
'
+ })
+ $("#pay_select_level .con_1").html(_zgHtml)
$('#goodsTotalMoney').html(priceT);
} else {
mui.alert(data.msg);
@@ -514,6 +527,15 @@ mui.plusReady(function() {
}
})
+ // 助购层级选择
+ $('.pay').on('tap', '#selectHelpLevel', function() {
+ $("#pay_select_level").show();
+ })
+ $("#pay_select_level .con_1").on('tap', '.row', function(e){
+ $("#pay_select_level").hide();
+ $("#displayHelpLevel").text((this.dataset.user_name + "(" + this.dataset.level_name + ")").substr(0,12))
+ for(var _k in this.dataset){document.getElementById("displayHelpLevel").dataset[_k] = this.dataset[_k]}
+ })
var click = false;
$('.pay_btn').on('tap', function() {
@@ -533,7 +555,13 @@ mui.plusReady(function() {
isInvoice: 0,
invoiceId: 0,
invoiceClient: '',
- recordId: userCoupon
+ recordId: userCoupon,
+ }
+ if(document.getElementById("displayHelpLevel").dataset["level_id"] !== undefined){
+ data_send["helpLevel"] = document.getElementById("displayHelpLevel").dataset["level_id"]
+ }
+ if(document.getElementById("displayHelpLevel").dataset["user_id"] !== undefined){
+ data_send["helpUserId"] = document.getElementById("displayHelpLevel").dataset["user_id"]
}
$('.remark').each(function() {
data_send['remark_' + ($(this).attr('data-shopid'))] = $(this).val();
diff --git a/js/indentcon.js b/js/indentcon.js
index 4064789..063e7cf 100644
--- a/js/indentcon.js
+++ b/js/indentcon.js
@@ -235,7 +235,7 @@ mui.plusReady(function() {
$('#goodsTotalMoney').html($(this).parent().siblings('.combination').children('o').html())
orderNo = $(this).parent().parent().attr('data-orderNo');
if (pay_name == 1) {
- $('.pay_info .con_1 .row').eq(1).attr('style', 'display: none;');
+ $('.pay_info .con_1 .row').eq(0).attr('style', 'display: none;');
$('.pay_info .con_1 .row').eq(2).addClass('on');
that.attr('disabled', 'disabled');
mui.ajax(hqlgUrl('app/ect/getToEctNum'), {
@@ -268,12 +268,25 @@ mui.plusReady(function() {
}
})
} else {
- $('.pay_info .con_1 .row').eq(1).addClass('on');
- $('.pay_info .con_1 .row').eq(2).attr('style', 'display: none;');
+ $('.pay_info .con_1 .row').eq(2).addClass('on');
+ $('.pay_info .con_1 .row').eq(3).attr('style', 'display: none;');
$('.bg').css('display', 'block');
$(".pay").slideDown(300);
}
-
+ $('#loginName').html(localStorage.getItem("userName"));
+ // 助购层级获取
+ // TODO: ajax
+ var _zgData = [
+ {level_id:1, user_id:2, user_name: "UID2名称", level_name: "第一层"},
+ {level_id:2, user_id:4, user_name: "UID4名称", level_name: "第二层"},
+ {level_id:3, user_id:6, user_name: "konodioda~~~~~~~~~~~~~6", level_name: "第三层"},
+ ]
+ let _zgHtml = ""
+ _zgData.forEach(function(each){
+ _zgHtml += ''+
+ '
'+each.level_name+':
'+'
'+each.user_name.substr(0, 12)+'
'
+ })
+ $("#pay_select_level .con_1").html(_zgHtml)
})
$('.bg').on('tap', '.mui-icon-left-nav', function() {
@@ -304,6 +317,15 @@ mui.plusReady(function() {
}
})
+ // 助购层级选择
+ $('.pay').on('tap', '#selectHelpLevel', function() {
+ $("#pay_select_level").show();
+ })
+ $("#pay_select_level .con_1").on('tap', '.row', function(e){
+ $("#pay_select_level").hide();
+ $("#displayHelpLevel").text((this.dataset.user_name + "(" + this.dataset.level_name + ")").substr(0,12))
+ for(var _k in this.dataset){document.getElementById("displayHelpLevel").dataset[_k] = this.dataset[_k]}
+ })
$('.pay_btn').on('tap', function() {
payCode = $('.con_1 .on').attr('data-payCode');
////console.log(payCode)
@@ -312,6 +334,12 @@ mui.plusReady(function() {
isBatch: 0,
orderNo: orderNo
}
+ if(document.getElementById("displayHelpLevel").dataset["level_id"] !== undefined){
+ data_send["helpLevel"] = document.getElementById("displayHelpLevel").dataset["level_id"]
+ }
+ if(document.getElementById("displayHelpLevel").dataset["user_id"] !== undefined){
+ data_send["helpUserId"] = document.getElementById("displayHelpLevel").dataset["user_id"]
+ }
that.attr('disabled', 'disabled');
mui.ajax(hyhUrl('app/orders/succeed'), {
data: data_ljfk,
diff --git a/js/my.js b/js/my.js
index de0a7a5..3b1c60a 100644
--- a/js/my.js
+++ b/js/my.js
@@ -25,6 +25,8 @@ var localAuthType = localStorage.getItem("authType");
if (data.status == 1) {
userId = parseInt(data.data.user.userId);
authType = parseInt(data.data.user.authType);
+ localStorage.setItem("userId", userId);
+ localStorage.setItem("userName", data.data.user.userName)
var imgurl = data.data.user.userPhoto ? hyhImgUrl(data.data.user.userPhoto) : '../img/mujiimg.png';
if(1 == localAuthType){
//本地申请亲人认证
diff --git a/templete/confirmOrder.html b/templete/confirmOrder.html
index de4bd96..be00d0b 100644
--- a/templete/confirmOrder.html
+++ b/templete/confirmOrder.html
@@ -139,6 +139,10 @@
账号
+
-
+
diff --git a/templete/indentcon.html b/templete/indentcon.html
index ceb6b95..153f5b8 100644
--- a/templete/indentcon.html
+++ b/templete/indentcon.html
@@ -98,6 +98,10 @@
账号
+
+