index.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="myInsurance">
  3. <view class="myInsuranceCart" v-for="(item, index) in list" :key="index" @click="gopage(item)">
  4. <view class="myInsuranceCartbuju xiangxia">
  5. <view class="">
  6. {{ item.policyName }}
  7. </view>
  8. <view class="" style="color: red">
  9. {{ { BZZ: '保障中', YSX: '失效', DSX: '待生效' }[item.status] }}
  10. </view>
  11. </view>
  12. <view class="">
  13. <view class="xiangxia"> 所属网点:{{ item.websitName }} </view>
  14. <view class="xiangxia"> 保单类型:{{ { AC: '意外险', EM: '雇主险', IN: '工伤险' }[item.policyType] }} </view>
  15. <view class="xiangxia"> 保单编号:{{ item.policyOrder }} </view>
  16. <view class="xiangxia"> 保单金额:{{ item.policyPrice }} </view>
  17. <view class="xiangxia"> 有效时间:{{ item.startTime }}~{{ item.endTime }} </view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. list: [],
  27. websitId: ''
  28. }
  29. },
  30. onShow() {
  31. uni.showLoading({
  32. title: '加载中'
  33. })
  34. this.$api.post('/worker/myPolicy', { pageNum: 1, pageSize: -1 }).then(res => {
  35. this.list = res.data
  36. this.$nextTick(() => {
  37. uni.hideLoading()
  38. })
  39. })
  40. },
  41. onPullDownRefresh() {
  42. this.$api.post('/worker/myPolicy', { pageNum: 1, pageSize: -1 }).then(res => {
  43. this.list = res.data
  44. this.$nextTick(() => {
  45. uni.stopPullDownRefresh()
  46. })
  47. })
  48. },
  49. methods: {
  50. gopage(item) {
  51. this.$navToPage({
  52. url: `/packageEnter/pages/insurance/policyParticulars/index?id=${item.id}`
  53. })
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .myInsurance {
  60. box-sizing: border-box;
  61. padding: 20rpx;
  62. padding-top: 40rpx;
  63. .myInsuranceCart {
  64. width: 100%;
  65. height: auto;
  66. box-sizing: border-box;
  67. padding: 20rpx;
  68. margin-bottom: 20rpx;
  69. box-shadow: 2.8px 2.8px 2.2px rgba(0, 0, 0, 0.02), 6.7px 6.7px 5.3px rgba(0, 0, 0, 0.028),
  70. 12.5px 12.5px 10px rgba(0, 0, 0, 0.035), 22.3px 22.3px 17.9px rgba(0, 0, 0, 0.042),
  71. 41.8px 41.8px 33.4px rgba(0, 0, 0, 0.05), 100px 100px 80px rgba(0, 0, 0, 0.07);
  72. border-radius: 10rpx;
  73. .myInsuranceCartbuju {
  74. display: flex;
  75. justify-content: space-between;
  76. }
  77. .xiangxia {
  78. margin-bottom: 10rpx;
  79. }
  80. }
  81. }
  82. </style>