浏览代码

修改组件的位置

zhuliu 1 年之前
父节点
当前提交
4f94b4f289

pages/component/followPopup/followPopup.js → myComponents/followPopup/followPopup.js


pages/component/followPopup/followPopup.json → myComponents/followPopup/followPopup.json


pages/component/followPopup/followPopup.wxml → myComponents/followPopup/followPopup.wxml


pages/component/followPopup/followPopup.wxss → myComponents/followPopup/followPopup.wxss


+ 1 - 1
pageIndex/hotProduct/hotProduct.json

@@ -2,6 +2,6 @@
   "usingComponents": {
     "myProduct":"/myComponents/product/product",
     "myDialog":"/myComponents/dialog/dialog",
-    "followPopup":"/pages/component/followPopup/followPopup"
+    "followPopup":"/myComponents/followPopup/followPopup"
   }
 }

+ 20 - 1
pageIndex/index/index.js

@@ -1,5 +1,6 @@
 const api = require("../../api/index.js")
 const app = getApp()
+const activity = require('../../utils/activity')
 // index.js
 const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
 
@@ -41,7 +42,8 @@ Page({
         page:'/pages/form/application/application'
       }
     ],
-    visible1:false
+    visible1:false,
+    activityList:activity.getActivityList()
   },
   bindViewTap() {
     wx.navigateTo({
@@ -65,6 +67,23 @@ Page({
      }
    )
   },
+    //点击活动
+    clickActivity(e){
+      var {item} = e.currentTarget.dataset
+      var page = item.page
+      if(page){
+        wx.navigateTo({
+          url: page,
+        })
+        return
+      }
+      var url = item.url
+      if(url){
+        wx.navigateTo({
+          url: '/pages/webView/webView?src='+url,
+        })
+      }
+    },
   onClose1(){
     this.setData(
       {

+ 11 - 1
pageIndex/index/index.wxml

@@ -42,8 +42,18 @@
     </view>
   </view>
  <view class="foot">
+  <!-- 活动 -->
+  <view class="activity">
+    <swiper indicator-dots="{{true}}"  autoplay="{{true}}" interval="{{2000}}" duration="{{500}}">
+      <block wx:if="{{activityList && activityList.length>0}}" wx:for="{{activityList}}" wx:key="index">
+        <swiper-item>
+          <image src="{{item.image}}" data-item="{{item}}" bindtap="clickActivity" class="slide-image" 	show-menu-by-longpress mode="aspectFit"/>  
+        </swiper-item>
+      </block>
+    </swiper>
+  </view>
  <view>软件服务提供商:小世 </view>
- <view>知识产权服务提供商:深圳威世博</view>
+ <!-- <view>知识产权服务提供商:深圳威世博</view> -->
      
  </view>
 </view>

+ 12 - 1
pageIndex/index/index.wxss

@@ -4,6 +4,13 @@ page {
   display: flex;
   flex-direction: column;
 }
+.slide-image {  
+  width: 100%;  
+  height: 100%;  
+  background-size:contain; /* 图片覆盖整个容器,可能部分图片不可见 */  
+  background-position: center; /* 图片居中显示 */  
+  background-repeat: no-repeat; /* 图片不重复 */  
+}
 .scrollarea {
   flex: 1;
   /* overflow-y: hidden; */
@@ -49,6 +56,7 @@ page {
 }
 
 .foot{
+  padding: 0 8px;
   font-size: 14px;
   display: flex;
   flex-direction: column;
@@ -56,7 +64,10 @@ page {
   margin-top: 30px;
   color: #a7a5a5;
 }
-
+.activity{
+  width: 100%;
+  margin-bottom: 15px;
+}
 
 .landscape_content{
   border-radius: 15rpx;

+ 1 - 2
pages/memberCenter/menberCenter2.js

@@ -25,7 +25,6 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    this.getUserinfo()
     this.queryAllVip()
     this.getVipRights()
   },
@@ -41,7 +40,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-
+    this.getUserinfo()
   },
 
   /**

+ 1 - 1
pages/monitor/monitor.json

@@ -3,6 +3,6 @@
   "usingComponents": {
     "navBar": "/myComponents/navBar/navBar",
     "myProduct":"/myComponents/product/product",
-    "followPopup":"/pages/component/followPopup/followPopup"
+    "followPopup":"/myComponents/followPopup/followPopup"
   }
 }

+ 1 - 1
pages/myFollow/myFollow.json

@@ -7,6 +7,6 @@
     "van-checkbox-group": "/miniprogram_npm/@vant/weapp/checkbox-group/index",
     "van-tab": "/miniprogram_npm/@vant/weapp/tab/index",
     "van-tabs": "/miniprogram_npm/@vant/weapp/tabs/index",
-    "followPopup":"/pages/component/followPopup/followPopup"
+    "followPopup":"/myComponents/followPopup/followPopup"
   }
 }

+ 1 - 1
pages/riskAssessment/riskAssessment.json

@@ -4,6 +4,6 @@
     "navBar": "/myComponents/navBar/navBar",
     "myProduct":"/myComponents/product/product",
     "myDialog":"/myComponents/dialog/dialog",
-    "followPopup":"/pages/component/followPopup/followPopup"
+    "followPopup":"/myComponents/followPopup/followPopup"
   }
 }

+ 1 - 1
pages/searchResults/searchResults.json

@@ -9,6 +9,6 @@
     "van-checkbox-group": "/miniprogram_npm/@vant/weapp/checkbox-group/index",
     "wux-gallery": "/miniprogram_npm/wux-weapp/gallery/index",
     "myDialog":"/myComponents/dialog/dialog",
-    "followPopup":"/pages/component/followPopup/followPopup"
+    "followPopup":"/myComponents/followPopup/followPopup"
   }
 }