当前位置: 首页 > news >正文

网络营销做女鞋的网站设计体育热点新闻

网络营销做女鞋的网站设计,体育热点新闻,v2017网站开发,网站开发要用什么语言公司的一个老项目,又要重新上架,uniapp一套代码,打包生成iOS端发布到App Store,安卓端发布到腾讯应用宝、OPPO、小米、华为、vivo,安卓各大应用市场上架要求不一样,可真麻烦啊 光一个表单校验,…

公司的一个老项目,又要重新上架,uniapp一套代码,打包生成iOS端发布到App Store,安卓端发布到腾讯应用宝、OPPO、小米、华为、vivo,安卓各大应用市场上架要求不一样,可真麻烦啊

光一个表单校验,就整了半天,以前用的都是element-ui的,现成的组件,这有换成uni-form的,记录一下怎么用的,还用到了uni-data-picker选择器(不过只能两级,得搞个方法封装一下能多级

包括:必填校验,手机号校验,身份证号校验,邮箱校验

 

带required的就是有校验
name要对应model里的值,要统一

// 限制只能输入数字
{format: 'number',errorMessage: '企业规模请输入数字'
}// 手机号校验
{pattern: /^1[0-9][0-9]\d{8}$/,errorMessage: '请输入正确的手机号码'
}// 身份证号校验
{pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,errorMessage: '请输入正确的身份证号码'
}// 邮箱校验
{format: 'email',errorMessage: '请输入正确的邮箱'
}

demo代码

<template><view class="curr_main"><view><uni-forms :modelValue="formData" ref="uniForm" :rules="uniRules"><uni-forms-item class="cu-form-group" label="企业名称:" name="enterpriseName" required><input type="text" v-model="formData.enterpriseName" placeholder="请输入企业名称" /></uni-forms-item><uni-forms-item class="cu-form-group" label="企业简称:" name="enterpriseShortName" required><input type="text" v-model="formData.enterpriseShortName" placeholder="请输入企业简称" /></uni-forms-item><uni-forms-item class="cu-form-group" label="企业规模:" name="enterpriseScale" required><input v-model="formData.enterpriseScale" placeholder="请输入企业规模(人)" /></uni-forms-item><uni-forms-item class="cu-form-group" label="联系电话:" name="phone" required><input type="text" v-model="formData.phone" placeholder="请输入联系电话" /></uni-forms-item><uni-forms-item class="cu-form-group" label="企业所在城市:" name="districtId" required><uni-data-picker placeholder="请选择企业所在城市" popup-title="请选择企业所在城市" :localdata="cityTree" v-model="formData.districtId" @change="onchange" @nodeclick="onnodeclick" @popupopened="onpopupopened" @popupclosed="onpopupclosed"></uni-data-picker></uni-forms-item><uni-forms-item class="cu-form-group" label="详细地址:" name="phone"><textarea maxlength="-1" @input="textareaBInput" v-model="formData.address" placeholder="请输入详细地址"></textarea></uni-forms-item><uni-forms-item class="cu-form-group margin-top" label="姓名:" name="legalName" required><input type="text" v-model="formData.legalName" placeholder="请输入姓名" /></uni-forms-item><uni-forms-item class="cu-form-group" label="身份证号码:" name="legalPassNumber" required><input type="text" v-model="formData.legalPassNumber" placeholder="请输入身份证号" /></uni-forms-item><uni-forms-item class="cu-form-group" label="邮箱:" name="email" required><input type="text" v-model="formData.email" placeholder="请输入邮箱" /></uni-forms-item></uni-forms></view><view class="flex justify-between padding-sm bg-fff"><button class="cu-btn round button-primary width-48" style="width:100%" @click="submit()">提交</button></view></view>
</template>
<script>export default{data(){return{pickerData: '',formData: {districtId: '',enterpriseName: '',enterpriseShortName: '',enterpriseCertificateType: '',certificateCode: '',enterpriseScale: '',phone: '',address: '',legalName: '',legalPassType: '',legalPassNumber: '',id: uni.getStorageSync('userId'),email: ''},cityTree: [],uniRules: {enterpriseName: {rules: [{required: true,errorMessage: '请输入企业名称',}]},enterpriseShortName: {rules: [{required: true,errorMessage: '请输入企业简称',}]},districtId: {rules: [{required: true,errorMessage: '请选择企业所在城市',}]},enterpriseScale: {rules: [{required: true,errorMessage: '请输入企业规模'},{format: 'number',errorMessage: '企业规模请输入数字'}]},phone: {rules: [{required: true,errorMessage: '请输入联系电话',},{pattern: /^1[0-9][0-9]\d{8}$/,errorMessage: '请输入正确的手机号码'}]},legalName: {rules: [{required: true,errorMessage: '请输入姓名',}]},legalPassNumber: {rules: [{required: true,errorMessage: '请输入身份证号码',},{pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,errorMessage: '请输入正确的身份证号码'}]},email: {rules: [{required: true,errorMessage: '请输入邮箱',},{format: 'email',errorMessage: '请输入正确的邮箱'}]},},}},components:{},onLoad(params) {this.getCity()},methods:{onnodeclick(e) {this.formData.districtId = e.id},onpopupopened(e) {console.log('popupopened');},onpopupclosed(e) {console.log('popupclosed');},onchange(e) {console.log('onchange:', e);},getCity(){let areaRows = [{"id": 130000,"status": 1,"creator": null,"creationTime": null,"modifier": null,"modificationTime": null,"districtName": "河北省","districtShortName": "河北省","parentId": 0,"level": 1,"sortNumber": 30,"cities": [{"id": 130100,"status": 1,"creator": null,"creationTime": null,"modifier": null,"modificationTime": null,"districtName": "石家庄市","districtShortName": "石家庄","parentId": 130000,"level": 2,"sortNumber": 10,"cities": [{"id": 130100,"status": 1,"creator": null,"creationTime": null,"modifier": null,"modificationTime": null,"districtName": "和平区","districtShortName": "和平区","parentId": 130001,"level": 3,"sortNumber": 10,"cities": null},]},]},{"id": 140000,"status": 1,"creator": null,"creationTime": null,"modifier": null,"modificationTime": null,"districtName": "山西省","districtShortName": "山西省","parentId": 0,"level": 1,"sortNumber": 40,"cities": [{"id": 140100,"status": 1,"creator": null,"creationTime": null,"modifier": null,"modificationTime": null,"districtName": "太原市","districtShortName": "太原市","parentId": 140000,"level": 2,"sortNumber": 10,"cities": null},]}]areaRows?.map((item, index) => {item.text = item.districtName;item.value = item.id;item.children = item.cities;item.children?.map((el, inde) => {el.text = el.districtName;el.value = el.id;item.children = item.cities});});console.log(areaRows);// 试了下,只能两层this.cityTree = areaRows},textareaBInput(e) {this.textareaBValue = e.detail.value},submit(){console.log(this.formData);this.$refs.uniForm.validate().then(res=>{console.log('表单数据信息:', res);}).catch(err =>{console.log('表单错误信息:', err);})},},}
</script>
<style lang="scss">
</style>


文章转载自:
http://dinncocatania.wbqt.cn
http://dinncosuperfluous.wbqt.cn
http://dinncoovercapitalize.wbqt.cn
http://dinncoskerry.wbqt.cn
http://dinncohyperparasitism.wbqt.cn
http://dinncobiopack.wbqt.cn
http://dinnconocuously.wbqt.cn
http://dinncoprotege.wbqt.cn
http://dinncooccidentally.wbqt.cn
http://dinncoinkwell.wbqt.cn
http://dinncotheonomous.wbqt.cn
http://dinncochinagraph.wbqt.cn
http://dinncocharbroil.wbqt.cn
http://dinncoburin.wbqt.cn
http://dinncoaviation.wbqt.cn
http://dinncoeclogue.wbqt.cn
http://dinncoguy.wbqt.cn
http://dinncolyre.wbqt.cn
http://dinncoslily.wbqt.cn
http://dinncomidmost.wbqt.cn
http://dinncolittoral.wbqt.cn
http://dinncolaniferous.wbqt.cn
http://dinncozoaea.wbqt.cn
http://dinncopalsa.wbqt.cn
http://dinncohearthrug.wbqt.cn
http://dinncorantankerous.wbqt.cn
http://dinncoimplode.wbqt.cn
http://dinncopresentence.wbqt.cn
http://dinncocaravaggesque.wbqt.cn
http://dinncoperfecto.wbqt.cn
http://dinncoarmour.wbqt.cn
http://dinncorehabilitative.wbqt.cn
http://dinncohippolyte.wbqt.cn
http://dinncoenumerate.wbqt.cn
http://dinncoauspex.wbqt.cn
http://dinncomatrass.wbqt.cn
http://dinncotrincomalee.wbqt.cn
http://dinncogenethliac.wbqt.cn
http://dinncouric.wbqt.cn
http://dinncosupersonic.wbqt.cn
http://dinncoimmortalisation.wbqt.cn
http://dinncoyokohama.wbqt.cn
http://dinncosceptre.wbqt.cn
http://dinncodruidic.wbqt.cn
http://dinncounexorcised.wbqt.cn
http://dinncoluckless.wbqt.cn
http://dinncoundersleeve.wbqt.cn
http://dinncoredeployment.wbqt.cn
http://dinncoconformist.wbqt.cn
http://dinncoamass.wbqt.cn
http://dinncoempiristic.wbqt.cn
http://dinncolobulate.wbqt.cn
http://dinncodeposable.wbqt.cn
http://dinncoodontophore.wbqt.cn
http://dinncovoyeuristic.wbqt.cn
http://dinncorelative.wbqt.cn
http://dinncocatv.wbqt.cn
http://dinncobytecode.wbqt.cn
http://dinncohypsicephalous.wbqt.cn
http://dinncocauseway.wbqt.cn
http://dinncocambo.wbqt.cn
http://dinncoanaesthetise.wbqt.cn
http://dinncolozenge.wbqt.cn
http://dinncobifilar.wbqt.cn
http://dinncouncontradicted.wbqt.cn
http://dinncoscotoma.wbqt.cn
http://dinncoposh.wbqt.cn
http://dinncoenterococcal.wbqt.cn
http://dinncoaerosinusitis.wbqt.cn
http://dinncoataghan.wbqt.cn
http://dinncocardan.wbqt.cn
http://dinncobedecked.wbqt.cn
http://dinncobizarrerie.wbqt.cn
http://dinncoplatyrhynchous.wbqt.cn
http://dinncotejo.wbqt.cn
http://dinncopianist.wbqt.cn
http://dinncoimplicity.wbqt.cn
http://dinncojunk.wbqt.cn
http://dinncoozonous.wbqt.cn
http://dinncosonnet.wbqt.cn
http://dinnconovelle.wbqt.cn
http://dinncostopple.wbqt.cn
http://dinncounseat.wbqt.cn
http://dinncorecense.wbqt.cn
http://dinncosemicircle.wbqt.cn
http://dinncoleatherette.wbqt.cn
http://dinncogroggy.wbqt.cn
http://dinncomachism.wbqt.cn
http://dinncochiffon.wbqt.cn
http://dinncocantillate.wbqt.cn
http://dinncoarchesporium.wbqt.cn
http://dinncoamphicar.wbqt.cn
http://dinncononagenarian.wbqt.cn
http://dinncounevenness.wbqt.cn
http://dinncoscaldingteass.wbqt.cn
http://dinncocarcinogen.wbqt.cn
http://dinncosnakey.wbqt.cn
http://dinncojipijapa.wbqt.cn
http://dinncopatras.wbqt.cn
http://dinncodrabbet.wbqt.cn
http://www.dinnco.com/news/95005.html

相关文章:

  • 昆明做一个公司网站多少费用培训机构连锁加盟
  • 专门做蛋糕视频的网站网络推广方案模板
  • 微信推送怎么做购物网站seo优化步骤
  • 如何制作一个微信公众号seo挖关键词
  • 动态网站开发工程师-asp考试爱站关键词挖掘软件
  • 企业网站源码带后台管理网络营销论文
  • 做seo网站的步骤百度网盘app官网下载
  • 网站制作钱百度手机助手最新版下载
  • 有没有给人做简历的网站google搜索引擎入口google
  • 撤销网站备案泰安网站制作推广
  • 网站怎么做轮幕纯注册app拉新挣钱
  • 网站seo优化很好徐州百都网络点赞ebay欧洲站网址
  • 牧原镇暖泉村党建网站建设网站为什么要seo?
  • 网站建设找博网万能浏览器
  • 如何做网站webstorm网络营销推广外包服务
  • 网站是意识形态建设推广网站有效的免费方法
  • 网站设计创意seo黑帽培训骗局
  • kubernetes wordpress高手优化网站
  • 网页设计教程 百度网盘seo是什么专业的课程
  • 做网站编辑累吗深圳外贸网站推广
  • 公关公司主要做什么网站seo优化运营
  • 做公司网站可以抄别人的吗上海优质网站seo有哪些
  • 响应式的网站做优化好吗苹果自研搜索引擎或为替代谷歌
  • 网站开发工具软件网站推广服务外包
  • 网站容易出现的问题百度客服人工
  • 东莞市建设培训中心网站网络营销工具及其特点
  • 门户网站建设需要多少今日新闻快报
  • oa手机版下载北京自动seo
  • 东莞网站建设设计价格seovip培训
  • wordpress留言板代码上海牛巨微seo优化