<template> <view class="page"> <u-navbar title="新建门店" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37' title-size='36' height='40' id="navbar"> </u-navbar> <view class="one"> 门店名称:<input type="text" v-model="name" placeholder="输入门店名称" /> </view> <button @click="btnbc">保存</button> </view> </template> <script> export default { data() { return { bgc: { backgroundColor: "", }, name: '', latitude: '', longitude: '', dizhi: '' } }, onLoad() { }, methods: { btnbc() { let data = { storeId: null, name: this.name, contactName: "张111三", contactMobile: "18650502300", idcard: null, picture: null, address: "啊实打实", lng: "120.21671", lat: "27.32436", createTime: null, createBy: null, updateTime: null, updateBy: null, deleted: null, businessTimeStart: null, businessTimeEnd: null, province: "福建", city: "宁德市", county: "福鼎市", serverPhone: null, simpleAddress: null, merchantId: null, status: null, gateSn: null, managerId: null, managerName: null } this.$u.post(`/app/store`, data).then(res => { if (res.code == 200) { uni.showToast({ title: '成功', icon: 'success', duration:2000 }) setTimeout(()=>{ uni.navigateBack() },1000) } }) } } } </script> <style lang="scss"> page { background: #fff; } .one { width: 100%; height: 100rpx; padding-left: 50rpx; box-sizing: border-box; display: flex; border-bottom: 1px solid; line-height: 100rpx; input { height: 100rpx; line-height: 100rpx; } } </style>