购物车引导页
This commit is contained in:
parent
762fe382a4
commit
2ac5f09ec2
@ -513,7 +513,22 @@ mui.plusReady(function() {
|
||||
})
|
||||
|
||||
mui('.header').on('tap', '.icon-cart', function() {
|
||||
JZL.openWindow('shoppingcart.html','shoppingcart.html');
|
||||
mui.openWindow({
|
||||
url: "shoppingcart.html",
|
||||
id: "shoppingcart.html_"+from_id,
|
||||
extras: {
|
||||
from_id: from_id,
|
||||
},
|
||||
waiting: {
|
||||
autoShow: true, //自动显示等待框,默认为true
|
||||
title: '正在加载...', //等待对话框上显示的提示内容
|
||||
options: {
|
||||
// width: waiting - dialog - widht, //等待框背景区域宽度,默认根据内容自动计算合适宽度
|
||||
// height: waiting - dialog - height, //等待框背景区域高度,默认根据内容自动计算合适高度
|
||||
// ......
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
//点击导航栏跳转
|
||||
mui('.nav').on('tap', '#nav1', function() {
|
||||
|
2
js/my.js
2
js/my.js
@ -275,7 +275,7 @@ var localAuthType = localStorage.getItem("authType");
|
||||
JZL.openWindow('setting.html', 'setting.html')
|
||||
})
|
||||
$('.mydata-content').on('tap', '.shoppingcart', function() {
|
||||
JZL.openWindow('shoppingcart.html', 'shoppingcart.html')
|
||||
JZL.openWindow('shoppingcart_warp.html', 'shoppingcart_warp.html')
|
||||
})
|
||||
$('.mydata-content').on('tap', '.shangdu', function() {
|
||||
if (authType == 2) {
|
||||
|
@ -27,6 +27,7 @@ var isjiazai = 1;
|
||||
var nowPage = 1;
|
||||
var isLoading = false;
|
||||
mui.plusReady(function() {
|
||||
from_id=1;
|
||||
getLocation();
|
||||
function getLocation() {
|
||||
if (navigator.geolocation) {
|
||||
|
@ -53,7 +53,7 @@ mui.plusReady(function() {
|
||||
localStorage.removeItem("userId");
|
||||
localStorage.removeItem("userName");
|
||||
mui.fire(plus.webview.getWebviewById('templete/my.html'), 'refresh');
|
||||
mui.fire(plus.webview.getWebviewById('templete/shoppingcart.html'), 'refresh');
|
||||
mui.fire(plus.webview.getWebviewById('templete/shoppingcart_warp.html'), 'refresh');
|
||||
mui.back();
|
||||
var data = toJson(data, 1);
|
||||
if(data.status == 1) {
|
||||
|
@ -5,6 +5,7 @@ $('.mui-action-back').show();
|
||||
function getMsg(pageNum, pagesizeNum) {
|
||||
|
||||
var data_msg = {
|
||||
from: from_id,
|
||||
page: pageNum ? pageNum : 1,
|
||||
pagesize: pagesizeNum ? pagesizeNum : 10
|
||||
}
|
||||
@ -76,6 +77,19 @@ mui.plusReady(function() {
|
||||
// var scroll = mui('.mui-scroll-wrapper').scroll({
|
||||
// deceleration: 0.002 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
|
||||
// });
|
||||
var self = plus.webview.currentWebview();
|
||||
from_id = self.from_id?self.from_id:0;
|
||||
switch(from_id){
|
||||
case 1:
|
||||
$(".title").text("逛商都购物车")
|
||||
break
|
||||
case 2:
|
||||
$(".title").text("助微吧购物车")
|
||||
break
|
||||
case 3:
|
||||
$(".title").text("助购吧购物车")
|
||||
break
|
||||
}
|
||||
window.addEventListener('refresh', function(e) {
|
||||
location.reload();
|
||||
})
|
||||
@ -118,7 +132,7 @@ mui.plusReady(function() {
|
||||
}
|
||||
mui.ajax(qlgUrl('app/carts/index'), {
|
||||
// mui.ajax(hyhUrl('app/carts/index'), {
|
||||
data: {},
|
||||
data: {from:from_id},
|
||||
dataType: 'json', //服务器返回json格式数据
|
||||
type: 'post', //HTTP请求类型
|
||||
timeout: 10000, //超时时间设置为10秒;
|
||||
@ -240,7 +254,8 @@ mui.plusReady(function() {
|
||||
height: '100%' //新页面高度,默认为100%
|
||||
},
|
||||
extras: {
|
||||
data_id: data_id
|
||||
data_id: data_id,
|
||||
from_id: from_id,
|
||||
// ..... //自定义扩展参数,可以用来处理页面间传值
|
||||
},
|
||||
createNew: false, //是否重复创建同样id的webview,默认为false:不重复创建,直接显示
|
||||
@ -281,6 +296,7 @@ mui.plusReady(function() {
|
||||
isChecks();
|
||||
mui.ajax(qlgUrl('app/carts/batchChangeCartGoods'), {
|
||||
data: {
|
||||
from: from_id,
|
||||
ids: ids,
|
||||
isCheck: isCheck
|
||||
},
|
||||
@ -318,6 +334,7 @@ mui.plusReady(function() {
|
||||
that.attr('disabled', 'disabled');
|
||||
mui.ajax(qlgUrl('app/carts/batchChangeCartGoods'), {
|
||||
data: {
|
||||
from: from_id,
|
||||
ids: ids,
|
||||
isCheck: isCheck
|
||||
},
|
||||
@ -357,6 +374,7 @@ mui.plusReady(function() {
|
||||
$(this).attr('disabled', 'disabled');
|
||||
mui.ajax(qlgUrl('app/carts/changeCartGoods'), {
|
||||
data: {
|
||||
from: from_id,
|
||||
id: cartId,
|
||||
isCheck: isCheck,
|
||||
buyNum: buyNum
|
||||
@ -414,6 +432,7 @@ mui.plusReady(function() {
|
||||
$('input').attr('disabled', 'disabled');
|
||||
mui.ajax(hyhUrl('app/carts/changeCartGoods'), {
|
||||
data: {
|
||||
from: from_id,
|
||||
id: cartId,
|
||||
buyNum: num
|
||||
},
|
||||
@ -476,6 +495,7 @@ mui.plusReady(function() {
|
||||
$('input').attr('disabled', 'disabled');
|
||||
mui.ajax(qlgUrl('app/carts/changeCartGoods'), {
|
||||
data: {
|
||||
from: from_id,
|
||||
id: cartId,
|
||||
buyNum: num
|
||||
},
|
||||
@ -501,6 +521,7 @@ mui.plusReady(function() {
|
||||
if (confirm('确定删除?')) {
|
||||
mui.ajax(hyhUrl('app/carts/delCart'), {
|
||||
data: {
|
||||
from: from_id,
|
||||
id: cartId
|
||||
},
|
||||
dataType: 'json', //服务器返回json格式数据
|
||||
|
@ -27,7 +27,7 @@ var isjiazai = 1;
|
||||
var nowPage = 1;
|
||||
var isLoading = false;
|
||||
mui.plusReady(function() {
|
||||
from_id: 2
|
||||
from_id= 2;
|
||||
getLocation();
|
||||
function getLocation() {
|
||||
if (navigator.geolocation) {
|
||||
|
106
templete/shoppingcart_warp.html
Normal file
106
templete/shoppingcart_warp.html
Normal file
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/mui.css" />
|
||||
</head>
|
||||
|
||||
<body style="visibility:hidden;">
|
||||
<div class="header">
|
||||
<div class="header_con">
|
||||
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="display: none;"></a>
|
||||
<p class="title">购物车</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="z"></div>
|
||||
<div class="block">
|
||||
<div class="row shadown_wai" id="cart_1"><img class="img" src="../img/setting_lock1.png" /><span class="r1">逛商都购物车</span><img
|
||||
class="youjiantou" src="../img/youjiantou.png" /></div>
|
||||
<div class="row shadown_wai" id="cart_2"><img class="img" src="../img/setting_lock1.png" /><span class="r1">助微吧购物车</span><img
|
||||
class="youjiantou" src="../img/youjiantou.png" /></div>
|
||||
<div class="row shadown_wai" id="cart_3"><img class="img" src="../img/setting_lock1.png" /><span class="r1">助购吧购物车</span><img
|
||||
class="youjiantou" src="../img/youjiantou.png" /></div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
mui.plusReady(function() {
|
||||
var element;
|
||||
var parent = document.body;
|
||||
element = document.createElement('script');
|
||||
element.src = localStorage.getItem("jsUrl") + 'common.js?ver=' + localStorage.getItem('version');
|
||||
parent.appendChild(element);
|
||||
element.onload = function(){
|
||||
var style = [JZL.getCssUrl('setting.css'),JZL.getCssUrl('sha.css'), JZL.getCssUrl('header.css'), JZL.getCssUrl('recommend.css'), JZL.getCssUrl("global.css")];
|
||||
JZL.css_init(style);
|
||||
setTimeout(function() {
|
||||
parent.style.visibility="visible";
|
||||
}, 100);
|
||||
};
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
mui.plusReady(()=>{
|
||||
$("#cart_1").click(()=>{
|
||||
mui.openWindow({
|
||||
url: "shoppingcart.html",
|
||||
id: "shoppingcart.html_1",
|
||||
extras: {
|
||||
from_id: 1,
|
||||
},
|
||||
waiting: {
|
||||
autoShow: true, //自动显示等待框,默认为true
|
||||
title: '正在加载...', //等待对话框上显示的提示内容
|
||||
options: {
|
||||
// width: waiting - dialog - widht, //等待框背景区域宽度,默认根据内容自动计算合适宽度
|
||||
// height: waiting - dialog - height, //等待框背景区域高度,默认根据内容自动计算合适高度
|
||||
// ......
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
$("#cart_2").click(()=>{
|
||||
mui.openWindow({
|
||||
url: "shoppingcart.html",
|
||||
id: "shoppingcart.html_2",
|
||||
extras: {
|
||||
from_id: 2,
|
||||
},
|
||||
waiting: {
|
||||
autoShow: true, //自动显示等待框,默认为true
|
||||
title: '正在加载...', //等待对话框上显示的提示内容
|
||||
options: {
|
||||
// width: waiting - dialog - widht, //等待框背景区域宽度,默认根据内容自动计算合适宽度
|
||||
// height: waiting - dialog - height, //等待框背景区域高度,默认根据内容自动计算合适高度
|
||||
// ......
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
$("#cart_3").click(()=>{
|
||||
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, //等待框背景区域高度,默认根据内容自动计算合适高度
|
||||
// ......
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user