Browse Source

去除了isShowApplet的逻辑

zyh 2 months ago
parent
commit
99e3c4a589

+ 0 - 1
app.js

@@ -73,7 +73,6 @@ App({
 		const oldVersion = wx.getStorageSync('version') || null;
 		//若当前无缓存
 		let infoList = wx.getStorageInfoSync()
-		console.log(infoList);
 		if(infoList.keys.length <= 0) {
 			//缓存当前版本
 			wx.setStorageSync('version', versionConfig.version)

+ 0 - 1
components/customField/customField.js

@@ -145,7 +145,6 @@ Component({
 		setList() {
 			let canSubmit = true;
 			let list = this.data.list
-			console.log(list);
 			for (let index = 0; index < list.length; index++) {
 				if ((list[index].customNameVal == null || list[index].customNameVal == '') && list[index].isShow === 1 && list[index].isEditable == 1) {
 					canSubmit = false;

+ 1 - 1
components/detailsCard/index.wxml

@@ -152,7 +152,7 @@
 				<view wx:if="{{recordInfo.contents}}" wx:for="{{recordInfo.contents}}">
 					<van-cell wx:if="{{item.isShow==1}}" custom-class="van-cell" title-class="text-gray" value-class="text-black flex-sm" border="{{ false }}" title="{{item.customName}}">
 						<image wx:if="{{item.customType=='图片'}}" class="photo" src="{{item.customNameVal}}" bindtap="preview" data-src="{{item.customNameVal}}"></image>
-						<text wx:else>{{item.customNameVal}}</text>
+						<text wx:else>{{item.customNameVal || ''}}</text>
 					</van-cell>
 				</view>
 

+ 0 - 5
pages/changeUserInfo/index.js

@@ -128,7 +128,6 @@ Page({
 			}
 			//有选中的楼宇id
 			if (buildingIndex != null) {
-				console.log(buildingIndex);
 				//获取企业列表
 				this.getCompanyList();
 				//获取是否开启自定义字段
@@ -247,7 +246,6 @@ Page({
 	getContextStatusByAdminId(orgId) {
 		getContextByAdminId(orgId).then(res => {
 			if (res.code == 200) {
-				console.log(res);
 				this.setData({
 					isShowApplet: res.data,
 					isFillFields: !res.data,
@@ -317,7 +315,6 @@ Page({
 			return;
 		}
 		selectContextByCardId(this.data.buildingAdminId, this.data.userInfo.userId).then(res => {
-			console.log(res.data);
 			this.setData({
 				customField: res.data
 			})
@@ -441,7 +438,6 @@ Page({
 			title: '申报中..',
 		});
 		userWhiteCheck(data).then((res) => {
-			console.log(res);
 			if (res.code == 200) {
 				this.data.timeCount = 30
 				this.countDown()
@@ -487,7 +483,6 @@ Page({
 				cancelText: "使用上次",
 				confirmText: "使用本次",
 				complete: (res) => {
-					console.log(res);
 					if (res.cancel) {
 						app.data.temporaryAdminInfo = null
 					}

+ 2 - 30
pages/regular_register/regular_register.js

@@ -10,7 +10,7 @@ const {
 	throttle
 } = require("../../utils/throttle/throttle");
 import {
-	getContextByAdminId, selectContextByCardId
+	selectContextByCardId
 } from '../../utils/api/customField'
 const app = getApp()
 
@@ -66,8 +66,6 @@ Page({
 		disableSelectAdminInfo: false,
 		//是否禁用人员认证按钮
 		isDisabled: false,
-		//楼宇账号是否开启自定义字段
-		isShowApplet: false,
 		//是否完成自定义字段的填写
 		isFillFields: false,
 		//自定义字段内容
@@ -143,8 +141,6 @@ Page({
 			if (buildingIndex != null) {
 				//获取企业列表
 				this.getCompanyList();
-				//获取是否开启自定义字段
-				this.getContextStatusByAdminId(this.data.buildingAdminId)
 				//获取楼宇账号配置
 				this.getAdminConfig()
 			}
@@ -259,28 +255,6 @@ Page({
 		})
 
 	},
-	//获取是否有自定义字段
-	getContextStatusByAdminId(orgId) {
-		getContextByAdminId(orgId).then(res => {
-			if (res.code != 200) {
-				wx.showToast({
-					title: res.msg,
-					icon: 'none'
-				})
-				return;
-			}
-			console.log(!res.data);
-			this.setData({
-				isShowApplet: res.data,
-				isFillFields: !res.data,
-			})
-			this.canOperation()
-			//若存在自定义字段,则拉取自定义字段内容
-			if(res.data) {
-				this.getContextByAdminId()
-			}
-		})
-	},
 	//选择楼宇或企业
 	getValue(e) {
 		switch (e.currentTarget.dataset.type) {
@@ -290,7 +264,6 @@ Page({
 					buildingName: e.detail.name,
 				})
 				this.getCompanyList()
-				this.getContextStatusByAdminId(e.detail.adminId)
 				this.getAdminConfig()
 				break;
 			case 'companyAdminId':
@@ -379,8 +352,7 @@ Page({
 	},
 	// 判断是否填写完成
 	isFillFields(e) {
-		console.log(e.detail);
-		if (e.detail == false) {
+		if (e.detail === false) {
 			this.data.isFillFields = false;
 		} else {
 			this.data.customField = e.detail;

+ 1 - 1
pages/regular_register/regular_register.wxml

@@ -40,7 +40,7 @@
 		</view>
 		<block wx:if="{{companyAdminId&&buildingAdminId&&isDisabled&&!showMyFun}}">
 			<!-- 自定义字段 -->
-			<custom-field wx:if="{{isShowApplet}}" orgId="{{buildingAdminId}}" customField="{{customField}}" bind:isFillFields="isFillFields" />
+			<custom-field orgId="{{buildingAdminId}}" customField="{{customField}}" bind:isFillFields="isFillFields" />
 		</block>
 	</block>
 	<!-- 功能区 -->

+ 0 - 1
pages/regular_visit_details/regular_visit_details.js

@@ -313,7 +313,6 @@ Page({
 	 * 生命周期函数--监听页面加载
 	 */
 	onLoad: function (options) {
-		console.log(options);
 		this.doCheckInfo(options);
 	},
 	/**

+ 0 - 36
pages/visitor_make/visitor_make.js

@@ -133,8 +133,6 @@ Page({
 		}],
 		//是否禁用拜访信息
 		isAudit: false,
-		//是否开启自定义字段
-		isShowApplet: false,
 		//自定义字段内容
 		customField: null,
 		//是否仅需认证
@@ -190,11 +188,6 @@ Page({
 			}
 			//有选中的楼宇id
 			if (buildingIndex != null) {
-				console.log(buildingIndex);
-				//获取企业列表
-				// this.getCompanyList(); 
-				//获取是否开启自定义字段
-				this.getContextStatusByAdminId(this.data.buildingAdminId)
 				//获取楼宇账号配置
 				this.getAdminConfig()
 			}
@@ -224,31 +217,12 @@ Page({
 			this.jugdeInfo();
 		})
 	},
-	//获取是否有自定义字段
-	getContextStatusByAdminId(orgId) {
-		getContextByAdminId(orgId).then(res => {
-			if (res.code == 200) {
-				this.setData({
-					isShowApplet: res.data,
-					isFillFields: !res.data,
-				})
-				this.canOperation()
-			} else {
-				wx.showToast({
-					title: res.msg,
-					icon: 'none'
-				})
-			}
-		})
-	},
 	// 获取用户填写的自定义字段内容
 	getContextByAdminId() {
 		if (!this.data.companyAdminId || !this.data.userInfo) {
 			return;
 		}
 		selectContextByCardId(this.data.companyAdminId, this.data.userInfo.userId).then(res => {
-			console.log(res.data);
-			console.log(this.data.isShowApplet);
 			this.setData({
 				customField: res.data
 			})
@@ -332,7 +306,6 @@ Page({
 			isDisabled: true,
 		});
 		this.updateSetting()
-		this.getContextStatusByAdminId(this.data.buildingAdminId)
 		this.getContextByAdminId();
 	},
 	// 更改信息
@@ -381,7 +354,6 @@ Page({
 				})
 				break;
 			case 'visiteeBuilding':
-				console.log(e);
 				this.setData({
 					'form.visiteeBuilding': e.detail.name,
 					'form.visiteeBuildingId': e.detail.adminId,
@@ -389,7 +361,6 @@ Page({
 					buildingName: e.detail.name,
 				})
 				this.getAdminConfig()
-				this.getContextStatusByAdminId(e.detail.adminId)
 				break;
 			case "visiteeCompany":
 				if (buildingCheckType == 1) {
@@ -611,7 +582,6 @@ Page({
 				})
 				this.matchCorrectPhone();
 				if (this.data.userInfo) {
-					this.getContextStatusByAdminId(res.data.visiteeCompanyId)
 					this.getContextByAdminId()
 				}
 				this.doCheckAdmin();
@@ -648,7 +618,6 @@ Page({
 		} else {
 			stepsList[1].complete = (!disableComplete && isFillFields) ? true : false
 		}
-		console.log(this.data.isShowApplet);
 		this.setData({
 			stepsList
 		})
@@ -677,7 +646,6 @@ Page({
 				cancelText: "使用上次",
 				confirmText: "使用本次",
 				complete: (res) => {
-					console.log(res);
 					if (res.cancel) {
 						app.data.temporaryAdminInfo = null
 					}
@@ -735,9 +703,6 @@ Page({
 		this.setData({
 			currentIndex: 1,
 		})
-		if (userInfo && userInfo.userId && !isShowApplet) {
-			this.getContextStatusByAdminId(this.data.buildingAdminId)
-		}
 	},
 	// 上一步
 	previous_step(e) {
@@ -757,7 +722,6 @@ Page({
 			return;
 		}
 		//判断常客信息的严格等级是否大于等于登录要求 实名认证>非实名
-		console.log(!(!this.data.needRealname || app.data.userInfo.needRealname));
 		if (!(!this.data.needRealname || app.data.userInfo.needRealname)) {
 			return;
 		}

+ 1 - 1
pages/visitor_make/visitor_make.wxml

@@ -113,7 +113,7 @@
             <three_yards xcPhone="{{visitorUserInfo.phone}}" startTime="{{startTime}}" hsHour="{{hsHour}}" threeCodeList="{{threeCodeList}}" bind:isthreeYards="isthreeYards" language="{{language}}" buildingId="{{form.visiteeBuildingId}}" />
           </view> -->
 					<!-- 自定义字段 -->
-					<custom-field wx:if="{{isShowApplet}}" pageType="访客" orgId="{{buildingAdminId}}" customField="{{customField}}" bind:isFillFields="isFillFields" currentIndex="{{currentIndex}}" />
+					<custom-field pageType="访客" orgId="{{buildingAdminId}}" customField="{{customField}}" bind:isFillFields="isFillFields" currentIndex="{{currentIndex}}" />
 					<view style="height: 138rpx;"></view>
 					<!-- 按钮区 -->
 					<view class="btn-area-two">

+ 0 - 3
utils/faceCheck/faceCheck.js

@@ -6,7 +6,6 @@ const app = getApp()
 //进入人脸识别--人脸下发
 const intoFace_wxrlxf = (name, idcard, phone, orgId) => {
   return new Promise ((reslove, reject) => {
-		console.log("跳转");
     let taskId = `${orgId}-${date.formatTime(Date.now(), 'YYYYMMDDHHNNSS')}${(parseInt((Math.random()*9+1)*10000))}`
     // taskId = '00-993306131355291200';
     app.data.faceTaskId = taskId;
@@ -15,7 +14,6 @@ const intoFace_wxrlxf = (name, idcard, phone, orgId) => {
         path: 'pages/index/index?idNumber='+idcard+'&name='+name+'&phone='+phone+'&notify='+(util.wx_rlxf?util.pro_baseUrl_wxrlxf:util.dev_baseUrl_wxrlxf)+'/api/next/doConfirmFaceNotify&unit=简约通&token=73b81e3eb2ff11eb877300163e0a5d80&taskId='+taskId,
         envVersion: 'release',
         success(res) {
-					console.log(res);
           reslove(true)
         },
         fail(err) {
@@ -95,7 +93,6 @@ const getFace = (api, method, data) => {
         return suc
       }).catch((err) => {
         wx.hideLoading()
-        console.log(err)
         util.showToast(err)
       })
   )