guhongwei před 4 roky
rodič
revize
a1940484f3

+ 1 - 0
app.json

@@ -4,6 +4,7 @@
     "pages/perssonal/perssonal",
     "pages/setting/setting",
     "pages/editPwd/editPwd",
+    "pages/achieveList/achieveList",
     "pages/about/about",
     "pages/news/news",
     "pages/newsDetail/newsDetail",

+ 37 - 0
pages/achieveList/achieveList.js

@@ -0,0 +1,37 @@
+//index.js
+//获取应用实例
+const app = getApp()
+
+Page({
+  data: {
+    type: '昨日新增',
+    list: [
+      {
+        tc: '169套餐169套餐169套餐169套餐169套餐',
+        tzNum: 1,
+        jpNum: 1
+      },
+      {
+        tc: '129套餐',
+        tzNum: 2,
+        jpNum: 3
+      },
+    ],
+    provinceList: [
+      { name: '吉林省' },
+      { name: '黑龙江省' },
+      { name: '辽宁省' },
+    ],
+    province: ''
+  },
+  // 事件处理
+  // 选择省份
+  provinceChange: function (e) {
+    this.setData({ "province": this.data.provinceList[e.detail.value].name })
+  },
+  onLoad: function (options) {
+    var that = this;
+    // 获取地址栏统计类型
+    that.setData({ type: options.type });
+  }
+})

+ 4 - 0
pages/achieveList/achieveList.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 39 - 0
pages/achieveList/achieveList.wxml

@@ -0,0 +1,39 @@
+<view class="main">
+  <view class="one">
+    业绩统计
+  </view>
+  <view class="two">
+    <view class="top">
+      <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="down">
+      <view class="downTxt">
+        {{type}}(<text>0</text>)
+      </view>
+      <view class="downTable">
+        <view class="th">
+          <text></text>
+          <text>拓展人</text>
+          <text>金牌拓展</text>
+          <text>合计</text>
+        </view>
+        <view class="td">
+          <view class="list" wx:key="unique" wx:for="{{list}}" wx:for-item="item">
+            <text class="textOver">{{item.tc}}</text>
+            <text class="textOver">{{item.tzNum||0}}</text>
+            <text class="textOver">{{item.jpNum||0}}</text>
+            <text class="textOver">{{item.tzNum+item.jpNum}}</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</view>

+ 113 - 0
pages/achieveList/achieveList.wxss

@@ -0,0 +1,113 @@
+.main {
+  float: left;
+  width: 100%;
+  height: 100%;
+  background-color: #f6f6f6;
+}
+
+.main .one {
+  position: fixed;
+  z-index: 9999;
+  width: 100%;
+  height: 80rpx;
+  line-height: 80rpx;
+  background-color: #409eff;
+  color: #ffffff;
+  text-align: center;
+}
+
+.main .two {
+  position: absolute;
+  top: 80rpx;
+  width: 100%;
+  background-color: #f6f6f6;
+}
+
+.main .two .top {
+  float: left;
+  width: 94%;
+  height: 50rpx;
+  line-height: 50rpx;
+  padding: 20rpx;
+  background-color: #ffffff;
+}
+
+.main .two .top .topView {
+  float: left;
+  width: 50%;
+}
+
+.main .two .top .topView:nth-child(2) {
+  text-align: right;
+}
+
+.van-icon {
+  top: 3px;
+}
+
+.main .two .down {
+  float: left;
+  width: 100%;
+}
+
+.main .two .down .downTxt {
+  float: left;
+  width: 100%;
+  text-align: center;
+  height: 80rpx;
+  line-height: 80rpx;
+}
+
+.main .two .down .downTable {
+  float: left;
+  width: 100%;
+  background-color: #ffffff;
+}
+
+.main .two .down .downTable .th {
+  float: left;
+  width: 100%;
+}
+
+.main .two .down .downTable .th text {
+  float: left;
+  width: 25%;
+  text-align: center;
+  height: 80rpx;
+  line-height: 80rpx;
+  font-size: 28rpx;
+  border-top: 1px solid #ccc;
+  border-right: 1px solid #ccc;
+}
+
+.main .two .down .downTable .th text:last-child {
+  width: 24%;
+  border-right: none;
+}
+
+.main .two .down .downTable .td {
+  float: left;
+  width: 100%;
+  border-bottom: 1px solid #ccc;
+}
+
+.main .two .down .downTable .td .list {
+  float: left;
+  width: 100%;
+}
+
+.main .two .down .downTable .td .list text {
+  float: left;
+  width: 25%;
+  text-align: center;
+  height: 80rpx;
+  line-height: 80rpx;
+  font-size: 28rpx;
+  border-top: 1px solid #ccc;
+  border-right: 1px solid #ccc;
+}
+
+.main .two .down .downTable .td .list text:last-child {
+  width: 24%;
+  border-right: none;
+}

+ 8 - 0
pages/home/home.js

@@ -23,6 +23,14 @@ Page({
     duration: 500
   },
   //事件处理函数
+  // 统计信息
+  achieveBtn: function (event) {
+    console.log(event.currentTarget.id);
+    let type = event.currentTarget.id;
+    wx.navigateTo({
+      url: '/pages/achieveList/achieveList?type=' + type // 希望跳转过去的页面
+    })
+  },
   // 个人信息
   perssonalBtn: function () {
     wx.navigateTo({

+ 4 - 4
pages/home/home.wxml

@@ -31,28 +31,28 @@
       </view>
     </van-col>
     <van-col span="24" class="three">
-      <view class="num">
+      <view class="num" bindtap="achieveBtn" id="{{'昨日新增'}}">
         <view class="numOne">
           <text>昨日新增</text>
           <image src="/pages/images/zr.png"></image>
         </view>
         <view class="numTwo">0</view>
       </view>
-      <view class="num">
+      <view class="num" bindtap="achieveBtn" id="{{'本周新增'}}">
         <view class="numOne">
           <text>本周新增</text>
           <image src="/pages/images/zhou.png"></image>
         </view>
         <view class="numTwo">0</view>
       </view>
-      <view class="num">
+      <view class="num" bindtap="achieveBtn" id="{{'当月新增'}}">
         <view class="numOne">
           <text>当月新增</text>
           <image src="/pages/images/yue.png"></image>
         </view>
         <view class="numTwo">0</view>
       </view>
-      <view class="num">
+      <view class="num" bindtap="achieveBtn" id="{{'团队统计'}}">
         <view class="numOne">
           <text>团队统计</text>
           <image src="/pages/images/team.png"></image>