zs 3 tahun lalu
induk
melakukan
e4bb2e6f51

+ 1 - 0
app.json

@@ -16,6 +16,7 @@
     "pages/information/index",
     "pages/score/index",
     "pages/photo/index",
+    "pages/add/index",
     "pages/password/index",
     "pages/auditTeam/index",
     "pages/match/index",

+ 158 - 0
pages/add/index.js

@@ -0,0 +1,158 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '申请加入', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    singledate: '2018-09-01',
+    time: '12:01',
+    form: {
+      team_id: '1',// 团队id
+      team_name: '团队名称', // 团队名称
+      apply_time: '2022-03-22',// 申请时间
+      apply_user: '申请人',// 申请人
+      apply_id: '1',// 申请人id
+    },
+  },
+  // 确定选择
+  szChange: function (e) {
+    const that = this;
+    let value = e.detail.value;
+    let list = that.data.valueList;
+    let data = []
+    for (let [index, val] of value.entries()) {
+      if (list[index][val]) data.push(list[index][val])
+      else data.push(list[index][0])
+    }
+    //存值
+    let sz = [...that.data.szList, { type: data[0], name: data[1] }]
+    that.setData({ szList: sz })
+    that.setData({ szValue: data })
+    that.search();
+  },
+  // 列值改变时
+  columnChange: function (e) {
+    const that = this;
+    let array = that.data.levelArray;
+    let list = that.data.valueList;
+    if (e.detail.column == '0') list[1] = array[parseInt(e.detail.value) + 1];
+    that.setData({ valueList: list });
+  },
+  //删除
+  toDel: function (e) {
+    const that = this;
+    let list = that.data.szList;
+    let value = e.currentTarget.dataset.index;
+    let data = list.filter((i, index) => index != value)
+    this.setData({ szList: data })
+  },
+  search: function () {
+    const that = this;
+    let data = that.data.levelArray;
+    that.setData({ valueList: [data[0], data[1]] })
+  },
+  bindDateChange3: function (e) {
+    console.log('picker发送选择改变,携带值为', e.detail.value)
+    this.setData({
+      singledate: e.detail.value
+    })
+  },
+  bindTimeChange: function (e) {
+    console.log('picker发送选择改变,携带值为', e.detail.value)
+    this.setData({
+      time: e.detail.value
+    })
+  },
+  // 时间段选择  
+  bindDateChange(e) {
+    let that = this;
+    console.log(e.detail.value)
+    that.setData({
+      date: e.detail.value,
+    })
+  },
+  bindDateChange2(e) {
+    let that = this;
+    that.setData({
+      date2: e.detail.value,
+    })
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight()
+    const that = this;
+    // 初始化数据
+    that.search();
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/add/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 56 - 0
pages/add/index.wxml

@@ -0,0 +1,56 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view>
+      <form style="height:{{infoHeight-140}}px;">
+        <view class="one">
+          <view class="one_list">
+            <!-- team_id: '1',// 团队id
+          team_name: '团队名称', // 团队名称
+          apply_time: '申请时间',// 申请时间
+          apply_user: '申请人',// 申请人
+          apply_id: '1',// 申请人id -->
+            <view class="text">团队id</view>
+            <view class="text">{{form.team_id}}</view>
+          </view>
+          <view class="one_list">
+            <view class="text">团队名称</view>
+            <view class="text">{{form.team_name}}</view>
+          </view>
+          <view class="one_list">
+            <view class="text">申请人</view>
+            <view class="text">{{form.apply_user}}</view>
+          </view>
+          <view class="one_list">
+            <view class="text">申请时间</view>
+            <view class="text" style="display: flex;flex-wrap: wrap;">
+              <picker mode="date" value="{{ form.apply_time}}" start="2018-09-01" end="2150-09-01" bindchange="bindDateChange3">
+                <view class="picker1">
+                  {{form.apply_time}}
+                </view>
+              </picker>
+              <picker mode="time" value="{{time}}" start="00:00" end="24:00" bindchange="bindTimeChange">
+                <view class="picker2">
+                  {{time}}
+                </view>
+              </picker>
+            </view>
+          </view>
+          <view class="one_list">
+            <view class="text">申请人id</view>
+            <view class="text">{{form.team_name}}</view>
+          </view>
+        </view>
+      </form>
+    </view>
+    <view class="four">
+      <view class="four-1">
+        <view class="four1">
+          <button class="button" form-type="submit">返回</button>
+        </view>
+        <view class="four2">
+          <button class="buttons" form-type="submit">确认</button>
+        </view>
+      </view>
+    </view>
+  </view>
+</mobile-main>

+ 118 - 0
pages/add/index.wxss

@@ -0,0 +1,118 @@
+.main {
+  position: relative;
+  width: 100%;
+  background-color: #ffffff;
+}
+
+.one_list {
+  display: flex;
+  justify-content: space-between;
+  border-bottom: 1px solid #dddddd;
+  margin: 0 20px;
+  height: 40px;
+  line-height: 40px;
+}
+
+.four {
+  position: absolute;
+  width: 100%;
+  bottom: 0;
+  background-color: white;
+}
+
+.four-1 {
+  background-color: white;
+  width: 100%;
+}
+
+.four1 {
+  background-color: white;
+  margin-top: 15%;
+  margin-bottom: 15%;
+  margin-left: 10%;
+  float: left;
+  width: 37%;
+}
+
+.four2 {
+  background-color: white;
+  margin-top: 15%;
+  margin-bottom: 10%;
+  float: left;
+  width: 30%;
+}
+
+.button {
+  margin-top: 0 !important;
+  width: 140px !important;
+  height: 35px;
+  background-color: rgba(209, 205, 205, 0.5);
+  /* background-image: linear-gradient(to right, rgb(236, 75, 83) , rgb(247, 41, 230)); */
+  border-top-left-radius: 1.5em;
+  border-top-right-radius: 0em;
+  border-bottom-right-radius: 0em;
+  border-bottom-left-radius: 1.5em;
+  color: #777777;
+  font-size: 14px;
+}
+
+.buttons {
+  margin-top: 0 !important;
+  width: 140px !important;
+  height: 35px;
+  background-color: rgba(32, 88, 243, 0.5);
+  background-image: linear-gradient(to right, rgb(75, 113, 236), rgb(203, 97, 245));
+  border-top-left-radius: 0em;
+  border-top-right-radius: 1.5em;
+  border-bottom-right-radius: 1.5em;
+  border-bottom-left-radius: 0em;
+  color: #ffffff;
+  font-size: 14px;
+}
+
+.mult {
+  float: left;
+  width: 65%;
+  padding-left: 15px;
+  font-size: 14px;
+  line-height: 80rpx;
+  background-color: white;
+  font-weight: 500;
+}
+
+.mult11 {
+  padding-left: 15px;
+  font-size: 14px;
+  line-height: 80rpx;
+  background-color: white;
+  font-weight: 500;
+}
+
+.mults {
+  margin-top: -1px;
+  background-color: white;
+  line-height: 80rpx;
+  text-align: center;
+}
+
+.multone {
+  margin-bottom: 1.8px;
+  font-size: 14px;
+}
+
+.mult88 {
+  float: left;
+  width: 63%;
+  line-height: 80rpx;
+  background-color: white;
+  text-align: right;
+  padding: 0 9px 0 0;
+}
+
+.mult00 {
+  padding-left: 15px;
+  float: left;
+  width: 30%;
+  line-height: 80rpx;
+  background-color: white;
+}

+ 1 - 0
pages/home/index.wxss

@@ -114,6 +114,7 @@ listbut{
 }
 
 .right1_2 .right1_2o {
+  margin-left: 1%;
   float: left;
   width: 11%;
   height: 40px;

+ 24 - 19
pages/team/apply.js

@@ -14,34 +14,34 @@ Page({
     infoHeight: '',
     list: [
       {
-        id: '1',time: '08:30', date: '2022.01.15',Founder:'XXX',group:'哈拉海队',person:'10',grade:'c'
+        id: '1', time: '08:30', date: '2022.01.15', Founder: 'XXX', group: '哈拉海队', person: '10', grade: 'c'
       }
     ],
     lists: [
       {
-        id: '1',name:'老头1',head:'/image/tou.png'
+        id: '1', name: '老头1', head: '/image/tou.png'
       },
       {
-        id: '1',name:'老头2',head:'/image/tou.png'
+        id: '1', name: '老头2', head: '/image/tou.png'
       },
       {
-        id: '1',name:'老头3',head:'/image/tou.png'
+        id: '1', name: '老头3', head: '/image/tou.png'
       },
       {
-        id: '1',name:'老头4',head:'/image/tou.png'
+        id: '1', name: '老头4', head: '/image/tou.png'
       },
       {
-        id: '1',name:'老头5',head:'/image/tou.png'
+        id: '1', name: '老头5', head: '/image/tou.png'
       },
       {
-        id: '1',name:'老头6',head:'/image/tou.png'
+        id: '1', name: '老头6', head: '/image/tou.png'
       },
       {
-        id: '1',name:'老头7',head:'/image/tou.png'
+        id: '1', name: '老头7', head: '/image/tou.png'
       },
 
       {
-        id: '1',name:'老头8',head:'/image/tou.png'
+        id: '1', name: '老头8', head: '/image/tou.png'
       }
     ],
   },
@@ -49,22 +49,27 @@ Page({
     let query = e.detail.detail;
     if (query) wx.redirectTo({ url: `/pages/${query}/index` })
   },
+  add: function () {
+    wx.navigateTo({
+      url: '/pages/add/index',
+    })
+  },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
   },
-  out(){
+  out() {
     wx.showModal({
-     title: '',
-     content: '是否确认退出团队',
-     success(res) {
-      if (res.confirm) {
-       console.log('用户点击确定')
-      } else if (res.cancel) {
-       console.log('用户点击取消')
+      title: '',
+      content: '是否确认退出团队',
+      success(res) {
+        if (res.confirm) {
+          console.log('用户点击确定')
+        } else if (res.cancel) {
+          console.log('用户点击取消')
+        }
       }
-     }
     })
-   },
+  },
   /**
    * 生命周期函数--监听页面加载
    */

+ 1 - 1
pages/team/apply.wxml

@@ -65,7 +65,7 @@
     </view>
     <view class="four">
       <button class="button" form-type="submit">待通过</button>
-      <button class="button" form-type="submit">申请加入</button>
+      <button class="button" form-type="submit" bindtap='add'>申请加入</button>
       <button class="button" form-type="submit" bindtap='out'>退出团队</button>
     </view>
   </view>

+ 1 - 0
pages/team/index.wxss

@@ -78,6 +78,7 @@
   border-radius: 30px; 
   color:#ffffff; 
   font-size: 13px;
+  line-height: 15px;
 }
 .head {
   float: left;