Browse Source

Merge remote-tracking branch 'origin/skk/feat/writeOff'

xing.li 3 years ago
parent
commit
f9a70796a7

+ 23 - 0
pages/welfareMall/index/index.js

@@ -13,6 +13,7 @@ Page({
       activityList:[],
       bannerList:[],
       navigationList:[],
+      adList:[],
       autoplay: true,
       interval: 5000,
       duration: 500,
@@ -134,6 +135,7 @@ Page({
       activityList:res.data.activityList,
       bannerList:res.data.bannerList,
       navigationList:res.data.navigationList,
+      adList:res.data.adList,
       grayTheme:res.data.config.grayTheme
     })
 
@@ -180,5 +182,26 @@ Page({
       })
     }
 
+  },
+
+  goToAd(e){
+    var appId = e.currentTarget.dataset.appid;
+    var path = e.currentTarget.dataset.path;
+ 
+    if(appId && path){
+      wx.navigateToMiniProgram({
+        appId: appId,
+        path: path,
+        success(res) {
+          // 打开成功
+        }
+      })
+    }
+    if(!appId && path){
+      wx.navigateTo({
+        url: path,
+      })
+    }
+
   }
 })

+ 12 - 0
pages/welfareMall/index/index.wxml

@@ -62,4 +62,16 @@
     </view>
   </view> -->
   </view>
+
+  <view class="jointly-info" wx:if="{{adList != null && adList.length > 0}}">
+    <view class="c_l_top flex-row">
+      <view class="c_l_top_l">沪上联名</view>
+    </view>
+    <view class="jointly-style">
+      <view class="jointly-list" wx:for="{{adList}}" data-appid="{{item.appId}}" data-path="{{item.path}}" wx:key="unique" bindtap="goToAd">
+        <image class="jointly-img" src="{{item.figure}}"></image>
+        <view class="jointly-text over-ellipsis-two">{{item.title}}</view>
+      </view>
+    </view>
+  </view>
 </page-wrap>

+ 49 - 6
pages/welfareMall/index/index.wxss

@@ -65,7 +65,7 @@ Page {
   margin-top: 26rpx;
   box-sizing: border-box;
   padding: 40rpx 36rpx;
-  margin-bottom: 40rpx;
+  margin-bottom: 20rpx;
 }
 .c_l_top{
   width: 100%;
@@ -142,7 +142,7 @@ color: #B01717;
 }
 
 /*用来包裹所有的小圆点  */
- 
+
 .dots {
   width: 210rpx;
   height: 20rpx;
@@ -154,7 +154,7 @@ color: #B01717;
   transform: translateX(-50%);
   bottom: 0rpx;
 }
- 
+
 
 .swiper_box {
   height: auto;
@@ -162,7 +162,7 @@ color: #B01717;
 }
 
 /*未选中时的小圆点样式 */
- 
+
 .dot {
   width: 40rpx;
   height: 10rpx;
@@ -171,9 +171,9 @@ color: #B01717;
   background-color: #ccc;
   opacity: 0.5;
 }
- 
+
 /*选中以后的小圆点样式  */
- 
+
 .active_dot {
   background-color: #333;
   opacity: 0.5;
@@ -182,3 +182,46 @@ color: #B01717;
   -webkit-filter: grayscale(100%);
   filter: grayscale(100%);
 }
+
+.jointly-info {
+  width: 676rpx;
+  background: #FFFFFF;
+  border-radius: 10rpx;
+  box-sizing: border-box;
+  padding: 40rpx 48rpx;
+  margin-bottom: 38rpx;
+}
+
+.jointly-style{
+  width: 100%;
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
+
+.jointly-list{
+  width: 260rpx;
+  height: 330rpx;
+  margin-top: 24rpx;
+  display: flex;
+  flex-flow: column nowrap;
+  align-items: center;
+  justify-content: left;
+}
+
+.jointly-img{
+  width: 260rpx;
+  height: 260rpx;
+}
+
+.jointly-text{
+  font-size: 26rpx;
+  width: 260rpx;
+  font-weight: 700;
+  margin-top: 26rpx;
+  text-align: center;
+  overflow: hidden;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+}