Commit 0c6ac8de by wangzhihui

xiu'fu

1 parent 0d3cc0f0
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<view class="entry_plan"> <view class="entry_plan">
<view class="block_title" style="display: flex; justify-content: space-between; align-items: center;"> <view class="block_title" style="display: flex; justify-content: space-between; align-items: center;">
<text>试岗计划</text> <text>试岗计划</text>
<view class="btn_add_trial" bindtap="showTrialPopup" data-type="add" style="color: #347bff; font-size: 26rpx; font-weight: normal; display: flex; align-items: center;"> <view wx:if="{{recruitment.status!=2}}" class="btn_add_trial" bindtap="showTrialPopup" data-type="add" style="color: #347bff; font-size: 26rpx; font-weight: normal; display: flex; align-items: center;">
<van-icon name="plus" style="margin-right: 4rpx;" /> 添加试岗 <van-icon name="plus" style="margin-right: 4rpx;" /> 添加试岗
</view> </view>
</view> </view>
......
...@@ -36,10 +36,6 @@ const VALIDATION_CONFIG = { ...@@ -36,10 +36,6 @@ const VALIDATION_CONFIG = {
} }
} }
// 详细地址:仅支持大小写字母、数字、中文及 、,/[]【】(提交时校验)
const ADDRESS_DETAIL_ALLOWED_REG = /^[a-zA-Z0-9\u4e00-\u9fa5、,\/\[\]【】]*$/
const ADDRESS_DETAIL_FORMAT_TIP = '详细地址仅支持大小写字母、数字、中文及、,/[]【】符号'
Page({ Page({
data: { data: {
IMG_URL, IMG_URL,
...@@ -599,18 +595,13 @@ Page({ ...@@ -599,18 +595,13 @@ Page({
}, },
// 表单验证 // 表单验证
validateForm() { validateForm() {
const { formList, bySystemMerchant } = this.data const { formList } = this.data
for (let [index, config] of Object.entries(VALIDATION_CONFIG)) { for (let [index, config] of Object.entries(VALIDATION_CONFIG)) {
if (config.required && !formList[index].value) { if (config.required && !formList[index].value) {
wx.showToast({ title: config.tip, icon: 'none', duration: 2000 }) wx.showToast({ title: config.tip, icon: 'none', duration: 2000 })
return false return false
} }
} }
const addressDetail = formList[FORM_FIELDS.ADDRESS_DETAIL].value || ''
if (bySystemMerchant && addressDetail && !ADDRESS_DETAIL_ALLOWED_REG.test(addressDetail)) {
wx.showToast({ title: ADDRESS_DETAIL_FORMAT_TIP, icon: 'none', duration: 2000 })
return false
}
return true return true
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!