qlg.frontend/js/my_help_sale.js
2021-07-16 23:23:05 +08:00

190 lines
6.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mui.plusReady(function(){
JZL.ajax(qlgUrl('app/user_level/index'), {}, function(data) {
// console.log(data); //服务器返回响应,根据响应结果,分析是否登录成功;
var data = toJson(data, 1);
console.log(data);
for (let i in data) {
let each = data[i];
$("#helpSaleTable").append('<div class="row helpSaleTableRow shadown_wai"><span class="c1">'+each.count+'</span><span class="c2">'+each.total+'</span>'+
'<span class="c3">'+each.level+'</span></div>')
}
})
JZL.ajax(qlgUrl('app/user_level/stats'), {}, function(data) {
// console.log(data); //服务器返回响应,根据响应结果,分析是否登录成功;
var data = toJson(data, 1);
$('.zgThing').show();
console.log(data);
$('#zgTimes').text(data.zgTimes);
$('#zgAmounts').text('¥'+data.zgAmounts);
$('#myZgA').text(data.myZgA);
})
$("#userName").text(localStorage.getItem("userName"))
JZL.ajax(qlgUrl('app/users/getIndex'), {}, function(data) {
// console.log(data); //服务器返回响应,根据响应结果,分析是否登录成功;
var data = toJson(data, 1);
if (data.status == 1) {
userId = parseInt(data.data.user.userId);
localStorage.setItem("userName", data.data.user.loginName)
$("#userName").text(data.data.user.loginName)
$("#preGetCouponCount").text("购物股:¥"+data.data.expectedProductNum);
}
})
$("#preGetCoupon").on("tap",function(){
JZL.openWindow("vouchers.html", "vouchers.html", {
data_href: 'expectedProduct',
data_type: '1',
data_expect: '1'
})
})
$(".ZGYH").on("tap",function(){
JZL.openWindow("helpGet.html", "helpGet.html")
})
$("#myHelpSaleOrder").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'zgall',
extras: {
data_href: 'zgall'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".waitSend").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'zgwaitDeliver',
extras: {
data_href: 'zgwaitDeliver'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".waitDeliver").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'zgwaitReceive',
extras: {
data_href: 'zgwaitReceive'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".waitAppraise").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'zgwaitAppraise',
extras: {
data_href: 'zgwaitAppraise'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".abnormal").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'zgabnormal',
extras: {
data_href: 'zgabnormal'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".helpSaleConfirm").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'mzgwaitConfirm',
extras: {
data_href: 'mzgwaitConfirm'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".helpSalePaid").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'mzgwaitPaid',
extras: {
data_href: 'mzgwaitPaid'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".helpSaleUpload").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'mzgwaitUpload',
extras: {
data_href: 'mzgwaitUpload'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".helpSaleRecive").on("tap", function(){
mui.openWindow({
url: 'indent.html',
id: 'mzgwaitReceive',
extras: {
data_href: 'mzgwaitReceive'
},
createNew: false, //是否重复创建同样id的webview默认为false:不重复创建,直接显示
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
}
})
})
$(".helpSaleCart").on("tap", function(){
mui.openWindow({
url: "shoppingcart.html",
id: "shoppingcart.html_3",
extras: {
from_id: 3,
},
waiting: {
autoShow: true, //自动显示等待框默认为true
title: '正在加载...', //等待对话框上显示的提示内容
options: {
// width: waiting - dialog - widht, //等待框背景区域宽度,默认根据内容自动计算合适宽度
// height: waiting - dialog - height, //等待框背景区域高度,默认根据内容自动计算合适高度
// ......
}
}
})
})
$("#toHelpSale").on("tap", function(){
JZL.openWindow('zhugouba.html', 'zhugouba.html');
})
})