index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. {{longitude}}-----{{latitude}}
  9. </view>
  10. <view @click="goRemind">客户提醒</view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. title: 'Hello',
  18. androidData:'',
  19. latitude:'',
  20. longitude:'',
  21. }
  22. },
  23. onLoad() {
  24. window.getAndroid=this.getAndroid;
  25. // setTimeout( this.getAndroid(),500)
  26. // alert(11)
  27. // this.callByAndroid()
  28. // window.LoginOut=this.LoginOut
  29. /* uni.getLocation({
  30. type: 'wgs84',
  31. success: function (res) {
  32. console.log('当前位置的经度:' + res.longitude);
  33. console.log('当前位置的纬度:' + res.latitude);
  34. this.latitude=res.latitude
  35. this.longitude=res.longitude
  36. },fail(err){
  37. console.log(err)
  38. }
  39. }); */
  40. },
  41. created() {
  42. },
  43. methods: {
  44. goRemind(){
  45. uni.navigateTo({
  46. url:'../remind/index'
  47. })
  48. },
  49. gojkorder(){
  50. uni.navigateTo({
  51. url:'../myOrder/myOrder'
  52. })
  53. },
  54. // LoginOut(){
  55. // uni.showToast({
  56. // title: '66666',
  57. // icon:'none',
  58. // duration: 6000
  59. // });
  60. // },
  61. getAndroid(e){
  62. uni.showToast({
  63. title: '66666',
  64. icon:'none',
  65. duration: 6000
  66. });
  67. this.androidData=e
  68. return "hello";
  69. },
  70. callByAndroid(){
  71. alert("Js收到消息");
  72. }
  73. }
  74. }
  75. </script>
  76. <style scoped>
  77. .content {
  78. display: flex;
  79. flex-direction: column;
  80. align-items: center;
  81. justify-content: center;
  82. }
  83. .logo {
  84. height: 200rpx;
  85. width: 200rpx;
  86. margin-top: 200rpx;
  87. margin-left: auto;
  88. margin-right: auto;
  89. margin-bottom: 50rpx;
  90. }
  91. .text-area {
  92. display: flex;
  93. justify-content: center;
  94. }
  95. .title {
  96. font-size: 36rpx;
  97. color: #8f8f94;
  98. }
  99. </style>