index.vue 2.1 KB

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