auth.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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" :style="{marginBottom:safeAreaBottom +'rpx'}">
  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. console.log(options);
  120. if(!this.$isEmpty(options)){
  121. //页面数据
  122. this.city_county_name=app.globalData.city+app.globalData.county
  123. this.data.room_id=options.room_id
  124. this.data.room_name=options.room_name
  125. this.data.residential_name=options.residential_name
  126. this.data.building_name=options.building_name
  127. this.data.building_id=options.building_id
  128. this.data.unit_name=options.unit_name
  129. }
  130. },
  131. methods: {
  132. jump(type){
  133. let that=this
  134. if(type==0){
  135. //选择城市
  136. let params={
  137. city:app.globalData.city,
  138. county:app.globalData.county,
  139. currentCityCode:app.globalData.currentCityCode
  140. }
  141. uni.navigateTo({
  142. url:"../choosePlot/choosePlot"+this.$u.queryParams(params)
  143. })
  144. return
  145. }
  146. //未选择城市
  147. if(this.$isEmpty(this.city_county_name)){
  148. uni.showToast({
  149. title:"请选择城市",
  150. icon:"none"
  151. })
  152. return
  153. }
  154. if(type==1){
  155. //选择小区
  156. let params={
  157. city:app.globalData.city,
  158. county:app.globalData.county,
  159. currentCityCode:app.globalData.currentCityCode
  160. }
  161. uni.navigateTo({
  162. url:"../choosePlot/choosePlot"+this.$u.queryParams(params)
  163. })
  164. return
  165. }
  166. //未选择小区
  167. if(this.$isEmpty(this.data.residential_name)){
  168. uni.showToast({
  169. title:"请选择小区",
  170. icon:"none"
  171. })
  172. return
  173. }
  174. if(type==2){
  175. //选择楼栋
  176. let params={
  177. residential_id:this.residential_id,
  178. residential_name:this.data.residential_name
  179. }
  180. uni.navigateTo({
  181. url:"../choosePlot/chooseBuilding/chooseBuilding"+this.$u.queryParams(params)
  182. })
  183. return
  184. }
  185. //未选择楼栋
  186. if(this.$isEmpty(this.data.building_name)){
  187. uni.showToast({
  188. title:"请选择楼栋",
  189. icon:"none"
  190. })
  191. return
  192. }
  193. if (type==3) {
  194. //选择单元
  195. let params={
  196. residential_name:this.data.residential_name,
  197. building_id:this.data.building_id,
  198. building_name:this.data.building_name
  199. }
  200. uni.navigateTo({
  201. url:"../choosePlot/chooseUnit/chooseUnit"+this.$u.queryParams(params)
  202. })
  203. }
  204. if(type==4){
  205. //选择房间
  206. let params={
  207. residential_name:this.data.residential_name,
  208. building_name:this.data.building_name,
  209. building_id:this.data.building_id,
  210. unit_name:this.data.unit_name,
  211. unit_id:this.unit_id
  212. }
  213. uni.navigateTo({
  214. url:"/pages/choosePlot/chooseRoom/chooseRoom"+this.$u.queryParams(params)
  215. })
  216. }
  217. },
  218. next(){
  219. if(this.$isEmpty(this.city_county_name)){
  220. uni.showToast({
  221. title:"请选择城市",
  222. icon:"none"
  223. })
  224. return
  225. }
  226. if(this.$isEmpty(this.data.residential_name)){
  227. uni.showToast({
  228. title:"请选择小区",
  229. icon:"none"
  230. })
  231. return
  232. }
  233. if(this.$isEmpty(this.data.building_name)){
  234. uni.showToast({
  235. title:"请选择楼栋",
  236. icon:"none"
  237. })
  238. return
  239. }
  240. if(this.$isEmpty(this.data.unit_name)){
  241. uni.showToast({
  242. title:"请选择单元",
  243. icon:"none"
  244. })
  245. return
  246. }
  247. if(this.$isEmpty(this.data.room_id)||this.$isEmpty(this.data.room_name)){
  248. uni.showToast({
  249. title:"请选择门牌号",
  250. icon:"none"
  251. })
  252. return
  253. }
  254. let params=this.$u.deepClone(this.data)
  255. params.residentialId=this.residential_id
  256. params.unitId=this.unit_id
  257. uni.navigateTo({
  258. url:"../choosePlot/householdCert/householdCert"+this.$u.queryParams(params)
  259. })
  260. }
  261. }
  262. }
  263. </script>
  264. <style lang="scss">
  265. view,
  266. button{
  267. box-sizing: border-box;
  268. }
  269. .cu-list.menu>.cu-item.arrow {
  270. padding-right: 36px;
  271. }
  272. .bg-gray{
  273. background-color: #a1a1a1;
  274. color: #FFFFFF;
  275. }
  276. </style>