index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="flex-common-css">
  3. <Nav :leftShow='false' :customNav='true' title="" bgckgroundBox='#EF1F0C'></Nav>
  4. <view class="flex-1 flex-direction iPhone-bottom box-border-box">
  5. <image class="qd-bg" src="@/static/img/order-food/qd-bg.png" mode=""></image>
  6. <view class="order-food-box p-0-32 box-border-box">
  7. <view class="order-food p-32 box-border-box bgc-f b-rad-24" @click="goToUrl()">
  8. <view
  9. class="b-FFD7CC bc-FFEDE9-FFF1EE b-rad-24 p-20-32 box-border-box align-items-center flex-justify-space">
  10. <view class="flex-direction">
  11. <view class="align-items-center mb-8">
  12. <view class="fs-36 fc-3 fw-600">
  13. 堂食扫码点餐
  14. </view>
  15. <image class="right-h" src="@/static/img/order-food/right-h.png" mode=""></image>
  16. </view>
  17. <view class="fs-28 fc-9">
  18. 自助下单方便快捷
  19. </view>
  20. </view>
  21. <image class="zh-img" src="@/static/img/order-food/zh-img.png" mode=""></image>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import cartStore from '@/utils/cartStore.js';
  30. import {
  31. appletLogin
  32. } from "@/api/member";
  33. import tools from "@/service/tools";
  34. export default {
  35. components: {},
  36. data() {
  37. return {}
  38. },
  39. onLoad(data) {
  40. // if (data) {
  41. // uni.setStorageSync('shop_id', data.shop_id)
  42. // }
  43. cartStore.clearCurrentShopCart();
  44. },
  45. onShow() {
  46. // uni.setStorageSync('shop_id', 111)
  47. // uni.setStorageSync('table_number', 1)
  48. // this.login()
  49. },
  50. mounted() {},
  51. methods: {
  52. // login() {
  53. // uni.login({
  54. // provider: "weixin",
  55. // success: (loginRes) => {
  56. // this.appletLogin(loginRes.code);
  57. // },
  58. // fail: (loginRes) => {
  59. // this.isAjax = false;
  60. // tools.error("获取授权信息失败");
  61. // },
  62. // });
  63. // },
  64. // appletLogin(code) {
  65. // appletLogin({
  66. // 'code': code
  67. // }).then(res => {
  68. // if (res.code === 1) {
  69. // uni.setStorageSync('token', res.data.token)
  70. // uni.setStorageSync('m_id', res.data.m_id)
  71. // // this.goToUrl()
  72. // }
  73. // })
  74. // },
  75. goToUrl(shop_id) {
  76. uni.reLaunch({
  77. url: '/pages-takeout/new-shop?shop_id=' + shop_id
  78. });
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .qd-bg {
  85. width: 100%;
  86. height: 696rpx;
  87. }
  88. .order-food-box {
  89. position: relative;
  90. }
  91. .order-food {
  92. width: calc(100% - 64rpx);
  93. position: absolute;
  94. left: 32rpx;
  95. top: -90rpx;
  96. }
  97. .bc-FFEDE9-FFF1EE {
  98. background: linear-gradient(90deg, #FFEDE9 0%, #FFF1EE 100%);
  99. }
  100. .zh-img {
  101. width: 148rpx;
  102. height: 148rpx;
  103. }
  104. .right-h {
  105. width: 40rpx;
  106. height: 40rpx;
  107. }
  108. </style>