index.vue 1.3 KB

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