auth.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <view style="background-color: #FFFFFF;min-height: 100vh;">
  3. <view class="flex justify-between " style="padding: 30rpx;box-sizing: border-box;">
  4. <view class="" style="font-size: 38rpx;">
  5. <text class="text-bold text-black">您要申请的小区</text>
  6. </view>
  7. <view class="text-red" style="padding-top: 12rpx;">
  8. <text style="font-size: 38rpx;">{{totalStep-1}}</text>
  9. <text class="text-df">/{{totalStep}}</text>
  10. </view>
  11. </view>
  12. <view class="padding-top-30 cu-list menu">
  13. <view @click="jump(0)" class="cu-item arrow">
  14. <view class="content">
  15. <image style="width: 50rpx; height: 50rpx;margin: 0 20rpx 4rpx 0;"
  16. src="/static/common/city2.png" class="png" mode="aspectFit"></image>
  17. <text class="text-black text-bold">城市</text>
  18. </view>
  19. <view class="action">
  20. <text class="text-grey text-df">
  21. {{$isEmpty(city_county_name)?'请选择城市':city_county_name}}
  22. </text>
  23. </view>
  24. </view>
  25. <view @click="jump(1)" class="cu-item arrow">
  26. <view class="content">
  27. <image style="width: 50rpx; height: 50rpx;margin: 0 20rpx 0rpx 0;"
  28. src="/static/common/xiaoqu.png" class="png" mode="aspectFit"></image>
  29. <text class="text-black text-bold">小区</text>
  30. </view>
  31. <view class="action">
  32. <text class="text-grey text-df">
  33. {{$isEmpty(data.residential_name)?'请选择小区':data.residential_name}}
  34. </text>
  35. </view>
  36. </view>
  37. <view @click="jump(2)" class="cu-item arrow">
  38. <view class="content">
  39. <image style="width: 50rpx; height: 50rpx;margin: 0 20rpx 10rpx 0;"
  40. src="/static/common/loudong.png" class="png" mode="aspectFit"></image>
  41. <text class="text-black text-bold">楼栋</text>
  42. </view>
  43. <view class="action">
  44. <text class="text-grey text-df">
  45. {{$isEmpty(data.building_name)?'请选择楼栋':data.building_name}}
  46. </text>
  47. </view>
  48. </view>
  49. <view @click="jump(3)" class="cu-item arrow">
  50. <view class="content">
  51. <image style="width: 36rpx; height: 36rpx;margin: 0 24rpx 10rpx 10rpx;"
  52. src="/static/common/unit.png" class="png" mode="aspectFit"></image>
  53. <text class="text-black text-bold">单元</text>
  54. </view>
  55. <view class="action">
  56. <text class="text-grey text-df">
  57. {{$isEmpty(data.unit_name)?'请选择楼栋':data.unit_name}}
  58. </text>
  59. </view>
  60. </view>
  61. <view @click="jump(4)" class="cu-item arrow">
  62. <view class="content">
  63. <image style="width: 50rpx; height: 50rpx;margin: 0 20rpx 10rpx 0;"
  64. src="/static/common/fangjian.png" class="png" mode="aspectFit"></image>
  65. <text class="text-black text-bold">门牌号</text>
  66. </view>
  67. <view class="action">
  68. <text class="text-grey text-df">
  69. {{$isEmpty(data.room_name)?'请选择门牌号':data.room_name}}
  70. </text>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="footer-fixed" @click="next">
  75. <view class="cu-btn flex text-lg bg-red-btn" style="padding: 46rpx 0;">
  76. 下一步
  77. </view>
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. var app = getApp()
  83. export default {
  84. data() {
  85. return {
  86. totalStep: 3,
  87. //小区id
  88. residential_id: '',
  89. //楼栋id
  90. unit_id: '',
  91. data: {
  92. //小区
  93. residential_name: "",
  94. //楼栋
  95. building_name: '',
  96. //楼栋id
  97. building_id: '',
  98. //单元
  99. unit_name: "",
  100. //房间名
  101. room_name: "",
  102. //房间id
  103. room_id: "",
  104. },
  105. //城市
  106. city_county_name: ''
  107. }
  108. },
  109. onShow() {
  110. if (this.$isEmpty(app.globalData.totalStep)) {
  111. this.totalStep = 2
  112. } else {
  113. this.totalStep = app.globalData.totalStep
  114. }
  115. this.residential_id = app.globalData.residentialId || ''
  116. this.unit_id = app.globalData.unitId || ''
  117. },
  118. onLoad(options) {
  119. if (!this.$isEmpty(options)) {
  120. //页面数据
  121. this.city_county_name = app.globalData.city + app.globalData.county
  122. this.data.room_id = options.room_id
  123. this.data.room_name = options.room_name
  124. this.data.residential_name = options.residential_name
  125. this.data.building_name = options.building_name
  126. this.data.building_id = options.building_id
  127. this.data.unit_name = options.unit_name
  128. }
  129. },
  130. methods: {
  131. jump(type) {
  132. let that = this
  133. if (type == 0) {
  134. //选择城市
  135. let params = {
  136. city: app.globalData.city,
  137. county: app.globalData.county,
  138. currentCityCode: app.globalData.currentCityCode
  139. }
  140. uni.navigateTo({
  141. url: "../choosePlot/choosePlot" + this.$u.queryParams(params)
  142. })
  143. return
  144. }
  145. //未选择城市
  146. if (this.$isEmpty(this.city_county_name)) {
  147. uni.showToast({
  148. title: "请选择城市",
  149. icon: "none"
  150. })
  151. return
  152. }
  153. if (type == 1) {
  154. //选择小区
  155. let params = {
  156. city: app.globalData.city,
  157. county: app.globalData.county,
  158. currentCityCode: app.globalData.currentCityCode
  159. }
  160. uni.navigateTo({
  161. url: "../choosePlot/choosePlot" + this.$u.queryParams(params)
  162. })
  163. return
  164. }
  165. //未选择小区
  166. if (this.$isEmpty(this.data.residential_name)) {
  167. uni.showToast({
  168. title: "请选择小区",
  169. icon: "none"
  170. })
  171. return
  172. }
  173. if (type == 2) {
  174. //选择楼栋
  175. let params = {
  176. residential_id: this.residential_id,
  177. residential_name: this.data.residential_name
  178. }
  179. uni.navigateTo({
  180. url: "../choosePlot/chooseBuilding/chooseBuilding" + this.$u.queryParams(params)
  181. })
  182. return
  183. }
  184. //未选择楼栋
  185. if (this.$isEmpty(this.data.building_name)) {
  186. uni.showToast({
  187. title: "请选择楼栋",
  188. icon: "none"
  189. })
  190. return
  191. }
  192. if (type == 3) {
  193. //选择单元
  194. let params = {
  195. residential_name: this.data.residential_name,
  196. building_id: this.data.building_id,
  197. building_name: this.data.building_name
  198. }
  199. uni.navigateTo({
  200. url: "../choosePlot/chooseUnit/chooseUnit" + this.$u.queryParams(params)
  201. })
  202. }
  203. if (type == 4) {
  204. //选择房间
  205. let params = {
  206. residential_name: this.data.residential_name,
  207. building_name: this.data.building_name,
  208. building_id: this.data.building_id,
  209. unit_name: this.data.unit_name,
  210. unit_id: this.unit_id
  211. }
  212. uni.navigateTo({
  213. url: "/pages/choosePlot/chooseRoom/chooseRoom" + this.$u.queryParams(params)
  214. })
  215. }
  216. },
  217. next() {
  218. if (this.$isEmpty(this.city_county_name)) {
  219. uni.showToast({
  220. title: "请选择城市",
  221. icon: "none"
  222. })
  223. return
  224. }
  225. if (this.$isEmpty(this.data.residential_name)) {
  226. uni.showToast({
  227. title: "请选择小区",
  228. icon: "none"
  229. })
  230. return
  231. }
  232. if (this.$isEmpty(this.data.building_name)) {
  233. uni.showToast({
  234. title: "请选择楼栋",
  235. icon: "none"
  236. })
  237. return
  238. }
  239. if (this.$isEmpty(this.data.unit_name)) {
  240. uni.showToast({
  241. title: "请选择单元",
  242. icon: "none"
  243. })
  244. return
  245. }
  246. if (this.$isEmpty(this.data.room_id) || this.$isEmpty(this.data.room_name)) {
  247. uni.showToast({
  248. title: "请选择门牌号",
  249. icon: "none"
  250. })
  251. return
  252. }
  253. uni.navigateTo({
  254. url: "../choosePlot/householdCert/householdCert" + this.$u.queryParams(this.data)
  255. })
  256. }
  257. }
  258. }
  259. </script>
  260. <style lang="scss">
  261. view,
  262. button {
  263. box-sizing: border-box;
  264. }
  265. .cu-list.menu > .cu-item.arrow {
  266. padding-right: 36px;
  267. }
  268. .bg-gray {
  269. background-color: #a1a1a1;
  270. color: #FFFFFF;
  271. }
  272. </style>