index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="content">
  3. <u--image :showLoading="true" src="https://4dscene.4dage.com/new4dkk/deng/static/img/img_cover@2x.jpg" width="100vw" height="100vh"></u--image>
  4. <view class="fixed bottom-48 w-full text-center">
  5. <view class="absolute" style="left: calc(50% - 112px);bottom: 100px">
  6. <u--image src="https://4dscene.4dage.com/new4dkk/deng/static/img/btn_enter@2x.png" width="224px" height="55px"></u--image>
  7. </view>
  8. <view class="butText text-center" @click="handleHome">开始云游</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. // import uButton from "uview-ui/components/u-button/u-button.vue";
  14. import { wxLogin } from "@/common/api.js";
  15. export default {
  16. components: {
  17. // uButton
  18. },
  19. data() {
  20. return {
  21. title: 'Hello'
  22. }
  23. },
  24. onLoad() {
  25. },
  26. methods: {
  27. handleHome() {
  28. console.log('开启云上观灯', uni)
  29. this.$store.commit("wxLogininfo", wxLogin);
  30. // uni.login({
  31. // provider: 'weixin', //使用微信登录
  32. // success: function ({code}) {
  33. // console.log('loginRes', code);
  34. // wxLogin({
  35. // code: code
  36. // }).then(res => {
  37. // console.log('wxLoginRes', res, code);
  38. // uni.$u.toast("登录成功");
  39. // uni.setStorageSync('token', res.token);
  40. // })
  41. // }
  42. // });
  43. }
  44. }
  45. }
  46. </script>
  47. <style>
  48. .content {
  49. display: flex;
  50. flex-direction: column;
  51. align-items: center;
  52. justify-content: center;
  53. min-height: 100vh;
  54. }
  55. .butText{
  56. font-weight: 400;
  57. font-size: 24px;
  58. color: #FFFFFF;
  59. line-height: 36px;
  60. text-shadow: 0px 0px 8px #FFF9B1, 0px 0px 27px #FFF9B1, 0px 0px 4px #D86332;
  61. font-style: normal;
  62. text-transform: none;
  63. position: relative;
  64. top: -110px;
  65. z-index: 10;
  66. }
  67. </style>