Jelajahi Sumber

修复访客事由无法修改问题

zyh 2 bulan lalu
induk
melakukan
e25d311e17
4 mengubah file dengan 14 tambahan dan 3 penghapusan
  1. 12 0
      app.js
  2. 1 1
      pages/resitor_scence/resitor_scence.js
  3. 0 1
      pages/visitor_make/visitor_make.js
  4. 1 1
      version.js

+ 12 - 0
app.js

@@ -71,12 +71,24 @@ App({
 	//版本判断
 	checkVersion() {
 		const oldVersion = wx.getStorageSync('version') || null;
+		//若当前无缓存
+		let infoList = wx.getStorageInfoSync()
+		console.log(infoList);
+		if(infoList.keys.length <= 0) {
+			//缓存当前版本
+			wx.setStorageSync('version', versionConfig.version)
+			return;
+		}
 		//当前无版本号或大版本更新
 		if (!oldVersion || Number(versionConfig.version.split('.')[0]) > Number(oldVersion.split('.')[0])) {
 			let infoList = wx.getStorageInfoSync()
 			infoList.keys.forEach(item => {
 				wx.removeStorageSync(item)
 			});
+			wx.showModal({
+				content: '小程序已升级到2.0.10,请重新认证后使用',
+				complete: (res) => {}
+			})
 		}
 		//缓存当前版本
 		wx.setStorageSync('version', versionConfig.version)

+ 1 - 1
pages/resitor_scence/resitor_scence.js

@@ -213,7 +213,7 @@ Page({
     // options = {
     //   // adminId: 108,
     //   adminId: 103,
-    //   type: 0,//1常客0通用
+    //   type: 1,//1常客0通用
     // }
     if ('adminId' in options) {
 			app.data.qrcodeInfo = options

+ 0 - 1
pages/visitor_make/visitor_make.js

@@ -507,7 +507,6 @@ Page({
 		form.addCustomList = isFillFields ? customField : null;
 		form.userId = that.data.userInfo.userId;
 		form.visiteeBuildingId = that.data.buildingAdminId;
-		form.reason = that.data.reasonList[that.data.reasonIndex].name
 		visitorySubmit(form).then(res => {
 			// 提交失败
 			if (res.code != 200) {

+ 1 - 1
version.js

@@ -1,3 +1,3 @@
 module.exports = {
-	version: "2.0.0"
+	version: "2.0.10"
 }