细节优化

This commit is contained in:
Devil
2021-02-27 23:51:19 +08:00
parent a4292a9504
commit 2045677c92
207 changed files with 180 additions and 672 deletions

View File

@ -74,11 +74,13 @@ Page({
data['id'] = this.data.data.id || 0;
}
// 数据验证
var validation = [
{fields: 'name', msg: '请填写联系人姓名格式 2~30 个字符之间'},
{fields: 'tel', msg: '请填写联系人电话 6~15 个字符'},
{fields: 'address', msg: '请填写联系人地址、最多230个字符'}
];
var validation = [];
if((this.data.data_base || null) != null && (this.data.data_base.is_qrcode_must_userinfo || 0) == 1)
{
validation.push({fields: 'name', msg: '请填写联系人姓名格式 2~30 个字符之间'});
validation.push({fields: 'tel', msg: '请填写联系人电话 6~15 个字符'});
validation.push({fields: 'address', msg: '请填写联系人地址、最多230个字符'});
}
if(app.fields_check(data, validation))
{
qq.showLoading({title: '提交中...'});

View File

@ -4,17 +4,19 @@
<view> <text class="cr-main">{{data.reward_invitee || data_base.reward_invitee}}</text> </view>
</view>
<view class="form-container spacing-mb oh">
<view class="form-gorup bg-white">
<view class="form-gorup-title"><text class="form-group-tips-must"></text></view>
<input type="text" name="name" placeholder-class="cr-ccc" class="cr-666" placeholder="联系人姓名格式 2~30 个字符之间" maxlength="30" value="{{data.name || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title"><text class="form-group-tips-must"></text></view>
<input type="text" name="tel" placeholder-class="cr-ccc" class="cr-666" placeholder="联系人电话 6~15 个字符" maxlength="15" value="{{data.tel || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title"><text class="form-group-tips-must"></text></view>
<input type="text" name="address" placeholder-class="cr-ccc" class="cr-666" placeholder="联系人地址、最多230个字符" maxlength="230" value="{{data.address || ''}}" />
<view qq:if="{{(data_base.is_qrcode_must_userinfo || 0) == 1}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title"><text class="form-group-tips-must"></text></view>
<input type="text" name="name" placeholder-class="cr-ccc" class="cr-666" placeholder="联系人姓名格式 2~30 个字符之间" maxlength="30" value="{{data.name || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title"><text class="form-group-tips-must"></text></view>
<input type="text" name="tel" placeholder-class="cr-ccc" class="cr-666" placeholder="联系人电话 6~15 个字符" maxlength="15" value="{{data.tel || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title"><text class="form-group-tips-must"></text></view>
<input type="text" name="address" placeholder-class="cr-ccc" class="cr-666" placeholder="联系人地址、最多230个字符" maxlength="230" value="{{data.address || ''}}" />
</view>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title"><text class="form-group-tips"></text></view>