diff --git a/app.wxss b/app.wxss
index 447ec7f..cfd7bca 100644
--- a/app.wxss
+++ b/app.wxss
@@ -293,7 +293,6 @@ justify-content:space-around;
-
/* 7.26 */
.white{
color: #fff;
@@ -413,4 +412,5 @@ background: #ffe3e2;
.lh1 {
line-height: 1;
-}
\ No newline at end of file
+}
+
diff --git a/components/diy_searchbox/diy_searchbox.js b/components/diy_searchbox/diy_searchbox.js
index 283717d..75b51e0 100644
--- a/components/diy_searchbox/diy_searchbox.js
+++ b/components/diy_searchbox/diy_searchbox.js
@@ -5,7 +5,6 @@ var t = getApp(),
Component({
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
-
object: {
type: Object,
value: null,
@@ -15,19 +14,49 @@ Component({
// 这里是一些组件内部数据
yc:false,
imghost: o.imghost,
- someData: {}
+ someData: {},
+ first:1,
+ inputShowed:1,
+ inputval:'在店铺内搜索',
+ keyword:'',
},
ready: function() {
- console.log("ready");
+ var th=this;
+ getApp().getConfig2(function(e) {
+ //看有没有热搜
+ if(e.hot_keywords)
+ th.setData({keyword:e.hot_keywords});
+ })
},
methods: {
//智能跳转
go_url:function (e) {
var url=e.currentTarget.dataset.url;
getApp().goto(url);
- }
-
-
-
+ },
+ click_sear:function(){
+ //如果搜索的单词为空的时候,就要跳到搜索页
+ if(this.data.keyword!=''){
+ getApp().goto("/pages/goods/search/search");
+ return false;
+ }
+ this.setData({first:0,inputShowed:1,inputval:''});
+ },
+
+ onblur:function(){
+ var val=this.data.inputval;
+ if(val==''){
+ this.setData({first:1,});
+ }
+ },
+ set_input:function(e){
+ var val=e.detail.value;
+ this.setData({inputval:val});
+ },
+ sear:function(){
+ var url="/pages/goods/search/search?s_key="+this.data.inputval;
+ getApp().goto(url);
+ }
+
}
})
\ No newline at end of file
diff --git a/components/diy_searchbox/diy_searchbox.wxml b/components/diy_searchbox/diy_searchbox.wxml
index 2ce8ff1..6a874f3 100644
--- a/components/diy_searchbox/diy_searchbox.wxml
+++ b/components/diy_searchbox/diy_searchbox.wxml
@@ -2,12 +2,22 @@
-
-
-
- 在店铺内搜索
+
+
+
+ 在店铺内搜索
+
+
+
+
+
+
+
+
+
@@ -24,10 +34,15 @@
-
-
- 在店铺内搜索
+
+
+ 在店铺内搜索
+
+
+
+
diff --git a/components/diy_searchbox/diy_searchbox.wxss b/components/diy_searchbox/diy_searchbox.wxss
index f00f7c1..8df14d5 100644
--- a/components/diy_searchbox/diy_searchbox.wxss
+++ b/components/diy_searchbox/diy_searchbox.wxss
@@ -60,9 +60,6 @@
height: 30rpx;
margin-left: 10rpx;
margin-right: 4rpx;
- margin-bottom:-6rpx;
-margin-top:20rpx;
-
}
.s1_gk_a1{
@@ -83,4 +80,9 @@ margin-top:20rpx;
.abs_top2{
position: fixed; z-index: 10;
-}
\ No newline at end of file
+}
+
+.flex{ display: flex; align-items: center;}
+.find_img{margin: 0 20rpx; }
+.find_inp{text-align: left; width: 620rpx;}
+.find_inp2{text-align: left; width: 520rpx;}
\ No newline at end of file
diff --git a/components/goods_list/g_filter.wxs b/components/goods_list/g_filter.wxs
index 8a9998e..f41a711 100644
--- a/components/goods_list/g_filter.wxs
+++ b/components/goods_list/g_filter.wxs
@@ -59,7 +59,7 @@ var g_filters = {
}
if(type==0) return min_price;
- if(min_name.length>4 ) min_name=min_name.substring(0, 4);
+ if(min_name.length>7 ) min_name=min_name.substring(0, 8);
return min_name;
},
}
diff --git a/components/goods_list/goods_list.js b/components/goods_list/goods_list.js
index fffb4dc..287046b 100644
--- a/components/goods_list/goods_list.js
+++ b/components/goods_list/goods_list.js
@@ -62,7 +62,7 @@ Component({
//--- 判断是等级会员,且在有效期范围内 ---
if (user.card_field && now < end) {
var card_name = ob.name_map.get(user.card_field);
- if (card_name.length > 4) card_name = card_name.substring(0, 4);
+ if (card_name.length > 6) card_name = card_name.substring(0, 6);
th.setData({
card_field: user.card_field,
card_name: card_name,
@@ -166,7 +166,6 @@ Component({
card_name_map.set(name, plusCard[i].CardName);
new_arr.push(plusCard[i]);
-
}
}
var ob = {
diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss
index 934d857..fc2bddc 100644
--- a/custom-tab-bar/index.wxss
+++ b/custom-tab-bar/index.wxss
@@ -2,11 +2,11 @@
width:100%; border-top: 1rpx solid #ebebeb; position: fixed; bottom: 0; left: 0; z-index: 10000;
}
.tabbar_item{
- position:relative;height:100%;float:left;text-align:center;padding:5px 0;
+ position:relative;height:100%;float:left;text-align:center;padding:0px 0;
}
.tab_img{display: flex; justify-content: center;align-items: center}
.nav_imgage{
- height: 56rpx; width: 56rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%;
+ height: 54rpx; width: 54rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%;
}
.cart_num{
top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;
diff --git a/images/share/hui_hear_pic.png b/images/share/hui_hear_pic.png
index 91144c7..9ea7b6d 100644
--- a/images/share/hui_hear_pic.png
+++ b/images/share/hui_hear_pic.png
diff --git a/images/share/mackground.png b/images/share/mackground.png
index 6bcf62e..39396ac 100644
--- a/images/share/mackground.png
+++ b/images/share/mackground.png
diff --git a/images/share/s_gou.png b/images/share/s_gou.png
index 5e4e765..02a8b0a 100644
--- a/images/share/s_gou.png
+++ b/images/share/s_gou.png
diff --git a/packageA/images/gt.png b/packageA/images/gt.png
new file mode 100644
index 0000000..354851e
--- /dev/null
+++ b/packageA/images/gt.png
diff --git a/packageA/pages/prom_list/prom_list.js b/packageA/pages/prom_list/prom_list.js
index 5fef675..6fc346f 100644
--- a/packageA/pages/prom_list/prom_list.js
+++ b/packageA/pages/prom_list/prom_list.js
@@ -770,7 +770,9 @@ Page({
data: {
store_id: o.stoid,
is_show: 1,
- pageSize: 1000
+ pageSize: 1000,
+ orderField:"sort",
+ orderType:'asc',
},
success: function(ee) {
if (ee.data.code == 0) {
@@ -795,12 +797,12 @@ Page({
//----要进行门店分组--------
for (var i = 0; i < sto_arr.length; i++) {
//找一下这个门店有没有在分类数组内
- var find2 = 0,
- find2name = "";
+ var find2 = 0, find2name = "",sort=0;
for (var m = 0; m < sto_cate.length; m++) {
if (sto_arr[i].category_id == sto_cate[m].cat_id) {
find2 = sto_cate[m].cat_id;
find2name = sto_cate[m].cat_name;
+ sort=sto_cate[m].sort;
break;
}
}
@@ -822,6 +824,7 @@ Page({
var item = {
cat_id: find2,
name: find2name,
+ sort:sort,
s_arr: arr0
};
newarr.push(item);
@@ -837,6 +840,7 @@ Page({
var item = {
cat_id: find2,
name: find2name,
+ sort:sort,
s_arr: arr0
};
newarr.push(item);
@@ -845,6 +849,18 @@ Page({
}
}
}
+
+ //门店分类要排序下
+ function compare(property){
+ return function(a,b){
+ var value1 = a[property];
+ var value2 = b[property];
+ return value1 - value2;
+ }
+ }
+ if(newarr.length>0)
+ newarr.sort(compare("sort"));
+
//----安排其他的分类-----
if (qita.length > 0) {
@@ -1135,7 +1151,7 @@ Page({
if (bconfig.is_sort_storage) {
wx.getLocation({
- type: 'wgs84',
+ type: 'gcj02',
success: function(res) {
th.data.lat = res.latitude;
@@ -1464,7 +1480,7 @@ Page({
var e = th.data.bconfig;
if (e.is_sort_storage) {
wx.getLocation({
- type: 'wgs84',
+ type: 'gcj02',
success: function(res) {
th.data.lat = res.latitude;
th.data.lon = res.longitude;
diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js
index 1a41adc..d1b5dea 100644
--- a/pages/cart/cart/cart.js
+++ b/pages/cart/cart/cart.js
@@ -159,6 +159,15 @@ Page({
await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + item.goods_id, {}).then(res => {
good = res.data.data;
})
+ if(!good){
+ var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
+ getApp().request.delete(url, {
+ success: function (t) {
+ }
+ });
+ continue;
+ }
+
var tt = ut.gettimestamp();
//如果商品下架了,或者商品是赠品,一开始都要清除
if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0 || item.is_gift) {
diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml
index cde5553..3afb2e6 100644
--- a/pages/cart/cart/cart.wxml
+++ b/pages/cart/cart/cart.wxml
@@ -107,7 +107,7 @@
-
+
diff --git a/pages/cart/cart/cart.wxss b/pages/cart/cart/cart.wxss
index 71c30e3..676fff5 100644
--- a/pages/cart/cart/cart.wxss
+++ b/pages/cart/cart/cart.wxss
@@ -138,12 +138,11 @@ radio {
}
.pay-for {
-
width: 100%;
- height: 100rpx;
+ height: 110rpx;
position: fixed;
left: 0;
- bottom: 90rpx;
+ bottom: 130rpx;
font-size: 28rpx;
color: #666;
background-color: rgb(255, 255, 255);
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index f1978fe..41e6cba 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -46,7 +46,9 @@ Page({
bn_exp_type:1, //0是物流 1自提
bn_pick:0, //选择的门店
bn_pickname: "", //选择的门店名称
- bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流
+ bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流
+
+ bn_plus_cut_price:0, //显示等级卡会优惠多少钱
/*------------------------*/
user_addr:null,//物流
userinfo:null, //获取会员
@@ -105,7 +107,11 @@ Page({
//-- order_prom_list --
order_prom_list_cart:null,
- ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊
+ ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊
+ rank_switch:0, //是不是开同等级卡
+ show_card:null, //显示的等级卡
+ card_name:'', //显示的卡的名称
+ card_cut_price:null,//减价多少钱
},
onLoad: function(t) {
@@ -113,7 +119,7 @@ Page({
wx.setNavigationBarTitle({ title: "填写订单",})
var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,});
th.data.param=t;
-
+
//清空is_pick_up
getApp().request.put("/api/weshop/useraddress/updatePickUp", {
data: {user_id: getApp().globalData.user_id, is_pickup: 0},
@@ -121,15 +127,7 @@ Page({
}
});
- //先获取是否有关闭使用优惠券
- getApp().getConfig2(function (ee) {
- var json_d = JSON.parse(ee.switch_list);
- th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
- th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules});
- //-----先获取物流,再获取用户信息,再展示页面-----
- th.get_wuliu(th.get_info(th.show_page));
- })
-
+
},
onUnload: function () { this.setData({ isclose: 1 })},
onHide: function () {
@@ -155,7 +153,6 @@ Page({
console.log("getuser_addr")
console.log(ie)
-
//地址切换要把包邮券清空
if( !th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){
var using_quan=th.data.using_quan;
@@ -209,6 +206,57 @@ Page({
getApp().globalData.is_cart2_old=0;
}
}
+
+ //先获取是否有关闭使用优惠券
+ getApp().getConfig2(function (ee) {
+ var json_d = JSON.parse(ee.switch_list);
+ th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
+ th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
+
+ var rank_switch=json_d.rank_switch;
+ var max_price=-1;
+ var show_card=null;
+ var name="";
+ //如果有开等级卡的时候,
+ //因为都是调接口,要返回在计算
+ if(rank_switch==2){
+ //-- 获取所有的等级卡, --
+ getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid,
+ {}).then(res => {
+ if(res.data.code==0){
+ var plusCard = res.data.data;
+ //-- 循环判断,拿到最贵的那张卡 --
+ for(var ih in plusCard){
+ if(plusCard[ih].IsStopBuy == true){ continue; }
+ if(max_price<0){
+ max_price=plusCard[ih].CardFee;
+ name='card'+plusCard[ih]['CorrPrice'];
+ show_card=plusCard[ih];
+ }else{
+ if(max_priceitem[th.data.card_name] ){
+ item.goods_price=item[th.data.card_name];
+ carr[i].goods_price=item[th.data.card_name];
+ }
+ }else{
+ // 拼团,搭配购不计算,赠品也不计算,同时会员还未购买等级会员
+ if(item[th.data.card_name]>0 && item['prom_type']!=5 && item['prom_type']!=6 && !th.data.userinfo.card_field
+ && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){
+ item.cut_price= item.goods_price-item[th.data.card_name];
+ carr[i].cut_price=item.goods_price-item[th.data.card_name];
+ }
+
+ }
+
+
item.original_img = oo.imghost + item.original_img;
/*----接口要弄出来的,先顶着-----*/
var pcid = item.pick_id;
@@ -320,7 +391,9 @@ Page({
if (arr.length > 0) {
for (var j = 0; j < arr.length; j++) {
if (arr[j].pickup_id == pcid) {
- arr[j].goods.push(item);
+ arr[j].goods.push(item);
+ //-- 把等级卡会优惠多少钱装进去 --
+ if(item.cut_price) arr[j].card_cut_price+=arr[j].cut_price;
find = 1;break;
}
}
@@ -348,6 +421,7 @@ Page({
//如果是物流的话,全部自提的控制要弄成0
if (e_t == 0) th.setData({ is_all_zt:0});
+
var narr = new Array(); narr.push(item);
//-----------拼装购物车结算的数组,如果有默认物流时要用默认物流编号-----------------
@@ -359,9 +433,13 @@ Page({
}
var ie = {
- pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: m_wind, distr_t: dis_t,
+ pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: m_wind, distr_t: dis_t,card_cut_price:0,
goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0};
+
+ //-- 把等级卡会优惠多少钱装进去 --
+ if(item.cut_price) ie.card_cut_price+=item.cut_price;
arr.push(ie);
+
}
}
//深拷贝
@@ -414,6 +492,21 @@ Page({
var item=th.data.wu_arr[k]; if(def_exp_code==item.code){ m_wind=k; }
}
}
+
+ //---是不是购买等级卡成功的返回---等级卡显示的判断---
+ var is_card_back=getApp().globalData.is_card_back;
+ if(is_card_back){
+ gg.goods_price=gd[th.data.card_name];
+ getApp().globalData.is_card_back=0;
+ th.setData({card_cut_price:0});
+ }else{
+ //--- 商品不能是搭配购,商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格
+ if(gd['prom_type']!=5 && gd['prom_type']!=6 && th.data.card_name && gd[th.data.card_name]>0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){
+ var cut_p= gg.goods_price-gd[th.data.card_name];
+ th.setData({card_cut_price:cut_p});
+ }
+ }
+
switch (gd.prom_type){
case 0:
case 2:
@@ -480,7 +573,6 @@ Page({
th.get_buy_now_quan();
})
-
}else{
//--看是不是搭配促销--
if(gg.prom_type==5){
@@ -2942,7 +3034,13 @@ Page({
}
}
return is_use;
- }
+ },
+
+ //跳转到购买卡
+ buycard:function(){
+ getApp().goto("/pages/user/plus/plus");
+ getApp().globalData.plus_buy_back=1;
+ }
diff --git a/pages/cart/cart2/cart2.wxml b/pages/cart/cart2/cart2.wxml
index e8552aa..0fa6006 100644
--- a/pages/cart/cart2/cart2.wxml
+++ b/pages/cart/cart2/cart2.wxml
@@ -3,518 +3,588 @@
+
+
+
+ 留言
+
+
+
+
+
+
+
+
+
+
+
+
+ 使用余额 :¥{{yuer}}
+
+
+
+
+
+
+
+
+
+
+ {{bn_pickname}}
+
+
+
+
+
+
+
+ {{bn_goods.goods_name}}
+
+
+
+ {{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}
+
+
+
+
+
+
+
+
+
+
+ ¥{{filters.toFix(bn_goods.shop_price,2)}}
+ x{{bn_goods.buynum}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{buy_now_gift_goods.goods_name}}
+
+
+
+ {{filters.show_gui_ge(buy_now_gift_goods.goods_spec,buy_now_gift_goods.goods_color)}}
+
+
+
+
+ ¥0
+ x{{buy_now_gift_goods.buynum}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.goods_name}}
+
+
+
+ {{filters.show_gui_ge(item.goods_spec,item.goods_color)}}
+
+
+
+
+ ¥{{item.price}}
+ x{{item.goods_num}}
+
+
+
+
+
+
+
+
+
+ image>
+ {{show_card.CardName}}
+
+ 立减 {{filters.toFix(card_cut_price,2) }} 元
+
+
+ vip超级会员仅需{{show_card.CardFee}}元
+
+
+
+
+ 立即开通
+
+
+
+
+
+ {{order.store_prom}}
+
+
+
+
+
+ 优惠券 {{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用
+
+
+ 不使用
+
+ ¥{{using_quan[bn_pick].money}}元优惠券
+ 包邮券
+
+
+
+
+
+
+
+
+
+
+ 门店自提
+
+
+
+ 快递邮寄
+
+
+
+
+ {{wu_arr[index].name}}
+
+
+
+
+
+
+
+ 留言
+
+
+
+
+
+
+
+
+
+ 使用余额 :¥{{yuer}}
+
+
+
+
+
+
+
+ 商品金额
+ ¥ {{formData.all_price}}元
+
+
+ 配送费用
+ ¥ {{formData.shipping_price}}元
+
+
+ 使用优惠券
+ - ¥ {{formData.coupon_price}}元
+
+
+
+ 优惠活动
+ - ¥ {{filters.toFix(formData.cut_price,2)}}元
+
+
+
+ 订单优惠
+ - ¥ {{filters.toFix(formData.order_prom_amount,2)}}元
+
+
+ 使用余额
+ - ¥ {{formData.user_money}}元
+
+
+
+
+
+
+ 应付金额:¥{{formData.order_amount}}
+
+
+
+
-
-
-
-
-
-
-
-