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