guhongwei 4 vuotta sitten
vanhempi
commit
34d73a4ff0
7 muutettua tiedostoa jossa 323 lisäystä ja 19 poistoa
  1. 2 2
      app.json
  2. 2 2
      pages/home/home.js
  3. 2 2
      pages/login/login.js
  4. 78 5
      pages/team/team.js
  5. 106 2
      pages/team/team.wxml
  6. 129 2
      pages/team/team.wxss
  7. 4 4
      project.config.json

+ 2 - 2
app.json

@@ -1,5 +1,7 @@
 {
   "pages": [
+    "pages/team/team",
+    "pages/login/login",
     "pages/home/home",
     "pages/perssonal/perssonal",
     "pages/setting/setting",
@@ -9,14 +11,12 @@
     "pages/news/news",
     "pages/newsDetail/newsDetail",
     "pages/card/card",
-    "pages/team/team",
     "pages/integral/integral",
     "pages/exchange/exchange",
     "pages/exchange/exchangeList",
     "pages/car/car",
     "pages/shareholder/shareholder",
     "pages/user/user",
-    "pages/login/login",
     "pages/index/index",
     "pages/logs/logs",
     "pages/test/test"

+ 2 - 2
pages/home/home.js

@@ -51,8 +51,8 @@ Page({
   },
   // 退出登录
   logouBtn: function () {
-    wx.navigateTo({
-      url: '../login/login'
+    wx.redirectTo({
+      url: '/pages/login/login'
     })
   },
   // 关于我们

+ 2 - 2
pages/login/login.js

@@ -8,8 +8,8 @@ Page({
   formSubmit: function (e) {
     let form = e.detail.value;
     console.log(form);
-    wx.navigateTo({
-      url: '../home/home'
+    wx.redirectTo({
+      url: '/pages/home/home'
     })
   },
   onLoad: function () {

+ 78 - 5
pages/team/team.js

@@ -4,14 +4,87 @@ const app = getApp()
 
 Page({
   data: {
-
+    provinceList: [
+      { name: '吉林省' },
+      { name: '黑龙江省' },
+      { name: '辽宁省' },
+    ],
+    province: '',
+    form: {},
+    // 类型
+    typeList: [
+      { name: '余额' },
+      { name: '花呗' },
+      { name: '微信' },
+    ],
+    // 套餐列表
+    mealList: [
+      { name: '169套餐' },
+      { name: '129套餐' },
+    ],
+    // 时间列表
+    dateList: [
+      { name: '全部', },
+      { name: '本天', },
+      { name: '本周', },
+      { name: '本月', },
+      { name: '本年', },
+    ],
+    // 筛选
+    show: true
   },
   //事件处理函数
-  bindViewTap: function () {
-    wx.navigateTo({
-      url: '../index/index'
-    })
+  // 选择省份
+  provinceChange: function (e) {
+    this.setData({ "province": this.data.provinceList[e.detail.value].name })
+  },
+  // 选择类型
+  typeChange: function (e) {
+    this.setData({ "form.type": this.data.typeList[e.detail.value].name })
+  },
+  // 选择套餐
+  mealChange: function (e) {
+    this.setData({ "form.meal": this.data.mealList[e.detail.value].name })
+  },
+  // 选择时间
+  dateChange: function (e) {
+    this.setData({ "form.create_time": this.data.dateList[e.detail.value].name })
+  },
+  // 自主选择时间段
+  changeStart: function (e) {
+    this.setData({ "form.start_time": e.detail.value })
+  },
+  changeEnd: function (e) {
+    this.setData({ "form.end_time": e.detail.value })
   },
+  // 弹出层
+  showPopup: function () {
+    var that = this;
+    that.setData({ show: true })
+  },
+  // 关闭弹出层
+  onClose: function () {
+    var that = this;
+    that.setData({ show: false })
+  },
+  // 取消
+  cancelBtn: function () {
+    console.log('s');
+    var that = this;
+    that.setData({ show: false })
+  },
+  // 重置
+  resetBtn: function () {
+    var that = this;
+    that.setData({ show: false })
+  },
+  // 确定
+  formSubmit: function (e) {
+    console.log(e);
+    // var that = this;
+    // that.setData({ show: false })
+  },
+
   onLoad: function () {
   },
 })

+ 106 - 2
pages/team/team.wxml

@@ -3,6 +3,110 @@
     我的团队
   </view>
   <view class="two">
-    内容
+    <view class="top">
+      <view class="topOne">
+        <view class="topView">号码归属省</view>
+        <view class="topView">
+          <picker class="createTime" bindchange="provinceChange" name="province" value="{{province}}"
+            range="{{provinceList}}" range-key="{{'name'}}">
+            <view class="picker">{{province||'归属省'}}
+              <van-icon name="arrow" />
+            </view>
+          </picker>
+        </view>
+      </view>
+      <view class="topTwo">
+        <view class="topTwoView">
+          <picker class="createTime" bindchange="typeChange" name="type" value="{{form.type}}" range="{{typeList}}"
+            range-key="{{'name'}}">
+            <view class="picker textOver">{{form.type||'类型'}}
+              <van-icon name="arrow-down" />
+            </view>
+          </picker>
+        </view>
+        <view class="topTwoView">
+          <picker class="createTime" bindchange="mealChange" name="meal" value="{{form.meal}}" range="{{mealList}}"
+            range-key="{{'name'}}">
+            <view class="picker textOver">{{form.meal||'套餐'}}
+              <van-icon name="arrow-down" />
+            </view>
+          </picker>
+        </view>
+        <view class="topTwoView">
+          <picker class="createTime" bindchange="dateChange" name="create_time" value="{{form.create_time}}"
+            range="{{dateList}}" range-key="{{'name'}}">
+            <view class="picker textOver">{{form.create_time||'时间'}}
+              <van-icon name="arrow-down" />
+            </view>
+          </picker>
+        </view>
+        <view class="topTwoView">
+          <view class="picker" bindtap="showPopup">筛选
+            <van-icon name="arrow-down" />
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="down">
+      底部
+    </view>
   </view>
-</view>
+</view>
+<van-popup show="{{ show }}" position="right" custom-style="height: 100%;width:100%;" bind:close="onClose">
+  <form bindsubmit="formSubmit" bindreset="formReset">
+    <view class="popup">
+      <view class="one">
+        <view class="title"> 类型 </view>
+        <view class="radio">
+          <radio-group name="radio" bindchange="typeChange">
+            <label wx:key="unique" wx:for="{{typeList}}" wx:for-item="item">
+              <radio value="{{index}}" color="#ff0000" />{{item.name}}</label>
+          </radio-group>
+        </view>
+      </view>
+      <view class="one">
+        <view class="title">套餐</view>
+        <view class="radio">
+          <radio-group name="radio" bindchange="mealChange">
+            <label wx:key="unique" wx:for="{{mealList}}" wx:for-item="item">
+              <radio value="{{index}}" color="#ff0000" />{{item.name}}</label>
+          </radio-group>
+        </view>
+      </view>
+      <view class="one">
+        <view class="title">时间</view>
+        <view class="radio">
+          <radio-group name="radio" bindchange="dateChange">
+            <label wx:key="unique" wx:for="{{dateList}}" wx:for-item="item">
+              <radio value="{{index}}" color="#ff0000" />{{item.name}}</label>
+          </radio-group>
+        </view>
+      </view>
+      <view class="one">
+        <view class="title">
+          自主选择时间段
+        </view>
+        <view class="dateAuto">
+          <view class="datePar">
+            <picker class="createTime" mode="date" name="start_time" value="{{form.start_time}}"
+              bindchange="changeStart">
+              <view class="picker">{{form.start_time||'选择开始时间'}}</view>
+            </picker>
+          </view>
+          <view class="datePar">至</view>
+          <view class="datePar">
+            <picker class="createTime" mode="date" name="end_time" value="{{form.end_time}}" bindchange="changeEnd">
+              <view class="picker">{{form.end_time||'选择结束时间'}}</view>
+            </picker>
+          </view>
+        </view>
+      </view>
+      <view class="btn">
+        <button bindtap="cancelBtn">取消</button>
+        <button bindtap="resetBtn">重置</button>
+        <button form-type="submit">确定</button>
+      </view>
+    </view>
+  </form>
+
+</van-popup>

+ 129 - 2
pages/team/team.wxss

@@ -1,11 +1,13 @@
 .main {
   float: left;
   width: 100%;
+  height: 100%;
+  background-color: #f6f6f6;
 }
 
 .main .one {
   position: fixed;
-  z-index: 9999;
+  z-index: 999;
   width: 100%;
   height: 80rpx;
   line-height: 80rpx;
@@ -18,5 +20,130 @@
   position: absolute;
   top: 80rpx;
   width: 100%;
-  height: 15000px;
+  background-color: #f6f6f6;
+}
+
+.main .two .top {
+  float: left;
+  width: 100%;
+  background-color: #ffffff;
+}
+
+.main .two .top .topOne {
+  float: left;
+  width: 94%;
+  height: 78rpx;
+  line-height: 78rpx;
+  border-bottom: 1px solid #ccc;
+  padding: 0 20rpx;
+}
+
+.main .two .top .topOne .topView {
+  float: left;
+  width: 50%;
+}
+
+.main .two .top .topOne .topView:nth-child(2) {
+  text-align: right;
+}
+
+.van-icon {
+  top: 3px;
+}
+
+.main .two .top .topTwo {
+  float: left;
+  width: 94%;
+  height: 78rpx;
+  line-height: 78rpx;
+  padding: 0 20rpx;
+}
+
+.main .two .top .topTwo .topTwoView {
+  float: left;
+  width: 25%;
+  text-align: center;
+}
+
+.main .two .top .topTwo .topTwoView .picker {
+  float: left;
+  width: 100%;
+  font-size: 25rpx;
+}
+
+.popup {
+  float: left;
+  width: 94%;
+  padding: 80rpx 20rpx 15rpx 20rpx;
+}
+
+.popup .one {
+  float: left;
+  width: 100%;
+  margin: 0 0 20rpx 0;
+}
+
+.popup .one .title {
+  float: left;
+  width: 100%;
+  font-weight: bold;
+  font-size: 30rpx;
+  padding: 10rpx 0;
+  margin: 0 0 10rpx 0;
+}
+
+.popup .one .radio label {
+  float: left;
+  margin: 0 25rpx 15rpx 0;
+  font-size: 25rpx;
+}
+
+.popup .one .dateAuto {
+  float: left;
+  width: 100%;
+  background-color: #cccccc5f;
+  border-radius: 10rpx;
+  padding: 10rpx 0;
+}
+
+.popup .one .dateAuto .datePar {
+  float: left;
+  width: 45%;
+  text-align: center;
+}
+
+.popup .one .dateAuto .datePar:nth-child(2) {
+  width: 10%;
+}
+
+.popup .btn {
+  float: left;
+  width: 90%;
+  position: absolute;
+  bottom: 10rpx;
+  background-color: #f1f1f1;
+  padding: 15rpx;
+}
+
+.popup .btn button {
+  float: left;
+  width: 28%;
+  margin: 0 50rpx 0 0;
+  border-radius: 50rpx;
+  line-height: 77rpx;
+}
+
+.popup .btn button:nth-child(1) {
+  background-color: #ffffff;
+}
+
+.popup .btn button:nth-child(2) {
+  border: 1px solid #ff0000;
+  color: #ff0000;
+}
+
+.popup .btn button:nth-child(3) {
+  background-color: #ff0000;
+  color: #fff;
+  margin: 0;
 }

+ 4 - 4
project.config.json

@@ -23,6 +23,7 @@
     "compileHotReLoad": false,
     "useMultiFrameRuntime": true,
     "useApiHook": true,
+    "useApiHostProcess": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
@@ -36,13 +37,12 @@
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "useApiHostProcess": false
+    "minifyWXSS": true
   },
   "compileType": "miniprogram",
   "libVersion": "2.14.1",
-  "appid": "wx2c50f82dae28a9f5",
-  "projectname": "鸿泰跃达",
+  "appid": "wx0fd4b616bc7cf3bb",
+  "projectname": "%E9%B8%BF%E6%B3%B0%E8%B7%83%E8%BE%BE",
   "debugOptions": {
     "hidedInDevtools": []
   },