auth.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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.unit_name)?'请选择楼栋':data.unit_name}}
  46. </text>
  47. </view>
  48. </view>
  49. <view @click="jump(3)" class="cu-item arrow" >
  50. <view class="content">
  51. <image style="width: 50rpx; height: 50rpx;margin: 0 20rpx 10rpx 0;"
  52. src="/static/common/fangjian.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.room_name)?'请选择门牌号':data.room_name}}
  58. </text>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="footer-fixed" @click="next" >
  63. <view class="cu-btn flex text-lg bg-red-btn" style="padding: 46rpx 0;">
  64. 下一步
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. var app=getApp()
  71. export default {
  72. data() {
  73. return {
  74. totalStep:3,
  75. numList: [{
  76. name: '注册账号'
  77. }, {
  78. name: '选择小区'
  79. }, {
  80. name: '填写信息'
  81. }],
  82. //小区id
  83. residential_id:'',
  84. //楼栋id
  85. unit_id:'',
  86. data:{
  87. //小区
  88. residential_name:"",
  89. //楼栋
  90. unit_name:"",
  91. //房间名
  92. room_name:"",
  93. //房间id
  94. room_id:"",
  95. },
  96. //城市
  97. city_county_name:''
  98. }
  99. },
  100. onShow() {
  101. if(this.$isEmpty(app.globalData.totalStep)){
  102. this.totalStep=2
  103. }else{
  104. this.totalStep=app.globalData.totalStep
  105. }
  106. this.residential_id=app.globalData.residentialId || ''
  107. this.unit_id=app.globalData.unitId || ''
  108. },
  109. onLoad(options){
  110. if(!this.$isEmpty(options)){
  111. //页面数据
  112. this.city_county_name=app.globalData.city+app.globalData.county
  113. this.data.room_id=options.room_id
  114. this.data.room_name=options.room_name
  115. this.data.residential_name=options.residential_name
  116. this.data.unit_name=options.unit_name
  117. }
  118. },
  119. methods: {
  120. jump(type){
  121. let that=this
  122. if(type==0){
  123. //选择城市
  124. uni.navigateTo({
  125. url:"../choosePlot/choosePlot?city="+app.globalData.city+"&county="+app.globalData.county+"&currentCityCode="+app.globalData.currentCityCode
  126. })
  127. return
  128. }
  129. //未选择城市
  130. if(this.$isEmpty(this.city_county_name)){
  131. uni.showToast({
  132. title:"请选择城市",
  133. icon:"none"
  134. })
  135. return
  136. }
  137. if(type==1){
  138. //选择小区
  139. uni.navigateTo({
  140. url:"../choosePlot/choosePlot?city="+app.globalData.city+"&county="+app.globalData.county+"&currentCityCode="+app.globalData.currentCityCode
  141. })
  142. return
  143. }
  144. //未选择小区
  145. if(this.$isEmpty(this.data.residential_name)){
  146. uni.showToast({
  147. title:"请选择小区",
  148. icon:"none"
  149. })
  150. return
  151. }
  152. if(type==2){
  153. //选择楼栋
  154. uni.navigateTo({
  155. url: '/pages/choosePlot/chooseUnit/chooseUnit?residential_id=' + this.residential_id + '&residential_name=' + this.data.residential_name,
  156. })
  157. return
  158. }
  159. //未选择楼栋
  160. if(this.$isEmpty(this.data.unit_name)){
  161. uni.showToast({
  162. title:"请选择楼栋",
  163. icon:"none"
  164. })
  165. return
  166. }
  167. if(type==3){
  168. let url="/pages/choosePlot/chooseRoom/chooseRoom?unit_id=" + this.unit_id + "&unit_name=" + this.data.unit_name + "&residential_name=" + this.data.residential_name
  169. console.log(url)
  170. //选择房间
  171. uni.navigateTo({
  172. url:url
  173. })
  174. }
  175. },
  176. next(){
  177. if(this.$isEmpty(this.city_county_name)){
  178. uni.showToast({
  179. title:"请选择城市",
  180. icon:"none"
  181. })
  182. return
  183. }
  184. if(this.$isEmpty(this.data.residential_name)){
  185. uni.showToast({
  186. title:"请选择小区",
  187. icon:"none"
  188. })
  189. return
  190. }
  191. if(this.$isEmpty(this.data.unit_name)){
  192. uni.showToast({
  193. title:"请选择楼栋",
  194. icon:"none"
  195. })
  196. return
  197. }
  198. if(this.$isEmpty(this.data.room_id)||this.$isEmpty(this.data.room_name)){
  199. uni.showToast({
  200. title:"请选择门牌号",
  201. icon:"none"
  202. })
  203. return
  204. }
  205. uni.navigateTo({
  206. url:"../choosePlot/householdCert/householdCert"+this.$u.queryParams(this.data)
  207. })
  208. }
  209. }
  210. }
  211. </script>
  212. <style lang="scss">
  213. view,
  214. button{
  215. box-sizing: border-box;
  216. }
  217. .cu-list.menu>.cu-item.arrow {
  218. padding-right: 36px;
  219. }
  220. .bg-gray{
  221. background-color: #a1a1a1;
  222. color: #FFFFFF;
  223. }
  224. </style>