刘浩男 1 year ago
parent
commit
a9fb010da6
1 changed files with 34 additions and 22 deletions
  1. 34 22
      pages/quotations/quotations.vue

+ 34 - 22
pages/quotations/quotations.vue

@@ -1,8 +1,8 @@
 <template>
-  <view >
+  <view>
     <view class="nactive">
       <scroll-view class="scroll-view_H" :scroll-x="true" @scroll="scroll" scroll-left="120">
-        <uni-grid :column="5" @change="change" :showBorder="false" :square="true" >
+        <uni-grid :column="5" @change="change" :showBorder="false" :square="true">
           <uni-grid-item v-for="item in categories" :index="item.id">
             <view class="grid-item-box">
               <image class="image" :src="loadImgSrc(item.icon)" mode="aspectFit"></image>
@@ -22,12 +22,12 @@
           <uni-th width="100" align="center">时间</uni-th>
         </uni-tr>
         <uni-tr v-for="(item, index) in quotationsList" :key="index">
-          <uni-td align="center">{{ item.area+item.address }}
+          <uni-td align="center">{{ item.area + item.address }}
           </uni-td>
           <uni-td align="center">{{ item.productName }}
           </uni-td>
           <uni-td align="center">
-            <view class="name">{{ item.type}}</view>
+            <view class="name">{{ item.type }}</view>
           </uni-td>
           <uni-td align="center">{{ item.price }}
           </uni-td>
@@ -52,7 +52,7 @@ export default {
   },
   data() {
     return {
-      book:false,
+      book: false,
 
       //是否显示弹出层
       open: false,
@@ -73,7 +73,7 @@ export default {
         pageNum: 1,
         pageSize: 15,
         id: null,
-        status:"1",
+        status: "1",
       },
       //加载更多
       status: 'more',
@@ -95,19 +95,19 @@ export default {
     this.getList()
   },
   //上拉加载
-  onReachBottom(){
-  	let pageNum = this.queryParams.pageNum
-  	let pageSize = this.queryParams.pageSize
-  	let total = this.total
-  	if(pageNum*pageSize >= total){
-  		uni.showToast({
-  			title:'暂无更多数据'
-  		})
-  		return
-  	} else {
-  		this.queryParams.pageNum += 1;
-  		this.getList()
-  	}
+  onReachBottom() {
+    let pageNum = this.queryParams.pageNum
+    let pageSize = this.queryParams.pageSize
+    let total = this.total
+    if (pageNum * pageSize >= total) {
+      uni.showToast({
+        title: '暂无更多数据'
+      })
+      return
+    } else {
+      this.queryParams.pageNum += 1;
+      this.getList()
+    }
   },
   onLoad() {
     this.getList();
@@ -171,12 +171,14 @@ export default {
 </script>
 
 <style>
-.nactive{
+.nactive {
   padding: 10px 0 10px 0;
 }
-.container{
+
+.container {
   backgroud-color: #f5f5f5;
 }
+
 .grid-item-box {
   flex: 1;
 // position: relative;
@@ -193,8 +195,18 @@ export default {
   height: 100%;
   width: 100%;
 }
-.uni-container{
+
+.uni-container {
   align-items: center;
 }
 
+.gray-background {
+  background-color: gray;
+}
+
+.uni-table-tr:first-child {
+  background-color: #aaaaaa !important;
+}
+
+
 </style>