bayi hai 1 ano
pai
achega
6875dd202c

+ 2 - 0
app.js

@@ -15,9 +15,11 @@ let storeBindings
 App({
     async onLaunch() {
         // #if MP
+        wx.setStorageSync('channelCode', '3001')
         this.updateApplet()
         this.checkIsIos()
         // #elif ANDROID
+        wx.setStorageSync('channelCode', '12345')
         this.initPlugin()
         // #endif
         this.getNavbarInfo()

+ 24 - 23
components/banner/index.less

@@ -1,29 +1,30 @@
 .header {
-  position: relative;
+    position: relative;
+    margin-bottom: 50rpx;
 
-  .headerBg {
-    position: absolute;
-    z-index: -2;
-    width: 100%;
-    height: 100%;
-    background-color:#F2F6FC;
-  }
+    .headerBg {
+        position: absolute;
+        z-index: -2;
+        width: 100%;
+        height: 100%;
+        background-color: #F2F6FC;
+    }
 
-  .swiper {
-    margin: 0 auto;
-    width: 700rpx;
-    height: 250rpx;
-    border-radius: 30rpx;
-    overflow: hidden;
-    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
+    .swiper {
+        margin: 0 auto;
+        width: 700rpx;
+        height: 250rpx;
+        border-radius: 30rpx;
+        overflow: hidden;
+        box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
 
-    .swiper-item {
-      width: 100%;
-      height: 100%;
-      border-radius: 20rpx;
-      overflow: hidden;
-      object-fit: cover;
-    }
+        .swiper-item {
+            width: 100%;
+            height: 100%;
+            border-radius: 20rpx;
+            overflow: hidden;
+            object-fit: cover;
+        }
 
-  }
+    }
 }

+ 1 - 0
components/banner/index.wxss

@@ -1,5 +1,6 @@
 .header {
   position: relative;
+  margin-bottom: 50rpx;
 }
 .header .headerBg {
   position: absolute;

+ 2 - 2
pages/index/index.less

@@ -1,10 +1,10 @@
 .recommend {
     position: relative;
-    padding-top: 55rpx;
+    padding-top: 50rpx;
     padding-bottom: calc(140rpx + env(safe-area-inset-bottom)) !important;
 
     .firstClassify {
-        margin: 50rpx auto;
+        margin: 0rpx auto 50rpx;
         width: 700rpx;
         padding: 40rpx 10rpx;
         box-sizing: border-box;

+ 2 - 0
pages/index/index.wxml

@@ -1,6 +1,8 @@
 <navigationBar bind:reload='requestAgain'></navigationBar>
 <view class="recommend">
+    <!-- #if MP  -->
     <banner bannerList="{{bannerList}}" userInfo="{{userInfo}}" />
+    <!-- #endif -->
     <!-- 一级分类 -->
     <view class="firstClassify">
         <view class="classifyBox" wx:for="{{categoryList}}" wx:key="id" data-item='{{item}}'

+ 2 - 2
pages/index/index.wxss

@@ -1,10 +1,10 @@
 .recommend {
   position: relative;
-  padding-top: 55rpx;
+  padding-top: 50rpx;
   padding-bottom: calc(140rpx + env(safe-area-inset-bottom)) !important;
 }
 .recommend .firstClassify {
-  margin: 50rpx auto;
+  margin: 0rpx auto 50rpx;
   width: 700rpx;
   padding: 40rpx 10rpx;
   box-sizing: border-box;

+ 4 - 5
pages/my/index.wxml

@@ -25,7 +25,7 @@
             </view>
         </view>
     </view>
-    <!-- 安卓 -->
+    <!-- #if MP -->
     <view class="scrollViewBox" wx:if="{{vipTime!='1'&&!isIos}}">
         <scroll-view class="goodsList" scroll-x="true" enhanced show-scrollbar="{{false}}">
             <view wx:for="{{products}}" wx:key="id"
@@ -38,11 +38,13 @@
         </scroll-view>
         <view class="goodsTips">虚拟产品不支持退货</view>
     </view>
+    <!-- #endif -->
     <!-- ios -->
     <!-- <view class="longpressBox" wx:if="{{isIos}}">
         <image src="https://reader-wx.ai160.com/images/reader/v3/pay1.png" class="iosVip" />
         <image src="{{qrCode}}" class="qrCode" show-menu-by-longpress="{{true}}" />
     </view> -->
+    <!-- #if MP -->
     <view class="menu">
         <view class="activation" bindtap="activationCode" wx:if="{{vipTime!='1'}}">
             <view class="tips">
@@ -50,14 +52,12 @@
             </view>
             <image class='black' src='/static/black.png'></image>
         </view>
-        <!-- #if MP -->
         <view class="activation" bindtap="toGzh">
             <view class="tips">
                 <image src="/static/care.png" class="tipsImg" />关注公众号不迷路,更多福利等您!
             </view>
             <image class='black' src='/static/black.png'></image>
         </view>
-        <!-- #endif -->
         <view class="activation" bindtap="jump" data-url="/salesperson/pages/sale/index"
             wx:if="{{!userInfo.user.saleUserId}}">
             <view class="tips">
@@ -78,14 +78,12 @@
             </view>
             <image class='black' src='/static/black.png'></image>
         </view>
-        <!-- #if MP -->
         <button class="resetBtn activation" open-type="contact" plain="true">
             <view class="tips">
                 <image src="/static/contact.png" class="tipsImg" />联系我们
             </view>
             <image class='black' src='/static/black.png'></image>
         </button>
-        <!-- #endif -->
         <!--     <view class="activation" bindtap="jump" data-url="/pages/orderRecord/index">
             <view class="tips">
                 <image src="/static/care.png" class="tipsImg" />购买记录
@@ -93,6 +91,7 @@
             <image class='black' src='/static/black.png'></image>
         </view> -->
     </view>
+    <!-- #endif -->
     <!-- 弹窗 -->
     <view class="activationModal" wx:if="{{activationModal}}">
         <view class="box zoomIn">

+ 4 - 5
utils/request.js

@@ -1,6 +1,5 @@
 let baseUrl = null
 let oldUrl = null
-
 const {
     miniProgram: {
         envVersion
@@ -10,15 +9,15 @@ const {
 //     baseUrl = 'https://reader-api.efunbox.cn/wx'
 //     oldUrl = 'https://reader-api.efunbox.cn'
 // } else {
-    baseUrl = 'https://reader-api.ai160.com/wx'
-    oldUrl = 'https://reader-api.ai160.com'
+baseUrl = 'https://reader-api.ai160.com/wx'
+oldUrl = 'https://reader-api.ai160.com'
 // }
 
 function request(url, method, data, oldBaseUrl = false, intercept = true) {
     let header = {
         'uid': wx.getStorageSync('uid') || '',
-        'channelCode': wx.getStorageSync('user').channel == '4001' ? '4001' : '3001'
-        // 'channelCode': 3006
+        // 'channelCode': wx.getStorageSync('user').channel == '4001' ? '4001' : '3001'
+        'channelCode': wx.getStorageSync('channelCode')
     }
     return new Promise((reslove, reject) => {
         wx.request({