Sfoglia il codice sorgente

feat(提交代码): 提交代码

提交代码
wangxin 2 anni fa
parent
commit
72a0c2ca01
6 ha cambiato i file con 36 aggiunte e 14 eliminazioni
  1. 5 2
      app.json
  2. 12 1
      pages/index/index.js
  3. 13 6
      pages/search/index.js
  4. 1 1
      pages/search/index.wxml
  5. 2 1
      project.config.json
  6. 3 3
      project.private.config.json

+ 5 - 2
app.json

@@ -3,7 +3,8 @@
     "scope.userLocation": {
       "desc": "您的位置信息将用于获取当地职位列表、打卡等功能"
     }
-  },
+	},
+	"requiredPrivateInfos":["startLocationUpdate","getLocation","onLocationChange"],
   "pages": [
     "pages/index/index",
     "pages/detail/index",
@@ -65,7 +66,9 @@
     "pages/clock/clock-success/clock-success",
     "pages/clock/clock-rule/clock-rule",
     "pages/clock/clock-tongji/index",
-    "pages/clock/clock-tongji/list"
+		"pages/clock/clock-tongji/list",
+		"ocrsdk/pages/id-card/id-card",
+		"ocrsdk/pages/index/index"
   ],
   "subpackages": [
     {

+ 12 - 1
pages/index/index.js

@@ -79,7 +79,18 @@ Page({
     this.fetchList();
   },
   onShow: function () {
-
+		if (wx.getStorageSync('city') !== this.data.cityName) {
+			this.setData({
+				cityName: wx.getStorageSync('city') || '无锡',
+				cityCode: wx.getStorageSync('cityCode') || '320200',
+				pageNo: 1, //当前分页
+				isScroll: true, //是否可以滚动
+				filter: -1, //岗位类型
+				list: [],
+			}, _ => {
+				this.start();
+			})
+		}
   },
   //下拉刷新
   onPullDownRefresh: function () {

+ 13 - 6
pages/search/index.js

@@ -93,13 +93,20 @@ Page({
       key.id = this.data.searchKey.length;
       key.searchVal = this.data.searchVal;
 
-      let searchKey = this.data.searchKey
-      searchKey.push(key);
-      wx.setStorageSync("searchKey", searchKey);
+			let searchKey = this.data.searchKey
+			if (!searchKey.map(value => value.searchVal).includes(this.data.searchVal)) {
+				searchKey.push(key);
+				wx.setStorageSync("searchKey", searchKey);
+			}
     }
 
-    wx.navigateTo({
-      url: '../search-result/search-result?searchVal=' + this.data.searchVal,
-    })
+		wx.navigateTo({
+			url: '../search-result/search-result?searchVal=' + this.data.searchVal,
+			success: () => {
+				this.setData({
+					searchVal: ''
+				})
+			}
+		})
   },
 })

+ 1 - 1
pages/search/index.wxml

@@ -22,7 +22,7 @@
         <image src='/images/happyjob/search.png'></image>
       </view>
       <input class='search-input' focus="{{true}}" type='text' confirm-type="search" value="{{searchVal}}"
-        bindconfirm="toSearchPage" placeholder="搜索你想要的好岗位" placeholder-class="placeholder"></input>
+        bindconfirm="toSearchPage" bindinput="bindKeyInput" placeholder="搜索你想要的好岗位" placeholder-class="placeholder"></input>
     </view>
     <!-- <view class="btn-search" bindtap='toSearchPage'>搜索</view> -->
   </view>

+ 2 - 1
project.config.json

@@ -50,7 +50,8 @@
 		"useCompilerPlugins": false,
 		"minifyWXML": true,
 		"lazyloadPlaceholderEnable": false,
-		"useStaticServer": true
+		"useStaticServer": true,
+		"ignoreUploadUnusedFiles": true
 	},
 	"compileType": "miniprogram",
 	"libVersion": "2.11.2",

+ 3 - 3
project.private.config.json

@@ -1,6 +1,6 @@
 {
 	"setting": {
-		"compileHotReLoad": false,
+		"compileHotReLoad": true,
 		"urlCheck": false
 	},
 	"condition": {
@@ -321,14 +321,14 @@
 				{
 					"name": "面试登记",
 					"pathName": "pages/interview-reg/index",
-					"query": "",
+					"query": "scene=url%3DYbQJNj",
 					"launchMode": "default",
 					"scene": 1011
 				}
 			]
 		}
 	},
-	"projectname": "kaixin",
+	"projectname": "Mina",
 	"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
 	"libVersion": "2.16.1"
 }