Authored by 李奇

有赚UI优化

... ... @@ -4,33 +4,10 @@
<div class="apply-title">基本信息</div>
<ul class="section-ul">
<li><span>姓名</span><input type="text" class="name" placeholder="请输入姓名" /></li>
<li class="border-node"><span>手机号码</span><input type="number" class="mobile" placeholder="请输入手机号码" /></li>
<li><span>手机号码</span><input type="number" class="mobile" placeholder="请输入手机号码" /></li>
<li><span>微信号</span><input type="text" class="wechat" placeholder="请输入微信号(选填)" /></li>
</ul>
</div>
<div class="section">
<div class="apply-title">完善信息</div>
{{#socialMediaList}}
<div class="party-icon-item">
<div class="public-info-section">
<img class="public-icon" src="{{icon}}" />
<div class="personal">
<div class="public-name">{{name}}</div>
<div class="account-name {{#if required}}required{{/if}}" data-type="{{type}}">
{{#if account}}
账号:<em>{{account}}</em>&nbsp;&nbsp;
粉丝:<em data-fans="{{fans}}">{{fans}}</em>
{{/if}}
</div>
</div>
</div>
{{#if account}}
<div class="fill-in disable">已填写</div>
{{else}}
<div class="fill-in">填写</div>
{{/if}}
</div>
{{/socialMediaList}}
<p class="other">如果您有其他渠道,可以添加我们的服务号“有货有赚”反馈,也可以了解您的申请状态<em class="added">点击添加</em></p>
<p class="other">提供微信号,方便邀您加入达人微信群,赚钱秘籍、特殊福利享不停!添加关注公众号“有货有赚”,申请状态、高佣活动早知道。<em class="added">点击添加</em></p>
</div>
<div class="agreement-section">
<div class="agreement">
... ...
... ... @@ -17,6 +17,7 @@ class HaveGainApplyPage extends Page {
$apply: $('.have-gain-apply'),
$nameInput: $('.section .name'),
$mobileInput: $('.section .mobile'),
$wxInput: $('.section .wechat'),
$fillIn: $('.party-icon-item .fill-in'),
$added: $('.other .added'),
$agreement: $('.agreement-section .agreement'),
... ... @@ -127,7 +128,6 @@ class HaveGainApplyPage extends Page {
let errStatus = 0;
let name = $.trim(this.selector.$nameInput.val());
let mobile = $.trim(this.selector.$mobileInput.val());
let wxInput = $('.account-name.required').find('em').length > 0;
if (name === '') {
errStatus = 1;
... ... @@ -135,8 +135,6 @@ class HaveGainApplyPage extends Page {
errStatus = 2;
} else if (!/^1[0-9]{10}$/.test(mobile)) {
errStatus = 21;
} else if (!wxInput) {
errStatus = 3;
}
if (errStatus) {
... ... @@ -213,8 +211,6 @@ class HaveGainApplyPage extends Page {
tip.show('请输入手机号');
} else if (errStatus === 21) {
tip.show('请输入正确的手机号');
} else if (errStatus === 3) {
tip.show('请填写微信账号');
}
if (errStatus) {
... ... @@ -226,15 +222,14 @@ class HaveGainApplyPage extends Page {
return tip.show('请勾选《我已阅读并同意》');
}
this.selector.$fillIn.each((index, event) => {
let $accountName = $(event).closest('.party-icon-item').find('.account-name');
let wxAccount = $.trim(this.selector.$wxInput.val());
if (wxAccount) {
socialMediaList.push({
type: $accountName.data('type'),
account: $accountName.find('em').eq(0).text() || '',
fans: parseInt(`0${$accountName.find('em').eq(1).data('fans')}`, 10)
type: 1,
account: wxAccount
});
});
}
if (this.selector.isFlag) {
return false;
... ... @@ -246,13 +241,16 @@ class HaveGainApplyPage extends Page {
union.union_type = this.query.union_type;
}
if (socialMediaList.length) {
union.socialMediaList = JSON.stringify(socialMediaList);
}
return this.ajax({
type: 'post',
url: `/activity/have-gain/submitApply${window.location.search}`,
data: Object.assign({
name: $.trim(this.selector.$nameInput.val()),
mobile: $.trim(this.selector.$mobileInput.val()),
socialMediaList: JSON.stringify(socialMediaList)
mobile: $.trim(this.selector.$mobileInput.val())
}, union)
}).then(res => {
this.selector.isFlag = false;
... ...
@import "have-gain-dialog";
body {
background-color: #fff;
}
.have-gain-apply {
background-color: #f0f0f0;
... ... @@ -35,10 +39,6 @@
}
}
li.border-node {
border: none;
}
.party-icon-item {
display: flex;
flex-direction: row;
... ... @@ -114,6 +114,10 @@
}
.agreement-section {
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: 30px 30px 0;
padding-bottom: 30px;
... ... @@ -149,7 +153,7 @@
height: 100px;
line-height: 100px;
background-color: #d0021b;
border-radius: 10px;
border-radius: 4px;
color: #fff;
text-align: center;
}
... ...