auth.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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/icon/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/icon/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/icon/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/icon/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. }
  128. //未选择城市
  129. if(this.$isEmpty(this.city_county_name)){
  130. uni.showToast({
  131. title:"请选择城市",
  132. icon:"none"
  133. })
  134. return
  135. }
  136. if(type==1){
  137. //选择小区
  138. uni.navigateTo({
  139. url:"../choosePlot/choosePlot?city="+app.globalData.city+"&county="+app.globalData.county+"&currentCityCode="+app.globalData.currentCityCode
  140. })
  141. return
  142. }
  143. //未选择小区
  144. if(this.$isEmpty(this.data.residential_name)){
  145. uni.showToast({
  146. title:"请选择小区",
  147. icon:"none"
  148. })
  149. return
  150. }
  151. if(type==2){
  152. //选择楼栋
  153. uni.navigateTo({
  154. url: '/pages/choosePlot/chooseUnit/chooseUnit?residential_id=' + this.residential_id + '&residential_name=' + this.data.residential_name,
  155. })
  156. return
  157. }
  158. //未选择楼栋
  159. if(this.$isEmpty(this.data.unit_name)){
  160. uni.showToast({
  161. title:"请选择楼栋",
  162. icon:"none"
  163. })
  164. return
  165. }
  166. if(type==3){
  167. let url="/pages/choosePlot/chooseRoom/chooseRoom?unit_id=" + this.unit_id + "&unit_name=" + this.data.unit_name + "&residential_name=" + this.data.residential_name
  168. console.log(url)
  169. //选择房间
  170. uni.navigateTo({
  171. url:url
  172. })
  173. }
  174. },
  175. next(){
  176. if(this.$isEmpty(this.city_county_name)){
  177. uni.showToast({
  178. title:"请选择城市",
  179. icon:"none"
  180. })
  181. return
  182. }
  183. if(this.$isEmpty(this.data.residential_name)){
  184. uni.showToast({
  185. title:"请选择小区",
  186. icon:"none"
  187. })
  188. return
  189. }
  190. if(this.$isEmpty(this.data.unit_name)){
  191. uni.showToast({
  192. title:"请选择楼栋",
  193. icon:"none"
  194. })
  195. return
  196. }
  197. if(this.$isEmpty(this.data.room_id)||this.$isEmpty(this.data.room_name)){
  198. uni.showToast({
  199. title:"请选择门牌号",
  200. icon:"none"
  201. })
  202. return
  203. }
  204. uni.navigateTo({
  205. url:"../choosePlot/householdCert/householdCert"+this.$u.queryParams(this.data)
  206. })
  207. }
  208. }
  209. }
  210. </script>
  211. <style lang="scss">
  212. view,
  213. button{
  214. box-sizing: border-box;
  215. }
  216. .cu-list.menu>.cu-item.arrow {
  217. padding-right: 36px;
  218. }
  219. .bg-gray{
  220. background-color: #a1a1a1;
  221. color: #FFFFFF;
  222. }
  223. </style>