Browse Source

Merge branch 'oil' of 39.97.239.116:gyfl/minixyz into oil

stanley-king 4 years ago
parent
commit
307e002401

+ 65 - 64
app.json

@@ -1,66 +1,67 @@
 {
-	"pages": [
-		"pages/index/index",
-		"pages/postage/postage",				
-		"pages/postageDetail/postageDetail",
-		"pages/postageManage/postageManage",
-		"pages/myhome/myhome",
-		"pages/address/address",
-		"pages/phoneCharges/phoneCharges",
-		"pages/discover/discover",
-		"pages/shopCart/shopCart",
-		"pages/person/person",
-		"pages/details/details",
-		"pages/webView/webView",
-		"pages/special/special",
-		"pages/brand/brand",
-		"pages/comments/comments",
-		"pages/search/search",
-		"pages/confirmOrder/confirmOrder",
-		"pages/confirmVOrder/confirmVOrder",
-		"pages/vorderList/orderTabs",
-		"pages/addAddress/addAddress",
-		"pages/orderPaySn/orderPaySn",
-		"pages/fcode/fcode",
-		"pages/login/login",
-		"pages/shareBonus/shareBonus",
-		"pages/handOutBonus/handOutBonus",
-		"pages/auth/auth"
-	],
-	"window": {
-		"backgroundTextStyle": "dark",
-		"navigationBarBackgroundColor": "#fff",
-		"navigationBarTitleText": "椰子充值",
-		"navigationBarTextStyle": "black",
-		"onReachBottomDistance": 200
-	},
-	"tabBar": {
-		"selectedColor": "#2B2B2B",
-		"backgroundColor": "#ffffff",
-		"borderStyle": "black",
-		"list": [
-			{
-				"iconPath": "./image/tabbar/index.png",
-				"selectedIconPath": "./image/tabbar/indexed.png",
-				"pagePath": "pages/index/index",
-				"text": "首页"
-			},
-			{
-				"iconPath": "./image/tabbar/phone.png",
-				"selectedIconPath": "./image/tabbar/phoned.png",
-				"pagePath": "pages/postage/postage",
-				"text": "加油"
-			},
-			{
-				"iconPath": "./image/tabbar/me.png",
-				"selectedIconPath": "./image/tabbar/med.png",
-				"pagePath": "pages/myhome/myhome",
-				"text": "我的"
-			}
-		]
-	},
-	"networkTimeout": {
-		"request": 20000
-	},
-	"sitemapLocation": "sitemap.json"
+  "pages": [
+    "pages/phoneCharges/phoneCharges",
+    "pages/invitees/invitees",
+    "pages/myhome/myhome",
+    "pages/index/index",
+    "pages/postage/postage",
+    "pages/postageDetail/postageDetail",
+    "pages/postageManage/postageManage",
+    "pages/address/address",
+    "pages/discover/discover",
+    "pages/shopCart/shopCart",
+    "pages/person/person",
+    "pages/details/details",
+    "pages/webView/webView",
+    "pages/special/special",
+    "pages/brand/brand",
+    "pages/comments/comments",
+    "pages/search/search",
+    "pages/confirmOrder/confirmOrder",
+    "pages/confirmVOrder/confirmVOrder",
+    "pages/vorderList/orderTabs",
+    "pages/addAddress/addAddress",
+    "pages/orderPaySn/orderPaySn",
+    "pages/fcode/fcode",
+    "pages/login/login",
+    "pages/shareBonus/shareBonus",
+    "pages/handOutBonus/handOutBonus",
+    "pages/auth/auth"
+  ],
+  "window": {
+    "backgroundTextStyle": "dark",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "椰子充值",
+    "navigationBarTextStyle": "black",
+    "onReachBottomDistance": 200
+  },
+  "tabBar": {
+    "selectedColor": "#2B2B2B",
+    "backgroundColor": "#ffffff",
+    "borderStyle": "black",
+    "list": [
+      {
+        "iconPath": "./image/tabbar/index.png",
+        "selectedIconPath": "./image/tabbar/indexed.png",
+        "pagePath": "pages/index/index",
+        "text": "首页"
+      },
+      {
+        "iconPath": "./image/tabbar/phone.png",
+        "selectedIconPath": "./image/tabbar/phoned.png",
+        "pagePath": "pages/postage/postage",
+        "text": "加油"
+      },
+      {
+        "iconPath": "./image/tabbar/me.png",
+        "selectedIconPath": "./image/tabbar/med.png",
+        "pagePath": "pages/myhome/myhome",
+        "text": "我的"
+      }
+    ]
+  },
+  "networkTimeout": {
+    "request": 20000
+  },
+  "sitemapLocation": "sitemap.json"
 }

+ 7 - 0
app.wxss

@@ -269,4 +269,11 @@ page {
 }
 .mb-20{
   margin-bottom: 20rpx;
+}
+
+.text-nowrap{
+  overflow: hidden;
+  white-space: nowrap;
+  word-break: keep-all;
+  text-overflow: ellipsis;
 }

+ 2 - 2
config.js

@@ -1,7 +1,7 @@
 // let api = "https://passport.lrlz.com/mobile/index.php";
 // let api = "http://www.xyzshops.cn/mobile/index.php";
-let api = "http://192.168.1.200/mobile/index.php";
-// let api = "https://www.xyzshops.cn/mobile/index.php";
+// let api = "http://192.168.1.200/mobile/index.php";
+let api = "https://www.xyzshops.cn/mobile/index.php";
 
 function getReq(app,data, callback, method)
 {

+ 90 - 0
pages/invitees/invitees.js

@@ -0,0 +1,90 @@
+// pages/invitees/invitees.js
+const config = require('../../config.js')
+const getReq = config.getReq
+const app = getApp();
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    list: []
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.getData()
+  },
+
+  getData(){
+    getReq(app,{
+        act: 'member_invitee',
+        op: 'list'
+      }, (res) => {
+        if (res.code == 200) {
+          if(res.datas) {
+            this.setData({list: res.datas })
+          }
+        } else {
+            app.showToast(res.message)
+        }
+    })
+  },
+
+  itemHandleClick(e){
+    const currentData = e.currentTarget.dataset
+    const { item } = currentData
+    console.log(item)
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/invitees/invitees.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 18 - 0
pages/invitees/invitees.wxml

@@ -0,0 +1,18 @@
+<!--pages/invitees/invitees.wxml-->
+<view class="invitees-wrp">
+  <view class="invitees-list" wx:if="{{list.length}}">
+    <!-- 循环体 begin-->
+    <view class="invitees-list-item" wx:for="{{list}}" wx:key="{{item.member_id}}" bindtap="itemHandleClick" data-item="{{item}}">
+      <image class="avtor" src="{{ item.avatar }}"></image>
+      <view class="content">
+        <view class="title">{{ item.nickname }}</view>
+        <!-- <view class="desc">{{ item.nickname }}</view> -->
+      </view>
+      <view class="extra">
+        <text>{{ item.add_time_desc }}</text>
+        <!-- <text>extra</text> -->
+      </view>
+    </view>
+    <!-- 循环体 over-->
+  </view>
+</view>

+ 59 - 0
pages/invitees/invitees.wxss

@@ -0,0 +1,59 @@
+/* pages/invitees/invitees.wxss */
+
+.invitees-wrp{
+
+}
+
+.invitees-list{
+  
+}
+
+.invitees-list-item{
+  display: flex;
+  align-items: center;
+  padding: 30rpx;
+  background-color: #fff;
+  border-radius: 10rpx;
+  margin: 20rpx 0;
+}
+
+.invitees-list-item:hover{
+  background-color: #eee;
+}
+
+.invitees-list-item .avtor{
+  max-width: 100rpx;
+  max-height: 100rpx;
+  margin-right: 20rpx;
+}
+
+.invitees-list-item .content{
+  flex: 1;
+  height: 100rpx;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-evenly;
+  margin-right: 20rpx;
+  overflow: hidden;
+  white-space: nowrap;
+  word-break: keep-all;
+  text-overflow: ellipsis;
+}
+
+.invitees-list-item .content .title{
+  /* padding: 10rpx 0; */
+  margin-top: -10rpx; 
+  font-size: 30rpx;
+}
+
+.invitees-list-item .content .desc, .invitees-list-item .extra{
+  font-size: 22rpx;
+  color: #8e8e8e;
+}
+
+.invitees-list-item .extra{
+  display: flex;
+  flex-direction: column;
+  line-height: 1.8;
+  text-align: right;
+}

+ 2 - 1
pages/myhome/myhome.js

@@ -18,7 +18,8 @@ Page({
 
   handleMore(e) {
     const { cardtype } = e.currentTarget.dataset
-    app.navigateto(`/pages/postageManage/postageManage?card_type=${cardtype}`)
+    // app.navigateto(`/pages/postageManage/postageManage?card_type=${cardtype}`)
+    app.navigateto('/pages/invitees/invitees')
   },
 
   /**

+ 1 - 1
pages/phoneCharges/phoneCharges.wxss

@@ -164,7 +164,7 @@
 }
 
 .card-no{
-  padding: 20rpx 0;
+  height: 70rpx;
   font-size: 40rpx;
   color: #2b2b2b;
 }

+ 1 - 1
pages/postage/postage.wxss

@@ -164,7 +164,7 @@
 }
 
 .card-no{
-  padding: 20rpx 0;
+  height: 70rpx;
   font-size: 40rpx;
   color: #2b2b2b;
 }