添加商品来源from_id;0其他,2微把,3够吧
This commit is contained in:
parent
cd2c6ed3a0
commit
762fe382a4
@ -4,6 +4,13 @@ var aliChannel = null; // 支付宝支付
|
|||||||
var channel = null; //支付通道
|
var channel = null; //支付通道
|
||||||
mui.init();
|
mui.init();
|
||||||
mui.plusReady(function() {
|
mui.plusReady(function() {
|
||||||
|
var self = plus.webview.currentWebview();
|
||||||
|
from_id = self.from?self.from:0
|
||||||
|
if(from_id==3){
|
||||||
|
$("#selectHelpLevel").show();
|
||||||
|
}else{
|
||||||
|
$("#selectHelpLevel").hide();
|
||||||
|
}
|
||||||
window.addEventListener('setAddress', function(e) {
|
window.addEventListener('setAddress', function(e) {
|
||||||
var addressId = localStorage.getItem('addressId') ? localStorage.getItem('addressId') : 0;
|
var addressId = localStorage.getItem('addressId') ? localStorage.getItem('addressId') : 0;
|
||||||
if (addressId == 0) {
|
if (addressId == 0) {
|
||||||
@ -273,18 +280,15 @@ mui.plusReady(function() {
|
|||||||
$('.userMoney').html(data.userMoney);
|
$('.userMoney').html(data.userMoney);
|
||||||
|
|
||||||
// 助购层级获取
|
// 助购层级获取
|
||||||
// TODO: ajax
|
JZL.ajax(qlgUrl('app/user_level/TreeList'),function(res){
|
||||||
var _zgData = [
|
var _zgData = JSON.parse(res);
|
||||||
{level_id:1, user_id:2, user_name: "UID2名称", level_name: "第一层"},
|
let _zgHtml = ""
|
||||||
{level_id:2, user_id:4, user_name: "UID4名称", level_name: "第二层"},
|
_zgData.forEach(function(each){
|
||||||
{level_id:3, user_id:6, user_name: "konodioda~~~~~~~~~~~~~6", level_name: "第三层"},
|
_zgHtml += '<div class="row clearfix" data-user_id="'+each.userId+'" data-user_name="'+each.userName+'" data-level_name="'+each.level+'">'+
|
||||||
]
|
'<p class="row_left">'+each.level+':</p>'+'<p class="row_right">'+each.userName.substr(0, 12)+'</p></div>'
|
||||||
let _zgHtml = ""
|
})
|
||||||
_zgData.forEach(function(each){
|
$("#pay_select_level .con_1").html(_zgHtml)
|
||||||
_zgHtml += '<div class="row clearfix" data-level_id="'+each.level_id+'" data-user_id="'+each.user_id+'" data-user_name="'+each.user_name+'" data-level_name="'+each.level_name+'">'+
|
|
||||||
'<p class="row_left">'+each.level_name+':</p>'+'<p class="row_right">'+each.user_name.substr(0, 12)+'</p></div>'
|
|
||||||
})
|
})
|
||||||
$("#pay_select_level .con_1").html(_zgHtml)
|
|
||||||
$('#goodsTotalMoney').html(priceT);
|
$('#goodsTotalMoney').html(priceT);
|
||||||
} else {
|
} else {
|
||||||
mui.alert(data.msg);
|
mui.alert(data.msg);
|
||||||
|
@ -256,6 +256,7 @@ mui.plusReady(function() {
|
|||||||
var isMiaosha = self.isMiaosha;
|
var isMiaosha = self.isMiaosha;
|
||||||
var MiaoshaSaleSpec = self.MiaoshaSaleSpec;
|
var MiaoshaSaleSpec = self.MiaoshaSaleSpec;
|
||||||
var specsId = '';
|
var specsId = '';
|
||||||
|
from_id = self.from_id?self.from_id:0
|
||||||
// //console.log(isMiaosha)
|
// //console.log(isMiaosha)
|
||||||
// isMiaosha = 1;
|
// isMiaosha = 1;
|
||||||
// MiaoshaSaleSpec = '0';
|
// MiaoshaSaleSpec = '0';
|
||||||
@ -662,8 +663,8 @@ mui.plusReady(function() {
|
|||||||
goodsType:goodsType,
|
goodsType:goodsType,
|
||||||
goodsId: goodsId,
|
goodsId: goodsId,
|
||||||
buyNum: buyNum,
|
buyNum: buyNum,
|
||||||
goodsSpecId: goodsSpecId
|
goodsSpecId: goodsSpecId,
|
||||||
|
from: from_id
|
||||||
},
|
},
|
||||||
dataType: 'json', //服务器返回json格式数据
|
dataType: 'json', //服务器返回json格式数据
|
||||||
type: 'post', //HTTP请求类型
|
type: 'post', //HTTP请求类型
|
||||||
@ -686,7 +687,7 @@ mui.plusReady(function() {
|
|||||||
},
|
},
|
||||||
extras: {
|
extras: {
|
||||||
// goodsId: goodsId
|
// goodsId: goodsId
|
||||||
|
from: from_id,
|
||||||
type: 1
|
type: 1
|
||||||
|
|
||||||
// ..... //自定义扩展参数,可以用来处理页面间传值
|
// ..... //自定义扩展参数,可以用来处理页面间传值
|
||||||
|
@ -83,6 +83,7 @@ mui.plusReady(function() {
|
|||||||
catId = self.data_catId;
|
catId = self.data_catId;
|
||||||
keyword = self.data_keyword;
|
keyword = self.data_keyword;
|
||||||
goodsType = self.goodsType?self.goodsType :"";
|
goodsType = self.goodsType?self.goodsType :"";
|
||||||
|
from_id = self.from_id?self.from_id:0;
|
||||||
$('.commoditylistnav').on('tap', '.nav_block', function() {
|
$('.commoditylistnav').on('tap', '.nav_block', function() {
|
||||||
page = 1;
|
page = 1;
|
||||||
count = 1;
|
count = 1;
|
||||||
@ -121,7 +122,8 @@ mui.plusReady(function() {
|
|||||||
page: 1,
|
page: 1,
|
||||||
condition: condition,
|
condition: condition,
|
||||||
desc: desc,
|
desc: desc,
|
||||||
goodsType :goodsType
|
goodsType :goodsType,
|
||||||
|
from: from_id
|
||||||
}
|
}
|
||||||
if (catId) {
|
if (catId) {
|
||||||
data.catId = catId;
|
data.catId = catId;
|
||||||
@ -162,7 +164,8 @@ mui.plusReady(function() {
|
|||||||
pagesize: 10,
|
pagesize: 10,
|
||||||
page: 1,
|
page: 1,
|
||||||
condition: 2,
|
condition: 2,
|
||||||
desc: 0
|
desc: 0,
|
||||||
|
from: from_id,
|
||||||
}
|
}
|
||||||
if (catId) {
|
if (catId) {
|
||||||
data_1.catId = catId;
|
data_1.catId = catId;
|
||||||
|
@ -263,7 +263,6 @@ mui.plusReady(function() {
|
|||||||
that.removeAttr('disabled');
|
that.removeAttr('disabled');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -274,18 +273,15 @@ mui.plusReady(function() {
|
|||||||
}
|
}
|
||||||
$('#loginName').html(localStorage.getItem("userName"));
|
$('#loginName').html(localStorage.getItem("userName"));
|
||||||
// 助购层级获取
|
// 助购层级获取
|
||||||
// TODO: ajax
|
JZL.ajax(qlgUrl('app/user_level/TreeList'),function(res){
|
||||||
var _zgData = [
|
var _zgData = JSON.parse(res);
|
||||||
{level_id:1, user_id:2, user_name: "UID2名称", level_name: "第一层"},
|
let _zgHtml = ""
|
||||||
{level_id:2, user_id:4, user_name: "UID4名称", level_name: "第二层"},
|
_zgData.forEach(function(each){
|
||||||
{level_id:3, user_id:6, user_name: "konodioda~~~~~~~~~~~~~6", level_name: "第三层"},
|
_zgHtml += '<div class="row clearfix" data-user_id="'+each.userId+'" data-user_name="'+each.userName+'" data-level_name="'+each.level+'">'+
|
||||||
]
|
'<p class="row_left">'+each.level+':</p>'+'<p class="row_right">'+each.userName.substr(0, 12)+'</p></div>'
|
||||||
let _zgHtml = ""
|
})
|
||||||
_zgData.forEach(function(each){
|
$("#pay_select_level .con_1").html(_zgHtml)
|
||||||
_zgHtml += '<div class="row clearfix" data-level_id="'+each.level_id+'" data-user_id="'+each.user_id+'" data-user_name="'+each.user_name+'" data-level_name="'+each.level_name+'">'+
|
|
||||||
'<p class="row_left">'+each.level_name+':</p>'+'<p class="row_right">'+each.user_name.substr(0, 12)+'</p></div>'
|
|
||||||
})
|
})
|
||||||
$("#pay_select_level .con_1").html(_zgHtml)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.bg').on('tap', '.mui-icon-left-nav', function() {
|
$('.bg').on('tap', '.mui-icon-left-nav', function() {
|
||||||
|
@ -6,7 +6,7 @@ mui.plusReady(function() {
|
|||||||
// tj.show();
|
// tj.show();
|
||||||
// mui.alert(e.target.attributes["data-id"].nodeValue);
|
// mui.alert(e.target.attributes["data-id"].nodeValue);
|
||||||
var data_id = this.attributes["data-goodsId"].nodeValue;
|
var data_id = this.attributes["data-goodsId"].nodeValue;
|
||||||
var goodsType =$(this).attr('data-goodsType')
|
var goodsType =$(this).attr('data-goodsType');
|
||||||
// //console.log(this.attributes["data-id"].nodeValue);
|
// //console.log(this.attributes["data-id"].nodeValue);
|
||||||
mui.openWindow({
|
mui.openWindow({
|
||||||
url: 'details.html',
|
url: 'details.html',
|
||||||
@ -19,7 +19,8 @@ mui.plusReady(function() {
|
|||||||
},
|
},
|
||||||
extras: {
|
extras: {
|
||||||
data_id: data_id,
|
data_id: data_id,
|
||||||
goodsType : goodsType?goodsType :""
|
goodsType : goodsType?goodsType :"",
|
||||||
|
from_id: from_id?from_id:0
|
||||||
// ..... //自定义扩展参数,可以用来处理页面间传值
|
// ..... //自定义扩展参数,可以用来处理页面间传值
|
||||||
},
|
},
|
||||||
createNew: false, //是否重复创建同样id的webview,默认为false:不重复创建,直接显示
|
createNew: false, //是否重复创建同样id的webview,默认为false:不重复创建,直接显示
|
||||||
|
@ -109,7 +109,7 @@ mui.plusReady(function() {
|
|||||||
$(this).children().removeClass('check_0').addClass('check_1');
|
$(this).children().removeClass('check_0').addClass('check_1');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if($('.check2 .check_0').length > 0){
|
if($('.check2 .check_1').length===0 && $('.check2 .check_0').length > 0){
|
||||||
$(".js .checks").removeClass('check_1').addClass('check_0');
|
$(".js .checks").removeClass('check_1').addClass('check_0');
|
||||||
}else{
|
}else{
|
||||||
$(".js .checks").removeClass('check_0').addClass('check_1');
|
$(".js .checks").removeClass('check_0').addClass('check_1');
|
||||||
|
@ -27,6 +27,7 @@ var isjiazai = 1;
|
|||||||
var nowPage = 1;
|
var nowPage = 1;
|
||||||
var isLoading = false;
|
var isLoading = false;
|
||||||
mui.plusReady(function() {
|
mui.plusReady(function() {
|
||||||
|
from_id=3;
|
||||||
getLocation();
|
getLocation();
|
||||||
function getLocation() {
|
function getLocation() {
|
||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
@ -106,7 +107,7 @@ mui.plusReady(function() {
|
|||||||
|
|
||||||
mui('.con').on('tap', '.bc_img', function() {
|
mui('.con').on('tap', '.bc_img', function() {
|
||||||
var goodsId = $(this).attr('data-goodsId');
|
var goodsId = $(this).attr('data-goodsId');
|
||||||
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId});
|
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId, from_id:3, from_id:3});
|
||||||
})
|
})
|
||||||
function getShopList(nowPage, pageSize) {
|
function getShopList(nowPage, pageSize) {
|
||||||
|
|
||||||
@ -319,7 +320,7 @@ $('.header').on('blur', '#keyword', function() {
|
|||||||
$(".header").on('tap', '.search button', function(e) {
|
$(".header").on('tap', '.search button', function(e) {
|
||||||
var searchName = $('#keyword').val();
|
var searchName = $('#keyword').val();
|
||||||
// JZL.openWindow('shopsList.html', 'shopsList.html', {data_keyword: searchName,goodsType:2});
|
// JZL.openWindow('shopsList.html', 'shopsList.html', {data_keyword: searchName,goodsType:2});
|
||||||
JZL.openWindow('goodslist.html', 'goodslist.html', {data_keyword: searchName,goodsType :2});
|
JZL.openWindow('goodslist.html', 'goodslist.html', {data_keyword: searchName,goodsType :2, from_id:3});
|
||||||
$('#keyword').val("")
|
$('#keyword').val("")
|
||||||
});
|
});
|
||||||
//跳转商品详情页
|
//跳转商品详情页
|
||||||
@ -327,5 +328,5 @@ mui("body").on('tap', '.bc_img', function() {
|
|||||||
var goodsId = $(this).attr('data-goodsId');
|
var goodsId = $(this).attr('data-goodsId');
|
||||||
var shopId = $(this).parent().parent().attr('data-shopId');
|
var shopId = $(this).parent().parent().attr('data-shopId');
|
||||||
var goodsType=$(this).attr('data-goodsType')
|
var goodsType=$(this).attr('data-goodsType')
|
||||||
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId,shopId: shopId,goodsType : goodsType});
|
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId,shopId: shopId,goodsType : goodsType, from_id:3});
|
||||||
})
|
})
|
||||||
|
@ -27,6 +27,7 @@ var isjiazai = 1;
|
|||||||
var nowPage = 1;
|
var nowPage = 1;
|
||||||
var isLoading = false;
|
var isLoading = false;
|
||||||
mui.plusReady(function() {
|
mui.plusReady(function() {
|
||||||
|
from_id: 2
|
||||||
getLocation();
|
getLocation();
|
||||||
function getLocation() {
|
function getLocation() {
|
||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
@ -106,7 +107,7 @@ mui.plusReady(function() {
|
|||||||
|
|
||||||
mui('.con').on('tap', '.bc_img', function() {
|
mui('.con').on('tap', '.bc_img', function() {
|
||||||
var goodsId = $(this).attr('data-goodsId');
|
var goodsId = $(this).attr('data-goodsId');
|
||||||
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId});
|
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId, from_id: 2});
|
||||||
})
|
})
|
||||||
function getShopList(nowPage, pageSize) {
|
function getShopList(nowPage, pageSize) {
|
||||||
|
|
||||||
@ -188,7 +189,7 @@ mui.plusReady(function() {
|
|||||||
// var goodsId = $(this).attr('data-goodsId');
|
// var goodsId = $(this).attr('data-goodsId');
|
||||||
var shopName = $(this).attr("data-shopName");
|
var shopName = $(this).attr("data-shopName");
|
||||||
var shopId = $(this).attr("data-shopId");
|
var shopId = $(this).attr("data-shopId");
|
||||||
JZL.openWindow('storeout.html', 'storeout.html', {shopName: shopName,shopId: shopId});
|
JZL.openWindow('storeout.html', 'storeout.html', {shopName: shopName,shopId: shopId, from_id:2});
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -320,7 +321,7 @@ $('.header').on('blur', '#keyword', function() {
|
|||||||
$(".header").on('tap', '.search button', function(e) {
|
$(".header").on('tap', '.search button', function(e) {
|
||||||
var searchName = $('#keyword').val();
|
var searchName = $('#keyword').val();
|
||||||
// JZL.openWindow('shopsList.html', 'shopsList.html', {data_keyword: searchName,goodsType:2});
|
// JZL.openWindow('shopsList.html', 'shopsList.html', {data_keyword: searchName,goodsType:2});
|
||||||
JZL.openWindow('goodslist.html', 'goodslist.html', {data_keyword: searchName,goodsType :2});
|
JZL.openWindow('goodslist.html', 'goodslist.html', {data_keyword: searchName,goodsType :2, from_id:2});
|
||||||
$('#keyword').val("")
|
$('#keyword').val("")
|
||||||
});
|
});
|
||||||
//跳转商品详情页
|
//跳转商品详情页
|
||||||
@ -328,5 +329,5 @@ mui("body").on('tap', '.bc_img', function() {
|
|||||||
var goodsId = $(this).attr('data-goodsId');
|
var goodsId = $(this).attr('data-goodsId');
|
||||||
var shopId = $(this).parent().parent().attr('data-shopId');
|
var shopId = $(this).parent().parent().attr('data-shopId');
|
||||||
var goodsType=$(this).attr('data-goodsType')
|
var goodsType=$(this).attr('data-goodsType')
|
||||||
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId,shopId: shopId,goodsType : goodsType});
|
JZL.openWindow('details.html', 'details.html' + goodsId, {data_id: goodsId,shopId: shopId,goodsType : goodsType, from_id:2});
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user