USER-20230908AJ\Administrator 1 سال پیش
والد
کامیت
6fc8b55524
4فایلهای تغییر یافته به همراه59 افزوده شده و 258 حذف شده
  1. 3 3
      common/task/task-item.vue
  2. 1 1
      components/en-utils/en-blank/en-blank.vue
  3. 29 30
      page_task/gain_task/gain_task.vue
  4. 26 224
      pages.json

+ 3 - 3
common/task/task-item.vue

@@ -1,6 +1,6 @@
 <template>
-	<view>
-		<view class="task-body m-lr20 m-t20">
+	<view class="p-t20">
+		<view class="task-body m-lr20  animate__animated animate__fadeIn" v-if="taskList.length>0">
 			<view class="row-c page-box-bg-fff m-b20 r-30 box-shadow-197" v-for="(item,index) in taskList" :key="index"
 				@click="onTaskDetails(item)">
 				<view class="main_string" :style="{background:lineColor[0]}"></view>
@@ -47,7 +47,7 @@
 			</view>
 			<view class="placeholder sys-list-background-color" v-if="is_bottom && taskList.length"></view>
 		</view>
-		<en-blank v-if="taskList.length<=0"></en-blank>
+		<en-blank  v-else></en-blank>
 	</view>
 </template>
 

+ 1 - 1
components/en-utils/en-blank/en-blank.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="blank-page" v-if="showBlank">
+	<view class="blank-page  animate__animated animate__fadeIn" v-if="showBlank">
 		<view class="blank-img-box">
 			<image class="image" src="/static/img/public/task-empty.png" mode=""></image>
 		</view>

+ 29 - 30
page_task/gain_task/gain_task.vue

@@ -2,7 +2,7 @@
 	<view class="total-page page-box gain-task">
 		<Nav :title="'领取任务'" :genre="1" is_fixed></Nav>
 		<view class="m-lr20 r-20">
-			<k-tabs-swiper class="r-20" v-model="current" :tabs="tabs" :field="'name'" bgColor="#fff" color="#444444"
+			<k-tabs-swiper class="r-20" v-model="current" :tabs="tabs" :field="'name'"   bgColor="#fff" color="#444444"
 				activeColor="#10B261" fontSize="28rpx" :bold="true" :scroll="true" height="100rpx" lineHeight="10rpx"
 				@change="changeTab" paddingItem="0 50rpx">
 			</k-tabs-swiper>
@@ -15,10 +15,10 @@
 
 <script>
 	import TaskItem from "@/common/task/task-item.vue"
-	import {
-		getTaskReceiving,
-		takeTask
-	} from "@/api/task"
+  import {
+    getTaskReceiving, getTaskType,
+    takeTask
+  } from "@/api/task"
 	import tools from "@/service/tools"
 
 	export default {
@@ -28,31 +28,15 @@
 		data() {
 			return {
 				current: 0,
-				tabs: [{
-					name: '新闻',
-					icon: '/static/img/statistics/task-four.png'
-				}, {
-					name: '新闻新闻',
-					icon: '/static/img/logo.png'
-				}, {
-					name: '新闻新',
-					icon: '/static/img/logo.png'
-				}, {
-					name: '新闻新闻',
-					icon: '/static/img/logo.png'
-				}, {
-					name: '新闻新闻',
-					icon: '/static/img/logo.png'
-				}, {
-					name: '新闻',
-					icon: '/static/img/logo.png'
-				}, {
-					name: '新闻新闻',
-					icon: '/static/img/logo.png'
-				}, {
-					name: '新闻',
-					icon: '/static/img/logo.png'
-				}, ],
+				tabs: [
+          {
+            id: 0,
+            name: '全部(0)',
+            product_name: '全部',
+            icon: '/static/img/task/task-all.png',
+            num:0
+          }
+        ],
 				taskList: [],
 				page: 1,
 				totalNum: 9999,
@@ -61,11 +45,26 @@
 			}
 		},
 		mounted() {
+			this.getTaskType()
 			this.getTaskReceiving()
 		},
 		methods: {
+      getTaskType() {
+        getTaskType({'numType':1}).then(res => {
+          if (res.code === 1) {
+            res.data.forEach(item=>{
+              item.name=item.product_name+'('+item.num+')'
+              this.tabs[0].num+=item.num
+              this.tabs[0].name=this.tabs[0].product_name+'('+ this.tabs[0].num+')'
+              this.tabs.push(item)
+            })
+          }
+        })
+      },
 			changeTab(index) {
 				this.current = index
+        console.log(index)
+        this.setProductId(this.tabs[index].id)
 			},
 			setProductId(productId) {
 				console.log('productId:' + productId)

+ 26 - 224
pages.json

@@ -1,12 +1,11 @@
 {
-<<<<<<< HEAD
 	"pages": [{
-			"path": "pages/index/index",
-			"style": {
-				"navigationBarTitleText": "首页",
-				"navigationBarTextStyle": "white"
-			}
-		},
+		"path": "pages/index/index",
+		"style": {
+			"navigationBarTitleText": "首页",
+			"navigationBarTextStyle": "white"
+		}
+	},
 
 		{
 			"path": "pages/login/index",
@@ -67,11 +66,11 @@
 	"subPackages": [{
 		"root": "page_subpack",
 		"pages": [{
-				"path": "system_setting/system_setting",
-				"style": {
-					"navigationBarTitleText": ""
-				}
-			},
+			"path": "system_setting/system_setting",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
 			{
 				"path": "message/message",
 				"style": {
@@ -88,11 +87,11 @@
 	}, {
 		"root": "page_task",
 		"pages": [{
-				"path": "gain_task/gain_task",
-				"style": {
-					"navigationBarTitleText": ""
-				}
-			},
+			"path": "gain_task/gain_task",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
 			{
 				"path": "task_details/task_details",
 				"style": {
@@ -146,6 +145,13 @@
 				"style": {
 					"navigationBarTitleText": ""
 				}
+			},
+			{
+				"path": "draft/index",
+				"style": {
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
 			}
 		]
 	}],
@@ -160,9 +166,9 @@
 	"tabBar": {
 		"custom": true,
 		"list": [{
-				"pagePath": "pages/index/index",
-				"text": ""
-			},
+			"pagePath": "pages/index/index",
+			"text": ""
+		},
 			{
 				"pagePath": "pages/task/task",
 				"text": ""
@@ -198,207 +204,3 @@
 		]
 	}
 }
-=======
-  "pages": [
-    {
-      "path": "pages/index/index",
-      "style": {
-        "navigationBarTitleText": "首页",
-        "navigationBarTextStyle": "white"
-      }
-    },
-    {
-      "path": "pages/login/index",
-      "style": {
-        "navigationBarTitleText": "登陆",
-        "disableScroll": true
-      }
-    },
-    {
-      "path": "pages/login/register",
-      "style": {
-        "navigationBarTitleText": "",
-        "enablePullDownRefresh": false,
-        "disableScroll": true
-      }
-    },
-    {
-      "path": "pages/login/forget",
-      "style": {
-        "navigationBarTitleText": "",
-        "enablePullDownRefresh": false
-      }
-    },
-    {
-      "path": "pages/login/await-audit",
-      "style": {
-        "navigationBarTitleText": "",
-        "enablePullDownRefresh": false
-      }
-    },
-    {
-      "path": "pages/test/index",
-      "style": {
-        "navigationBarTitleText": "",
-        "enablePullDownRefresh": false
-      }
-    },
-    {
-      "path": "pages/task/task",
-      "style": {
-        "navigationBarTitleText": ""
-      }
-    },
-    {
-      "path": "pages/loan/loan",
-      "style": {
-        "navigationBarTitleText": ""
-      }
-    },
-    {
-      "path": "pages/statistics/statistics",
-      "style": {
-        "navigationBarTextStyle": "white"
-      }
-    }
-  ],
-  "subPackages": [
-    {
-      "root": "page_subpack",
-      "pages": [
-        {
-          "path": "system_setting/system_setting",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "message/message",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "personal_details/personal_details",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        }
-      ]
-    },
-    {
-      "root": "page_task",
-      "pages": [
-        {
-          "path": "gain_task/gain_task",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "task_details/task_details",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "creation_task/creation_task",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "information/information",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "identity/identity",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "identity_upload/identity_upload",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "property/property",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "apply/apply",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "task_operate/task_operate",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        },
-        {
-          "path": "draft/index",
-          "style": {
-            "navigationBarTitleText": "",
-            "enablePullDownRefresh": false
-          }
-        }
-      ]
-    }
-  ],
-  "globalStyle": {
-    "navigationBarTextStyle": "black",
-    "navigationBarTitleText": "万汇融通云",
-    "navigationBarBackgroundColor": "#F8F8F8",
-    "backgroundColor": "#F8F8F8",
-    "navigationStyle": "custom",
-    "backgroundColorBottom": "#EEF1F7"
-  },
-  "tabBar": {
-    "custom": true,
-    "list": [
-      {
-        "pagePath": "pages/index/index",
-        "text": ""
-      },
-      {
-        "pagePath": "pages/task/task",
-        "text": ""
-      },
-      {
-        "pagePath": "pages/loan/loan",
-        "text": ""
-      },
-      {
-        "pagePath": "pages/statistics/statistics",
-        "text": ""
-      }
-    ],
-    "color": "",
-    "selectedColor": "",
-    "backgroundColor": ""
-  },
-  "condition": {
-    "current": 0,
-    "list": [
-      {
-        "name": "任务详情",
-        "path": "/page_task/task_details/task_details",
-        "query": "taskId=4278"
-      },
-      {
-        "name": "添加任务",
-        "path": "/page_task/information/information",
-        "query": "productId=1"
-      }
-    ]
-  }
-}
->>>>>>> 81d8ff2fe39f47a217874d3be5b66c757eec8673