index.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="homePage-container">
  3. <view class="scan-con">
  4. <u-icon name="scan" class="scan-icon" size="70"></u-icon>
  5. <text class="scan-txt">扫描识别</text>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. }
  14. },
  15. onLoad() {
  16. // 设置底部tabbar 样式
  17. const theme = getApp().globalData.theme
  18. uni.setTabBarItem({
  19. "index": 0,
  20. "iconPath": "static/"+theme+"/tabbar/record.png",
  21. "selectedIconPath": "static/"+theme+"/tabbar/record-active.png",
  22. })
  23. uni.setTabBarItem({
  24. "index": 1,
  25. "iconPath": "static/"+theme+"/tabbar/user.png",
  26. "selectedIconPath": "static/"+theme+"/tabbar/user-active.png",
  27. })
  28. uni.setTabBarStyle({
  29. color: this.$config("topBarTitleColors"),
  30. selectedColor: this.$config("primaryColor"),
  31. borderStyle: 'white',
  32. complete: function(res){
  33. console.log(res)
  34. }
  35. })
  36. },
  37. onShow() {
  38. },
  39. methods:{
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. page{
  45. height: 100%;
  46. }
  47. .homePage-container {
  48. width: 100%;
  49. height: 100%;
  50. background-color: rgba(0,0,0,.6);
  51. .scan-con{
  52. background-color: #ed1c24;
  53. width: 260upx;
  54. height: 260upx;
  55. border-radius: 50%;
  56. color: #fff;
  57. margin: 300upx auto 0;
  58. text-align: center;
  59. .scan-icon{
  60. margin: 70upx 0 14upx;
  61. }
  62. .scan-txt{
  63. display: block;
  64. font-size: 30upx;
  65. }
  66. }
  67. }
  68. </style>