Commit c7287bc1f04249c1c355af9ec1c6a0e78d8efcc4

Authored by yvan.ni
1 parent b41021e3

OA单的优化

... ... @@ -51,7 +51,7 @@ App({
51 51 config: null, //门店参数
52 52 config2: null, //门店配置
53 53 code: null,
54   - user_id:null,//6520352
  54 + user_id:null,//6520491,// 6519913,//6520352
55 55 // user_id:6520314,// qa-6519858,//
56 56 // user_id:14148118,// qa-6519858,//
57 57 buy_now: null,
... ... @@ -75,6 +75,7 @@ App({
75 75 sp_scene: null,
76 76  
77 77 navBarHeight:44, //默认高度44
  78 + is_pc:0, //是不是在pc端打开小程序
78 79 },
79 80 auth: o,
80 81 request: a,
... ... @@ -202,7 +203,16 @@ App({
202 203 if (modelmes && modelmes.indexOf('iPhone X') != -1) {  //XS,XR,XS MAX均可以适配,因为indexOf()会将包含'iPhone X'的字段都查出来
203 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 218 this.globalData.menuInfo = wx.getMenuButtonBoundingClientRect() || {}
... ... @@ -1636,6 +1646,8 @@ App({
1636 1646 }
1637 1647 a.wxParse(content, "html", ut.format_content(ob.text), th, 6);
1638 1648 e.wxParseAddFullImageUrl(th, content);
  1649 +
  1650 +
1639 1651 },
1640 1652  
1641 1653 async deal_iframe_next(ob){
... ...
components/com_top_nav/com_top_nav.js
... ... @@ -19,7 +19,8 @@ Component({
19 19 height:0,
20 20 h1:0,
21 21 h2:0,
22   - user_id:0
  22 + user_id:0,
  23 + is_pc:0
23 24 },
24 25 ready: function() {
25 26 let height= getApp().globalData.navBarHeight;
... ... @@ -30,6 +31,9 @@ Component({
30 31 }
31 32 //-- 胶囊的高度 --
32 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 38 pageLifetimes: {
35 39 //要处理一下,游客登录后的界面的变化,主要还该是改变会员
... ...
components/com_top_nav/com_top_nav.wxml
1 1 <!-- 需要cover-view是大转盘才会 -->
  2 +<block wx:if="{{!is_pc}}">
  3 +
2 4 <block wx:if="{{need_cover}}">
3 5 <cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">
4 6 <cover-view class="tab" style="height:{{h1}}px;">
... ... @@ -31,4 +33,6 @@
31 33  
32 34  
33 35 <!-- 用于顶开层的高 -->
34   -<view style="height:{{height}}px"></view>
35 36 \ No newline at end of file
  37 +<view style="height:{{height}}px"></view>
  38 +
  39 +</block>
36 40 \ No newline at end of file
... ...
components/diy_top_nav/diy_top_nav.js
... ... @@ -65,43 +65,51 @@ Component({
65 65 // img:'',
66 66 // url:''
67 67 // },
68   - ]
  68 + ],
  69 + is_pc:0
69 70 },
70 71 lifetimes:{
71 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 1 <!--components/diy_top_nav/diy_top_nav.wxml-->
2 2 <!-- 支撑作用 -->
  3 +<block wx:if="{{!is_pc}}">
  4 +
3 5 <view wx:if="{{nav_type==-1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};">
4 6 <view style="height: {{nav_h}}px;width: 100%;"></view>
5 7 <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;"></view>
6 8 </view>
  9 +
  10 +
7 11 <!-- 默认没有返回按钮 -->
8 12 <view wx:if="{{nav_type==0}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};">
9 13 <view style="height: {{nav_h}}px;width: 100%;"></view>
... ... @@ -67,3 +71,5 @@
67 71 <view class="nav_right">1212121</view>
68 72 </view>
69 73 </view>
  74 +
  75 +</block>
70 76 \ No newline at end of file
... ...
packageA/pages/goodsInfo/goodsInfo.wxml
... ... @@ -15,7 +15,7 @@
15 15 nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
16 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 19 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
20 20 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
21 21 {{item.name}}
... ...
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
... ... @@ -17,7 +17,7 @@
17 17 nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
18 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 21 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
22 22 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
23 23 {{item.name}}
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -495,7 +495,14 @@ Page({
495 495 //------几人评价-------
496 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 507 a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
501 508 common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
... ... @@ -20,7 +20,7 @@
20 20 </view>
21 21  
22 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 24 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
25 25 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view>
26 26 </view>
... ... @@ -681,6 +681,10 @@
681 681 </view>
682 682 </view>
683 683 </view>
  684 + <!-- 详情广告顶部-->
  685 + <view class="wxParse">
  686 + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template>
  687 + </view>
684 688 <!-- 详情图片 -->
685 689 <view class="wxParse">
686 690 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
... ... @@ -689,6 +693,7 @@
689 693 <view class="wxParse">
690 694 <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template>
691 695 </view>
  696 +
692 697 </view>
693 698 <!-- 推荐商品 -->
694 699 <view class="flex-center rel xc-linellae-frame">
... ... @@ -768,6 +773,12 @@
768 773 </view>
769 774 </view>
770 775 </view>
  776 +
  777 + <!-- 详情广告顶部-->
  778 + <view class="wxParse">
  779 + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template>
  780 + </view>
  781 +
771 782 <view class="wxParse">
772 783 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
773 784 </view>
... ...
packageC/pages/presell/cardInfo/goodsInfo.wxml
... ... @@ -16,7 +16,7 @@
16 16 <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1"
17 17 nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
18 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 20 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
21 21 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
22 22 {{item.name}}
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -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 435 a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
429 436 common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
... ...
packageC/pages/presell/goodsInfo/goodsInfo.wxml
... ... @@ -19,7 +19,7 @@
19 19 nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
20 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 23 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
24 24 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
25 25 {{item.name}}
... ... @@ -346,14 +346,21 @@
346 346 </view>
347 347 </view>
348 348 </view>
  349 +
  350 + <!-- 详情广告顶部-->
  351 + <view class="wxParse">
  352 + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template>
  353 + </view>
  354 +
349 355 <!-- 详情图片 -->
350 356 <view class="wxParse">
351 357 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
352 358 </view>
353   - <!-- 详情广告 -->
  359 + <!-- 详情广告底部 -->
354 360 <view class="wxParse">
355 361 <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template>
356 362 </view>
  363 +
357 364 </view>
358 365 <!-- 推荐商品 -->
359 366 <view class="flex-center rel xc-linellae-frame">
... ... @@ -440,6 +447,13 @@
440 447 </view>
441 448 </view>
442 449 </view>
  450 +
  451 +
  452 + <!-- 详情广告顶部-->
  453 + <view class="wxParse">
  454 + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template>
  455 + </view>
  456 +
443 457 <view class="wxParse">
444 458 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
445 459 </view>
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -526,7 +526,8 @@ Page({
526 526 data: {
527 527 "storeId": a.stoid, //商家ID
528 528 "userId": d.user_id, //用户ID
529   - "giftBagId": th.getGiftID
  529 + "giftBagId": th.getGiftID,
  530 + isnNewUserLb:1
530 531 },
531 532 success: function success(res) {
532 533 if (res.data.code == 0) {
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -517,8 +517,15 @@ Page({
517 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 530 a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
524 531 common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -22,7 +22,7 @@
22 22 nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
23 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 26 <view class="type-box" wx:for="{{categories}}" wx:key="id">
27 27 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view>
28 28 </view>
... ... @@ -878,6 +878,12 @@
878 878 </view>
879 879 </view>
880 880 </view>
  881 +
  882 + <!-- 详情广告顶部-->
  883 + <view class="wxParse">
  884 + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template>
  885 + </view>
  886 +
881 887 <!-- 详情图片 -->
882 888 <view class="wxParse">
883 889 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
... ... @@ -965,6 +971,12 @@
965 971 </view>
966 972 </view>
967 973 </view>
  974 +
  975 + <!-- 详情广告顶部-->
  976 + <view class="wxParse">
  977 + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template>
  978 + </view>
  979 +
968 980 <view class="wxParse">
969 981 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
970 982 </view>
... ...