personnel.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="box">
  3. <view class="view" v-for="(item,index) in workList" :key='index'>
  4. <text>维修人员:{{item.name}}</text>
  5. <text>职位:维修技术人员</text>
  6. <text>联系方式:{{item.phone}}</text>
  7. </view>
  8. <view class="noData" v-if="workList.length==0">
  9. <image src="http://resource.weilaibike.com/none.png"></image>
  10. <view>暂无相关数据~</view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. var app = getApp()
  16. export default{
  17. data(){
  18. return{
  19. workList: '',
  20. }
  21. },
  22. onLoad() {
  23. this.getWorker();
  24. },
  25. methods:{
  26. getWorker:function(){
  27. uni.showToast({
  28. title:"加载中",
  29. icon:'none'
  30. })
  31. app.request('personal/workerList', '', 'POST').then(res => {
  32. uni.hideLoading();
  33. console.log(res,'这是列表数据打印')
  34. if(res.data){
  35. this.workList=res.data
  36. }else{
  37. this.workList=''
  38. }
  39. })
  40. }
  41. }
  42. }
  43. </script>
  44. <style>
  45. @import url("/static/css/base.css");
  46. page {
  47. width: 100%;
  48. height: 100%;
  49. background: #eee;
  50. }
  51. .box {
  52. width: 100%;
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. padding-top: 10rpx;
  57. }
  58. .box .view {
  59. width: 90%;
  60. background: white;
  61. display: flex;
  62. flex-direction: column;
  63. height: 200rpx;
  64. justify-content: space-around;
  65. margin-top: 20rpx;
  66. padding-left: 33rpx;
  67. font-size: 28rpx;
  68. font-family: PingFang SC;
  69. font-weight: 500;
  70. color: rgba(77, 77, 77, 1);
  71. border-radius: 10rpx;
  72. }
  73. </style>