diff --git a/app.js b/app.js index cc84722..bca94af 100644 --- a/app.js +++ b/app.js @@ -51,7 +51,7 @@ App({ config: null, //门店参数 config2: null, //门店配置 code: null, - user_id:null,//6520352 + user_id:null,//6520491,// 6519913,//6520352 // user_id:6520314,// qa-6519858,// // user_id:14148118,// qa-6519858,// buy_now: null, @@ -75,6 +75,7 @@ App({ sp_scene: null, navBarHeight:44, //默认高度44 + is_pc:0, //是不是在pc端打开小程序 }, auth: o, request: a, @@ -202,7 +203,16 @@ App({ if (modelmes && modelmes.indexOf('iPhone X') != -1) {  //XS,XR,XS MAX均可以适配,因为indexOf()会将包含'iPhone X'的字段都查出来 this.globalData.isIpx = true } - this.globalData.navBarHeight = 44 + res.statusBarHeight + + /*-- 判断是不是PC端打开的 */ + if (res && ["windows", "mac"].some((v) => v === res["platform"])) { + app.globalData.is_pc=1; + this.globalData.navBarHeight =0 + }else{ + this.globalData.navBarHeight = 44 + res.statusBarHeight + } + + }, }) this.globalData.menuInfo = wx.getMenuButtonBoundingClientRect() || {} @@ -1636,6 +1646,8 @@ App({ } a.wxParse(content, "html", ut.format_content(ob.text), th, 6); e.wxParseAddFullImageUrl(th, content); + + }, async deal_iframe_next(ob){ diff --git a/components/add_purchase/add_purchase.wxml b/components/add_purchase/add_purchase.wxml index 023b9f2..bf93c36 100644 --- a/components/add_purchase/add_purchase.wxml +++ b/components/add_purchase/add_purchase.wxml @@ -1,6 +1,6 @@ - + diff --git a/components/add_purchase/add_purchase.wxss b/components/add_purchase/add_purchase.wxss index bfd3246..f671ff6 100644 --- a/components/add_purchase/add_purchase.wxss +++ b/components/add_purchase/add_purchase.wxss @@ -18,7 +18,7 @@ padding-top: 80rpx; } -image { +.add_purchase image { vertical-align: top; } .rules { diff --git a/components/com_top_nav/com_top_nav.js b/components/com_top_nav/com_top_nav.js index 10f442e..cd12ba4 100644 --- a/components/com_top_nav/com_top_nav.js +++ b/components/com_top_nav/com_top_nav.js @@ -19,7 +19,8 @@ Component({ height:0, h1:0, h2:0, - user_id:0 + user_id:0, + is_pc:0 }, ready: function() { let height= getApp().globalData.navBarHeight; @@ -30,6 +31,9 @@ Component({ } //-- 胶囊的高度 -- this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_no}); + if(getApp().globalData.is_pc){ + this.setData({is_pc:1}) + } }, pageLifetimes: { //要处理一下,游客登录后的界面的变化,主要还该是改变会员 diff --git a/components/com_top_nav/com_top_nav.wxml b/components/com_top_nav/com_top_nav.wxml index 4f1b623..49ce91b 100644 --- a/components/com_top_nav/com_top_nav.wxml +++ b/components/com_top_nav/com_top_nav.wxml @@ -1,4 +1,6 @@ + + @@ -31,4 +33,6 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/components/diy_public/diy_public.wxml b/components/diy_public/diy_public.wxml index 56531e3..b5f78d0 100644 --- a/components/diy_public/diy_public.wxml +++ b/components/diy_public/diy_public.wxml @@ -8,7 +8,7 @@ {{object.column_name}} - 更多 + 更多 diff --git a/components/diy_searchbox/diy_searchbox.wxml b/components/diy_searchbox/diy_searchbox.wxml index 937cdf5..7bc0b8a 100644 --- a/components/diy_searchbox/diy_searchbox.wxml +++ b/components/diy_searchbox/diy_searchbox.wxml @@ -5,7 +5,7 @@ - + {{object.searchbox_text}} 请输入商品关键字 diff --git a/components/diy_seckill/diy_seckill.wxml b/components/diy_seckill/diy_seckill.wxml index 7119f86..00fa529 100644 --- a/components/diy_seckill/diy_seckill.wxml +++ b/components/diy_seckill/diy_seckill.wxml @@ -8,7 +8,7 @@ {{object.column_name}} - 更多 + 更多 diff --git a/components/diy_top_nav/diy_top_nav.js b/components/diy_top_nav/diy_top_nav.js index 014ae36..7001086 100644 --- a/components/diy_top_nav/diy_top_nav.js +++ b/components/diy_top_nav/diy_top_nav.js @@ -65,43 +65,51 @@ Component({ // img:'', // url:'' // }, - ] + ], + is_pc:0 }, lifetimes:{ attached:function(){ - //满屏顶部导航参数获取----------- - try { - let systemInfo = wx.getSystemInfoSync() - let mentButt = wx.getMenuButtonBoundingClientRect() - let nav_pb = mentButt.top - systemInfo.statusBarHeight - let navleft_pb = systemInfo.windowWidth - mentButt.right - let user_no=''; - if(getApp().globalData.userInfo){ - user_no=getApp().globalData.userInfo.erpvipno - } + var is_pc=getApp().globalData.is_pc; + if(!is_pc) { + + //满屏顶部导航参数获取----------- + try { + let systemInfo = wx.getSystemInfoSync() + let mentButt = wx.getMenuButtonBoundingClientRect() + let nav_pb = mentButt.top - systemInfo.statusBarHeight + let navleft_pb = systemInfo.windowWidth - mentButt.right + + let user_no = ''; + if (getApp().globalData.userInfo) { + user_no = getApp().globalData.userInfo.erpvipno + } - this.setData({ - nav_h:mentButt.top, - mentButt_h:mentButt.height, - nav_left_w:mentButt.left, - navleft_pb, - nav_pb, - navleft_w:mentButt.width*0.9, - user_no - }) - } catch (e) { - console.error(e); - wx.showToast({ - title: '系统参数获取失败', - icon: 'none', - duration: 2000 - }) - // this.setData({ - // is_full_screen_navigation:false - // }) - // Do something when catch error - } + this.setData({ + nav_h: mentButt.top, + mentButt_h: mentButt.height, + nav_left_w: mentButt.left, + navleft_pb, + nav_pb, + navleft_w: mentButt.width * 0.9, + user_no + }) + } catch (e) { + console.error(e); + wx.showToast({ + title: '系统参数获取失败', + icon: 'none', + duration: 2000 + }) + // this.setData({ + // is_full_screen_navigation:false + // }) + // Do something when catch error + } + }else{ + this.setData({is_pc:1}); + } } }, /** diff --git a/components/diy_top_nav/diy_top_nav.wxml b/components/diy_top_nav/diy_top_nav.wxml index 618306b..f092e3d 100644 --- a/components/diy_top_nav/diy_top_nav.wxml +++ b/components/diy_top_nav/diy_top_nav.wxml @@ -1,9 +1,13 @@ + + + + @@ -67,3 +71,5 @@ 1212121 + + \ No newline at end of file diff --git a/packageA/pages/goodsInfo/goodsInfo.wxml b/packageA/pages/goodsInfo/goodsInfo.wxml index 23f13df..451107d 100644 --- a/packageA/pages/goodsInfo/goodsInfo.wxml +++ b/packageA/pages/goodsInfo/goodsInfo.wxml @@ -15,7 +15,7 @@ nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"> - + {{item.name}} diff --git a/packageA/pages/quan_pro/quan_pro.js b/packageA/pages/quan_pro/quan_pro.js index 36d2762..1c64842 100644 --- a/packageA/pages/quan_pro/quan_pro.js +++ b/packageA/pages/quan_pro/quan_pro.js @@ -88,13 +88,19 @@ Page({ th.setData({is_get:1}); return false; } + + //-- 券已经领取完的优化 -- + if(r_data.sum_num && r_data.sum_num<=r_data.use_sumnum){ + th.setData({is_get:1}); + return false; + } + if(r_data.type!=1){ th.setData({is_get:2}); return false; } var now=ut.gettimestamp(); - if(r_data.send_start_time>now){ th.setData({is_get:3}); return false; @@ -102,26 +108,26 @@ Page({ if(r_data.send_end_time-1){ + th.setData({is_get:5,err_txt:'您已领过该券'}); + }else if(rss.data.msg.indexOf('您已领完该券')>-1){ + th.setData({is_get:5,err_txt:'您已领完该券'}); + } + }else if(rss && rss.data.code==0){ + //获取会员已经领取了多少张券 + var n1=rss.data.data.usercounted?rss.data.data.usercounted:0; + th.setData({'q_data.lqnum':n1}) + } - // var user_id=getApp().globalData.user_id; - // await getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { - // data:{store_id:os.stoid,type:1,id:th.data.id,user_id:user_id} - // }).then(res => { - // th.setData({is_get:1}); - // if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length){ - // th.setData({q_data:res.data.data.pageData[0]}); - // } - // }); - - }, onUnload:function(){ wx.offCopyUrl() @@ -198,7 +204,7 @@ Page({ success: function(res) { th.data.linging = 0; if (res.data.code == 0) { - item.lqnum++; + var text3="q_data"; var obj = {};obj[text3] = item; th.setData(obj); @@ -214,9 +220,24 @@ Page({ } }) } else { - th.setData({ + + //设置一下优惠券领取的数量 + var q_data=th.data.q_data; + q_data.use_sumnum++; + q_data.lqnum++; + + th.setData({ show_success: 1, + q_data }) + + if(q_data.everyone_num>0 && q_data.everyone_num<= q_data.lqnum){ + th.setData({is_get:5,err_txt:'您已领完该券'}); + }else if(q_data.interval_time>0){ + th.setData({is_get:5,err_txt:'您已领过该券'}); + } + + } } else { app.confirmBox(res.data.msg); diff --git a/packageA/pages/quan_pro/quan_pro.wxml b/packageA/pages/quan_pro/quan_pro.wxml index 467d6d4..ab48f5a 100644 --- a/packageA/pages/quan_pro/quan_pro.wxml +++ b/packageA/pages/quan_pro/quan_pro.wxml @@ -34,7 +34,7 @@ - + 有效期 {{filters.format_time(getcurday+3600*24*q_data.startdays)}} {{filters.format_time(q_data.use_start_time)}}至 @@ -58,7 +58,9 @@ - 已领取 + 该券已领完 + 优惠券已过期 + {{err_txt}} 立即领取 diff --git a/packageA/pages/quan_pro/quan_pro.wxss b/packageA/pages/quan_pro/quan_pro.wxss index bf3560a..0dd8457 100644 --- a/packageA/pages/quan_pro/quan_pro.wxss +++ b/packageA/pages/quan_pro/quan_pro.wxss @@ -26,7 +26,7 @@ page{background-color: #f8f8f8;} border-bottom-left-radius:25rpx; } -.btn.gray{background-color: #dcdcdc; color: #adb3be;} +.btn.gray{background-color: #aaa; color: #fff;} .coupon_remark{padding: 30rpx 0 10rpx 0; box-sizing: border-box; overflow: hidden;} .q_title{ diff --git a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml index 73be720..f042b28 100644 --- a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml +++ b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml @@ -17,7 +17,7 @@ nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"> - + {{item.name}} diff --git a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss index af8db1e..d38ba36 100644 --- a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss +++ b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss @@ -2967,3 +2967,9 @@ button.custom-service::after{ max-width:370rpx; flex-shrink: 0; } +.type-navbar_box{ + position: fixed; + top: 0; + z-index: 9999; + width: 100%; +} \ No newline at end of file diff --git a/packageB/pages/zuhegou/index/index.js b/packageB/pages/zuhegou/index/index.js index 14a7f8f..cbeacec 100644 --- a/packageB/pages/zuhegou/index/index.js +++ b/packageB/pages/zuhegou/index/index.js @@ -2782,7 +2782,12 @@ Page({ }, go_cart: function () { - getApp().goto("/pages/cart/cart/cart"); + //-- 组合购选中的跳转链接 -- + getApp().globalData.from_act_link={ + prom_type:7, + prom_id:this.data.act.id + } + getApp().goto("/pages/cart/cart/cart"); }, //获取购物车中,相应的门店已购买的商品 diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js index 1d48410..ca07bb0 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -495,7 +495,14 @@ Page({ //------几人评价------- //n.init(th, "", "comments"); - if(e && e.goods_bottomconent){ + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ + //商品详情广告---- + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); + //------- + } + + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1){ //商品详情广告---- a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml index efa5522..ba9cf72 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml @@ -20,7 +20,7 @@ - + {{item.name}} @@ -681,6 +681,10 @@ + + + + @@ -689,6 +693,7 @@ + @@ -768,6 +773,12 @@ + + + + + + diff --git a/packageC/pages/presell/cardInfo/goodsInfo.wxml b/packageC/pages/presell/cardInfo/goodsInfo.wxml index 4067a4e..c0e78b1 100644 --- a/packageC/pages/presell/cardInfo/goodsInfo.wxml +++ b/packageC/pages/presell/cardInfo/goodsInfo.wxml @@ -16,7 +16,7 @@ - + {{item.name}} diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index f3a9be6..d84461d 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -423,7 +423,14 @@ Page({ }); - if(e && e.goods_bottomconent){ + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ + //商品详情广告---- + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); + //------- + } + + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1){ //商品详情广告---- a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.wxml b/packageC/pages/presell/goodsInfo/goodsInfo.wxml index 4197a1d..edb17bb 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.wxml +++ b/packageC/pages/presell/goodsInfo/goodsInfo.wxml @@ -19,7 +19,7 @@ nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"> - + {{item.name}} @@ -346,14 +346,21 @@ + + + + + + - + + @@ -440,6 +447,13 @@ + + + + + + + diff --git a/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js b/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js index f9bbec6..74efcd6 100644 --- a/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js +++ b/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js @@ -203,6 +203,7 @@ Page({ }, + GetBuyIntegral: function (e) { var that = this.data; var th = this; @@ -344,7 +345,8 @@ Page({ data: { "storeId": a.stoid, //商家ID "userId": d.user_id, //用户ID - "giftBagId": th.getGiftID + "giftBagId": th.getGiftID, + isnNewUserLb:1 }, success: function success(res) { if (res.data.code == 0) { @@ -402,6 +404,11 @@ Page({ } else { getApp().my_warnning(res.data.msg, 0, _this2); + + setTimeout(()=>{ + getApp().goto('/pages/index/index/index') + },2000) + return false; } } diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index 86d16f8..593eeb8 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -126,6 +126,11 @@ Page({ }, onShow: function () { + if(getApp().globalData.from_act_link){ + this.data.from_act_link= ut.deep_cp(getApp().globalData.from_act_link); + getApp().globalData.from_act_link=null; + } + //-- 看一下隐私政策要不要显示 -- var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id if (privacy_pop) { @@ -923,7 +928,7 @@ Page({ }), th.doCheckAll(), wx.stopPullDownRefresh(); - wx.hideLoading(); + wx.hideLoading(); } }); @@ -2445,7 +2450,7 @@ Page({ if (item[c].prom_type == 7) { item[c].act = th.data.zuhe_map[item[c].prom_id]; if(item[c].zh_b_num===undefined || item[c].zh_b_num===null ){ - var prom_goodsbuynum = 0; + var prom_goodsbuynum = 0; //--要获得商品,该用户买了多少件,同步应用,用于限购的计算-- await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { data: { @@ -2460,7 +2465,7 @@ Page({ if(res.data.code==0 && res.data.data) if (res.data.data.promgoodsbuynum) { - promgoodsbuynum = res.data.data.promgoodsbuynum; + prom_goodsbuynum = res.data.data.promgoodsbuynum; } }) diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index a41a257..15ebba3 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -526,7 +526,8 @@ Page({ data: { "storeId": a.stoid, //商家ID "userId": d.user_id, //用户ID - "giftBagId": th.getGiftID + "giftBagId": th.getGiftID, + isnNewUserLb:1 }, success: function success(res) { if (res.data.code == 0) { @@ -604,6 +605,11 @@ Page({ } else { getApp().my_warnning(res.data.msg, 0, _this2); + + setTimeout(()=>{ + getApp().goto('/pages/index/index/index') + },2000) + return false; } } diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 7b396c3..9ba930a 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -517,8 +517,15 @@ Page({ // goods_bottomconent:e.goods_bottomconent }); + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ + //商品详情广告---- + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); + //------- + } + //判断商品详情要有东西 - if(e && e.goods_bottomconent) { + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1) { //商品详情广告---- a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml index 874237f..5f6f567 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxml +++ b/pages/goods/goodsInfo/goodsInfo.wxml @@ -22,7 +22,7 @@ nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"> - + {{item.name}} @@ -273,10 +273,10 @@ - - + + - {{prom_integral}} + {{prom_integral}} 积分 + @@ -878,6 +878,12 @@ + + + + + + @@ -965,6 +971,12 @@ + + + + + + @@ -1313,17 +1325,19 @@ --> - + 即将开始 + 已兑光 立即兑换 积分不足 - + 即将开始 + 已兑光 立即兑换 - + 服务记录 历史预约 diff --git a/utils/more_cx.js b/utils/more_cx.js index 60524a0..e5784b2 100644 --- a/utils/more_cx.js +++ b/utils/more_cx.js @@ -718,6 +718,24 @@ module.exports = { //活动要排序一下 k_item.act_arr.sort(comp); + //-- 看一下是不是组合购 -- 点击 --如果是从活动链接过来的,点亮 --,新增优化2024-1-20 + if(th.data.from_act_link){ + var fd_idx=k_item.act_arr.findIndex(function (eh){ + return eh.prom_type==th.data.from_act_link.prom_type && eh.prom_id==th.data.from_act_link.prom_id; + }) + + if(fd_idx>-1) { + ck_prom_type= k_item.act_arr[fd_idx]; + for (var idf = 0; idf < k_item.act_arr.length; idf++) { + if(fd_idx==idf){ + k_item.act_arr[idf].sele=1; + }else{ + k_item.act_arr[idf].sele=0; + } + } + } + } + //确定一下活动,先看一下有没有选择的活动 ck_prom_type=k_item.act_arr.find(function (el){ return el.sele;