123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <template>
- <view style="background-color: #FFFFFF; width: auto;">
- <view style="height: 90vh;">
- <!-- 列选择器 -->
- <u-select v-model="choiceName" :list="choicelist" @confirm="confirm1"></u-select>
- <u-select v-model="relationship" :list="relationshipList" @confirm="confirm2"></u-select>
- <!-- 步骤条 -->
- <view class="steps">
- <u-steps :list="numList" :current="current"></u-steps>
- </view>
- <!-- 分隔 -->
- <u-gap height="30" bg-color="#f9f9f9"></u-gap>
- <!-- 宝贝信息 -->
- <view>
- <view>
- <!-- 标题 -->
- <view class="information-title">宝贝信息</view>
- <u-line color="#ededed" />
- <!-- 姓名 -->
- <uni-list :border="false">
- <uni-list-item :border="false" :clickable="true" @click="choiceName = true">
- <!-- 自定义左(header)右(footer)的内容 -->
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">绑定人</text>
- </view>
- <view slot="footer">
- <text style="font-size: 30rpx;">{{babyNmae}}</text>
- </view>
- </uni-list-item>
- <!-- 身份证 -->
- <uni-list-item :border="false">
- <!-- 自定义左(header)右(footer)的内容 -->
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">绑定人身份证</text>
- </view>
- <view slot="footer">
- <u-input v-model="babyID" type="idcard" :border="false" placeholder="请填写宝贝身份证" :clearable="false" input-align="right"
- height="50" />
- </view>
- </uni-list-item>
- <!-- 社保 -->
- <uni-list-item :border="false">
- <!-- 自定义左(header)右(footer)的内容 -->
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">绑定人是否有社保</text>
- </view>
- <view slot="footer">
- <u-radio-group v-model="guarantee" @change="radioGroupChange">
- <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
- {{item.name}}
- </u-radio>
- </u-radio-group>
- </view>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- <!-- 分隔 -->
- <u-gap height="30" bg-color="#f9f9f9"></u-gap>
- <!-- 监护人信息 -->
- <view>
- <view>
- <!-- 标题 -->
- <view class="information-title">监护人信息</view>
- <!-- 线条 -->
- <u-line color="#ededed" />
- <uni-list :border="false">
- <!-- 监护人姓名 -->
- <uni-list-item :border="false">
- <!-- 自定义左(header)右(footer)的内容 -->
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">监护人姓名</text>
- </view>
- <view slot="footer">
- <u-input v-model="guardianName" type="text" :border="false" placeholder="请填写您真实姓名" :clearable="false"
- input-align="right" height="50" />
- </view>
- </uni-list-item>
- <!-- 关系 -->
- <uni-list-item :border="false" :showArrow="true" :clickable="true" @click="relationship = true">
- <!-- 自定义左(header)右(footer)的内容 -->
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">与宝贝的关系</text>
- </view>
- <view slot="footer">
- <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view>
- <view style="color: #AAAAAA;" v-else>{{nRelationship}}</view>
- </view>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- </view>
- <!-- 按钮 -->
- <view class="information-button">
- <u-button shape="circle" type="primary" @click="next">下一步</u-button>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- //当前处于第几步
- current: 0,
- numList: [{
- name: '基本信息'
- }, {
- name: '确认订单'
- }, {
- name: '支付结果'
- }],
- list: [{
- name: '是',
- disabled: false
- },
- {
- name: '否',
- disabled: false
- }
- ],
- //控制列选择器
- choiceName: false,
- relationship: false,
- choicelist: [{
- value: '1',
- label: '测试1'
- },
- {
- value: '2',
- label: '测试2'
- }
- ],
- relationshipList: [{
- value: '1',
- label: '父母'
- },
- {
- value: '2',
- label: '祖父母'
- },
- {
- value: '3',
- label: '亲属'
- },
- {
- value: '4',
- label: '其他'
- }
- ],
- /**
- * 需要传的数据
- * 名字
- * 身份证
- * 社保 值为 是 否
- * 监护人姓名
- * */
- babyNmae: '测试',
- babyID: '',
- guarantee: '',
- guardianName: '',
- nRelationship: ''
- }
- },
- methods: {
- // 选中某个单选框时,由radio时触发
- radioChange(e) {
- console.log(e);
- },
- // 选中任一radio时,由radio-group触发
- radioGroupChange(e) {
- console.log(e);
- },
- confirm1(e) {
- this.babyNmae = e[0].label
- },
- confirm2(e) {
- this.nRelationship = e[0].label
- },
- //下一步
- next(e) {
- console.log(123123)
- uni.navigateTo({
- url: '/pages/order/payment'
- });
- }
- }
- }
- </script>
- <style>
- .steps {
- padding-top: 50rpx;
- padding-bottom: 30rpx;
- height: auto;
- }
- /* 信息标题 */
- .information-title {
- height: auto;
- width: auto;
- font-size: 36rpx;
- font-weight: 700;
- padding: 30rpx 0 20rpx 30rpx;
- }
- /* 星号 */
- .xinghao {
- width: 20px;
- height: 20px;
- display: inline-block;
- vertical-align: middle;
- text-align: center;
- line-height: 26px;
- font-size: 15px;
- color: #f00;
- }
- .information-button {
- height: 10vh;
- padding: 0 20rpx;
- }
- </style>
|