transactionDetail.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="content">
  3. <web-view :src="url + type" @message="back1" ref="webH5"></web-view>
  4. <!-- #ifdef H5 -->
  5. <view class="btns">
  6. <view @click="back('/pages/transaction/bbjy?type=' + type + '&current=1')" class="btn btn-green" :class="{ dontbuy: isbuy != 1 }">買入</view>
  7. <view @click="back('/pages/transaction/bbjy?type=' + type + '&current=2')" class="btn btn-red" :class="{ dontbuy: isbuy != 1 }">賣出</view>
  8. </view>
  9. <!-- #endif -->
  10. </view>
  11. </template>
  12. <script>
  13. var wv;
  14. export default {
  15. data() {
  16. return {
  17. url: '/hybrid/html/local.html?type=',
  18. type: '',
  19. isbuy: 1
  20. };
  21. },
  22. onLoad(res) {
  23. this.type = res.type;
  24. console.log(res.type == 'AZB-USDT', 'this,type+++++++++++++');
  25. // if (res.type == 'GCB-USDT') {
  26. // this.isbuy = 2;
  27. // }
  28. },
  29. onShow() {},
  30. methods: {
  31. back(url) {
  32. if (this.isbuy == 1) {
  33. console.log('触发');
  34. uni.navigateTo({
  35. url
  36. });
  37. }
  38. },
  39. back1(url) {
  40. console.log('触发1');
  41. }
  42. }
  43. };
  44. </script>
  45. <style lang="scss">
  46. page,
  47. .content {
  48. min-height: 100%;
  49. height: auto;
  50. }
  51. .btns {
  52. position: fixed;
  53. z-index: 1000;
  54. left: 0;
  55. right: 0;
  56. bottom: 0;
  57. display: flex;
  58. flex-direction: row;
  59. align-items: center;
  60. justify-content: center;
  61. padding: 10px;
  62. box-sizing: border-box;
  63. background-color: #131623;
  64. .btn {
  65. flex: 1;
  66. height: 40px;
  67. border-radius: 4px;
  68. line-height: 40px;
  69. text-align: center;
  70. color: #fff;
  71. font-size: 16px;
  72. }
  73. .btn-green {
  74. margin-right: 20px;
  75. background-color: #38ad70;
  76. }
  77. .btn-red {
  78. background-color: #fe5c57;
  79. }
  80. .dontbuy {
  81. background-color: #aaaaaa !important;
  82. }
  83. }
  84. </style>