|
@@ -79,14 +79,11 @@ var productList = new Vue({
|
|
//非会员
|
|
//非会员
|
|
if(!GLOBAL_VIP_FLAG === 1) return false;
|
|
if(!GLOBAL_VIP_FLAG === 1) return false;
|
|
// 商品所有机构可见
|
|
// 商品所有机构可见
|
|
- if(pros.priceFlag === 0 ) return true;
|
|
|
|
- console.log('11111111111')
|
|
|
|
|
|
+ if(pros.priceFlag === 0 && pros.svipProductFlag === 1 ) return true;
|
|
// 商品价格仅资质机构可见
|
|
// 商品价格仅资质机构可见
|
|
- if(pros.priceFlag === 2 && GLOBAL_USER_IDENTITY === 2) return true;
|
|
|
|
- console.log('222222222222')
|
|
|
|
|
|
+ if(pros.priceFlag === 2 && pros.svipProductFlag === 1 && GLOBAL_USER_IDENTITY === 2) return true;
|
|
// 商品价格仅医美机构可见
|
|
// 商品价格仅医美机构可见
|
|
- if(pros.priceFlag === 3 && GLOBAL_USER_IDENTITY === 2 && GLOBAL_CLUB_TYPE == 1) return true;
|
|
|
|
- console.log('33333333333')
|
|
|
|
|
|
+ if(pros.priceFlag === 3 && pros.svipProductFlag === 1 && GLOBAL_USER_IDENTITY === 2 && GLOBAL_CLUB_TYPE == 1) return true;
|
|
// 其它
|
|
// 其它
|
|
return false;
|
|
return false;
|
|
},
|
|
},
|
|
@@ -133,10 +130,8 @@ var productList = new Vue({
|
|
newFlag: this.params.newFlag, // 查询新品标记,默认0,新品1
|
|
newFlag: this.params.newFlag, // 查询新品标记,默认0,新品1
|
|
promotionFlag: this.params.promotionFlag, // 查询促销标记,默认0,促销1
|
|
promotionFlag: this.params.promotionFlag, // 查询促销标记,默认0,促销1
|
|
},function (res) {
|
|
},function (res) {
|
|
- console.log(res);
|
|
|
|
if (res.code === 0 && res.data ) {
|
|
if (res.code === 0 && res.data ) {
|
|
var result = JSON.parse(res.data);
|
|
var result = JSON.parse(res.data);
|
|
- console.log(result.items);
|
|
|
|
_self.listRecord = result.total;
|
|
_self.listRecord = result.total;
|
|
var resultData = setSearchProductList(result.items, _self.userId, function(){
|
|
var resultData = setSearchProductList(result.items, _self.userId, function(){
|
|
_self.$forceUpdate();
|
|
_self.$forceUpdate();
|
|
@@ -166,7 +161,6 @@ var productList = new Vue({
|
|
getCommoditySearchQUeryBrand:function() { // 查询筛选项品牌
|
|
getCommoditySearchQUeryBrand:function() { // 查询筛选项品牌
|
|
var _self = this;
|
|
var _self = this;
|
|
ProductApi.getCommoditySearchQUeryBrand(_self.brandParam,function (response) {
|
|
ProductApi.getCommoditySearchQUeryBrand(_self.brandParam,function (response) {
|
|
- console.log(response);
|
|
|
|
if (response.code === 0 && response.data ) {
|
|
if (response.code === 0 && response.data ) {
|
|
var data = response.data;
|
|
var data = response.data;
|
|
_self.defaultBrandLists = data.map((el, index) => {
|
|
_self.defaultBrandLists = data.map((el, index) => {
|
|
@@ -254,41 +248,9 @@ var productList = new Vue({
|
|
handleConfirmScreen:function(){
|
|
handleConfirmScreen:function(){
|
|
this.params.num = 1;
|
|
this.params.num = 1;
|
|
this.listData = [];
|
|
this.listData = [];
|
|
- console.log('_self.params.brandIds',this.params.brandIds)
|
|
|
|
this.getListByKeyword();
|
|
this.getListByKeyword();
|
|
this.isProductScreen = false;
|
|
this.isProductScreen = false;
|
|
}
|
|
}
|
|
- // getListByCategory: function (path, categoryId) {
|
|
|
|
- // var _self = this;
|
|
|
|
- // $.getJSON(spiServer+"/search/query/product/"+ path ,{
|
|
|
|
- // id: categoryId,
|
|
|
|
- // identity: IDENTITY,
|
|
|
|
- // pageSize: this.params.size,
|
|
|
|
- // pageNum: this.params.num,
|
|
|
|
- // sortField: this.params.sortField,
|
|
|
|
- // sortType: this.params.sortType
|
|
|
|
- // }, function (r) {
|
|
|
|
- // if (r.code === 0 && r.data) {
|
|
|
|
- // var result = JSON.parse(r.data);
|
|
|
|
- // _self.listRecord = result.total;
|
|
|
|
- // var resultData = setSearchProductList(result.items, _self.userId, function(){
|
|
|
|
- // _self.$forceUpdate();
|
|
|
|
- // setTimeout(function(){
|
|
|
|
- // // 图片懒加载
|
|
|
|
- // $("img[data-original]").lazyload();
|
|
|
|
- // },500);
|
|
|
|
- // });
|
|
|
|
- // if(isPC){
|
|
|
|
- // _self.listData = resultData;
|
|
|
|
- // }else{
|
|
|
|
- // _self.listData = _self.listData.concat(resultData);
|
|
|
|
- // }
|
|
|
|
- // console.log(_self.listData)
|
|
|
|
- // }
|
|
|
|
- // _self.listLoading = false;
|
|
|
|
- // _self.requestFlag = true;
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
},
|
|
},
|
|
created: function () {
|
|
created: function () {
|
|
if(isPC){
|
|
if(isPC){
|
|
@@ -300,7 +262,6 @@ var productList = new Vue({
|
|
if(this.hrefBrandId){
|
|
if(this.hrefBrandId){
|
|
this.params.brandIds = this.hrefBrandId +',';
|
|
this.params.brandIds = this.hrefBrandId +',';
|
|
}
|
|
}
|
|
- console.log('hrefBrandId',this.hrefBrandId)
|
|
|
|
if(this.params.promotionFlag == 1){
|
|
if(this.params.promotionFlag == 1){
|
|
this.isActiviChecked = true;
|
|
this.isActiviChecked = true;
|
|
}else{
|
|
}else{
|
|
@@ -337,32 +298,6 @@ var productList = new Vue({
|
|
this.getListByKeyword();
|
|
this.getListByKeyword();
|
|
// 获取对应品牌列表
|
|
// 获取对应品牌列表
|
|
this.getCommoditySearchQUeryBrand();
|
|
this.getCommoditySearchQUeryBrand();
|
|
- // if (this.searchFlag) {
|
|
|
|
- // // 获取列表数据
|
|
|
|
- // this.getListByKeyword();
|
|
|
|
- // } else {
|
|
|
|
- // // category=1000-1001-1005
|
|
|
|
- // if (!getUrlParam("category")) {
|
|
|
|
- // this.listLoading = false;
|
|
|
|
- // return false;
|
|
|
|
- // }
|
|
|
|
- // var category = getUrlParam("category").split("-");
|
|
|
|
- // this.params.bid = category[0];
|
|
|
|
- // this.params.sid = category[1];
|
|
|
|
- // this.params.tid = category[2];
|
|
|
|
- // // 根据分类获取数据
|
|
|
|
- // if (this.params.tid && this.params.tid>0) {
|
|
|
|
- // this.getListByCategory("tinyType", this.params.tid);
|
|
|
|
- // } else if (this.params.sid && this.params.sid>0){
|
|
|
|
- // this.getListByCategory("smallType", this.params.sid);
|
|
|
|
- // } else if (this.params.bid && this.params.bid>0) {
|
|
|
|
- // this.getListByCategory("bigType", this.params.bid);
|
|
|
|
- // } else {
|
|
|
|
- // alertInfo("URL参数异常!", function(){
|
|
|
|
- // window.location.href = "/";
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
},
|
|
},
|
|
mounted: function () {
|
|
mounted: function () {
|
|
var _self = this;
|
|
var _self = this;
|
|
@@ -382,20 +317,6 @@ var productList = new Vue({
|
|
_self.params.num = next;
|
|
_self.params.num = next;
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
_self.getListByKeyword();
|
|
_self.getListByKeyword();
|
|
-
|
|
|
|
- // if (_self.searchFlag) {
|
|
|
|
- // // 获取列表数据
|
|
|
|
- // _self.getListByKeyword();
|
|
|
|
- // } else {
|
|
|
|
- // // 根据分类获取数据
|
|
|
|
- // if (_self.params.tid && _self.params.tid>0) {
|
|
|
|
- // _self.getListByCategory("tinyType", _self.params.tid);
|
|
|
|
- // } else if (_self.params.sid && _self.params.sid>0){
|
|
|
|
- // _self.getListByCategory("smallType", _self.params.sid);
|
|
|
|
- // } else if (_self.params.bid && _self.params.bid>0) {
|
|
|
|
- // _self.getListByCategory("bigType", _self.params.bid);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
}
|
|
}
|
|
_self.requestFlag = false;
|
|
_self.requestFlag = false;
|
|
}else{
|
|
}else{
|