switch.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view>
  3. <view class="top">
  4. <view class="int">
  5. <image src="https://chenglantimes.com/prod-api/profile/upload/2024/06/04/1717472740192.jpg" mode="widthFix"></image>
  6. <button class="btn" @click="go(0)">我要找工作</button>
  7. </view>
  8. </view>
  9. <view class="middle">
  10. <view class="int"><u-divider text="或者"></u-divider></view>
  11. </view>
  12. <view class="top" style="top: 55%">
  13. <view class="int">
  14. <image src="https://chenglantimes.com/prod-api/profile/upload/2024/06/04/1717472782145.jpg" mode="widthFix"></image>
  15. <button class="btn" @click="go(1)">我要招人</button>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. wxUserInfo: {},
  25. wx: 'false'
  26. };
  27. },
  28. onLoad(data) {
  29. if (data.wxUserInfo) {
  30. this.wxUserInfo = data.wxUserInfo
  31. }
  32. if (data.wx) {
  33. this.wx = data.wx
  34. }
  35. },
  36. methods: {
  37. //注册
  38. go(type) {
  39. this.http.request({
  40. url: '/app/user/choice',
  41. data: { type: type },
  42. method: 'POST',
  43. success: res => {
  44. uni.navigateBack();
  45. }
  46. });
  47. }
  48. }
  49. };
  50. </script>
  51. <style lang="scss">
  52. .top {
  53. position: fixed;
  54. width: 100%;
  55. height: 45%;
  56. top: 7%;
  57. }
  58. .middle {
  59. position: fixed;
  60. width: 100%;
  61. height: 10%;
  62. top: 45%;
  63. }
  64. image {
  65. width: 75%;
  66. border-radius: 60%;
  67. }
  68. .int {
  69. padding: 10px 70px 10px 70px;
  70. overflow: hidden;
  71. text-align: center;
  72. }
  73. .btn {
  74. margin-top: 25px;
  75. }
  76. </style>