data.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view>
  3. <image src="/static/icon/background.png" mode="" class="background"></image>
  4. <view style="padding-top: 100rpx;">
  5. <view class="align-items">
  6. <back></back>
  7. </view>
  8. <view class="project-content">
  9. <view class="font-forty-eight blue">
  10. 项目名称:{{name}}
  11. </view>
  12. <view class="font-forty-eight blue">
  13. 项目地址:{{address}}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="">
  18. <view class="project background-color1 font-sixty-four white" @click="add('repair')">添加</view>
  19. <view class="project background-color1 font-sixty-four white" @click="add('list')">查看</view>
  20. <view class="project background-color1 font-sixty-four white" @click="add('My')">我的</view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. id: 0,
  29. name: '',
  30. address: '',
  31. }
  32. },
  33. onLoad(e) {
  34. console.log(e)
  35. this.id = e.id;
  36. this.name = e.name;
  37. this.address = e.address
  38. },
  39. methods:{
  40. add(type){
  41. let that = this;
  42. if(this.name === '安检'){
  43. uni.navigateTo({
  44. url: `/pages/noLogin/${type}?id=004&name=${that.name}&address=${that.address}`
  45. })
  46. }else if(this.name === '维修'){
  47. uni.navigateTo({
  48. url: `/pages/noLogin/${type}?id=005&name=${that.name}&address=${that.address}`
  49. })
  50. }else if(this.name === '开栓'){
  51. uni.navigateTo({
  52. url: `/pages/noLogin/${type}?id=006&name=${that.name}&address=${that.address}`
  53. })
  54. }
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .background {
  61. z-index: -1;
  62. position: fixed;
  63. width: 100%;
  64. height: 100%;
  65. background-size: 100% 100%;
  66. }
  67. .project-content {
  68. border: 4rpx solid #3857F3;
  69. margin: 80rpx 55rpx 0;
  70. padding: 30rpx 20rpx;
  71. border-radius: 48rpx;
  72. }
  73. .project {
  74. border-radius: 72rpx;
  75. padding: 25rpx 0;
  76. text-align: center;
  77. margin: 60rpx 55rpx 0;
  78. }
  79. .project-img {
  80. width: 300rpx;
  81. height: 168rpx;
  82. margin: 20rpx auto;
  83. }
  84. </style>