wangning 5 лет назад
Родитель
Сommit
2cb47aa657
1 измененных файлов с 25 добавлено и 10 удалено
  1. 25 10
      hdApp/src/admin/home/newStudent.vue

+ 25 - 10
hdApp/src/admin/home/newStudent.vue

@@ -14,6 +14,7 @@
       class="students_list"
       scroll-y
     >
+    <block v-if="!$util.isEmpty(initData)">
       <view
         class="list_item"
         v-for="(item, index) in initData"
@@ -29,11 +30,11 @@
           <text
             class="status_apply"
             v-if="item.status === '1'"
-            style="color: #09bb07;"
+            style="color: #49484b;"
           >待付款</text>
           <text
             class="status_apply"
-            style="color: #333333;"
+            style="color: #3da239;"
             v-if="item.status === '2'"
           >已报名</text>
         </view>
@@ -44,15 +45,23 @@
             <view class="class_odd">单号:{{item.orderSn}} </view>
             <view class="class_odd">日期:{{item.applyTime.length > 10 ? item.applyTime.substr(0, 10) : item.applyTime}}</view>
           </view>
-          <view class="price">¥985.80</view>
+          <view class="price">¥{{item.actPrice}}</view>
         </view>
       </view>
+      </block>
+      <block v-else>
+          <AppWrapperEmpty
+            title="暂无数据"
+            :is-empty="$util.isEmpty(initData)"
+          />
+        </block>
     </scroll-view>
   </view>
 </template>
 
 <script>
 import { pxApplyList } from '@/api/px-apply/index'
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
 export default {
   data () {
     return {
@@ -60,14 +69,20 @@ export default {
       query: ''
     }
   },
-  mounted () {
-    this.getData()
+  components: {
+    AppWrapperEmpty,
+  },
+  onPullDownRefresh() {
+    this.getData().then(res => {
+      uni.stopPullDownRefresh();
+    })
   },
   methods: {
+    init() {
+      this.getData()
+    },
     getData () {
-      console.log(1111)
-      pxApplyList({ name: this.query }).then(res => {
-        console.log('res===>', res)
+      return pxApplyList({ name: this.query }).then(res => {
         this.initData = res.data.list
       }).catch(err => { console.log(err) })
     }
@@ -123,9 +138,9 @@ export default {
           font-weight: 600;
         }
         & > ._icon_new {
-          width: 64upx;
-          height: 26upx;
+          padding: 0 5upx;
           margin-left: 20upx;
+          font-size: 20upx;
           vertical-align: middle;
           background: #3385ff;
           border-radius: 4px;