Browse Source

no message

宇宙无敌M1处理器的MacBook Pro 4 years ago
parent
commit
2729ac997a
3 changed files with 49 additions and 4 deletions
  1. 38 2
      mini/pages/detailInfo/detailinfo.js
  2. 8 0
      mini/pages/detailInfo/detailinfo.wxml
  3. 3 2
      mini/utils/env.js

+ 38 - 2
mini/pages/detailInfo/detailinfo.js

xqd xqd xqd
@@ -10,7 +10,22 @@ Page({
   data: {
     min_date: "",
     max_date: "",
-    date: ""
+    date: "",
+    all: 0,
+    selectIndex: 2,
+    list: [{
+        name: "全部",
+        value: 2
+      },
+      {
+        name: "已解决",
+        value: 1
+      },
+      {
+        name: "未解决",
+        value: 0
+      }
+    ]
   },
 
   /**
@@ -18,6 +33,7 @@ Page({
    */
   onLoad: function (options) {
     this.getDateInfo()
+    this.getYears()
   },
 
   /**
@@ -38,11 +54,31 @@ Page({
       }
     })
   },
-  detailDatainfo(){
+  detailDatainfo() {
     wx.navigateTo({
       url: '../detailInfo/detailData',
     })
   },
+  onstatusChange(e) {
+    this.setData({
+      all: e.detail.value,
+      selectIndex: this.data.list[e.detail.value].value
+    })
+  },
+  getMonthData() {
+
+  },
+  getYears() {
+    http({
+      url: 'Order/getYears',
+      data: {},
+      success: function (res) {
+        if (res.code == 0) {
+          console.log(res)
+        }
+      }
+    })
+  },
   /**
    * 生命周期函数--监听页面显示
    */

+ 8 - 0
mini/pages/detailInfo/detailinfo.wxml

xqd
@@ -17,6 +17,14 @@
           </view>
         </view>
       </picker>
+      <picker value="{{all}}" range="{{list}}" range-key="name"  bindchange="onstatusChange">
+        <view class="picker">
+          <view class="sg-font-small sg-pad-tb-sm sg-flex sg-align-center" style="color:#5693FC">
+            <text style="margin-right:8rpx">订单状态:{{list[all].name}}</text>
+            <van-icon name="arrow-down" class="sg-icon"></van-icon>
+          </view>
+        </view>
+      </picker>
     </view>
 
     <view class="sg-item sg-white-bg sg-pad sg-margin-bottom" wx:for="{{6}}" wx:key="index" bindtap="detailDatainfo" data-index="{{index}}">

+ 3 - 2
mini/utils/env.js

xqd
@@ -1,3 +1,4 @@
 const isTest = true;
-export const baseUrl = isTest ? 'http://172.31.31.35/api/mini/' : 'https://t18.9026.com/api/mini/';
-export const imgHost = isTest ? 'http://172.31.31.35/images/' : 'https://t18.9026.com/images/'
+//172.31.31.35
+export const baseUrl = isTest ? 'http://172.31.31.92/api/mini/' : 'https://t18.9026.com/api/mini/';
+export const imgHost = isTest ? 'http://172.31.31.92/images/' : 'https://t18.9026.com/images/'