zhuliu 1 yıl önce
ebeveyn
işleme
2eb3af060c
3 değiştirilmiş dosya ile 55 ekleme ve 22 silme
  1. 23 12
      pages/about/invite.js
  2. 14 6
      pages/about/invite.wxml
  3. 18 4
      pages/about/invite.wxss

+ 23 - 12
pages/about/invite.js

@@ -42,22 +42,34 @@ Page({
   },
   //获取已邀请的人员
   getinvitePerson(){
-    var data = [{
-      "name": "用户",
-      "fileGuid": "72a4ea3d42624ffdb3f37724ef2d2c38",
-      "phoneNum": "18856669949",
-      "uuid": "cf934195ff9f40fd8ae16337d538dacb",
-      "vipType": 0,
-      "vipMessageVO": {},
-      "createTime": "2024-04-10 11:37:36"
-  }]
+    var data = [
+      {
+        "name": "用户",
+        "fileGuid": "72a4ea3d42624ffdb3f37724ef2d2c38",
+        "phoneNum": "18856669949",
+        "uuid": "cf934195ff9f40fd8ae16337d538dacb",
+        "vipType": 0,
+        "vipMessageVO": {},
+        "createTime": "2024-04-10 11:37:36",
+        isvip:true
+      },
+      {
+        "name": "用户2",
+        "fileGuid": "",
+        "phoneNum": "18856669949",
+        "uuid": "cf934195ff9f40fd8ae16337d538dacb",
+        "vipType": 0,
+        "vipMessageVO": {},
+        "createTime": "2024-04-10 11:37:36"
+      },
+    ]
   data.forEach(item=>{
     item.phoneNum = this.hideMiddleFour(item.phoneNum)
   })
     this.setData(
       {
         personList:data,
-        total:1
+        total:data.length
       }
     )
   },
@@ -92,7 +104,6 @@ Page({
   showShareMenu: function() {  
     wx.showShareMenu({  
       withShareTicket: true ,
-      menus: ['shareAppMessage', 'shareTimeline'] 
     });  
   }, 
 
@@ -132,7 +143,7 @@ Page({
     return {  
       title: '邀请好友加入',  
       path:"/pages/login/login?inviteCode=" + this.data.inviteCode,
-      
+      imageUrl:'/static/image/350.png'
     } 
   }
 })

+ 14 - 6
pages/about/invite.wxml

@@ -1,15 +1,23 @@
 <!--pages/about/invite.wxml-->
 <view class="invite">
+  <view class="invite_introduce">
+    被邀请的人员入会后邀请人会有惊喜福利哦,如果您是我们尊贵的会员,那么您邀请的人注册后将享有三天免费会员福利,快去邀请您的好友吧。(温馨提示:只有通过邀请链接进入才可以哦)
+  </view>
   <view class="invite_list shadow">
-    <view class="head"> 已邀请用户 <span style="font-size: 20rpx;color: darkgray;">{{total}}</span></view>
+    <view class="head"> 已邀请用户 <span style="font-size: 20rpx;color: darkgray;">{{total}}</span></view>
     <view class="invite_list_content">
       <block wx:if="{{personList.length>0}}">
         <view class="invite_list_item" wx:for="{{personList}}" wx:key="index">
-          <wux-avatar size="large" wx:if="{{item.fileGuid}}" src="{{imgHttp}}{{item.fileGuid}}"></wux-avatar>
-          <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg"></wux-avatar>
-          <view class="message">
-            <view class="name">{{item.name}}</view>
-            <view class="phone">{{item.phoneNum}}</view>
+          <view class="invite_list_item_left">
+            <wux-avatar size="large" wx:if="{{item.fileGuid}}" src="{{imgHttp}}{{item.fileGuid}}"></wux-avatar>
+            <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg"></wux-avatar>
+            <view class="message">
+              <view class="name">{{item.name}}</view>
+              <view class="phone">{{item.phoneNum}}</view>
+            </view>
+          </view>
+          <view class="invite_list_item_right">
+            {{item.isvip?'已入会':'未入会'}}
           </view>
         </view>
       </block>

+ 18 - 4
pages/about/invite.wxss

@@ -2,6 +2,11 @@
 .invite{
   padding: 10px;
 }
+.invite_introduce{
+  color: darkgray;
+  font-size: 24rpx;
+  height: 72rpx;
+}
 .empty{
   text-align: center;
   line-height: 150px;
@@ -26,7 +31,7 @@
 .invite_list_content{
   margin-top: 10px;
   padding: 8px;
-  max-height: calc(100vh - 120px);
+  height: calc(100vh - 200px - 70rpx);
   overflow-y: auto;
 }
 .invite_list_item{
@@ -37,6 +42,14 @@
   margin-bottom: 10px;
   display: flex;
   align-items: center;
+  justify-content: space-between;
+}
+.invite_list_item_left{
+  display: flex;
+  align-items: center;
+}
+.invite_list_item_right{
+  font-size: 28rpx;
 }
 .message{
   margin-left: 15px;
@@ -50,10 +63,11 @@
 }
 
 .invite_btn{
-  width: calc(100vw - 40px);
-  position: fixed;
+  margin-top: 20px;
+  /* width: calc(100vw - 40px); */
+  /* position: fixed;
   bottom: 50px;
-  margin: 10px;
+  margin: 10px; */
 }
 .btn{
   width: 70%;