You've already forked qlg.frontend
购物车引导页
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user