|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="container"> |
|
|
|
|
<page-meta :root-font-size="fontsize+'px'"></page-meta> <!--动态设置html字体大小--> |
|
|
|
|
<!-- <page-meta :root-font-size="fontsize+'px'"></page-meta> --> <!--动态设置html字体大小--> |
|
|
|
|
<view class="content_box"> |
|
|
|
|
<view class="top_box"> |
|
|
|
|
<view class="title_box"> |
|
|
|
|
@ -10,35 +10,6 @@ |
|
|
|
|
<p class="turn_item prev" @click="handlePrev" v-if="currentNum > 1">上一页</p> |
|
|
|
|
<p class="turn_item next" @click="handleNext" v-if="currentNum < orderNum">下一页</p> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="form_item"> |
|
|
|
|
<view class="img_box" @click="handlePrev"> |
|
|
|
|
<image src="../../../static/image/form.png" mode=""></image> |
|
|
|
|
<image src="../../../static/image/form_act.png" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_txt"> |
|
|
|
|
报名单{{currentNum}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line_box"></view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="img_box"> |
|
|
|
|
<image src="../../../static/image/form.png" mode=""></image> |
|
|
|
|
<image src="../../../static/image/form_act.png" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_txt"> |
|
|
|
|
报名单{{currentNum}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line_box"></view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="img_box"> |
|
|
|
|
<image src="../../../static/image/form.png" mode=""></image> |
|
|
|
|
<image src="../../../static/image/form_act.png" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_txt" @click="handleNext"> |
|
|
|
|
报名单{{currentNum}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="rele_content"> |
|
|
|
|
<view class="form_box"> |
|
|
|
|
@ -60,15 +31,15 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_content"> |
|
|
|
|
<uni-forms ref="valiForm" :rules="rules" :model="valiFormData" labelWidth="180px" |
|
|
|
|
<uni-forms ref="valiForm" :model="valiFormData" labelWidth="180px" validate-trigger="bind" |
|
|
|
|
label-position="top"> |
|
|
|
|
<uni-forms-item label="姓名" required name="username" :label-style="{'font-size':'40rpx'}"> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.username" |
|
|
|
|
placeholder="请输入姓名" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="手机" required name="phone"> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.phone" |
|
|
|
|
placeholder="请输入手机" /> |
|
|
|
|
<uni-forms-item label="手机" required name="phone"> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.phone" |
|
|
|
|
placeholder="请输入手机" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<!-- <uni-forms-item label="地址" required name="address"> |
|
|
|
|
<uni-data-picker v-model="valiFormData.city" :localdata="aCityData" popup-title="选择城市"> |
|
|
|
|
@ -106,8 +77,11 @@ |
|
|
|
|
<uni-forms-item label="颈肩宽度示意图"> |
|
|
|
|
<view class="wid_pre"> |
|
|
|
|
<img class="wid_img" :src="imgPrefix + 'jian.png'" alt=""> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.width" |
|
|
|
|
:localdata="widthData" /> |
|
|
|
|
<view class="img_tit"> |
|
|
|
|
颈肩宽度 |
|
|
|
|
</view> |
|
|
|
|
<!-- <uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.width" |
|
|
|
|
:localdata="widthData" /> --> |
|
|
|
|
</view> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="颈长"> |
|
|
|
|
@ -118,7 +92,10 @@ |
|
|
|
|
<uni-forms-item label="颈长示意图"> |
|
|
|
|
<view class="hei_pre"> |
|
|
|
|
<img class="hei_img" :src="imgPrefix + 'length.jpg'" alt=""> |
|
|
|
|
<uni-data-checkbox v-model="valiFormData.length" :localdata="lengthData" /> |
|
|
|
|
<view class="img_tit"> |
|
|
|
|
颈椎长度 |
|
|
|
|
</view> |
|
|
|
|
<!-- <uni-data-checkbox v-model="valiFormData.length" :localdata="lengthData" /> --> |
|
|
|
|
</view> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="年龄"> |
|
|
|
|
@ -179,13 +156,13 @@ |
|
|
|
|
<!-- <a href="#page_privacy_modal" data-toggle="modal">《隐私协议》</a> --> |
|
|
|
|
<span>提交即授权该表单收集你的填写信息</span> |
|
|
|
|
</view> |
|
|
|
|
<view class="mask_box" v-if="isShowCode"></view> |
|
|
|
|
<!-- <view class="mask_box" v-if="isShowCode"></view> --> |
|
|
|
|
<view class="phone_box" @click="clickPhone" v-if="widthScreen <= 500"> |
|
|
|
|
<uni-icons type="phone" size="30" color="#2eaadd"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
<view class="code_box" v-if="isShowCode"> |
|
|
|
|
<view class="code_box" v-if="isShowCode" > |
|
|
|
|
<span style="color: #333;font-size: 28rpx;margin-bottom: 12rpx;">扫码添加</span> |
|
|
|
|
<img class="code_img" :src="imgPrefix + 'add.png'" alt=""> |
|
|
|
|
<image :show-menu-by-longpress="true" class="code_img" :src="imgPrefix + 'add.png'" alt=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="link_box" v-if="widthScreen > 750" @click="isShowLink = !isShowLink"> |
|
|
|
|
<uni-icons type="phone" size="20" color="#2eaadd"></uni-icons> |
|
|
|
|
@ -268,13 +245,35 @@ |
|
|
|
|
rules: [{ |
|
|
|
|
required: true, |
|
|
|
|
errorMessage: '身高不能为空' |
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
validateFunction: function(rule, value, data, callback) { |
|
|
|
|
const moblie = /^(0{1}|[1-9]\d{0,3}|.{0})$/; |
|
|
|
|
if (!moblie.test(value)) { |
|
|
|
|
callback('请填写正确的身高'); |
|
|
|
|
} else { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
weight: { |
|
|
|
|
rules: [{ |
|
|
|
|
required: true, |
|
|
|
|
errorMessage: '体重不能为空' |
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
validateFunction: function(rule, value, data, callback) { |
|
|
|
|
const moblie = /^(0(\.\d{1}){0,1}|[1-8]\d{1,3}(\.\d{1}){0,1}|9\d{1,2}(\.\d{1}){0,1}|999(\.0){0,1}|.{0})$/; |
|
|
|
|
if (!moblie.test(value)) { |
|
|
|
|
callback('请填写正确的体重'); |
|
|
|
|
} else { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
pillowHardness: { |
|
|
|
|
rules: [{ |
|
|
|
|
@ -398,6 +397,9 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onShow() {}, |
|
|
|
|
onReady(){ |
|
|
|
|
this.$refs.valiForm.setRules(this.rules) |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
// let srceenNunber=15; //因设计图是1920所有把设计图分为19.2份,所以html字体大小为100px |
|
|
|
|
let that = this; |
|
|
|
|
@ -430,7 +432,7 @@ |
|
|
|
|
this.orderNo = options.orderNo |
|
|
|
|
this.orderNum = options.orderNum |
|
|
|
|
this.pageFrom = options.pageFrom |
|
|
|
|
this.valiFormData.phone = JSON.parse(uni.getStorageSync('userInfo')).phone ; |
|
|
|
|
|
|
|
|
|
// if(options.pageFrom == 'order'){ |
|
|
|
|
// this.phoneNumber = options.phone |
|
|
|
|
// // this.getInfo() |
|
|
|
|
@ -439,6 +441,30 @@ |
|
|
|
|
// this.getCurrentArea('北京市') |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//长按识别二维码 |
|
|
|
|
previewImage(e) { |
|
|
|
|
console.log(e) |
|
|
|
|
uni.previewImage({ |
|
|
|
|
// 需要预览的图片链接列表。若无需预览,可以注释urls |
|
|
|
|
urls: 'http://47.104.224.41:9000/etriphome/appresource/image/add.png', |
|
|
|
|
// 为当前显示图片的链接/索引值 |
|
|
|
|
current: 'http://47.104.224.41:9000/etriphome/appresource/image/add.png', |
|
|
|
|
// 图片指示器样式 |
|
|
|
|
indicator: 'default', |
|
|
|
|
// 是否可循环预览 |
|
|
|
|
loop: false, |
|
|
|
|
// 长按图片显示操作菜单,如不填默认为保存相册 |
|
|
|
|
longPressActions: { |
|
|
|
|
// itemList: [this.l('发送给朋友'), this.l] |
|
|
|
|
}, |
|
|
|
|
success: res => { |
|
|
|
|
console.log('previewImage res', res); |
|
|
|
|
}, |
|
|
|
|
fail: err => { |
|
|
|
|
console.log('previewImage err', err); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 根据订单号获取已填写的订单信息 |
|
|
|
|
getOrderInfo(type) { |
|
|
|
|
uni.request({ |
|
|
|
|
@ -452,6 +478,25 @@ |
|
|
|
|
console.log(res) |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.orderData = res.data.data; |
|
|
|
|
if(this.orderData.length == 0){ |
|
|
|
|
this.valiFormData = { |
|
|
|
|
phone:JSON.parse(uni.getStorageSync('userInfo')).phone, |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.valiFormData = this.orderData[this.orderData.length - 1] |
|
|
|
|
this.valiFormData.neckShoulderWidth = this.valiFormData |
|
|
|
|
.neckShoulderWidth == -1 ? '' : this.valiFormData.neckShoulderWidth; |
|
|
|
|
this.valiFormData.neckLength = this.valiFormData.neckLength == -1 ? '' : |
|
|
|
|
this.valiFormData.neckLength; |
|
|
|
|
this.valiFormData.ageRange = this.valiFormData.ageRange == -1 ? '' : this |
|
|
|
|
.valiFormData.ageRange; |
|
|
|
|
this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' : |
|
|
|
|
this.valiFormData.sleepLength; |
|
|
|
|
this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra == |
|
|
|
|
-1 ? '' : this.valiFormData.cervicalVertebra; |
|
|
|
|
this.valiFormData.otherNeed = this.valiFormData.otherNeed == -1 ? '' : this |
|
|
|
|
.valiFormData.otherNeed; |
|
|
|
|
} |
|
|
|
|
if (type == 'save') { |
|
|
|
|
if (this.orderData.length == this.orderNum) { |
|
|
|
|
if (this.pageFrom == 'order') { |
|
|
|
|
@ -896,16 +941,24 @@ |
|
|
|
|
.content_box { |
|
|
|
|
width: 690rpx; |
|
|
|
|
/* max-width: 700px; */ |
|
|
|
|
height: 80%; |
|
|
|
|
height: 71%; |
|
|
|
|
overflow: auto; |
|
|
|
|
background-color: #fff; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
margin-top: 2%; |
|
|
|
|
border-radius: 24rpx; |
|
|
|
|
padding: 30rpx 0; |
|
|
|
|
padding-top: 180rpx; |
|
|
|
|
|
|
|
|
|
.top_box { |
|
|
|
|
width: 690rpx; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
position: absolute; |
|
|
|
|
top: 16rpx; |
|
|
|
|
z-index: 100; |
|
|
|
|
background: #fff; |
|
|
|
|
border-radius: 24rpx 24rpx 0 0; |
|
|
|
|
padding-top: 20rpx; |
|
|
|
|
// background: #fff; |
|
|
|
|
// display: flex; |
|
|
|
|
// align-items: center; |
|
|
|
|
@ -977,10 +1030,10 @@ |
|
|
|
|
|
|
|
|
|
.rele_content { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 80%; |
|
|
|
|
height: 100%; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
position: relative; |
|
|
|
|
overflow: auto; |
|
|
|
|
// overflow: auto; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -994,6 +1047,7 @@ |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
background: #fff |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1037,6 +1091,7 @@ |
|
|
|
|
|
|
|
|
|
.code_img { |
|
|
|
|
width: 200rpx; |
|
|
|
|
height: 200rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1175,9 +1230,22 @@ |
|
|
|
|
|
|
|
|
|
.wid_img { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 316rpx; |
|
|
|
|
border-top-left-radius: 16rpx; |
|
|
|
|
border-top-right-radius: 16rpx; |
|
|
|
|
} |
|
|
|
|
.img_tit{ |
|
|
|
|
width: 306rpx; |
|
|
|
|
height: 94rpx; |
|
|
|
|
background: #fff; |
|
|
|
|
border-radius: 0 0 16rpx 16rpx; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
color: #333; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
border: 1px solid #eaeaea; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
::v-deep.checklist-box { |
|
|
|
|
width: 306rpx; |
|
|
|
|
@ -1197,9 +1265,22 @@ |
|
|
|
|
|
|
|
|
|
.hei_img { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 316rpx; |
|
|
|
|
border-top-left-radius: 16rpx; |
|
|
|
|
border-top-right-radius: 16rpx; |
|
|
|
|
} |
|
|
|
|
.img_tit{ |
|
|
|
|
width: 306rpx; |
|
|
|
|
height: 94rpx; |
|
|
|
|
background: #fff; |
|
|
|
|
border-radius: 0 0 16rpx 16rpx; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
color: #333; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
border: 1px solid #eaeaea; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
::v-deep.checklist-box { |
|
|
|
|
width: 306rpx; |
|
|
|
|
@ -1307,6 +1388,7 @@ |
|
|
|
|
|
|
|
|
|
.code_img { |
|
|
|
|
width: 200rpx; |
|
|
|
|
height: 200rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|