123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <template>
- <view class="box">
- <image class="image"
- src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404111712812810046B1fbafed9.png"
- lazy-load="true" mode="aspectFill" />
- <view class="function">
- <view class="cn-title">预约免费设计</view>
- <view class="en-title">Appointment Free Design</view>
- <view class="form">
- <view class="text">
- <view class="bg" />
- <view class="iconfont icon-renyuan-hui" />
- <input class="input" type="text" v-model="content.name" placeholder="请输入您的姓名">
- </view>
- <view class="text">
- <view class="bg" />
- <view class="iconfont icon-dianhua-hui" />
- <input class="input" type="number" v-model="content.phoneNumber" placeholder="请输入您的电话号码">
- </view>
- <picker mode='region' @change="getRegion">
- <view class="text">
- <view class="bg" />
- <view class="iconfont icon-dizhi-hui1" />
- <view style="color: #fff;" v-if="content.province">
- {{ this.getCity(content, false) }}
- </view>
- <view v-else style="opacity: .3;color: #fff;font-size: 14px;">
- 请选择城市
- </view>
- </view>
- </picker>
- <view class="text textarea-box">
- <view class="bg" />
- <view class="iconfont icon-dizhi-hui1" />
- <textarea class="textarea" v-model="content.address" placeholder="请输入您的具体地址(街道、楼号、门牌号等)" />
- </view>
- <view class="but" hover-class="navigator-hover" @click="submit">
- 立即免费预约 >
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "bottom1",
- props: {
- ownertable: {
- type: String
- },
- ownerid: {
- type: [String, Number]
- },
- type: {
- type: String
- },
- typemx: {
- type: String
- },
- extrajson: {
- type: Object
- }
- },
- data() {
- return {
- content: {
- name: "",
- phoneNumber: "",
- address: "",
- "province": "",
- "city": "",
- "county": "",
- }
- }
- },
- methods: {
- submit() {
- let content = this.content;
- content.ownertable = this.ownertable;
- content.ownerid = this.ownerid;
- content.type = this.type;
- content.typemx = this.typemx;
- content.extrajson = this.extrajson;
- this.$Http.basic({
- "id": 20240513144602,
- content
- }).then(res => {
- console.log("提交预约单", res)
- if (this.cutoff(res.msg)) return;
- uni.showModal({
- title: '提交成功',
- content: '感谢您的支持,工作人员会第一时间跟您联系!',
- showCancel: false,
- confirmColor: '#C30D23',
- })
- this.content = {
- name: "",
- phoneNumber: "",
- address: "",
- "province": "",
- "city": "",
- "county": "",
- };
- })
- },
- getRegion(e) {
- this.content.province = e.detail.value[0];
- this.content.city = e.detail.value[1];
- this.content.county = e.detail.value[2];
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .box {
- position: relative;
- width: 100vw;
- height: 436px;
- .image {
- width: 100%;
- height: 100%;
- display: block;
- vertical-align: bottom;
- }
- .function {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1;
- .cn-title {
- width: 100%;
- text-align: center;
- line-height: 22px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 16px;
- color: #FFFFFF;
- margin-top: 30px;
- }
- .en-title {
- width: 100%;
- text-align: center;
- font-family: PingFang SC, PingFang SC;
- font-size: 10px;
- color: #FFFFFF;
- }
- .form {
- width: 260px;
- margin: 0 auto;
- margin-top: 20px;
- .text {
- position: relative;
- display: flex;
- align-items: center;
- width: 260px;
- height: 45px;
- border: 1px solid rgba(255, 255, 255, 0.4);
- border-radius: 2px;
- overflow: hidden;
- padding: 0 10px;
- box-sizing: border-box;
- margin-bottom: 10px;
- .input {
- color: #fff;
- flex: 1;
- }
- .textarea {
- color: #fff;
- flex: 1;
- height: 62px;
- }
- .iconfont {
- color: #fff;
- font-size: 20px;
- margin-right: 10px;
- }
- }
- .textarea-box {
- padding-top: 13px;
- height: 90px;
- align-items: flex-start;
- }
- .text::after {
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: #fff;
- opacity: .2;
- }
- .but {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 260px;
- height: 45px;
- background: #C30D23;
- border-radius: 2px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 14px;
- color: #FFFFFF;
- }
- }
- }
- }
- </style>
|