type.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="riderr_login">
  3. <view class="rider_type">
  4. <view class="type_name">请选择发布类型</view>
  5. <!-- <view class="type_tit">请选择您是那种类型</view> -->
  6. </view>
  7. <view class="type_box" v-for="(item,index) in list" :key="item.id" @click="bindrider(item.name)">
  8. <view class="name">{{item.name}}</view>
  9. <view class="icon">
  10. <u-icon name="arrow-right"></u-icon>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. list: [{
  20. id: 1,
  21. name: '个人发布'
  22. }, {
  23. id: 2,
  24. name: '企业发布'
  25. }],
  26. Qe: 0,
  27. geRen: 0,
  28. renzheng: false
  29. }
  30. },
  31. onLoad() {
  32. this.Qe = uni.getStorageSync("Qe")
  33. this.geRen = uni.getStorageSync("geRen")
  34. if (this.Qe == 2 || this.geRen == 2) {
  35. this.renzheng = false
  36. } else {
  37. this.renzheng = true
  38. }
  39. },
  40. methods: {
  41. bindrider(name) {
  42. console.log(name)
  43. if (name == '个人发布') {
  44. if (this.renzheng) {
  45. uni.showModal({
  46. title: '提示',
  47. content: '您还未认证,请先认证',
  48. success(res) {
  49. if (res.confirm) {
  50. uni.navigateTo({
  51. url: "/my/renzheng/index?classify=" + 1
  52. })
  53. }
  54. }
  55. })
  56. return
  57. } else {
  58. uni.navigateTo({
  59. url: '/my/publish/editor?'
  60. })
  61. }
  62. } else if (name == '企业发布') {
  63. if (this.renzheng) {
  64. uni.showModal({
  65. title: '提示',
  66. content: '您还未认证,请先认证',
  67. success(res) {
  68. if (res.confirm) {
  69. uni.navigateTo({
  70. url: "/my/renzheng/index?classify=" + 2
  71. })
  72. }
  73. }
  74. })
  75. return
  76. } else {
  77. uni.navigateTo({
  78. url: '/my/publish/firm'
  79. })
  80. }
  81. }
  82. }
  83. }
  84. }
  85. </script>
  86. <style>
  87. .riderr_login {
  88. width: 100%;
  89. }
  90. .rider_type {
  91. width: 90%;
  92. margin: 0 auto;
  93. margin-top: 50rpx;
  94. margin-bottom: 135rpx;
  95. }
  96. .type_name {
  97. font-size: 38rpx;
  98. font-weight: bold;
  99. letter-spacing: 2rpx;
  100. }
  101. .type_tit {
  102. color: #999999;
  103. font-size: 21rpx;
  104. margin-top: 10rpx;
  105. }
  106. .type_box {
  107. width: 90%;
  108. margin: 0 auto;
  109. height: 110rpx;
  110. background: #F2F2F2;
  111. display: flex;
  112. margin-bottom: 20rpx;
  113. border-radius: 18rpx;
  114. }
  115. .name {
  116. flex: 1;
  117. font-size: 30rpx;
  118. color: black;
  119. display: flex;
  120. justify-content: left;
  121. align-items: center;
  122. margin-left: 60rpx;
  123. }
  124. .icon {
  125. flex: 1;
  126. display: flex;
  127. justify-content: flex-end;
  128. align-items: center;
  129. margin-right: 30rpx;
  130. }
  131. .icon image {
  132. width: 15rpx;
  133. height: 25rpx;
  134. }
  135. </style>