discern-result.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <!-- 病虫害识别结果 -->
  3. <view class="page-panel">
  4. <image class="discern-img" :src="result.img_urls" mode="aspectFill"></image>
  5. <view class="discern-title">识别结果</view>
  6. <view class="pest-title">{{result.name}}</view>
  7. <view class="pest-paragraph">{{result.course}}</view>
  8. <view class="pest-paragraph">{{result.prevention}}</view>
  9. <view class="discern-result">
  10. <!-- <view class="row-between discern-item">
  11. <view>害虫名称:<text>{{result.name}}</text></view>
  12. <view>害虫数量:<text>1只</text></view>
  13. </view> -->
  14. </view>
  15. <button class="btn discern-btn" @click="uni.navigateBack()">重新识别</button>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. //识别结果
  23. result:{}
  24. };
  25. },
  26. onLoad(options) {
  27. this.result=JSON.parse(options.params);
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. .discern-img {
  33. display: block;
  34. height: 510rpx;
  35. margin-bottom: 48rpx;
  36. border-radius: 5rpx;
  37. }
  38. .discern-title {
  39. font-size: $font-size-title;
  40. color: $color-title;
  41. line-height: $line-height-title;
  42. }
  43. .discern-result {
  44. padding: 0 40rpx;
  45. }
  46. .discern-item{
  47. margin-top: 14rpx;
  48. &>view {
  49. font-size: 24rpx;
  50. color: $color-title;
  51. line-height: 34rpx;
  52. text{
  53. color: $color-error;
  54. }
  55. }
  56. }
  57. .discern-btn{
  58. margin: 80rpx auto;
  59. }
  60. </style>