apply.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view class="wrapper">
  3. <template v-if="isStep == 1">
  4. <view class="" style="height: 135rpx;"></view>
  5. <view class="top"></view>
  6. <view class="item"><view class="item-top">特权一</view></view>
  7. <view class="item"><view class="item-top">特权一</view></view>
  8. <view class="item"><view class="item-top">特权一</view></view>
  9. <view class="btn" @click="changeStep">立即申请成为店长</view>
  10. </template>
  11. <template v-if="isStep == 2">
  12. <view class="tab-wrapper">
  13. <view class="tab-item">
  14. <view class="itemx">
  15. <view class="item-tit">姓名:</view>
  16. <input type="text" v-model="name" />
  17. </view>
  18. <view class="itemx">
  19. <view class="item-tit">推荐人编号:</view>
  20. <input type="text" v-model="name" />
  21. </view>
  22. <view class="itemx">
  23. <view class="item-tit">联系方式:</view>
  24. <input type="text" v-model="name" />
  25. </view>
  26. <view class="itemx">
  27. <view class="item-tit">验证码:</view>
  28. <input type="text" v-model="name" />
  29. </view>
  30. </view>
  31. </view>
  32. <view class="up-wrapper">
  33. 身份证正反面
  34. <view class="imgs">
  35. <view class="imgs-item">
  36. <image :src="sfzz" mode="" v-if="sfzz" @click.stop="upImg(1)"></image>
  37. <image src="../../static/img/add.png" mode="" v-if="!sfzz" @click.stop="upImg(1)"></image>
  38. </view>
  39. <view class="imgs-item">
  40. <image :src="sfzf" mode="" v-if="sfzf" @click.stop="upImg(2)"></image>
  41. <image src="../../static/img/add.png" mode="" v-if="!sfzf" @click.stop="upImg(2)"></image>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="up-wrapper">
  46. 营业执照
  47. <view class="imgs">
  48. <view class="imgs-item">
  49. <image :src="sfzz" mode="" v-if="sfzz" @click.stop="upImg(1)"></image>
  50. <image src="../../static/img/add.png" mode="" v-if="!sfzz" @click.stop="upImg(1)"></image>
  51. </view>
  52. <view class="imgs-item">
  53. <image :src="sfzf" mode="" v-if="sfzf" @click.stop="upImg(2)"></image>
  54. <image src="../../static/img/add.png" mode="" v-if="!sfzf" @click.stop="upImg(2)"></image>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. </view>
  60. </template>
  61. <script>
  62. import { upload } from '@/api/user.js';
  63. export default {
  64. data() {
  65. return {
  66. isStep: 1,
  67. name: '',
  68. speed_id: '',
  69. phone: '',
  70. code: '',
  71. sfzz: '', //身份证正面
  72. sfzf: '' //身份证反面
  73. };
  74. },
  75. methods: {
  76. changeStep() {
  77. this.isStep = 2;
  78. },
  79. upImg(index) {
  80. let obj = this;
  81. upload({
  82. filename: ''
  83. }).then(res => {
  84. console.log(res[0].url);
  85. if (index == 1) {
  86. obj.sfzz = res[0].url;
  87. }
  88. if( index == 2) {
  89. obj.sfzf = res[0].url
  90. }
  91. });
  92. }
  93. }
  94. };
  95. </script>
  96. <style lang="scss" scoped>
  97. .wrapper {
  98. height: 100%;
  99. }
  100. .top {
  101. margin: 0 auto 49rpx;
  102. width: 674rpx;
  103. height: 231rpx;
  104. background: linear-gradient(-23deg, #ffe7be, #fed591);
  105. border-radius: 10rpx;
  106. }
  107. .item {
  108. margin: 44rpx auto;
  109. width: 674rpx;
  110. height: 176rpx;
  111. box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.2);
  112. border-radius: 10rpx;
  113. .item-top {
  114. width: 85rpx;
  115. line-height: 36rpx;
  116. background-color: #fed591;
  117. border-radius: 10rpx 18rpx 18rpx 0;
  118. text-align: center;
  119. font-size: 20rpx;
  120. font-family: Source Han Sans CN;
  121. font-weight: 400;
  122. color: #975f4a;
  123. }
  124. }
  125. .btn {
  126. margin: 0 auto;
  127. width: 606rpx;
  128. height: 80rpx;
  129. background: linear-gradient(-23deg, #ffe7be, #fed591);
  130. border-radius: 40rpx;
  131. font-size: 35rpx;
  132. font-family: Source Han Sans CN;
  133. font-weight: 400;
  134. color: #704e1c;
  135. line-height: 80rpx;
  136. text-align: center;
  137. }
  138. .tab-wrapper {
  139. padding: 20rpx 30rpx;
  140. background-color: #f2f3f5;
  141. .itemx {
  142. margin: 0 auto;
  143. width: 100%;
  144. background-color: #fff !important;
  145. height: 100rpx;
  146. display: flex;
  147. // width: 690px;
  148. border: 1px #f4f4f4 solid;
  149. .item-tit {
  150. height: 100rpx;
  151. line-height: 100rpx;
  152. padding-left: 30rpx;
  153. width: 250rpx;
  154. font-size: 30rpx;
  155. font-family: PingFang SC;
  156. font-weight: 500;
  157. color: #666666;
  158. flex-shrink: 0;
  159. }
  160. input {
  161. width: 440rpx;
  162. padding-right: 20rpx;
  163. height: 100rpx;
  164. line-height: 100rpx;
  165. font-size: 30rpx;
  166. font-family: PingFang SC;
  167. font-weight: 500;
  168. color: #333333;
  169. }
  170. }
  171. }
  172. .up-wrapper {
  173. margin: auto;
  174. padding: 38rpx 21rpx;
  175. width: 690rpx;
  176. // height: 250rpx;
  177. background: #ffffff;
  178. border-radius: 10rpx;
  179. font-size: 28rpx;
  180. font-family: PingFang SC;
  181. font-weight: 500;
  182. color: #333333;
  183. .imgs {
  184. padding: 27rpx 70rpx;
  185. display: flex;
  186. justify-content: space-around;
  187. .imgs-item {
  188. height: 160rpx;
  189. width: 160rpx;
  190. image {
  191. width: 100%;
  192. height: 100%;
  193. }
  194. }
  195. }
  196. }
  197. </style>