酒店桌布为微信小程序
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.

336 lines
7.0 KiB

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