混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
2.9 KiB

2 weeks ago
  1. <template>
  2. <view class="content">
  3. <navbar title="推荐记录" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="ilst">
  5. <view v-for="(item, index) in recommendList" :key="index">
  6. <view class="item">
  7. <view class="flex-sb" style="line-height:90rpx;font-size:30rpx">
  8. <view>{{ item.name }}</view>
  9. <view style="color:#ccc;font-size:26rpx">{{ item.time }}</view>
  10. </view>
  11. <view style="line-height:42rpx;font-size:28rpx;color:#666;padding-bottom:30rpx">
  12. 您推荐的 <text v-if="item.isDriver">司机</text><text v-else>老板</text> 平台正在联系中感谢你的信任如有合作将为您提供丰厚奖励
  13. </view>
  14. </view>
  15. </view>
  16. <view v-if="isEmpty" class="re-empty">
  17. <view>暂无数据</view>
  18. </view>
  19. </view>
  20. <!-- 底部推荐按钮 -->
  21. <view class="re-end-pand b-fiexd">
  22. <button @click="recommend">我要推荐</button>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import navbar from '@/components/base/navbar.vue'
  28. export default {
  29. name: 'BaseSells',
  30. components: {
  31. navbar
  32. },
  33. data() {
  34. return {
  35. isEmpty: false,
  36. recommendList: [
  37. {
  38. id: 1,
  39. name: '张师傅',
  40. time: '2024-01-15 10:30',
  41. isDriver: true
  42. },
  43. {
  44. id: 2,
  45. name: '李总',
  46. time: '2024-01-14 15:20',
  47. isDriver: false
  48. },
  49. {
  50. id: 3,
  51. name: '王师傅',
  52. time: '2024-01-13 09:45',
  53. isDriver: true
  54. }
  55. ]
  56. }
  57. },
  58. onLoad() {
  59. uni.setNavigationBarTitle({
  60. title: '我要推荐'
  61. });
  62. },
  63. methods: {
  64. recommend() {
  65. uni.showActionSheet({
  66. itemList: ['推荐司机', '推荐老板'],
  67. success: (res) => {
  68. if (res.tapIndex === 0) {
  69. // 推荐司机
  70. uni.navigateTo({
  71. url: '/pages_order/base/addyuan?type=driver'
  72. });
  73. } else {
  74. // 推荐老板
  75. uni.navigateTo({
  76. url: '/pages_order/base/addyuan?type=boss'
  77. });
  78. }
  79. }
  80. });
  81. }
  82. }
  83. }
  84. </script>
  85. <style scoped lang="scss">
  86. .content {
  87. padding: 20rpx;
  88. min-height: 100vh;
  89. background-color: #f5f5f5;
  90. padding-bottom: 120rpx;
  91. }
  92. .ilst {
  93. margin-top: 20rpx;
  94. }
  95. .item {
  96. background-color: #fff;
  97. border-radius: 10rpx;
  98. padding: 30rpx;
  99. margin-bottom: 20rpx;
  100. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  101. }
  102. .flex-sb {
  103. display: flex;
  104. justify-content: space-between;
  105. align-items: center;
  106. }
  107. .re-empty {
  108. text-align: center;
  109. padding: 100rpx 0;
  110. color: #999;
  111. font-size: 28rpx;
  112. }
  113. .re-end-pand {
  114. position: fixed;
  115. bottom: 0;
  116. left: 0;
  117. right: 0;
  118. padding: 20rpx;
  119. background-color: #fff;
  120. border-top: 1rpx solid #f0f0f0;
  121. padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
  122. button {
  123. width: 100%;
  124. height: 80rpx;
  125. line-height: 80rpx;
  126. background-color: #007AFF;
  127. color: #fff;
  128. border-radius: 40rpx;
  129. font-size: 32rpx;
  130. border: none;
  131. }
  132. }
  133. .b-fiexd {
  134. position: fixed;
  135. }
  136. </style>