| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <template>
- <view id="myApp">
- <view class="header">
- <img src="@/static/img/index-bg.png" >
- </view>
- <view class="information" v-if="type == 1">
- <form name="myform">
- <view class="input">
- <view class="img">
- <img src="@/static/img/icon-2.png" >
- </view>
- <input type="text" v-model="name" placeholder="请输入会员姓名" />
- </view>
- <view class="input">
- <view class="img">
- <img src="@/static/img/icon-1.png" >
- </view>
- <input type="text" v-model="idcard" placeholder="请输入会员身份证号" />
- </view>
- <view class="button" @click="submit">
- 立即查询
- </view>
- </form>
- </view>
- <view class="information" v-else>
- <form name="myform">
- <view class="input">
- <view class="img">
- <img src="@/static/img/icon-2.png" >
- </view>
- <input type="text" v-model="name" placeholder="请输入企业名称" />
- </view>
- <view class="button" @click="submit">
- 立即查询
- </view>
- </form>
- </view>
- </view>
- </template>
- <script>
- import { query } from '../../api/apply.js'
- export default {
- data() {
- return {
- name: '',
- idcard: '',
- type: ''
- }
- },
- onLoad(options) {
- this.type = options.type
- },
- methods: {
- submit() {
- const data = this.type ==1 ? { name: this.name, idcard: this.idcard }: { name: this.name }
- query(data,this.type).then(res => {
- console.log(res)
- }).catch(res => {
- console.log(res)
- })
- }
- }
- }
- </script>
- <style>
- body {
- margin: 0;
- background-color: #f3f3f3;
- }
- .header img{
- width: 100%;
- }
- .information {
- padding: 10px 0;
- background-color: #fff;
- width: 95%;
- margin: 15px auto;
- border-radius: 10px;
- }
- .information .input{
- padding: 10px;
- padding-bottom: 10px;
- padding-top: 30px;
- margin: auto auto;
- text-align: center;
- width: 90%;
- border-bottom: solid 1px #d8d8d8;
- display: flex;
- }
- .information .input .img{
- width: 30px;
- margin: auto 0;
- margin-right: 5px;
- }
- .information .input .img img{
- height: 20px;
- margin: auto 0;
- }
- .information .input input{
- text-align: left;
- font-size: 15px;
- width: 90%;
- border: 0;
- height: 20px;
- padding-bottom: 0;
- }
- .button {
- margin: 30px auto;
- text-align: center;
- font-size: 15px;
- color: #fff;
- background-color: #3b66f5;
- border-radius: 30px;
- padding: 10px;
- width: 70%;
- }
- </style>
|