Commit b8eee6dc66a65b487793e91174b7a5b9a0c95979
1 parent
42494f79
1、 商品详情页面
2、预售商品详情页面 3、幸运购商品详情页面 4、服务卡项的商品页面的优化 5、高度要有默认值
Showing
15 changed files
with
52 additions
and
11 deletions
app.js
| ... | ... | @@ -51,7 +51,7 @@ App({ |
| 51 | 51 | config: null, //门店参数 |
| 52 | 52 | config2: null, //门店配置 |
| 53 | 53 | code: null, |
| 54 | - user_id:null,//6520390,//6520352 | |
| 54 | + user_id:null,//6520352 | |
| 55 | 55 | // user_id:6520314,// qa-6519858,// |
| 56 | 56 | // user_id:14148118,// qa-6519858,// |
| 57 | 57 | buy_now: null, |
| ... | ... | @@ -72,7 +72,9 @@ App({ |
| 72 | 72 | room_id: null, //直播间分享的房间ID |
| 73 | 73 | room_goods_id: null, //直播间分享的商品ID |
| 74 | 74 | fail_url: new Map(), |
| 75 | - sp_scene: null | |
| 75 | + sp_scene: null, | |
| 76 | + | |
| 77 | + navBarHeight:44, //默认高度44 | |
| 76 | 78 | }, |
| 77 | 79 | auth: o, |
| 78 | 80 | request: a, | ... | ... |
components/com_top_nav/com_top_nav.wxml
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <cover-view class="gback"> |
| 8 | 8 | <cover-view class="rote_view" style="border: 3rpx solid {{color}};"></cover-view> |
| 9 | 9 | </cover-view> |
| 10 | - <cover-view >{{title}}</cover-view> | |
| 10 | + <cover-view class="ellip">{{title}}</cover-view> | |
| 11 | 11 | </cover-view> |
| 12 | 12 | |
| 13 | 13 | </cover-view> | ... | ... |
components/com_top_nav/com_top_nav.wxss
| ... | ... | @@ -12,3 +12,10 @@ |
| 12 | 12 | width: 24rpx; height: 24rpx; margin-left: 6rpx; margin-top: 6rpx; |
| 13 | 13 | transform: rotate(45deg); |
| 14 | 14 | } |
| 15 | + | |
| 16 | +.ellip{ | |
| 17 | + max-width: 300rpx; | |
| 18 | + overflow: hidden; | |
| 19 | + white-space: nowrap; | |
| 20 | + text-overflow: ellipsis; | |
| 21 | +} | |
| 15 | 22 | \ No newline at end of file | ... | ... |
packageA/pages/goodsInfo/goodsInfo.js
| ... | ... | @@ -253,8 +253,10 @@ Page({ |
| 253 | 253 | room_user_share=1; |
| 254 | 254 | }; |
| 255 | 255 | }; |
| 256 | - | |
| 257 | - ee.setData({ gid: gid}); | |
| 256 | + | |
| 257 | + //-- 设置顶部高度 -- | |
| 258 | + let height= getApp().globalData.navBarHeight; | |
| 259 | + ee.setData({ gid: gid,top_nav:height}); | |
| 258 | 260 | |
| 259 | 261 | if(first_leader) { |
| 260 | 262 | getApp().globalData.first_leader=first_leader; | ... | ... |
packageA/pages/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 12 | 12 | <block wx:if="{{isshow}}"> |
| 13 | 13 | <view class="container"> |
| 14 | - <view class="type-navbar"> | |
| 14 | + <view class="type-navbar" style="top:{{top_nav}}px"> | |
| 15 | 15 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 16 | 16 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 17 | 17 | {{item.name}} | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
| ... | ... | @@ -207,6 +207,14 @@ Page({ |
| 207 | 207 | gid = t.goods_id, |
| 208 | 208 | first_leader = t.first_leader; |
| 209 | 209 | |
| 210 | + | |
| 211 | + //-- 设置顶部高度 -- | |
| 212 | + let height= getApp().globalData.navBarHeight; | |
| 213 | + this.setData({ | |
| 214 | + top_nav:height | |
| 215 | + }) | |
| 216 | + | |
| 217 | + | |
| 210 | 218 | //-- 自定义海报 -- |
| 211 | 219 | getApp().request.promiseGet("/api/weshop/goods/poster/page", { |
| 212 | 220 | data:{store_id:os.stoid, type:1, is_use:1} | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 12 | 12 | <block wx:if="{{isshow}}"> |
| 13 | 13 | <view class="container"> |
| 14 | - <view class="type-navbar"> | |
| 14 | + <view class="type-navbar" style="top:{{top_nav}}px"> | |
| 15 | 15 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 16 | 16 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 17 | 17 | {{item.name}} | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -336,6 +336,12 @@ Page({ |
| 336 | 336 | //检查测肤 |
| 337 | 337 | getApp().check_skin_face(t,0,gid); |
| 338 | 338 | |
| 339 | + //-- 设置顶部高度 -- | |
| 340 | + let height= getApp().globalData.navBarHeight; | |
| 341 | + th.setData({ | |
| 342 | + top_nav:height | |
| 343 | + }) | |
| 344 | + | |
| 339 | 345 | //-- 自定义海报 -- |
| 340 | 346 | getApp().request.promiseGet("/api/weshop/goods/poster/page", { |
| 341 | 347 | data: {store_id: os.stoid, type: 1, is_use: 1} | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <!-- 幸运购规则 --> |
| 15 | 15 | <view class="rules" bindtap="showRules">规则</view> |
| 16 | 16 | <!-- tab选项卡 --> |
| 17 | - <view class="type-navbar"> | |
| 17 | + <view class="type-navbar" style="top:{{top_nav}}px"> | |
| 18 | 18 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 19 | 19 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
| 20 | 20 | </view> | ... | ... |
packageC/pages/presell/cardInfo/goodsInfo.js
packageC/pages/presell/cardInfo/goodsInfo.wxml
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | <block wx:if="{{show}}"> |
| 12 | 12 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 13 | 13 | <view class="container"> |
| 14 | - <view class="type-navbar"> | |
| 14 | + <view class="type-navbar" style="top:{{top_nav}}px"> | |
| 15 | 15 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 16 | 16 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 17 | 17 | {{item.name}} | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.js
| ... | ... | @@ -283,6 +283,12 @@ Page({ |
| 283 | 283 | wxlog.info(getApp().globalData.user_id+'-分享的内容:'+JSON.stringify(t)); |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | + //-- 设置顶部高度 -- | |
| 287 | + let height= getApp().globalData.navBarHeight; | |
| 288 | + th.setData({ | |
| 289 | + top_nav:height | |
| 290 | + }) | |
| 291 | + | |
| 286 | 292 | //检查测肤 |
| 287 | 293 | getApp().check_skin_face(t, 0, gid); |
| 288 | 294 | //群id | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | <block wx:if="{{show}}"> |
| 11 | 11 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
| 12 | 12 | <view class="container"> |
| 13 | - <view class="type-navbar"> | |
| 13 | + <view class="type-navbar" style="top:{{top_nav}}px"> | |
| 14 | 14 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 15 | 15 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 16 | 16 | {{item.name}} | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -298,6 +298,12 @@ Page({ |
| 298 | 298 | console.log("gd onload-- 3 --"); |
| 299 | 299 | console.log(t); |
| 300 | 300 | |
| 301 | + //-- 设置顶部高度 -- | |
| 302 | + let height= getApp().globalData.navBarHeight; | |
| 303 | + th.setData({ | |
| 304 | + top_nav:height | |
| 305 | + }) | |
| 306 | + | |
| 301 | 307 | if(t){ |
| 302 | 308 | wxlog.info(getApp().globalData.user_id+'-分享的内容:'+JSON.stringify(t)); |
| 303 | 309 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -15,7 +15,7 @@ |
| 15 | 15 | <view class="container"> |
| 16 | 16 | <!-- 拼单规则规则 --> |
| 17 | 17 | <view wx:if="{{prom_type== 6}}" class="rules" bindtap="showRules">规则</view> |
| 18 | - <view class="type-navbar"> | |
| 18 | + <view class="type-navbar" style="top:{{top_nav}}px"> | |
| 19 | 19 | <view class="type-box" wx:for="{{categories}}" wx:key="id"> |
| 20 | 20 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
| 21 | 21 | </view> | ... | ... |