mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-06-07 02:12:25 +08:00
细节优化
This commit is contained in:
@ -78,20 +78,16 @@ Page({
|
||||
|
||||
if ((this.data.data || null) != null) {
|
||||
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)) {
|
||||
swan.showLoading({
|
||||
title: '提交中...'
|
||||
|
||||
@ -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 s-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>
|
||||
|
||||
Reference in New Issue
Block a user