| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <template>
- <view class="container">
- <view class="box">
- <view class="body">
- <!-- 姓名区域 -->
- <view class="body_box">
- <view class="body_box_key">姓名</view>
- <view class="body_box_value">
- <input class="input" type="text" placeholder="请输入姓名" v-model="name" />
- </view>
- </view>
- <!-- 身份证号区域 -->
- <view class="body_box">
- <view class="body_box_key">身份证号</view>
- <view class="body_box_value">
- <input class="input" type="text" placeholder="请输入身份证号" v-model="identity" />
- </view>
- </view>
- <!-- 联系电话区域 -->
- <view class="body_box">
- <view class="body_box_key">联系电话</view>
- <view class="body_box_value">
- <input class="input" type="text" placeholder="请输入联系电话" v-model="phone" />
- </view>
- </view>
- </view>
- <view class="btn">确定</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // 姓名
- name: '',
- // 身份证号
- identity: '',
- // 电话
- phone: ''
- }
- },
- onLoad(options) {
- // console.log(options)
- if (options.type === '2') {
- // 编辑状态
- const info = JSON.parse(options.info)
- this.name = info.name
- this.identity = info.identity
- this.phone = info.phone
- uni.setNavigationBarTitle({
- title: '编辑旅客'
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- display: flex;
- flex-direction: column;
- height: 100vh;
- background-color: #f2f2f2;
- .box {
- margin-top: 20rpx;
- height: calc(100vh - 20rpx);
- background-color: #fff;
- .body {
- box-sizing: border-box;
- padding: 0 20rpx;
- height: calc(100vh - 236rpx);
- background-color: #fff;
- .body_box {
- display: flex;
- align-items: center;
- margin-top: 30rpx;
- height: 80rpx;
- .body_box_key {
- width: 152rpx;
- color: #808080;
- font-size: 28rpx;
- }
- .body_box_value {
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 0 28rpx;
- width: 559rpx;
- height: 80rpx;
- font-size: 28rpx;
- border-radius: 15rpx;
- background-color: #f2f2f2;
- .input {
- width: 100%;
- }
- }
- }
- }
- .btn {
- display: flex;
- justify-content: center;
- align-items: center;
- margin: 45rpx auto;
- width: 710rpx;
- height: 96rpx;
- font-size: 32rpx;
- border-radius: 64rpx;
- color: #fff;
- background-color: #096562;
- }
- }
- }
- </style>
|