index.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view>
  3. <!-- 状态栏高度 -->
  4. <view :style="{ height: `${statusBarHeight}px` }"></view>
  5. <!-- 导航栏 -->
  6. <view :style="{ height: `${navigationBarHeight}px`,lineHeight: `${navigationBarHeight}px`}" class="order-nav">
  7. 北京大学校园送
  8. </view>
  9. <view style="background-color: #ffffff; border-radius: 23rpx;padding: 30rpx 20rpx 40rpx 20rpx;">
  10. <view style="display: flex;padding: 20rpx;">
  11. <view style="flex: 1;font-size: 21rpx;color: #999999;">
  12. <text style="margin-right: 14rpx;">绑定手机号:185-7033-6037</text>
  13. <image src="/static/img/ic-copy.png" style="width: 27rpx;height: 27rpx;vertical-align: middle;"></image>
  14. </view>
  15. <view style="flex: 1;text-align: right;color: #141414;font-size: 23rpx;font-weight: 600;">
  16. 个人中心 >
  17. </view>
  18. </view>
  19. <view class="item-settled">
  20. <view style="flex: 1;">
  21. <image src="/static/img/ic-merchant-settled.png" style="width: 116rpx;height: 116rpx;"></image>
  22. <text style="margin-right: 14rpx;">商家入驻</text>
  23. </view>
  24. <view style="flex: 1;">
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  32. let app = getApp();
  33. export default {
  34. data() {
  35. return {
  36. statusBarHeight: app.globalData.statusBarHeight,
  37. navigationBarHeight: 0,
  38. }
  39. },
  40. onLoad(options) {
  41. let that = this;
  42. //首页数据加载
  43. // this.getIndexConfig();
  44. // #ifdef MP-WEIXIN
  45. // 获取微信胶囊的位置信息 width,height,top,right,left,bottom
  46. const custom = wx.getMenuButtonBoundingClientRect()
  47. // 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
  48. this.navigationBarHeight = custom.height + (custom.top - this.statusBarHeight) * 2
  49. // console.log("导航栏高度:"+this.globalData.navigationBarHeight)
  50. // #endif
  51. },
  52. methods: {},
  53. }
  54. </script>
  55. <style scoped>
  56. .order-nav {
  57. font-weight: 500;
  58. font-size: 35rpx;
  59. color: #FFFFFF;
  60. background-color: #FF6702;
  61. text-align: center;
  62. }
  63. .item-settled {
  64. background: linear-gradient(135deg, #FED0A7 0%, #FFF3E2 52%, #FAEDD3 100%);
  65. border-radius: 8rpx;
  66. border: 2rpx solid;
  67. border-image: linear-gradient(200deg, rgba(255, 220, 135, 1), rgba(255, 172, 33, 1), rgba(255, 201, 24, 1)) 2 2;
  68. padding: 40rpx;
  69. }
  70. </style>