index - 副本.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="content">
  3. <image class="logo" src="@/static/logo.png"></image>
  4. <view class="text-area">
  5. <text class="title" @click="getMap">Hello RuoYi</text>
  6. </view>
  7. <!-- <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers> -->
  8. </view>
  9. </template>
  10. <script>
  11. import self from "@/utils/location.js"
  12. import footers from '@/components/footer/footer.vue'
  13. export default {
  14. data(){
  15. return{
  16. // footlist:[
  17. // {module:'home',title:'首页',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png'),},
  18. // {module:'work',title:'课表',icon_checked:require('@/static/images/tabbar/work_.png'),icon_nochecked:require('@/static/images/tabbar/work.png'),limit:'course:table:list'},
  19. // {module:'trends',title:'动态',icon_checked:require('@/static/images/tabbar/trends_.png'),icon_nochecked:require('@/static/images/tabbar/trends.png'),limit:'xiaoYuan:notice:list'},
  20. // {module:'mine',title:'我的',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
  21. // ],
  22. // footerindex:'home',
  23. // isfootflag:true,
  24. }
  25. },
  26. components:{footers},
  27. onLoad: function() {
  28. this.getLocation()
  29. },
  30. methods:{
  31. getLocation(){
  32. self.getLocation(function(res){
  33. console.log(res)
  34. })
  35. },
  36. getMap(){
  37. // #ifdef MP-WEIXIN
  38. this.$tab.navigateTo('/work/pages/map/map?type=update&lng=117.211954&lat=31.839676&address=时代数码港')
  39. // #endif
  40. },
  41. getphotoFn(e){
  42. let that = this;
  43. let file =[],count=9
  44. if(e=='zj'){
  45. file = that.zjfile;
  46. count=9
  47. }else{
  48. file = that.mjfile;
  49. count=9
  50. }
  51. if(file.length < count){
  52. uni.chooseImage({
  53. count: count - parseInt(file.length),
  54. success:function(res){
  55. let img= res.tempFilePaths;
  56. if(img.length + file.length > count){
  57. uni.showToast({
  58. title: '最多上传'+count+'张图片',
  59. icon: 'none',
  60. duration: 2000
  61. })
  62. }else{
  63. let imglen = res.tempFilePaths.length;
  64. var fuwufile = [];
  65. uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
  66. if(e=='zj'){
  67. that.zjfile = that.zjfile.concat(rs);
  68. that.datainfo.identificationPhoto=that.zjfile.join(',')
  69. }else{
  70. that.mjfile = that.mjfile.concat(rs);
  71. that.datainfo.entrancePermit=that.mjfile.join(',')
  72. }
  73. // console.log(that.datainfo.image,85)
  74. })
  75. }
  76. }
  77. });
  78. }
  79. },
  80. }
  81. }
  82. </script>
  83. <style>
  84. .content {
  85. display: flex;
  86. flex-direction: column;
  87. align-items: center;
  88. justify-content: center;
  89. }
  90. .logo {
  91. height: 200rpx;
  92. width: 200rpx;
  93. margin-top: 200rpx;
  94. margin-left: auto;
  95. margin-right: auto;
  96. margin-bottom: 50rpx;
  97. }
  98. .text-area {
  99. display: flex;
  100. justify-content: center;
  101. }
  102. .title {
  103. font-size: 36rpx;
  104. color: #8f8f94;
  105. }
  106. </style>