酒店桌布为微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

310 lines
6.3 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <view class="applyLaundryStore">
  3. <navbar title="申请水洗店" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="frame">
  5. <view class="title">
  6. <span
  7. style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
  8. <span>店铺信息</span>
  9. </view>
  10. <view class="shopName">
  11. <view>店铺名称</view>
  12. <view>
  13. <input v-model="form.name" placeholder="请输入店铺名称" clearable></input>
  14. </view>
  15. </view>
  16. <view class="shopName">
  17. <view>您的姓名</view>
  18. <view>
  19. <input v-model="form.userName" placeholder="请输入您的姓名" clearable></input>
  20. </view>
  21. </view>
  22. <view class="shopName">
  23. <view>联系方式</view>
  24. <view>
  25. <input v-model="form.phone" type="number" placeholder="请输入联系方式" clearable></input>
  26. </view>
  27. </view>
  28. <view class="currentRegion">
  29. <view>所在地区</view>
  30. <view>
  31. <input class="input" v-model="form.currentRegion" placeholder="请选择所在地区"></input>
  32. <view class="orientation" @click.stop="selectAddr">
  33. 定位
  34. <image src="../static/address/selectIcon.png"
  35. style="width:30rpx;height: 30rpx;margin:5rpx 5rpx 5rpx 5rpx;"></image>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="shopName">
  40. <view>详细地址</view>
  41. <view>
  42. <input v-model="form.address" placeholder="详细地址" clearable></input>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 底部按钮 -->
  47. <bottomBtn @confirm='submitApplication()' :color='bottomBtnStyle.color'
  48. :backgroundColor='bottomBtnStyle.backgroundColor' :fontSize='bottomBtnStyle.fontSize'
  49. :text='bottomBtnStyle.text' :width="bottomBtnStyle.width" :height="bottomBtnStyle.height"
  50. :borderRadius='bottomBtnStyle.borderRadius' :bottom='bottomBtnStyle.bottom'>
  51. </bottomBtn>
  52. </view>
  53. </template>
  54. <script>
  55. import Position from '@/utils/position.js'
  56. import bottomBtn from "../../components/bottom/bottomBtn.vue"
  57. export default {
  58. components: {
  59. bottomBtn,
  60. },
  61. data() {
  62. return {
  63. form: {
  64. userName: '',
  65. name: '',
  66. phone: '',
  67. currentRegion: '',
  68. address: '',
  69. latitude: '',
  70. longitude: '',
  71. },
  72. bottomBtnStyle: {
  73. color: '#FFF',
  74. backgroundColor: '#fd5100',
  75. fontSize: '34rpx',
  76. text: '提交',
  77. width: '400rpx',
  78. height: '80rpx',
  79. borderRadius: '100rpx',
  80. bottom: '40rpx'
  81. },
  82. }
  83. },
  84. computed: {
  85. },
  86. onShow() {
  87. },
  88. methods: {
  89. // 提交按钮
  90. submitApplication() {
  91. this.$api('applyShopHotel', this.form, res => {
  92. if (res.code == 200) {
  93. uni.showToast({
  94. title: '申请成功待审核', // 提示的内容
  95. icon: 'success', // 图标,可选值有 'success', 'loading', 'none'
  96. duration: 1500 // 提示的持续时间,默认是1500毫秒
  97. });
  98. setTimeout(()=>{
  99. uni.navigateTo({
  100. url:'/pages/index/center'
  101. })
  102. },1500)
  103. }
  104. })
  105. },
  106. //地图上选择地址
  107. selectAddr() {
  108. Position.getLocation(res => {
  109. Position.selectAddress(res.longitude, res.latitude, success => {
  110. this.setAddress(success)
  111. })
  112. })
  113. },
  114. //提取用户选择的地址信息复制给表单数据
  115. setAddress(res) {
  116. //经纬度信息
  117. this.form.latitude = res.latitude
  118. this.form.longitude = res.longitude
  119. if (!res.address && res.name) { //用户直接选择城市的逻辑
  120. return this.form.currentRegion = res.name
  121. }
  122. if (res.address || res.name) {
  123. return this.form.currentRegion = res.address + res.name
  124. }
  125. this.form.currentRegion = '' //用户啥都没选就点击勾选
  126. },
  127. }
  128. }
  129. </script>
  130. <style lang="scss" scoped>
  131. * {
  132. box-sizing: border-box;
  133. }
  134. .applyLaundryStore {
  135. padding: 0 20rpx 0 20rpx;
  136. background-color: #f5f5f5;
  137. .frame {
  138. display: flex;
  139. flex-direction: column;
  140. gap: 20rpx;
  141. background-color: #FFF;
  142. margin-top: 20rpx;
  143. padding: 20rpx;
  144. .title {
  145. display: flex;
  146. // padding-top: 40rpx;
  147. font-size: 34rpx;
  148. font-weight: 700;
  149. padding: 0 0 0 20rpx;
  150. >span:nth-of-type(1) {
  151. margin: 4rpx 0 0 8rpx;
  152. background-color: #FFF;
  153. }
  154. >span:nth-of-type(2) {
  155. margin: 0 0 0 8rpx;
  156. background-color: #FFF;
  157. }
  158. }
  159. .shopName {
  160. display: flex;
  161. align-items: center;
  162. background-color: #FFF;
  163. height: 80rpx;
  164. // margin: 10rpx 0 0 0;
  165. padding: 10rpx 0 0 20rpx;
  166. >view:nth-of-type(1) {
  167. width: 30%;
  168. // font-weight: 700;
  169. }
  170. >view:nth-of-type(2) {
  171. width: 70%;
  172. // padding: 0 20rpx 0 0;
  173. border-radius: 10rpx;
  174. overflow: hidden;
  175. input {
  176. background-color: #f5f5f5;
  177. // color: #a4a4a4;
  178. font-size: 28rpx;
  179. padding: 8rpx 8rpx 8rpx 15rpx;
  180. }
  181. }
  182. }
  183. .name {
  184. display: flex;
  185. align-items: center;
  186. background-color: #FFF;
  187. height: 80rpx;
  188. // margin: 10rpx 0 0 0;
  189. padding: 10rpx 0 0 20rpx;
  190. >view:nth-of-type(1) {
  191. width: 30%;
  192. font-weight: 700;
  193. }
  194. >view:nth-of-type(2) {
  195. width: 70%;
  196. padding: 0 20rpx 0 0;
  197. }
  198. }
  199. .phone {
  200. display: flex;
  201. align-items: center;
  202. background-color: #FFF;
  203. height: 80rpx;
  204. // margin: 10rpx 0 0 0;
  205. padding: 10rpx 0 0 20rpx;
  206. >view:nth-of-type(1) {
  207. width: 30%;
  208. font-weight: 700;
  209. }
  210. >view:nth-of-type(2) {
  211. width: 70%;
  212. padding: 0 20rpx 0 0;
  213. }
  214. }
  215. .currentRegion {
  216. display: flex;
  217. align-items: center;
  218. background-color: #FFF;
  219. height: 80rpx;
  220. // margin: 10rpx 0 0 0;
  221. padding: 10rpx 0 0 20rpx;
  222. >view:nth-of-type(1) {
  223. width: 30%;
  224. // font-weight: 700;
  225. }
  226. >view:nth-of-type(2) {
  227. width: 70%;
  228. padding: 0 20rpx 0 0;
  229. display: flex;
  230. .input {
  231. background-color: #f5f5f5;
  232. // color: #a4a4a4;
  233. font-size: 28rpx;
  234. padding: 8rpx 8rpx 8rpx 15rpx;
  235. width: 300rpx;
  236. }
  237. .orientation {
  238. display: flex;
  239. padding: 10rpx 10rpx 10rpx 20rpx;
  240. font-size: 30rpx;
  241. color: #FBAB32;
  242. }
  243. }
  244. }
  245. .detailedAddress {
  246. display: flex;
  247. align-items: center;
  248. background-color: #FFF;
  249. height: 80rpx;
  250. // margin: 10rpx 0 0 0;
  251. padding: 10rpx 0 0 20rpx;
  252. >view:nth-of-type(1) {
  253. width: 30%;
  254. font-weight: 700;
  255. }
  256. >view:nth-of-type(2) {
  257. width: 70%;
  258. padding: 0 20rpx 0 0;
  259. }
  260. }
  261. }
  262. }
  263. </style>