Sfoglia il codice sorgente

style:解决领取任务冲突

443166679@qq.com 1 anno fa
parent
commit
fba6e48b96
2 ha cambiato i file con 42 aggiunte e 49 eliminazioni
  1. 38 39
      common/task/task_ima_tab.vue
  2. 4 10
      page_task/gain_task/gain_task.vue

+ 38 - 39
common/task/task_ima_tab.vue

@@ -23,48 +23,47 @@
 	} from "@/api/task";
 
 	export default {
-		export default {
-			name: 'task-ima-tab',
-			data() {
-				return {
-					current: 0,
-					navList: [{
-						id: 0,
-						briefness_name: '全部',
-						product_icon: '/static/img/task/task-all.png'
-					}]
-				}
-			},
-			mounted() {
-				this.getTaskType()
-			},
-			methods: {
-				getTaskType() {
-					getTaskType().then(res => {
-						if (res.code === 1) {
-							this.navList.push(...res.data)
+		name: 'task-ima-tab',
+		data() {
+			return {
+				current: 0,
+				navList: [{
+					id: 0,
+					briefness_name: '全部',
+					product_icon: '/static/img/task/task-all.png'
+				}]
+			}
+		},
+		mounted() {
+			this.getTaskType()
+		},
+		methods: {
+			getTaskType() {
+				getTaskType().then(res => {
+					if (res.code === 1) {
+						this.navList.push(...res.data)
 
-						}
-					})
-				},
-				setType(current) {
-					// this.$nextTick(() => {
-					// 	uni.createSelectorQuery().in(this).select(".z-tabs-scroll-view").fields({
-					// 		scrollOffset: true
-					// 	}, data => {
-					// 		if (data) {
-					// 			this.currentScrollLeft = data.scrollLeft;
-					// 			console.log(data);
-					// 		} else {}
-					// 	}).exec();
-					// })
-					if (current !== this.current) {
-						this.current = current
-						this.$emit('setProductId', this.navList[current].id)
 					}
-				},
-			}
+				})
+			},
+			setType(current) {
+				// this.$nextTick(() => {
+				// 	uni.createSelectorQuery().in(this).select(".z-tabs-scroll-view").fields({
+				// 		scrollOffset: true
+				// 	}, data => {
+				// 		if (data) {
+				// 			this.currentScrollLeft = data.scrollLeft;
+				// 			console.log(data);
+				// 		} else {}
+				// 	}).exec();
+				// })
+				if (current !== this.current) {
+					this.current = current
+					this.$emit('setProductId', this.navList[current].id)
+				}
+			},
 		}
+	}
 </script>
 
 <style lang="scss" scoped>

+ 4 - 10
page_task/gain_task/gain_task.vue

@@ -16,19 +16,13 @@
 </template>
 
 <script>
-	// import TaskItem from "@/common/task/task-item.vue"
-	import TaskImgTab from "@/page_task/module/task_ima_tab.vue"
+	import TaskItem from "@/common/task/task-item.vue"
+	// import TaskImgTab from "@/page_task/module/task_ima_tab.vue"
 	import {
 		getTaskReceiving,
 		takeTask
-	} from "@/api/task";
-	import tools from "@/service/tools";
-	// import TaskImgTab from "@/common/task/task_ima_tab.vue"
-	import {
-		getTaskReceiving,
-		takeTask
-	} from "@/api/task";
-	import tools from "@/service/tools";
+	} from "@/api/task"
+	import tools from "@/service/tools"
 
 	export default {
 		components: {