index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="content">
  3. <view @click="getAndroid">安卓测试</view>
  4. {{androidData}}
  5. <view @click="gojkorder">集客订单</view>
  6. <view>救援订单1</view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. title: 'Hello',
  14. androidData:'',
  15. }
  16. },
  17. onLoad() {
  18. window.getAndroid=this.getAndroid;
  19. // setTimeout( this.getAndroid(),500)
  20. // alert(11)
  21. // this.callByAndroid()
  22. // window.LoginOut=this.LoginOut
  23. },
  24. created() {
  25. },
  26. methods: {
  27. gojkorder(){
  28. uni.navigateTo({
  29. url:'../myOrder/myOrder'
  30. })
  31. },
  32. // LoginOut(){
  33. // uni.showToast({
  34. // title: '66666',
  35. // icon:'none',
  36. // duration: 6000
  37. // });
  38. // },
  39. getAndroid(e){
  40. uni.showToast({
  41. title: '66666',
  42. icon:'none',
  43. duration: 6000
  44. });
  45. this.androidData=e
  46. return "hello";
  47. },
  48. callByAndroid(){
  49. alert("Js收到消息");
  50. }
  51. }
  52. }
  53. </script>
  54. <style scoped>
  55. .content {
  56. display: flex;
  57. flex-direction: column;
  58. align-items: center;
  59. justify-content: center;
  60. }
  61. .logo {
  62. height: 200rpx;
  63. width: 200rpx;
  64. margin-top: 200rpx;
  65. margin-left: auto;
  66. margin-right: auto;
  67. margin-bottom: 50rpx;
  68. }
  69. .text-area {
  70. display: flex;
  71. justify-content: center;
  72. }
  73. .title {
  74. font-size: 36rpx;
  75. color: #8f8f94;
  76. }
  77. </style>