Commit c7287bc1f04249c1c355af9ec1c6a0e78d8efcc4
1 parent
b41021e3
OA单的优化
Showing
15 changed files
with
140 additions
and
47 deletions
app.js
@@ -51,7 +51,7 @@ App({ | @@ -51,7 +51,7 @@ App({ | ||
51 | config: null, //门店参数 | 51 | config: null, //门店参数 |
52 | config2: null, //门店配置 | 52 | config2: null, //门店配置 |
53 | code: null, | 53 | code: null, |
54 | - user_id:null,//6520352 | 54 | + user_id:null,//6520491,// 6519913,//6520352 |
55 | // user_id:6520314,// qa-6519858,// | 55 | // user_id:6520314,// qa-6519858,// |
56 | // user_id:14148118,// qa-6519858,// | 56 | // user_id:14148118,// qa-6519858,// |
57 | buy_now: null, | 57 | buy_now: null, |
@@ -75,6 +75,7 @@ App({ | @@ -75,6 +75,7 @@ App({ | ||
75 | sp_scene: null, | 75 | sp_scene: null, |
76 | 76 | ||
77 | navBarHeight:44, //默认高度44 | 77 | navBarHeight:44, //默认高度44 |
78 | + is_pc:0, //是不是在pc端打开小程序 | ||
78 | }, | 79 | }, |
79 | auth: o, | 80 | auth: o, |
80 | request: a, | 81 | request: a, |
@@ -202,7 +203,16 @@ App({ | @@ -202,7 +203,16 @@ App({ | ||
202 | if (modelmes && modelmes.indexOf('iPhone X') != -1) { //XS,XR,XS MAX均可以适配,因为indexOf()会将包含'iPhone X'的字段都查出来 | 203 | if (modelmes && modelmes.indexOf('iPhone X') != -1) { //XS,XR,XS MAX均可以适配,因为indexOf()会将包含'iPhone X'的字段都查出来 |
203 | this.globalData.isIpx = true | 204 | this.globalData.isIpx = true |
204 | } | 205 | } |
205 | - this.globalData.navBarHeight = 44 + res.statusBarHeight | 206 | + |
207 | + /*-- 判断是不是PC端打开的 */ | ||
208 | + if (res && ["windows", "mac"].some((v) => v === res["platform"])) { | ||
209 | + app.globalData.is_pc=1; | ||
210 | + this.globalData.navBarHeight =0 | ||
211 | + }else{ | ||
212 | + this.globalData.navBarHeight = 44 + res.statusBarHeight | ||
213 | + } | ||
214 | + | ||
215 | + | ||
206 | }, | 216 | }, |
207 | }) | 217 | }) |
208 | this.globalData.menuInfo = wx.getMenuButtonBoundingClientRect() || {} | 218 | this.globalData.menuInfo = wx.getMenuButtonBoundingClientRect() || {} |
@@ -1636,6 +1646,8 @@ App({ | @@ -1636,6 +1646,8 @@ App({ | ||
1636 | } | 1646 | } |
1637 | a.wxParse(content, "html", ut.format_content(ob.text), th, 6); | 1647 | a.wxParse(content, "html", ut.format_content(ob.text), th, 6); |
1638 | e.wxParseAddFullImageUrl(th, content); | 1648 | e.wxParseAddFullImageUrl(th, content); |
1649 | + | ||
1650 | + | ||
1639 | }, | 1651 | }, |
1640 | 1652 | ||
1641 | async deal_iframe_next(ob){ | 1653 | async deal_iframe_next(ob){ |
components/com_top_nav/com_top_nav.js
@@ -19,7 +19,8 @@ Component({ | @@ -19,7 +19,8 @@ Component({ | ||
19 | height:0, | 19 | height:0, |
20 | h1:0, | 20 | h1:0, |
21 | h2:0, | 21 | h2:0, |
22 | - user_id:0 | 22 | + user_id:0, |
23 | + is_pc:0 | ||
23 | }, | 24 | }, |
24 | ready: function() { | 25 | ready: function() { |
25 | let height= getApp().globalData.navBarHeight; | 26 | let height= getApp().globalData.navBarHeight; |
@@ -30,6 +31,9 @@ Component({ | @@ -30,6 +31,9 @@ Component({ | ||
30 | } | 31 | } |
31 | //-- 胶囊的高度 -- | 32 | //-- 胶囊的高度 -- |
32 | this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_no}); | 33 | this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_no}); |
34 | + if(getApp().globalData.is_pc){ | ||
35 | + this.setData({is_pc:1}) | ||
36 | + } | ||
33 | }, | 37 | }, |
34 | pageLifetimes: { | 38 | pageLifetimes: { |
35 | //要处理一下,游客登录后的界面的变化,主要还该是改变会员 | 39 | //要处理一下,游客登录后的界面的变化,主要还该是改变会员 |
components/com_top_nav/com_top_nav.wxml
1 | <!-- 需要cover-view是大转盘才会 --> | 1 | <!-- 需要cover-view是大转盘才会 --> |
2 | +<block wx:if="{{!is_pc}}"> | ||
3 | + | ||
2 | <block wx:if="{{need_cover}}"> | 4 | <block wx:if="{{need_cover}}"> |
3 | <cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}"> | 5 | <cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}"> |
4 | <cover-view class="tab" style="height:{{h1}}px;"> | 6 | <cover-view class="tab" style="height:{{h1}}px;"> |
@@ -31,4 +33,6 @@ | @@ -31,4 +33,6 @@ | ||
31 | 33 | ||
32 | 34 | ||
33 | <!-- 用于顶开层的高 --> | 35 | <!-- 用于顶开层的高 --> |
34 | -<view style="height:{{height}}px"></view> | ||
35 | \ No newline at end of file | 36 | \ No newline at end of file |
37 | +<view style="height:{{height}}px"></view> | ||
38 | + | ||
39 | +</block> | ||
36 | \ No newline at end of file | 40 | \ No newline at end of file |
components/diy_top_nav/diy_top_nav.js
@@ -65,43 +65,51 @@ Component({ | @@ -65,43 +65,51 @@ Component({ | ||
65 | // img:'', | 65 | // img:'', |
66 | // url:'' | 66 | // url:'' |
67 | // }, | 67 | // }, |
68 | - ] | 68 | + ], |
69 | + is_pc:0 | ||
69 | }, | 70 | }, |
70 | lifetimes:{ | 71 | lifetimes:{ |
71 | attached:function(){ | 72 | attached:function(){ |
72 | - //满屏顶部导航参数获取----------- | ||
73 | - try { | ||
74 | - let systemInfo = wx.getSystemInfoSync() | ||
75 | - let mentButt = wx.getMenuButtonBoundingClientRect() | ||
76 | - let nav_pb = mentButt.top - systemInfo.statusBarHeight | ||
77 | - let navleft_pb = systemInfo.windowWidth - mentButt.right | ||
78 | 73 | ||
79 | - let user_no=''; | ||
80 | - if(getApp().globalData.userInfo){ | ||
81 | - user_no=getApp().globalData.userInfo.erpvipno | ||
82 | - } | 74 | + var is_pc=getApp().globalData.is_pc; |
75 | + if(!is_pc) { | ||
76 | + | ||
77 | + //满屏顶部导航参数获取----------- | ||
78 | + try { | ||
79 | + let systemInfo = wx.getSystemInfoSync() | ||
80 | + let mentButt = wx.getMenuButtonBoundingClientRect() | ||
81 | + let nav_pb = mentButt.top - systemInfo.statusBarHeight | ||
82 | + let navleft_pb = systemInfo.windowWidth - mentButt.right | ||
83 | + | ||
84 | + let user_no = ''; | ||
85 | + if (getApp().globalData.userInfo) { | ||
86 | + user_no = getApp().globalData.userInfo.erpvipno | ||
87 | + } | ||
83 | 88 | ||
84 | - this.setData({ | ||
85 | - nav_h:mentButt.top, | ||
86 | - mentButt_h:mentButt.height, | ||
87 | - nav_left_w:mentButt.left, | ||
88 | - navleft_pb, | ||
89 | - nav_pb, | ||
90 | - navleft_w:mentButt.width*0.9, | ||
91 | - user_no | ||
92 | - }) | ||
93 | - } catch (e) { | ||
94 | - console.error(e); | ||
95 | - wx.showToast({ | ||
96 | - title: '系统参数获取失败', | ||
97 | - icon: 'none', | ||
98 | - duration: 2000 | ||
99 | - }) | ||
100 | - // this.setData({ | ||
101 | - // is_full_screen_navigation:false | ||
102 | - // }) | ||
103 | - // Do something when catch error | ||
104 | - } | 89 | + this.setData({ |
90 | + nav_h: mentButt.top, | ||
91 | + mentButt_h: mentButt.height, | ||
92 | + nav_left_w: mentButt.left, | ||
93 | + navleft_pb, | ||
94 | + nav_pb, | ||
95 | + navleft_w: mentButt.width * 0.9, | ||
96 | + user_no | ||
97 | + }) | ||
98 | + } catch (e) { | ||
99 | + console.error(e); | ||
100 | + wx.showToast({ | ||
101 | + title: '系统参数获取失败', | ||
102 | + icon: 'none', | ||
103 | + duration: 2000 | ||
104 | + }) | ||
105 | + // this.setData({ | ||
106 | + // is_full_screen_navigation:false | ||
107 | + // }) | ||
108 | + // Do something when catch error | ||
109 | + } | ||
110 | + }else{ | ||
111 | + this.setData({is_pc:1}); | ||
112 | + } | ||
105 | } | 113 | } |
106 | }, | 114 | }, |
107 | /** | 115 | /** |
components/diy_top_nav/diy_top_nav.wxml
1 | <!--components/diy_top_nav/diy_top_nav.wxml--> | 1 | <!--components/diy_top_nav/diy_top_nav.wxml--> |
2 | <!-- 支撑作用 --> | 2 | <!-- 支撑作用 --> |
3 | +<block wx:if="{{!is_pc}}"> | ||
4 | + | ||
3 | <view wx:if="{{nav_type==-1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};"> | 5 | <view wx:if="{{nav_type==-1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};"> |
4 | <view style="height: {{nav_h}}px;width: 100%;"></view> | 6 | <view style="height: {{nav_h}}px;width: 100%;"></view> |
5 | <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;"></view> | 7 | <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;"></view> |
6 | </view> | 8 | </view> |
9 | + | ||
10 | + | ||
7 | <!-- 默认没有返回按钮 --> | 11 | <!-- 默认没有返回按钮 --> |
8 | <view wx:if="{{nav_type==0}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};"> | 12 | <view wx:if="{{nav_type==0}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};"> |
9 | <view style="height: {{nav_h}}px;width: 100%;"></view> | 13 | <view style="height: {{nav_h}}px;width: 100%;"></view> |
@@ -67,3 +71,5 @@ | @@ -67,3 +71,5 @@ | ||
67 | <view class="nav_right">1212121</view> | 71 | <view class="nav_right">1212121</view> |
68 | </view> | 72 | </view> |
69 | </view> | 73 | </view> |
74 | + | ||
75 | +</block> | ||
70 | \ No newline at end of file | 76 | \ No newline at end of file |
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | 15 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
16 | </view> | 16 | </view> |
17 | 17 | ||
18 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | 18 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> |
19 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 19 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
20 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 20 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
21 | {{item.name}} | 21 | {{item.name}} |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | 17 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
18 | </view> | 18 | </view> |
19 | 19 | ||
20 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | 20 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> |
21 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 21 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
22 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 22 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
23 | {{item.name}} | 23 | {{item.name}} |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -495,7 +495,14 @@ Page({ | @@ -495,7 +495,14 @@ Page({ | ||
495 | //------几人评价------- | 495 | //------几人评价------- |
496 | //n.init(th, "", "comments"); | 496 | //n.init(th, "", "comments"); |
497 | 497 | ||
498 | - if(e && e.goods_bottomconent){ | 498 | + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ |
499 | + //商品详情广告---- | ||
500 | + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); | ||
501 | + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); | ||
502 | + //------- | ||
503 | + } | ||
504 | + | ||
505 | + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1){ | ||
499 | //商品详情广告---- | 506 | //商品详情广告---- |
500 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); | 507 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); |
501 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); | 508 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | </view> | 20 | </view> |
21 | 21 | ||
22 | <!-- tab选项卡 --> | 22 | <!-- tab选项卡 --> |
23 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | 23 | + <view class="type-navbar" style="top:{{(top_nav?top_nav-4);0}}px"> |
24 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 24 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
25 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> | 25 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
26 | </view> | 26 | </view> |
@@ -681,6 +681,10 @@ | @@ -681,6 +681,10 @@ | ||
681 | </view> | 681 | </view> |
682 | </view> | 682 | </view> |
683 | </view> | 683 | </view> |
684 | + <!-- 详情广告顶部--> | ||
685 | + <view class="wxParse"> | ||
686 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | ||
687 | + </view> | ||
684 | <!-- 详情图片 --> | 688 | <!-- 详情图片 --> |
685 | <view class="wxParse"> | 689 | <view class="wxParse"> |
686 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | 690 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
@@ -689,6 +693,7 @@ | @@ -689,6 +693,7 @@ | ||
689 | <view class="wxParse"> | 693 | <view class="wxParse"> |
690 | <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> | 694 | <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> |
691 | </view> | 695 | </view> |
696 | + | ||
692 | </view> | 697 | </view> |
693 | <!-- 推荐商品 --> | 698 | <!-- 推荐商品 --> |
694 | <view class="flex-center rel xc-linellae-frame"> | 699 | <view class="flex-center rel xc-linellae-frame"> |
@@ -768,6 +773,12 @@ | @@ -768,6 +773,12 @@ | ||
768 | </view> | 773 | </view> |
769 | </view> | 774 | </view> |
770 | </view> | 775 | </view> |
776 | + | ||
777 | + <!-- 详情广告顶部--> | ||
778 | + <view class="wxParse"> | ||
779 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | ||
780 | + </view> | ||
781 | + | ||
771 | <view class="wxParse"> | 782 | <view class="wxParse"> |
772 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | 783 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
773 | </view> | 784 | </view> |
packageC/pages/presell/cardInfo/goodsInfo.wxml
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" | 16 | <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" |
17 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | 17 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
18 | </view> | 18 | </view> |
19 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | 19 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> |
20 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 20 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
21 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 21 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
22 | {{item.name}} | 22 | {{item.name}} |
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -423,7 +423,14 @@ Page({ | @@ -423,7 +423,14 @@ Page({ | ||
423 | 423 | ||
424 | }); | 424 | }); |
425 | 425 | ||
426 | - if(e && e.goods_bottomconent){ | 426 | + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ |
427 | + //商品详情广告---- | ||
428 | + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); | ||
429 | + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); | ||
430 | + //------- | ||
431 | + } | ||
432 | + | ||
433 | + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1){ | ||
427 | //商品详情广告---- | 434 | //商品详情广告---- |
428 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); | 435 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); |
429 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); | 436 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | 19 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
20 | </view> | 20 | </view> |
21 | 21 | ||
22 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | 22 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> |
23 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 23 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
24 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 24 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
25 | {{item.name}} | 25 | {{item.name}} |
@@ -346,14 +346,21 @@ | @@ -346,14 +346,21 @@ | ||
346 | </view> | 346 | </view> |
347 | </view> | 347 | </view> |
348 | </view> | 348 | </view> |
349 | + | ||
350 | + <!-- 详情广告顶部--> | ||
351 | + <view class="wxParse"> | ||
352 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | ||
353 | + </view> | ||
354 | + | ||
349 | <!-- 详情图片 --> | 355 | <!-- 详情图片 --> |
350 | <view class="wxParse"> | 356 | <view class="wxParse"> |
351 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | 357 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
352 | </view> | 358 | </view> |
353 | - <!-- 详情广告 --> | 359 | + <!-- 详情广告底部 --> |
354 | <view class="wxParse"> | 360 | <view class="wxParse"> |
355 | <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> | 361 | <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> |
356 | </view> | 362 | </view> |
363 | + | ||
357 | </view> | 364 | </view> |
358 | <!-- 推荐商品 --> | 365 | <!-- 推荐商品 --> |
359 | <view class="flex-center rel xc-linellae-frame"> | 366 | <view class="flex-center rel xc-linellae-frame"> |
@@ -440,6 +447,13 @@ | @@ -440,6 +447,13 @@ | ||
440 | </view> | 447 | </view> |
441 | </view> | 448 | </view> |
442 | </view> | 449 | </view> |
450 | + | ||
451 | + | ||
452 | + <!-- 详情广告顶部--> | ||
453 | + <view class="wxParse"> | ||
454 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | ||
455 | + </view> | ||
456 | + | ||
443 | <view class="wxParse"> | 457 | <view class="wxParse"> |
444 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | 458 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
445 | </view> | 459 | </view> |
pages/giftpack/giftpacklist/giftpacklist.js
@@ -526,7 +526,8 @@ Page({ | @@ -526,7 +526,8 @@ Page({ | ||
526 | data: { | 526 | data: { |
527 | "storeId": a.stoid, //商家ID | 527 | "storeId": a.stoid, //商家ID |
528 | "userId": d.user_id, //用户ID | 528 | "userId": d.user_id, //用户ID |
529 | - "giftBagId": th.getGiftID | 529 | + "giftBagId": th.getGiftID, |
530 | + isnNewUserLb:1 | ||
530 | }, | 531 | }, |
531 | success: function success(res) { | 532 | success: function success(res) { |
532 | if (res.data.code == 0) { | 533 | if (res.data.code == 0) { |
pages/goods/goodsInfo/goodsInfo.js
@@ -517,8 +517,15 @@ Page({ | @@ -517,8 +517,15 @@ Page({ | ||
517 | // goods_bottomconent:e.goods_bottomconent | 517 | // goods_bottomconent:e.goods_bottomconent |
518 | }); | 518 | }); |
519 | 519 | ||
520 | + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ | ||
521 | + //商品详情广告---- | ||
522 | + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); | ||
523 | + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); | ||
524 | + //------- | ||
525 | + } | ||
526 | + | ||
520 | //判断商品详情要有东西 | 527 | //判断商品详情要有东西 |
521 | - if(e && e.goods_bottomconent) { | 528 | + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1) { |
522 | //商品详情广告---- | 529 | //商品详情广告---- |
523 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); | 530 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); |
524 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); | 531 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | 22 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
23 | </view> | 23 | </view> |
24 | 24 | ||
25 | - <view class="type-navbar" style="top:{{top_nav-4}}px" wx:if="{{activeCategoryId>0 || !istop || ( istop && !searchbox_transparent)}}" > | 25 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px" wx:if="{{activeCategoryId>0 || !istop || ( istop && !searchbox_transparent)}}" > |
26 | <view class="type-box" wx:for="{{categories}}" wx:key="id"> | 26 | <view class="type-box" wx:for="{{categories}}" wx:key="id"> |
27 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> | 27 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
28 | </view> | 28 | </view> |
@@ -878,6 +878,12 @@ | @@ -878,6 +878,12 @@ | ||
878 | </view> | 878 | </view> |
879 | </view> | 879 | </view> |
880 | </view> | 880 | </view> |
881 | + | ||
882 | + <!-- 详情广告顶部--> | ||
883 | + <view class="wxParse"> | ||
884 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | ||
885 | + </view> | ||
886 | + | ||
881 | <!-- 详情图片 --> | 887 | <!-- 详情图片 --> |
882 | <view class="wxParse"> | 888 | <view class="wxParse"> |
883 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | 889 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
@@ -965,6 +971,12 @@ | @@ -965,6 +971,12 @@ | ||
965 | </view> | 971 | </view> |
966 | </view> | 972 | </view> |
967 | </view> | 973 | </view> |
974 | + | ||
975 | + <!-- 详情广告顶部--> | ||
976 | + <view class="wxParse"> | ||
977 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | ||
978 | + </view> | ||
979 | + | ||
968 | <view class="wxParse"> | 980 | <view class="wxParse"> |
969 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | 981 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
970 | </view> | 982 | </view> |