|
@@ -0,0 +1,274 @@
|
|
|
+<template>
|
|
|
+ <div class="wrapper">
|
|
|
+ <img class="goods-cover" src="./image/header@2x.png" alt="">
|
|
|
+ <Flow></Flow>
|
|
|
+ <ul class="form-wrap">
|
|
|
+ <li>
|
|
|
+ <label>
|
|
|
+ <span class="label-name" v-for="(str, index) in '姓名:姓名'" :key="index">{{ str }}</span>
|
|
|
+ </label>
|
|
|
+ <div class="value-wrap">
|
|
|
+ <div class="name">
|
|
|
+ <input type="text" v-model.trim="postData.name">
|
|
|
+ </div>
|
|
|
+ <div class="gender">
|
|
|
+ <p v-for="(str, index) in ['男', '女']" :key="index" @click="postData.gender = index">
|
|
|
+ <img src="./image/btn_xingbie_sel@2x.png" alt="" v-show="postData.gender === index">
|
|
|
+ <img src="./image/btn_xingbie_nor@2x.png" alt="" v-show="postData.gender !== index">
|
|
|
+ <span>{{ str }}</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <label>
|
|
|
+ <span v-for="(str, index) in '手机号码:'" :key="index">{{ str }}</span>
|
|
|
+ </label>
|
|
|
+ <div class="value-wrap">
|
|
|
+ <input type="text" v-model.trim="postData.phone">
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <label>
|
|
|
+ <span v-for="(str, index) in '所在城市:'" :key="index">{{ str }}</span>
|
|
|
+ </label>
|
|
|
+ <div class="value-wrap">
|
|
|
+ <p class="address">{{ postData.province + postData.city}}</p>
|
|
|
+ <img src="./image/btn_next@2x.png" alt="">
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <label>
|
|
|
+ <span v-for="(str, index) in '房产地址:'" :key="index">{{ str }}</span>
|
|
|
+ </label>
|
|
|
+ <div class="value-wrap">
|
|
|
+ <textarea name="" rows="1" v-model.trim="postData.address" ref="myTextarea"></textarea>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <label>
|
|
|
+ <span v-for="(str, index) in '需求金额:'" :key="index">{{ str }}</span>
|
|
|
+ </label>
|
|
|
+ <div class="value-wrap">
|
|
|
+ <input type="text" v-model.trim="postData.amount">
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <button class="submit">提交</button>
|
|
|
+ <p class="explain">
|
|
|
+ <span>申请代表您同意</span>
|
|
|
+ <router-link :to="{path: '/privacy'}">《用户隐私协议》</router-link>
|
|
|
+ <span>和</span>
|
|
|
+ <router-link :to="{path: '/agreement'}">《服务协议》</router-link>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import Flow from './components/flow'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'apply',
|
|
|
+ components: {
|
|
|
+ Flow
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ postData: {
|
|
|
+ name: '',
|
|
|
+ gender: -1,
|
|
|
+ phone: '',
|
|
|
+ province: '',
|
|
|
+ city: '',
|
|
|
+ address: '',
|
|
|
+ amount: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async mounted () {
|
|
|
+ await this.$nextTick()
|
|
|
+ const textarea = this.$refs.myTextarea
|
|
|
+ if (textarea) {
|
|
|
+ this.handleTextarea(textarea)
|
|
|
+ textarea.addEventListener('input', this.handleTextarea(textarea, 1), false)
|
|
|
+ this.$once('hook:beforeDestroy', () => {
|
|
|
+ textarea.addEventListener('input', this.handleTextarea(textarea, 1), false)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleTextarea (el, auto) {
|
|
|
+ return () => {
|
|
|
+ if (auto) {
|
|
|
+ el.style.height = 'auto'
|
|
|
+ }
|
|
|
+ el.style.height = el.scrollHeight + 'px'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .wrapper {
|
|
|
+ position: relative;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ width: 100%;
|
|
|
+ min-height: 100vh;
|
|
|
+ padding: 110px 0 200px;
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .goods-cover {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ min-height: 147px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .form-wrap {
|
|
|
+ li {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ width: 327px;
|
|
|
+ padding: 13px 14px;
|
|
|
+ margin-top: 8px;
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
+ border-radius: 4px;
|
|
|
+
|
|
|
+ &:nth-of-type(1) {
|
|
|
+ margin-top: 37px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ label {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ span {
|
|
|
+ line-height: 22px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #333;
|
|
|
+
|
|
|
+ &.label-name:nth-of-type(4),
|
|
|
+ &.label-name:nth-of-type(5) {
|
|
|
+ visibility: hidden;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .value-wrap {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ margin-left: 9px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ input {
|
|
|
+ width: 100%;
|
|
|
+ padding-top: 2px;
|
|
|
+ line-height: 20px;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #333;
|
|
|
+ outline: 0 none;
|
|
|
+ -webkit-text-fill-color: #333;
|
|
|
+ opacity: 1;
|
|
|
+ background: transparent;
|
|
|
+
|
|
|
+ &::-webkit-input-placeholder {
|
|
|
+ color: #999;
|
|
|
+ -webkit-text-fill-color: #999;
|
|
|
+ opacity: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ textarea {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 20px;
|
|
|
+ padding-top: 2px;
|
|
|
+ line-height: 20px;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #333;
|
|
|
+ word-break: break-all;
|
|
|
+ resize: none;
|
|
|
+ outline: 0 none;
|
|
|
+ overflow: hidden;
|
|
|
+ background: transparent;
|
|
|
+ -webkit-text-fill-color: #333;
|
|
|
+ opacity: 1;
|
|
|
+
|
|
|
+ &::-webkit-input-placeholder {
|
|
|
+ color: #999;
|
|
|
+ -webkit-text-fill-color: #999;
|
|
|
+ opacity: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .address {
|
|
|
+ flex: 1;
|
|
|
+ line-height: 22px;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .gender {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ p {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ &:nth-of-type(2) {
|
|
|
+ margin-left: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ span {
|
|
|
+ margin-left: 4px;
|
|
|
+ line-height: 22px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .submit {
|
|
|
+ width: 327px;
|
|
|
+ height: 45px;
|
|
|
+ margin-top: 36px;
|
|
|
+ border-radius: 4px;
|
|
|
+ line-height: 20px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #fff;
|
|
|
+ background: linear-gradient(90deg, #E5C7A5 0%, #CFAA7F 100%);
|
|
|
+ box-shadow: 0 14px 9px -10px rgba(219, 208, 194, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ .explain {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 12px;
|
|
|
+
|
|
|
+ span,
|
|
|
+ a {
|
|
|
+ line-height: 17px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|