zhengkaixin 1 năm trước cách đây
mục cha
commit
cce11a5e02

+ 4 - 0
components/nx-search.vue

@@ -110,6 +110,7 @@
             selectItem(index) {
                 this.selectIndex = index
                 this.showSelectList = !this.showSelectList;
+				 this.$emit('selectItem', index);
             },
             selectClick() {
 				if(this.selectList.length>1){
@@ -164,6 +165,9 @@
             }
         },
         watch: {
+			defaultSelectIndex(val){
+				this.selectIndex=this.defaultSelectIndex
+			},
             inputVal(newVal) {
                 if (newVal) {
                     this.searchName = '搜索';

+ 2 - 2
config/.env.dev.js

@@ -1,7 +1,7 @@
 const UNI_APP = {  
 	ProjectName :"荆州经开区共享用工平台",
-	BASE_URL: 'http://192.168.77.162:8086/jk-temporary-workers-server/',
-	//BASE_URL:"https://equipment.xiaoxinda.com/jk-temporary-workers-server/",
+	//BASE_URL: 'http://192.168.77.162:8086/jk-temporary-workers-server/',
+	BASE_URL:"https://equipment.xiaoxinda.com/jk-temporary-workers-server/",
 	//IMG_URL:"http://www.jsrailway.com.cn/",
 	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
 	

+ 1 - 8
main.js

@@ -40,14 +40,7 @@ Vue.mixin({
 			}
 			return  ''
 		},
-		getUnit(settlementMethod,item){
-			
-			if(item){
-				return ['', '日', '周', '月'][item.settlementMethod]
-			}else{
-				return  ['', '日', '周', '月'][settlementMethod];
-			}
-		},
+		
 		gotoUrl(url,tab) {
 			uni.navigateTo({
 				url: "/" + url

+ 6 - 1
pages/packages/search/search.vue

@@ -10,7 +10,8 @@
 					<nxsearch :selectList="selectList"
 					:defaultSelectIndex="defaultSelectIndex"
 					 button="inside" @search="doSearch" @confirm="doSearch"
-						v-model="searchQuery.keyword" placeholder="输入关键字找工作" />
+					 @selectItem="selectItem"
+						v-model="searchQuery.keyword" :placeholder="'输入关键字'+selectList[searchQuery.selectIndex].name" />
 
 
 				</view>
@@ -405,6 +406,7 @@
 				this.defaultSelectIndex=op.type
 				//this.$refs.nxsearch.selectItem(op.type)
 			}
+			console.log(this.searchQuery,op)
 			
 
 			var sz = this.carhelp.get("setSearchHistory");
@@ -423,6 +425,9 @@
 			}
 		},
 		methods: {
+			selectItem(i){
+				this.searchQuery.selectIndex=i;
+			},
 			changeSaralyChecked(index) {
 				this.saralyChecked = index;
 			},

+ 1 - 1
pages/tab/choreInformation/choreInformation.vue

@@ -10,7 +10,7 @@
 
 					<nxsearch :selectList="selectList" button="inside" @search="doSearch" @confirm="doSearc"
 						:setIsFocus="false" @focus="gotoUrl('pages/packages/search/search')"
-						v-model="searchQuery.keyword" placeholder="输入关键字找工" />
+						v-model="searchQuery.keyword" placeholder="输入关键字找工" />
 				</view>
 			</view>
 		</view>