Status.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="container flex-center">
  3. <view class="no-pos flex-center" >
  4. <image :src="`${assetsUrl}status-no-data.png`" mode="aspectFit" class="no-pos-img" v-if="type==='noData'"></image>
  5. <image :src="`${assetsUrl}status-authing.png`" mode="aspectFit" class="no-pos-img" v-else-if="type==='authing'"></image>
  6. <image :src="`${assetsUrl}status-deleted.png`" mode="aspectFit" class="no-pos-img" v-else-if="type==='deleted'"></image>
  7. <image :src="`${assetsUrl}status-frozen.png`" mode="aspectFit" class="no-pos-img" v-else-if="type==='frozen'"></image>
  8. <image :src="`${assetsUrl}status-no-msg.png`" mode="aspectFit" class="no-pos-img" v-else-if="type==='noMsg'"></image>
  9. <image :src="`${assetsUrl}status-no-pos.png`" mode="aspectFit" class="no-pos-img" v-else-if="type==='noPos'"></image>
  10. <image :src="`${assetsUrl}status-no-net.png`" mode="aspectFit" class="no-pos-img" v-else-if="type==='noNet'"></image>
  11. <text class="no-pos-text font24 fw400" v-if="text">{{text}}</text>
  12. <view class="no-pos-btn font24 fw400" @click="btnClick" v-if="btnText">
  13. {{btnText}}
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. /**
  20. * "noData":无数据,
  21. * "noNet":无网络
  22. * "authing":审核中
  23. * "deleted":已删除
  24. * "frozen":已冻结
  25. * "noMsg":无消息
  26. * "noPos":无定位
  27. */
  28. export default {
  29. name:"Status",
  30. props:{
  31. type:{
  32. type:String,
  33. default:"noData"
  34. },
  35. text:{
  36. type:String,
  37. default:""
  38. },
  39. btnText:{
  40. type:String,
  41. default:""
  42. }
  43. },
  44. data() {
  45. return {
  46. assetsUrl: this.$util.assetsUrl,
  47. };
  48. },
  49. methods:{
  50. btnClick(){
  51. this.$emit('btnEvent');
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .container{
  58. width: 100%;
  59. height: 500rpx;
  60. .no-pos{
  61. flex-direction: column;
  62. padding-top: 250rpx;
  63. .no-pos-img{
  64. width: 400rpx;
  65. height: 400rpx;
  66. }
  67. .no-pos-text{
  68. color: $fontcolor3;
  69. margin-top: -30rpx;
  70. }
  71. .no-pos-btn{
  72. width: 136rpx;
  73. height: 48rpx;
  74. background: $primary;
  75. border-radius: 24rpx;
  76. line-height: 48rpx;
  77. text-align: center;
  78. color: $fontcolor5;
  79. margin-top: 50rpx;
  80. }
  81. }
  82. }
  83. </style>