张文飞 3 лет назад
Родитель
Сommit
fae37395a3
2 измененных файлов с 19 добавлено и 24 удалено
  1. 17 23
      components/subComponents/dmHomeChoose.vue
  2. 2 1
      pages/homePage/homePage.vue

+ 17 - 23
components/subComponents/dmHomeChoose.vue

@@ -34,8 +34,8 @@
 							</scroll-view>
 							</scroll-view>
 						</view>
 						</view>
 						<view class="content_type" v-if="tab==2">
 						<view class="content_type" v-if="tab==2">
-							<view class="content_type_item" v-for="(item,index) in  types" :key='item.value' @click="typeChooce(item)" :style='{color:currentType==item.value?color1:"#999999"}'>
-								{{item.title}}
+							<view class="content_type_item" v-for="(item,index) in  types" :key='item.id' @click="typeChooce(item)" :style='{color:currentType==item.id?color1:"#999999"}'>
+								{{item.name}}
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -103,24 +103,7 @@
 				color2:'',
 				color2:'',
 				color1:'',
 				color1:'',
 				tab:1,
 				tab:1,
-				types:[
-					{
-						title:"获客",
-						value:2
-					},{
-						title:"获电",
-						value:3
-					},{
-						title:"到访",
-						value:4
-					},{
-						title:"成交",
-						value:5
-					},{
-						title:"注册",
-						value:1
-					}
-				],
+				types:[],
 				currentType:"",
 				currentType:"",
 				region:[],
 				region:[],
 				cities:[],
 				cities:[],
@@ -140,6 +123,17 @@
 			this.cities = region[0].children[0].children;
 			this.cities = region[0].children[0].children;
 		},
 		},
 		methods: {
 		methods: {
+			async queryCategoryBox(){
+				let res = await this.$myRequest({
+					url: "/task/queryCategoryBox",
+					data: {
+						whetherBox: false
+					}
+				})
+				if(res.data.success){
+					this.types = res.data.list||[];
+				}
+			},
 			setOptionType(option){
 			setOptionType(option){
 				this.tab = option;
 				this.tab = option;
 			},
 			},
@@ -150,7 +144,7 @@
 					this.containerVisible = true
 					this.containerVisible = true
 				}, 20)
 				}, 20)
 				console.log("regin",region)
 				console.log("regin",region)
-				
+				this.queryCategoryBox();
 			},
 			},
 			hide() {
 			hide() {
 				this.maskBgColor = ''
 				this.maskBgColor = ''
@@ -175,8 +169,8 @@
 				this.tab = tab;
 				this.tab = tab;
 			},
 			},
 			typeChooce(item){
 			typeChooce(item){
-				this.currentType = item.value;
-				this.typeName = item.title;
+				this.currentType = item.id;
+				this.typeName = item.name;
 			},
 			},
 			chooceProvince(item){
 			chooceProvince(item){
 				this.cities = item.children;
 				this.cities = item.children;

+ 2 - 1
pages/homePage/homePage.vue

@@ -13,7 +13,8 @@
 							<image class="level_icon" src="https://dm.static.elab-plus.com/yezhu/h5/icon_Level.png" mode="">
 							<image class="level_icon" src="https://dm.static.elab-plus.com/yezhu/h5/icon_Level.png" mode="">
 							</image>
 							</image>
 							<view class="level_text">{{userInfo.curlevel?'Lv'+userInfo.curlevel:''}}</view>
 							<view class="level_text">{{userInfo.curlevel?'Lv'+userInfo.curlevel:''}}</view>
-							<view class="level_des">/达到 {{userInfo.nextIncome}} 收益可升级</view>
+							<view class="level_des" v-if="(userInfo.curIncome&&userInfo.nextIncome&&userInfo.curIncome==userInfo.nextIncome)">/当前已达到最高等级</view>
+							<view class="level_des" v-else>/达到 {{userInfo.nextIncome}} 收益可升级</view>
 							<view class="level_update">
 							<view class="level_update">
 								<text>升级攻略</text>
 								<text>升级攻略</text>
 								<image class="level_right_icon"
 								<image class="level_right_icon"