Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4262a513
authored
Sep 01, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
页面样式
1 parent
02645b96
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
396 additions
and
40 deletions
pages/applicationAccount/applicationAccount.js
pages/applicationAccount/applicationAccount.wxml
pages/applicationAccount/applicationAccount.wxss
pages/applicationPartener/applicationPartener.js
pages/applicationPartener/applicationPartener.wxml
pages/applicationPartener/applicationPartener.wxss
pages/applicationAccount/applicationAccount.js
View file @
4262a51
...
@@ -10,8 +10,9 @@ Page({
...
@@ -10,8 +10,9 @@ Page({
accountForm
:
{
accountForm
:
{
applyName
:
''
,
applyName
:
''
,
telphone
:
''
,
telphone
:
''
,
enterpriseName
:
''
,
concerContent
:
''
,
concerContent
:
''
bussinessName
:
''
,
province
:
[]
}
}
},
},
...
@@ -19,32 +20,69 @@ Page({
...
@@ -19,32 +20,69 @@ Page({
// 表单验证规则
// 表单验证规则
initValidate
()
{
initValidate
()
{
const
rules
=
{
const
rules
=
{
applyName
:
{
nickName
:
{
required
:
true
},
required
:
true
,
telphone
:
{
required
:
true
minlength
:
2
},
bussinessName
:
{
}
required
:
true
},
province
:
{
required
:
true
}
}
}
const
messages
=
{
const
messages
=
{
applyName
:
{
nickName
:
{
required
:
'请填写申请人名称'
,
},
required
:
'请填写姓名'
,
telphone
:
{
required
:
'请填写联系电话'
minlength
:
'请输入正确的名称'
},
bussinessName
:
{
}
required
:
'请填写企业/门店名称'
},
province
:
{
required
:
'请选择省市'
}
}
}
this
.
WxValidate
=
new
WxValidate
(
rules
,
messages
)
this
.
WxValidate
=
new
WxValidate
(
rules
,
messages
)
},
},
//报错
showModal
(
error
)
{
wx
.
showModal
({
content
:
error
.
msg
,
showCancel
:
false
,
})
},
// 提交表单
submitAccount
(
e
)
{
console
.
log
(
e
);
const
params
=
e
.
detail
.
value
// 校验表单
if
(
!
this
.
WxValidate
.
checkForm
(
params
))
{
const
error
=
this
.
WxValidate
.
errorList
[
0
]
this
.
showModal
(
error
)
return
false
}
this
.
showModal
({
msg
:
'提交成功'
})
},
// 选择省市
bindRegionChange
(
e
)
{
console
.
log
(
e
.
detail
.
value
);
this
.
setData
({
"accountForm.province"
:
e
.
detail
.
value
})
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
...
...
pages/applicationAccount/applicationAccount.wxml
View file @
4262a51
<!--pages/applicationAccount/applicationAccount.wxml-->
<!--pages/applicationAccount/applicationAccount.wxml-->
<view class="apply-account">
<view class="apply-account">
<view>
<view class="apply-top">
top
<image class="apply-background" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/apply-background.png" bindload="imgSuccess" data-name="logo"></image>
</view>
<view class="apply-title">免费申请体验账号</view>
<view>
<button class="add-btn" plain="true">
<image class="apply-code" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/OR-code.png" bindload="imgSuccess" data-name="logo"></image>
</view>
添加体验专员
<view class="contact-inline">
</button>
</view>
</view>
<form class="apply-box" bindsubmit="submitAccount">
<view class="apply-info">
<view class='info-list'>
<text class="info-lable">申请人<text class="require"> *</text></text>
<input name="applyName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的姓名' value="{{parternerForm.applyName}}"></input>
</view>
<view class='info-list'>
<text class="info-lable">联系电话<text class="require"> *</text></text>
<input name="telphone" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的联系电话' value="{{parternerForm.telphone}}"></input>
</view>
<picker mode="region" value="{{accountForm.province}}" bindchange="bindRegionChange">
<view class='info-list'>
<text class="info-lable">所在省市<text class="require"> *</text></text>
<block wx:if="{{!accountForm.province.length}}">
<view class="province-placeholder">请选择</view>
</block>
<block wx:else>
<view>{{accountForm.province}}</view>
</block>
</view>
</picker>
<view class='info-list'>
<text class="info-lable">企业名称<text class="require"> *</text></text>
<input name="bussinessName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的企业/门店名称' value="{{parternerForm.bussinessName}}"></input>
</view>
<view class='info-list'>
<text class="info-lable">关注内容</text>
<textarea name="concerContent" class="concer-content" placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您关注的内容(选填)' maxlength="200" value="{{parternerForm.concerContent}}"></textarea>
</view>
</view>
<button class="submit-btn" form-type="submit">
提交申请
</button>
</form>
<view class="contact-inline">
</view>
</view>
</view>
pages/applicationAccount/applicationAccount.wxss
View file @
4262a51
...
@@ -3,6 +3,112 @@
...
@@ -3,6 +3,112 @@
position: relative;
position: relative;
}
}
.apply-top {
position: relative;
text-align: center;
}
.apply-background {
width: 100%;
}
.apply-title {
font-family: AlibabaPuHuiTiB;
font-weight: 600;
font-size: 56rpx;
color: #2D2D33;
position: absolute;
top: 128rpx;
left: 182rpx;
}
.apply-code {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
.add-btn {
width: 260rpx;
height: 72rpx;
border: 2rpx solid #5850FF !important;
border-radius: 8rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #5850FF !important;
padding-left: 14rpx;
padding-right: 14rpx;
position: absolute;
top: 252rpx;
left: 244rpx;
}
.apply-box {
width: 702rpx;
height: 864rpx;
background: #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(202,211,230,0.40);
border-radius: 12rpx;
margin: 0 auto;
margin-bottom: 30rpx;
position: absolute;
top: 420rpx;
left: 24rpx;
}
.apply-info {
padding: 0 32rpx;
}
.info-list {
background: #fff;
display: flex;
align-content: center;
padding: 36rpx 0;
border-bottom: 1rpx solid #eee;
}
.info-lable {
width: 176rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 28rpx;
color: #2D2D33;
}
.require {
color: #EB4E4E;
}
.concer-content {
height: 170rpx;
overflow: auto;
}
textarea {
width: 475rpx !important;
}
.province-placeholder {
font-size:28rpx;
color: #9E9EA8;
}
.submit-btn {
width: 622rpx;
height: 80rpx;
background: #5850FF;
border-radius: 8rpx;
margin-top: 40rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
font-weight: 500;
font-family: PingFangSC-Medium;
line-height: 80rpx;
}
.contact-inline {
.contact-inline {
width: 50rpx;
width: 50rpx;
height: 50rpx;
height: 50rpx;
...
...
pages/applicationPartener/applicationPartener.js
View file @
4262a51
// pages/applicationPartener/applicationPartener.js
// pages/applicationPartener/applicationPartener.js
import
WxValidate
from
"../../utils/WxValidate"
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
parternerForm
:
{
applyName
:
''
,
telphone
:
''
,
concerContent
:
''
}
},
},
// 表单验证规则
initValidate
()
{
const
rules
=
{
applyName
:
{
required
:
true
},
telphone
:
{
required
:
true
}
}
const
messages
=
{
applyName
:
{
required
:
'请填写申请人名称'
,
},
telphone
:
{
required
:
'请填写联系电话'
}
}
this
.
WxValidate
=
new
WxValidate
(
rules
,
messages
)
},
//报错
showModal
(
error
)
{
wx
.
showModal
({
content
:
error
.
msg
,
showCancel
:
false
,
})
},
// 提交表单
submitParterner
(
e
)
{
console
.
log
(
e
);
const
params
=
e
.
detail
.
value
// 校验表单
if
(
!
this
.
WxValidate
.
checkForm
(
params
))
{
const
error
=
this
.
WxValidate
.
errorList
[
0
]
this
.
showModal
(
error
)
return
false
}
this
.
showModal
({
msg
:
'提交成功'
})
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
// 初始化验证规则函数
this
.
initValidate
()
},
},
/**
/**
...
...
pages/applicationPartener/applicationPartener.wxml
View file @
4262a51
<!--pages/applicationPartener/applicationPartener.wxml-->
<!--pages/applicationPartener/applicationPartener.wxml-->
<view class="apply-partener">
<view class="apply-partener">
<view>
<view class="apply-top">
top
<image class="apply-background" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/apply-background.png" bindload="imgSuccess" data-name="logo"></image>
</view>
<view class="apply-title">申请城市合伙人</view>
<view>
<button class="add-btn" plain="true">
<image class="apply-code" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/OR-code.png" bindload="imgSuccess" data-name="logo"></image>
</view>
添加合伙人专员
<view class="contact-inline">
</button>
</view>
</view>
</view>
<form class="apply-box" bindsubmit="submitParterner">
<view class="apply-info">
<view class='info-list'>
<text class="info-lable">申请人<text class="require"> *</text></text>
<input name="applyName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的姓名' value="{{parternerForm.applyName}}"></input>
</view>
<view class='info-list'>
<text class="info-lable">联系电话<text class="require"> *</text></text>
<input name="telphone" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的联系电话' value="{{parternerForm.telphone}}"></input>
</view>
<view class='info-list'>
<text class="info-lable">关注内容</text>
<textarea name="concerContent" class="concer-content" placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您关注的内容(选填)' maxlength="200" value="{{parternerForm.concerContent}}"></textarea>
</view>
</view>
<button class="submit-btn" form-type="submit">
提交申请
</button>
</form>
<view class="contact-inline">
</view>
</view>
\ No newline at end of file
\ No newline at end of file
pages/applicationPartener/applicationPartener.wxss
View file @
4262a51
...
@@ -3,6 +3,107 @@
...
@@ -3,6 +3,107 @@
position: relative;
position: relative;
}
}
.apply-top {
position: relative;
text-align: center;
}
.apply-background {
width: 100%;
}
.apply-title {
font-family: AlibabaPuHuiTiB;
font-weight: 600;
font-size: 56rpx;
color: #2D2D33;
position: absolute;
top: 128rpx;
left: 182rpx;
}
.apply-code {
width: 28rpx;
height: 28rpx;
vertical-align: middle;
}
.add-btn {
width: 284rpx;
height: 72rpx;
border: 2rpx solid #5850FF !important;
border-radius: 8rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #5850FF !important;
padding-left: 14rpx;
padding-right: 14rpx;
position: absolute;
top: 252rpx;
left: 232rpx;
}
.apply-box {
width: 702rpx;
height: 640rpx;
background: #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(202,211,230,0.40);
border-radius: 12rpx;
margin: 0 auto;
margin-bottom: 30rpx;
position: absolute;
top: 420rpx;
left: 24rpx;
}
.apply-info {
padding: 0 32rpx;
}
.info-list {
background: #fff;
display: flex;
align-content: center;
padding: 36rpx 0;
border-bottom: 1rpx solid #eee;
}
.info-lable {
width: 176rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 28rpx;
color: #2D2D33;
}
.require {
color: #EB4E4E;
}
.concer-content {
height: 170rpx;
overflow: auto;
}
textarea {
width: 475rpx !important;
}
.submit-btn {
width: 622rpx;
height: 80rpx;
background: #5850FF;
border-radius: 8rpx;
margin-top: 40rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
font-weight: 500;
font-family: PingFangSC-Medium;
line-height: 80rpx;
}
.contact-inline {
.contact-inline {
width: 50rpx;
width: 50rpx;
height: 50rpx;
height: 50rpx;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment