环卫车小程序前端代码
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.

88 lines
2.5 KiB

4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
  1. <template>
  2. <view>
  3. <view class="se-px-20 se-py-20 se-bgc-white">
  4. <u-tabs :current="current" :activeStyle="{
  5. color: '#669A32',
  6. transform: 'scale(1.05)'
  7. }" lineColor="#669A32" :list="list" @click="onClick"></u-tabs>
  8. </view>
  9. <view class="se-m-20" v-if="current==0">
  10. <view class="se-bgc-white se-br-20 se-p-20 se-mb-20 se-flex" v-for="(items,indexs) in directUserList" :key="indexs">
  11. <image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.headImage" mode=""></image>
  12. <view class="se-flex se-flex-v se-flex-1 se-px-20">
  13. <view class="se-c-black se-fw-6 se-fs-26 se-toe-1 se-pt-5">
  14. {{items.nickName}}
  15. <text v-if="items.phone">-{{items.phone}}</text>
  16. </view>
  17. <view class="se-c-33 se-fs-24 se-lh-40 se-toe-3 se-pt-10">
  18. {{$u.timeFormat(items.createTime, 'yyyy年mm月dd日')}}加入
  19. </view>
  20. </view>
  21. </view>
  22. <u-empty v-if="directUserList && directUserList.length==0" mode="list"></u-empty>
  23. </view>
  24. <view class="se-m-20" v-if="current==1">
  25. <view class="se-bgc-white se-br-20 se-p-20 se-mb-20 se-flex" v-for="(items,indexs) in indirectUserList" :key="indexs">
  26. <image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.headImage" mode=""></image>
  27. <view class="se-flex se-flex-v se-flex-1 se-px-20">
  28. <view class="se-c-black se-fw-6 se-fs-26 se-toe-1 se-pt-5">
  29. {{items.nickName}}
  30. <text v-if="items.phone">-{{items.phone}}</text>
  31. </view>
  32. <view class="se-c-33 se-fs-24 se-lh-40 se-toe-3 se-pt-10">
  33. {{$u.timeFormat(items.createTime, 'yyyy年mm月dd日')}}加入
  34. </view>
  35. </view>
  36. </view>
  37. <u-empty v-if="indirectUserList && indirectUserList.length==0" mode="list"></u-empty>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import { getInviteUser } from "@/common/api.js"
  43. export default {
  44. data(){
  45. return{
  46. current:0,
  47. list:[
  48. {
  49. name: '直接用户',
  50. }, {
  51. name: '间推用户',
  52. }
  53. ],
  54. directUserList:[],
  55. indirectUserList:[]
  56. }
  57. },
  58. watch: {
  59. },
  60. onLoad(options) {
  61. this.onInviteUser()
  62. },
  63. methods:{
  64. onInviteUser(){
  65. let that = this
  66. let params ={}
  67. getInviteUser(params).then(response=>{
  68. console.info("getInviteUser",response)
  69. that.directUserList = response.result.directUserList
  70. that.indirectUserList = response.result.indirectUserList
  71. }).catch(error=>{
  72. })
  73. },
  74. onClick(event){
  75. // console.info(event)
  76. this.current = event.index
  77. }
  78. }
  79. }
  80. </script>
  81. <style>
  82. page{
  83. background-color: #f5f5f5;
  84. }
  85. </style>