chargeTips.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view>
  3. <view class="main">
  4. <view>
  5. <image :src="tipdata[0]"></image>
  6. </view>
  7. <view class="tip">{{tipdata[1]}}</view>
  8. <view class="descript">{{tipdata[2]}}</view>
  9. <view v-if="tipInfo!='Inside'"><button type="primary" @click="goHome" class="index">{{tipdata[3]}}</button></view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: ['tipInfo'],
  16. data() {
  17. return {
  18. tipType: '', //提示类型:(完成:over;未插枪:nogun;失败:fail)
  19. }
  20. },
  21. methods: {
  22. goHome() {
  23. if (this.tipInfo == 'over') {
  24. this.$utils.navigateTo("ucenter/charge");
  25. } else {
  26. this.$utils.switchTab("index/index");
  27. }
  28. }
  29. },
  30. // onShow() {
  31. // this.tipType=this.tipInfo
  32. // },
  33. computed: {
  34. tipdata() {
  35. switch (this.tipInfo) {
  36. case 'nogun':
  37. return ['https://rl-zk-image.oss-cn-hangzhou.aliyuncs.com/vehicle-pic/2023-06/86f1f2c5447b44d28926f4d175671bad-uploadFile',
  38. '未插枪', '检测到插枪未连接车辆,请连接后重试!', '返回首页', '异常提示'
  39. ]
  40. case 'over':
  41. return ['https://rl-zk-image.oss-cn-hangzhou.aliyuncs.com/vehicle-pic/2023-06/110773ed753d4750aaba05834e2ea09e-uploadFile',
  42. '充电完成', '您可以在【我的】充电记录中查看对应充电信息', '查看充电记录', '充电完成'
  43. ]
  44. case 'fail':
  45. return ['https://rl-zk-image.oss-cn-hangzhou.aliyuncs.com/vehicle-pic/2023-06/dfc15b9438624ded97bee786d915a4f7-uploadFile',
  46. '充电失败', '启动充电失败,请联系站点处理!', '返回首页', '充电失败'
  47. ]
  48. case 'Inside':
  49. return ['https://rl-zk-image.oss-cn-hangzhou.aliyuncs.com/vehicle-pic/2023-06/dfc15b9438624ded97bee786d915a4f7-uploadFile',
  50. '该枪未切换站外充电', '请联系站内值守人员!', '返回首页', '提示信息'
  51. ]
  52. }
  53. }
  54. },
  55. onLoad(options) {
  56. // this.ErrorTip = options.error
  57. uni.setNavigationBarTitle({
  58. title: this.tipdata[4]
  59. })
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .main {
  65. width: 588rpx;
  66. display: flex;
  67. flex-direction: column;
  68. margin: 0 auto;
  69. text-align: center;
  70. font-size: 32rpx;
  71. color: #1D2129;
  72. padding-top: 100rpx;
  73. image {
  74. width: 547rpx;
  75. height: 511rpx;
  76. }
  77. .tip {
  78. margin-bottom: 24rpx;
  79. font-size: 36rpx;
  80. font-weight: 600;
  81. color: #1D2129;
  82. }
  83. .descript {
  84. font-weight: 400;
  85. color: #88909B;
  86. font-size: 28rpx;
  87. margin-bottom: 98rpx;
  88. }
  89. .index {
  90. width: 400rpx;
  91. height: 88rpx;
  92. background: #58BE6B;
  93. border-radius: 58rpx 58rpx 58rpx 58rpx;
  94. opacity: 1;
  95. font-size: 32rpx;
  96. color: #fff;
  97. font-weight: 600;
  98. line-height: 88rpx;
  99. font-family: Noto Sans SC-Regular, Noto Sans SC;
  100. }
  101. }
  102. </style>